#include <options.h>
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 | |
Options & | add (const std::string &key, const std::string &value) |
Options & | add (const std::string &key, double value) |
Options & | add (const std::string &key, int value) |
Options & | add (const std::string &key, bool value) |
const ArrayMap & | arrays () const |
const BoolMap & | bools () const |
void | clear () |
const DoubleMap & | doubles () const |
const mxArray * | getArray (const std::string &key) const |
bool | getBool (const std::string &key, bool default_value=false) const |
const Bools & | getBools (const std::string &key) const |
double | getDouble (const std::string &key, double default_value=0) const |
const Doubles & | getDoubles (const std::string &key) const |
int | getInteger (const std::string &key, int default_value=0) const |
const Integers & | getIntegers (const std::string &key) const |
const std::string & | getString (const std::string &key, const std::string &default_value=std::string()) const |
const Strings & | getStrings (const std::string &key) const |
bool | hasKey (const std::string &key) const |
virtual void | init (int nrhs, const mxArray *prhs[], bool lowerCaseKeys=false) |
const IntegerMap & | integers () const |
void | merge (const Options &options) |
Options () | |
Options (int nrhs, const mxArray *prhs[], bool lowerCaseKeys=false) | |
Options & | set (const std::string &key, const std::string &value) |
Options & | set (const std::string &key, double value) |
Options & | set (const std::string &key, int value) |
Options & | set (const std::string &key, bool value) |
Options & | set (const std::string &key, const mxArray *value) |
const StringMap & | strings () 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_ |
typedef std::map<std::string, const mxArray *> rosmatlab::Options::ArrayMap |
typedef std::map<std::string, Bools> rosmatlab::Options::BoolMap |
typedef std::vector<bool> rosmatlab::Options::Bools |
typedef std::map<std::string, Doubles> rosmatlab::Options::DoubleMap |
typedef std::vector<double> rosmatlab::Options::Doubles |
typedef std::map<std::string, Integers> rosmatlab::Options::IntegerMap |
typedef std::vector<int> rosmatlab::Options::Integers |
typedef std::map<std::string, Strings> rosmatlab::Options::StringMap |
typedef std::vector<std::string> rosmatlab::Options::Strings |
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.
rosmatlab::Options::~Options | ( | ) | [virtual] |
Definition at line 159 of file options.cpp.
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] |
const BoolMap& rosmatlab::Options::bools | ( | ) | const [inline] |
void rosmatlab::Options::clear | ( | ) |
Definition at line 230 of file options.cpp.
const DoubleMap& rosmatlab::Options::doubles | ( | ) | const [inline] |
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] |
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] |
void rosmatlab::Options::throwOnUnused | ( | ) | const |
Definition at line 431 of file options.cpp.
void rosmatlab::Options::warnUnused | ( | ) | const |
Definition at line 412 of file options.cpp.
ArrayMap rosmatlab::Options::arrays_ [private] |
BoolMap rosmatlab::Options::bools_ [private] |
DoubleMap rosmatlab::Options::doubles_ [private] |
IntegerMap rosmatlab::Options::integers_ [private] |
StringMap rosmatlab::Options::strings_ [private] |
std::set<std::string> rosmatlab::Options::used_ [mutable, private] |