18 #ifndef __otbOGRFeatureWrapper_txx
19 #define __otbOGRFeatureWrapper_txx
25 #include <boost/version.hpp>
26 #if BOOST_VERSION >= 104800
27 # include <boost/move/move.hpp>
29 # include <boost/interprocess/detail/move.hpp>
34 #if BOOST_VERSION >= 104800
37 using boost::interprocess::move;
55 UncheckedSetFrom(rhs, mustForgive);
62 UncheckedSetFrom(rhs, map, mustForgive);
71 assert(index < GetSize() &&
"out of range field-index.");
72 return UncheckedGetElement(index);
78 return const_cast<Feature*
>(
this)->
operator[](index);
85 return UncheckedGetElement(name);
91 return const_cast<Feature*
>(
this)->
operator[](name);
97 assert(index < GetSize() &&
"out of range field-index.");
98 return UncheckedGetFieldDefn(index);
105 return UncheckedGetFieldDefn(name);
112 return UncheckedGetFieldIndex(name);
122 return UncheckedGetFID();
129 UncheckedSetFID(fid);
136 return UncheckedGetDefn();
146 OGRGeometry * g = geometry.get();
147 UncheckedSetGeometryDirectly(otb::move(geometry));
148 assert(m_Feature->GetGeometryRef() == g &&
"The new geometry hasn't been set as expected");
149 assert(! geometry &&
"UniqueGeometryPtr hasn't released its pointer");
157 assert(! m_Feature->GetGeometryRef() &&
"Geometry hasn't been properly stolen");
158 return otb::move(res);
165 UncheckedSetGeometry(geometry);
172 return UncheckedGetGeometry();
196 UncheckedPrintSelf(os, indent);
203 assert(m_Feature &&
"OGRFeature can't be null");
206 #endif // __otbOGRFeatureWrapper_txx