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>
Implementation class for Layer iterator.
boost::mpl::if_< boost::is_const< Value >, otb::ogr::DataSource const, otb::ogr::DataSource >::type container_type
Value dereference() const
container_type * m_DataSource
bool equal(layer_iter< OtherValue > const &other) const
Collection of geometric objects.
Layer GetLayerChecked(vcl_size_t i)
GDALDataset * m_DataSource
Layer GetLayer(vcl_size_t i)
OGRLayer * GetLayerUnchecked(vcl_size_t i)
Layer of geometric objects.