ISIS Core Library 0.7.2 (api 3.0.0)
|
Here, a Selection is one of our types (see types.hpp) and meant as an enumeration of "things" described by strings, e.g. More...
#include <selection.hpp>
Public Member Functions | |
std::list< util::istring > | getEntries () const |
operator int () const | |
Implicit cast to int. | |
operator std::string () const | |
Implicit cast to string. | |
operator util::istring () const | |
Implicit cast to istring. | |
bool | operator== (const Selection &ref) const |
Common comparison. | |
bool | operator== (const char ref[]) const |
String comparison. | |
bool | operator== (const int ref) const |
Number comparison. | |
Selection () | |
Fallback contructor to enable creation of empty selections. | |
template<typename T > | |
Selection (const std::map< T, std::string > &map) | |
Default constructor. | |
Selection (const char *entries, const char *init_val="") | |
Default constructor. | |
bool | set (const char *entry) |
Set the selection to the given type. | |
bool | set (unsigned short entry) |
Here, a Selection is one of our types (see types.hpp) and meant as an enumeration of "things" described by strings, e.g.
properties for easy acces of several properties from a PopertyMap. It's using isis::util::istring, therefore the options are CASE INSENSITIVE.
Definition at line 39 of file selection.hpp.
isis::util::Selection::Selection | ( | const char * | entries, |
const char * | init_val = "" |
||
) |
Default constructor.
Creates a selection with the given options.
entries | comma separated list of the options as a string |
init_val | the string which should be selected after initialisation (must be one from entries) |
Definition at line 18 of file selection.cpp.
isis::util::Selection::Selection | ( | const std::map< T, std::string > & | map | ) |
Default constructor.
Creates a selection from a number-option map.
map | a map which maps specific numbers (must not be 0) to options to be used |
Definition at line 104 of file selection.hpp.
isis::util::Selection::Selection | ( | ) |
Fallback contructor to enable creation of empty selections.
Definition at line 32 of file selection.cpp.
std::list< util::istring > isis::util::Selection::getEntries | ( | ) | const |
Definition at line 86 of file selection.cpp.
isis::util::Selection::operator int | ( | ) | const |
Implicit cast to int.
The numbers correspont to the order the options where given at the creation of the selection (first option -> 1, second option -> 2 ...)
Definition at line 34 of file selection.cpp.
isis::util::Selection::operator std::string | ( | ) | const |
Implicit cast to string.
Definition at line 43 of file selection.cpp.
isis::util::Selection::operator util::istring | ( | ) | const |
Implicit cast to istring.
Definition at line 35 of file selection.cpp.
bool isis::util::Selection::operator== | ( | const char | ref[] | ) | const |
String comparison.
Definition at line 76 of file selection.cpp.
bool isis::util::Selection::operator== | ( | const int | ref | ) | const |
Number comparison.
Definition at line 80 of file selection.cpp.
bool isis::util::Selection::operator== | ( | const Selection & | ref | ) | const |
Common comparison.
Definition at line 72 of file selection.cpp.
bool isis::util::Selection::set | ( | const char * | entry | ) |
Set the selection to the given type.
If the given option does not exist, a runtime error will be send and the selection won't be set.
entry | the option the selection should be set to. |
Definition at line 59 of file selection.cpp.
bool isis::util::Selection::set | ( | unsigned short | entry | ) |
Definition at line 49 of file selection.cpp.