#include <configreader.h>
|
std::string | getString (const std::string &key, const std::string &def="") |
|
long | getInt (const std::string &key, long def=0) |
|
double | getFloat (const std::string &key, double def=0) |
|
bool | getBool (const std::string &key, bool def=false) |
|
bool | readString (const std::string &key, std::string &value, bool allow_newline=false) |
|
std::string | getTagLocation () |
|
const std::vector< KeyVal > & | getItems () const |
|
unsigned int | GetReferenceCount () const |
|
void | refcount_inc () const |
|
bool | refcount_dec () const |
|
|
static ConfigTag * | create (const std::string &Tag, const std::string &file, int line, std::vector< KeyVal > *&Items) |
|
static void * | operator new (size_t, void *m) |
|
static void * | operator new (size_t) |
|
static void | operator delete (void *) |
|
|
const std::string | tag |
|
const std::string | src_name |
|
const int | src_line |
|
Structure representing a single <tag> in config
◆ create()
ConfigTag * ConfigTag::create |
( |
const std::string & |
Tag, |
|
|
const std::string & |
file, |
|
|
int |
line, |
|
|
std::vector< KeyVal > *& |
Items |
|
) |
| |
|
static |
Create a new ConfigTag, giving access to the private KeyVal item list
◆ getBool()
bool ConfigTag::getBool |
( |
const std::string & |
key, |
|
|
bool |
def = false |
|
) |
| |
Get the value of an option, using def if it does not exist
◆ getFloat()
double ConfigTag::getFloat |
( |
const std::string & |
key, |
|
|
double |
def = 0 |
|
) |
| |
Get the value of an option, using def if it does not exist
◆ getInt()
long ConfigTag::getInt |
( |
const std::string & |
key, |
|
|
long |
def = 0 |
|
) |
| |
Get the value of an option, using def if it does not exist
◆ getString()
std::string ConfigTag::getString |
( |
const std::string & |
key, |
|
|
const std::string & |
def = "" |
|
) |
| |
Get the value of an option, using def if it does not exist
◆ readString()
bool ConfigTag::readString |
( |
const std::string & |
key, |
|
|
std::string & |
value, |
|
|
bool |
allow_newline = false |
|
) |
| |
Get the value of an option
- Parameters
-
key | The option to get |
value | The location to store the value (unmodified if does not exist) |
allow_newline | Allow newlines in the option (normally replaced with spaces) |
- Returns
- true if the option exists
The documentation for this class was generated from the following files: