#include <Config.h>
Public Types | |
typedef ContainerIterator< ValueList > | ValueIterator |
typedef ConstContainerIterator< ValueList > | ConstValueIterator |
Public Member Functions | |
Option () | |
Constructs an empty instance. | |
Option (const Option &rhs) | |
Share the values from the given option with this one. | |
void | copy (const Option &rhs) |
Forces a copy of the values from the given Option to this one. | |
const String & | operator[] (size_t index) const |
Operator access to values. | |
String & | operator[] (size_t index) |
Operator access to values. | |
Option & | operator= (const Option &rhs) |
Share the values from the given option with this one. | |
Option & | value (const String &value) |
Defines a new value to be appended. | |
const String & | getValue (size_t index, const String &def="") const |
Returns the value at the given index. | |
void | removeValue (size_t index) |
Removes the value at the given index. | |
size_t | getValueCount () const |
Returns the current number of values. | |
ValueIterator | getValueIterator () |
Provides iterator access to the values. | |
ConstValueIterator | getValueIterator () const |
Provides iterator access to the values. | |
template<class Archive> | |
void | serialize (Archive &ar, const unsigned int version) |
This is an archiver function for options. | |
Protected Types | |
typedef std::vector< String > | ValueList |
typedef boost::shared_ptr< OptionData > | OptionDataPtr |
Protected Attributes | |
OptionDataPtr | _ptr |
Friends | |
class | Config |
Classes | |
struct | OptionData |
This class represents a configuration option, that may contains multiple assigned values. The Option uses strings to store data in a generic format.
|
|
|
|
|
|
|
|
|
Constructs an empty instance.
|
|
Share the values from the given option with this one.
|
|
Forces a copy of the values from the given Option to this one. This function will explicitely copy all values to this Option.
|
|
Returns the value at the given index. This function attempts to return the value at the given index. If no value is found, then the function will return the provided default value.
|
|
Returns the current number of values.
|
|
Provides iterator access to the values.
|
|
Provides iterator access to the values.
|
|
Share the values from the given option with this one.
|
|
Operator access to values.
|
|
Operator access to values.
|
|
Removes the value at the given index.
|
|
This is an archiver function for options.
|
|
Defines a new value to be appended. Appends a new value to the end of the list of values. This function returns an Option to allow for chaining.
|
|
|
|
|