Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: OpenGIS Simple Features Reference Implementation 4 : * Purpose: Defines OGRLayerWithTranslateFeature class 5 : * Author: Even Rouault, even dot rouault at spatialys.com 6 : * 7 : ****************************************************************************** 8 : * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com> 9 : * 10 : * SPDX-License-Identifier: MIT 11 : ****************************************************************************/ 12 : 13 : #ifndef OGRLAYERWITHTRANSLATEFEATURE_H_INCLUDED 14 : #define OGRLAYERWITHTRANSLATEFEATURE_H_INCLUDED 15 : 16 : #ifndef DOXYGEN_SKIP 17 : 18 : #include "ogrsf_frmts.h" 19 : 20 : /** Class that just extends by OGRLayer by mandating a pure virtual method 21 : * TranslateFeature() to be implemented. 22 : */ 23 64 : class OGRLayerWithTranslateFeature /* non final */ : virtual public OGRLayer 24 : { 25 : public: 26 : virtual ~OGRLayerWithTranslateFeature(); 27 : 28 : /** Translate the source feature into one or several output features */ 29 : virtual void TranslateFeature( 30 : std::unique_ptr<OGRFeature> poSrcFeature, 31 : std::vector<std::unique_ptr<OGRFeature>> &apoOutFeatures) = 0; 32 : }; 33 : 34 : #endif /* DOXYGEN_SKIP */ 35 : 36 : #endif /* OGRLAYERWITHTRANSLATEFEATURE_H_INCLUDED */