21 #ifndef otbOGRFeatureWrapper_hxx
22 #define otbOGRFeatureWrapper_hxx
36 assert(
m_Feature &&
"OGRFeature can't be null");
42 return UncheckedClone();
48 UncheckedSetFrom(rhs, mustForgive);
54 UncheckedSetFrom(rhs, map, mustForgive);
62 assert(index < GetSize() &&
"out of range field-index.");
63 return UncheckedGetElement(index);
68 return const_cast<Feature*
>(
this)->
operator[](index);
74 return UncheckedGetElement(name);
79 return const_cast<Feature*
>(
this)->
operator[](name);
84 assert(index < GetSize() &&
"out of range field-index.");
85 return UncheckedGetFieldDefn(index);
91 return UncheckedGetFieldDefn(name);
97 return UncheckedGetFieldIndex(name);
106 return UncheckedGetFID();
112 UncheckedSetFID(fid);
118 return UncheckedGetDefn();
128 OGRGeometry* g = geometry.get();
130 UncheckedSetGeometryDirectly(std::move(geometry));
131 assert((m_Feature->GetGeometryRef() == g) &&
"The new geometry hasn't been set as expected");
132 assert(!geometry &&
"UniqueGeometryPtr hasn't released its pointer");
139 itkAssertOrThrowMacro(!m_Feature->GetGeometryRef(),
"Geometry hasn't been properly stolen");
146 UncheckedSetGeometry(geometry);
152 return UncheckedGetGeometry();
173 UncheckedPrintSelf(os, indent);
176 #endif // otbOGRFeatureWrapper_hxx