Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
rosmatlab::Options Class Reference

#include <options.h>

Inheritance diagram for rosmatlab::Options:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::map< std::string,
const mxArray * > 
ArrayMap
typedef std::map< std::string,
Bools
BoolMap
typedef std::vector< bool > Bools
typedef std::map< std::string,
Doubles
DoubleMap
typedef std::vector< double > Doubles
typedef std::map< std::string,
Integers
IntegerMap
typedef std::vector< int > Integers
typedef std::map< std::string,
Strings
StringMap
typedef std::vector< std::string > Strings

Public Member Functions

Optionsadd (const std::string &key, const std::string &value)
Optionsadd (const std::string &key, double value)
Optionsadd (const std::string &key, int value)
Optionsadd (const std::string &key, bool value)
const ArrayMaparrays () const
const BoolMapbools () const
void clear ()
const DoubleMapdoubles () const
const mxArray * getArray (const std::string &key) const
bool getBool (const std::string &key, bool default_value=false) const
const BoolsgetBools (const std::string &key) const
double getDouble (const std::string &key, double default_value=0) const
const DoublesgetDoubles (const std::string &key) const
int getInteger (const std::string &key, int default_value=0) const
const IntegersgetIntegers (const std::string &key) const
const std::string & getString (const std::string &key, const std::string &default_value=std::string()) const
const StringsgetStrings (const std::string &key) const
bool hasKey (const std::string &key) const
virtual void init (int nrhs, const mxArray *prhs[], bool lowerCaseKeys=false)
const IntegerMapintegers () const
void merge (const Options &options)
 Options ()
 Options (int nrhs, const mxArray *prhs[], bool lowerCaseKeys=false)
Optionsset (const std::string &key, const std::string &value)
Optionsset (const std::string &key, double value)
Optionsset (const std::string &key, int value)
Optionsset (const std::string &key, bool value)
Optionsset (const std::string &key, const mxArray *value)
const StringMapstrings () const
void throwOnUnused () const
void warnUnused () const
virtual ~Options ()

Static Public Member Functions

static double getDoubleScalar (const mxArray *value)
static int getIntegerScalar (const mxArray *value)
static bool getLogicalScalar (const mxArray *value)
static std::string getString (const mxArray *value)
static bool isDoubleScalar (const mxArray *value)
static bool isIntegerScalar (const mxArray *value)
static bool isLogicalScalar (const mxArray *value)
static bool isScalar (const mxArray *value)
static bool isString (const mxArray *value)

Private Attributes

ArrayMap arrays_
BoolMap bools_
DoubleMap doubles_
IntegerMap integers_
StringMap strings_
std::set< std::string > used_

Detailed Description

Definition at line 39 of file options.h.


Member Typedef Documentation

typedef std::map<std::string, const mxArray *> rosmatlab::Options::ArrayMap

Definition at line 57 of file options.h.

typedef std::map<std::string, Bools> rosmatlab::Options::BoolMap

Definition at line 66 of file options.h.

typedef std::vector<bool> rosmatlab::Options::Bools

Definition at line 65 of file options.h.

typedef std::map<std::string, Doubles> rosmatlab::Options::DoubleMap

Definition at line 62 of file options.h.

typedef std::vector<double> rosmatlab::Options::Doubles

Definition at line 61 of file options.h.

typedef std::map<std::string, Integers> rosmatlab::Options::IntegerMap

Definition at line 64 of file options.h.

typedef std::vector<int> rosmatlab::Options::Integers

Definition at line 63 of file options.h.

typedef std::map<std::string, Strings> rosmatlab::Options::StringMap

Definition at line 60 of file options.h.

typedef std::vector<std::string> rosmatlab::Options::Strings

Definition at line 59 of file options.h.


Constructor & Destructor Documentation

Definition at line 150 of file options.cpp.

rosmatlab::Options::Options ( int  nrhs,
const mxArray *  prhs[],
bool  lowerCaseKeys = false 
)

Definition at line 154 of file options.cpp.

Definition at line 159 of file options.cpp.


Member Function Documentation

Options & rosmatlab::Options::add ( const std::string &  key,
const std::string &  value 
)

Definition at line 364 of file options.cpp.

Options & rosmatlab::Options::add ( const std::string &  key,
double  value 
)

Definition at line 370 of file options.cpp.

Options & rosmatlab::Options::add ( const std::string &  key,
int  value 
)

Definition at line 376 of file options.cpp.

Options & rosmatlab::Options::add ( const std::string &  key,
bool  value 
)

Definition at line 382 of file options.cpp.

