OTB  6.7.0
Orfeo Toolbox
Public Member Functions | List of all members
otb::ogr::StringListConverter Class Reference

#include <otbOGRHelpers.h>

+ Collaboration diagram for otb::ogr::StringListConverter:

Public Member Functions

template<class ContainerType >
 StringListConverter (ContainerType const &strings)
std::vector< char const * > m_raw
char ** to_ogr () const

Detailed Description

Helper class to convert a set of standard C++ string into char** as OGR API expects.


std::vector<std::string> options;
new otb::ogr::DataSource("name.shp", StringListConverter(options).to_ogr());
OTB v 3.14.0
Have DataSource constructor receive a std::vector<std::string>, or even more precide types.

Definition at line 73 of file otbOGRHelpers.h.

Constructor & Destructor Documentation

template<class ContainerType >
otb::ogr::StringListConverter::StringListConverter ( ContainerType const &  strings)

Init constructor.

Template Parameters
ContainerTypeAny container matching C++ convention for standard containers (have a value_type, begin(), end()).
[in]stringslist of strings to convert
std::bad_allocPrepares m_raw with to contain a list of strings that can be seen as a 0-terminated array of char*.

Definition at line 88 of file otbOGRHelpers.h.

Member Function Documentation

char** otb::ogr::StringListConverter::to_ogr ( ) const

Access to the OGR compliant list of strings.

Definition at line 103 of file otbOGRHelpers.h.

Referenced by otb::OGRDataSourceToLabelImageFilter< TOutputImage >::GenerateData().

Member Data Documentation

std::vector<char const*> otb::ogr::StringListConverter::m_raw

Access to the OGR compliant list of strings.

Definition at line 110 of file otbOGRHelpers.h.

The documentation for this class was generated from the following file: