27 #ifndef otbOGRDataSourceWrapper_hxx
28 #define otbOGRDataSourceWrapper_hxx
37 #include "ogrsf_frmts.h"
53 assert(
int(i) < GetLayersCount() &&
"Out-of-range index");
54 OGRLayer* layer_ptr = GetLayerUnchecked(i);
55 assert(layer_ptr &&
"No layer returned by OGR");
61 return const_cast<DataSource*
>(
this)->GetLayer(i);
66 return const_cast<DataSource*
>(
this)->GetLayer(name);
72 return const_cast<DataSource*
>(
this)->GetLayerChecked(i);
77 return const_cast<DataSource*
>(
this)->GetLayerUnchecked(i);
83 template <
class Value>
88 template <
class Value>
93 template <
class Value>
94 template <
class OtherValue>
96 typename boost::enable_if<boost::is_convertible<OtherValue*, Value*>,
enabler>::type)
101 template <
class Value>
102 template <
class OtherValue>
108 template <
class Value>
115 template <
class Value>
123 #endif // otbOGRDataSourceWrapper_hxx