const ArrayMap& rosmatlab::Options::arrays ( ) const [inline]

Definition at line 104 of file options.h.

const BoolMap& rosmatlab::Options::bools ( ) const [inline]

Definition at line 108 of file options.h.

Definition at line 230 of file options.cpp.

const DoubleMap& rosmatlab::Options::doubles ( ) const [inline]

Definition at line 106 of file options.h.

const mxArray * rosmatlab::Options::getArray ( const std::string &  key) const

Definition at line 245 of file options.cpp.

bool rosmatlab::Options::getBool ( const std::string &  key,
bool  default_value = false 
) const

Definition at line 316 of file options.cpp.

const Options::Bools & rosmatlab::Options::getBools ( const std::string &  key) const

Definition at line 329 of file options.cpp.

double rosmatlab::Options::getDouble ( const std::string &  key,
double  default_value = 0 
) const

Definition at line 274 of file options.cpp.

const Options::Doubles & rosmatlab::Options::getDoubles ( const std::string &  key) const

Definition at line 283 of file options.cpp.

double rosmatlab::Options::getDoubleScalar ( const mxArray *  value) [static]

Definition at line 106 of file options.cpp.

int rosmatlab::Options::getInteger ( const std::string &  key,
int  default_value = 0 
) const

Definition at line 293 of file options.cpp.

const Options::Integers & rosmatlab::Options::getIntegers ( const std::string &  key) const

Definition at line 306 of file options.cpp.

int rosmatlab::Options::getIntegerScalar ( const mxArray *  value) [static]

Definition at line 132 of file options.cpp.

bool rosmatlab::Options::getLogicalScalar ( const mxArray *  value) [static]

Definition at line 142 of file options.cpp.

std::string rosmatlab::Options::getString ( const mxArray *  value) [static]

Definition at line 83 of file options.cpp.

const std::string & rosmatlab::Options::getString ( const std::string &  key,
const std::string &  default_value = std::string() 
) const

Definition at line 254 of file options.cpp.

const Options::Strings & rosmatlab::Options::getStrings ( const std::string &  key) const

Definition at line 263 of file options.cpp.

bool rosmatlab::Options::hasKey ( const std::string &  key) const

Definition at line 240 of file options.cpp.

void rosmatlab::Options::init ( int  nrhs,
const mxArray *  prhs[],
bool  lowerCaseKeys = false 
) [virtual]

Definition at line 163 of file options.cpp.

const IntegerMap& rosmatlab::Options::integers ( ) const [inline]

Definition at line 107 of file options.h.

bool rosmatlab::Options::isDoubleScalar ( const mxArray *  value) [static]

Definition at line 92 of file options.cpp.

bool rosmatlab::Options::isIntegerScalar ( const mxArray *  value) [static]

Definition at line 111 of file options.cpp.

bool rosmatlab::Options::isLogicalScalar ( const mxArray *  value) [static]

Definition at line 137 of file options.cpp.

bool rosmatlab::Options::isScalar ( const mxArray *  value) [static]

Definition at line 73 of file options.cpp.

bool rosmatlab::Options::isString ( const mxArray *  value) [static]

Definition at line 78 of file options.cpp.

void rosmatlab::Options::merge ( const Options options)

Definition at line 201 of file options.cpp.

Options & rosmatlab::Options::set ( const std::string &  key,
const std::string &  value 
)

Definition at line 340 of file options.cpp.

Options & rosmatlab::Options::set ( const std::string &  key,
double  value 
)

Definition at line 346 of file options.cpp.

Options & rosmatlab::Options::set ( const std::string &  key,
int  value 
)

Definition at line 352 of file options.cpp.

Options & rosmatlab::Options::set ( const std::string &  key,
bool  value 
)

Definition at line 358 of file options.cpp.

Options & rosmatlab::Options::set ( const std::string &  key,
const mxArray *  value 
)

Definition at line 388 of file options.cpp.

const StringMap& rosmatlab::Options::strings ( ) const [inline]

Definition at line 105 of file options.h.

Definition at line 431 of file options.cpp.

Definition at line 412 of file options.cpp.


Member Data Documentation

Definition at line 111 of file options.h.

Definition at line 115 of file options.h.

Definition at line 113 of file options.h.

Definition at line 114 of file options.h.

Definition at line 112 of file options.h.

std::set<std::string> rosmatlab::Options::used_ [mutable, private]

Definition at line 117 of file options.h.


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


rosmatlab
Author(s): Johannes Meyer
autogenerated on Fri Jul 25 2014 06:08:36