#include <OptionsList.h>
|
| | OptionsList (std::shared_ptr< const OptionsList > Parent=nullptr) |
| |
| void | SetOption (const std::string &str, const std::string delim="=") |
| |
| void | SetOptions (const std::string &str, const std::string optdelim=",", const std::string valdelim="=") |
| |
| bool | HasOption (const std::string &key) const |
| | HasOption. More...
|
| |
| bool | HasOptionStartsWith (const std::string &key) const |
| | HasOptionStartsWith. More...
|
| |
| std::string | OptionStartsWith (const std::string &key) const |
| | OptionStartsWith. More...
|
| |
| bool | HasUnusedOptionStartsWith (const std::string &key) const |
| | HasUnusedOptionStartsWith. More...
|
| |
| std::string | UnusedOptionStartsWith (const std::string &key) const |
| | UnusedOptionStartsWith. More...
|
| |
| std::string | Flatten () const |
| | Flatten. More...
|
| |
| std::set< std::string > | GetUnused () const |
| | GetUnused. More...
|
| |
| std::set< std::string > | GetNotFound () const |
| |
| template<typename T > |
| T | Get (const std::string &key, const T &def_value=T()) const |
| | main method to retrieve options, already parsed to requested type More...
|
| |
| template<> |
| bool | Get (const string &key, const bool &def_value) const |
| |
| template<> |
| bool | Get (const std::string &key, const bool &def_value) const |
| |
|
| std::string | GetOption (const std::string &key) const |
| |
◆ notfound_t
◆ options_t
◆ OptionsList()
| OptionsList::OptionsList |
( |
std::shared_ptr< const OptionsList > |
Parent = nullptr | ) |
|
◆ Flatten()
| string OptionsList::Flatten |
( |
| ) |
const |
Flatten.
- Returns
- the instance as string representation
◆ Get() [1/3]
template<typename T >
| T ant::OptionsList::Get |
( |
const std::string & |
key, |
|
|
const T & |
def_value = T() |
|
) |
| const |
|
inline |
main method to retrieve options, already parsed to requested type
- Returns
- the parsed value on success, or the default value
◆ Get() [2/3]
template<>
| bool ant::OptionsList::Get |
( |
const std::string & |
key, |
|
|
const bool & |
def_value |
|
) |
| const |
◆ Get() [3/3]
template<>
| bool ant::OptionsList::Get |
( |
const string & |
key, |
|
|
const bool & |
def_value |
|
) |
| const |
◆ GetNotFound()
| std::set< string > OptionsList::GetNotFound |
( |
| ) |
const |
◆ GetOption()
| string OptionsList::GetOption |
( |
const std::string & |
key | ) |
const |
|
protected |
◆ GetUnused()
| std::set< string > OptionsList::GetUnused |
( |
| ) |
const |
GetUnused.
- Returns
- string representations of options which were not used by GetOption
◆ HasOption()
| bool OptionsList::HasOption |
( |
const std::string & |
key | ) |
const |
HasOption.
- Parameters
-
- Returns
- bool if the option is set
◆ HasOptionStartsWith()
| bool OptionsList::HasOptionStartsWith |
( |
const std::string & |
key | ) |
const |
HasOptionStartsWith.
- Parameters
-
- Returns
- bool if the option starts with the given string parameter key
◆ HasUnusedOptionStartsWith()
| bool OptionsList::HasUnusedOptionStartsWith |
( |
const std::string & |
key | ) |
const |
HasUnusedOptionStartsWith.
- Parameters
-
- Returns
- bool if there's an unused option starting with the given string parameter key
◆ OptionStartsWith()
| string OptionsList::OptionStartsWith |
( |
const std::string & |
key | ) |
const |
OptionStartsWith.
- Parameters
-
- Returns
- string with option key if it starts with the given string parameter key
◆ SetOption()
| void OptionsList::SetOption |
( |
const std::string & |
str, |
|
|
const std::string |
delim = "=" |
|
) |
| |
◆ SetOptions()
| void OptionsList::SetOptions |
( |
const std::string & |
str, |
|
|
const std::string |
optdelim = ",", |
|
|
const std::string |
valdelim = "=" |
|
) |
| |
◆ UnusedOptionStartsWith()
| string OptionsList::UnusedOptionStartsWith |
( |
const std::string & |
key | ) |
const |
UnusedOptionStartsWith.
- Parameters
-
- Returns
- string unused option key if it starts with the given string parameter key
◆ notfound
| std::unique_ptr< notfound_t > ant::OptionsList::notfound |
|
protected |
◆ options
| std::unique_ptr< options_t > ant::OptionsList::options |
|
protected |
◆ parent
The documentation for this class was generated from the following files: