Represents a list, or an array, of values.
More...
#include <Configuration.hpp>
|
| List (const libconfig::Setting &s) |
| The constructor. More...
|
|
unsigned int | getSize () const |
| Returns the number of elements in the list. More...
|
|
const Setting | getSetting (const unsigned int index) const |
| Returns the setting object with the given index. More...
|
|
const List | getList (const unsigned int index) const |
| Returns the list with the given index. More...
|
|
template<typename ValueType > |
void | read (const unsigned int index, ValueType *const value) const |
| Reads the specified setting and stores them in the given location. More...
|
|
void | read (const unsigned int index, std::string *const value) const |
| Reads the specified setting and stores it in the given location. More...
|
|
template<typename ValueType > |
ValueType | read (const unsigned int index) const |
| Returns the specified setting from the given configuration file. More...
|
|
Represents a list, or an array, of values.
Definition at line 323 of file Configuration.hpp.
◆ List()
OpenMPCD::Configuration::List::List |
( |
const libconfig::Setting & |
s | ) |
|
|
inline |
The constructor.
The instance is only valid as long as the Configuration instance it originated from is valid.
- Parameters
-
- Exceptions
-
Exception | If OPENMPCD_DEBUG is defined, throws if this setting is neither a list nor an array in the libconfig sense. |
Definition at line 334 of file Configuration.hpp.
◆ getList()
const List OpenMPCD::Configuration::List::getList |
( |
const unsigned int |
index | ) |
const |
|
inline |
Returns the list with the given index.
- Parameters
-
[in] | index | The index to return. |
- Exceptions
-
Definition at line 376 of file Configuration.hpp.
◆ getSetting()
const Setting OpenMPCD::Configuration::List::getSetting |
( |
const unsigned int |
index | ) |
const |
|
inline |
Returns the setting object with the given index.
- Exceptions
-
- Parameters
-
[in] | index | The setting index, starting at 0. |
Definition at line 359 of file Configuration.hpp.
◆ getSize()
unsigned int OpenMPCD::Configuration::List::getSize |
( |
| ) |
const |
|
inline |
◆ read() [1/3]
template<typename ValueType >
ValueType OpenMPCD::Configuration::List::read |
( |
const unsigned int |
index | ) |
const |
|
inline |
Returns the specified setting from the given configuration file.
- Exceptions
-
- Template Parameters
-
ValueType | The type of the settings value. |
- Parameters
-
[in] | index | The setting index |
Definition at line 464 of file Configuration.hpp.
◆ read() [2/3]
void OpenMPCD::Configuration::List::read |
( |
const unsigned int |
index, |
|
|
std::string *const |
value |
|
) |
| const |
|
inline |
Reads the specified setting and stores it in the given location.
- Exceptions
-
- Parameters
-
[in] | index | The setting index. |
[out] | value | The location to read the setting value into. |
Definition at line 434 of file Configuration.hpp.
◆ read() [3/3]
template<typename ValueType >
void OpenMPCD::Configuration::List::read |
( |
const unsigned int |
index, |
|
|
ValueType *const |
value |
|
) |
| const |
|
inline |
Reads the specified setting and stores them in the given location.
- Exceptions
-
- Template Parameters
-
ValueType | The type of the settings value. |
- Parameters
-
[in] | index | The setting index. |
[out] | value | The location to read the setting value into. |
Definition at line 400 of file Configuration.hpp.
The documentation for this class was generated from the following file: