

Public Member Functions | |
| DataStack (const std::string &name) | |
| Constructor. | |
| ~DataStack () | |
| Deconstructor. | |
| void | init () |
| Initialises the DataStack. | |
| void | clear () |
| Clears the DataStack. | |
| u32 | getID () const |
| Gets the ID of the DataStack. | |
| const std::string & | getName () const |
| Gets the name of the DataStack. | |
| u32 | getSize () const |
| Gets the number of variables on the DataStack. | |
| template<typename T > | |
| bool | setVar (const std::string &name, const T &value) |
| Sets the variable with the given name. | |
| template<typename T > | |
| T | getVar (const std::string &name) |
| Gets the variable with the given name. | |
| std::string | getVar (const std::string &name) |
| Gets the variable with the given name. | |
| void | removeVars () |
| Removes all variables from this DataStack. | |
| bool | removeVar (const std::string &name) |
| Removes the variable with the given name. | |
| bool | saveBencode (const std::string &fileName) |
| Saves the DataStack as a bencoded file. | |
| bool | loadBencode (const std::string &fileName) |
| Loads the DataStack from a bencoded file. | |
| bool | saveXML (const std::string &fileName) |
| Saves the DataStack as a XML file. | |
| bool | loadXML (const std::string &fileName) |
| Loads the DataStack from a XML file. | |
Definition at line 33 of file DataStack.h.
| DataStack::DataStack | ( | const std::string & | name | ) |
| DataStack::~DataStack | ( | ) |
| void DataStack::clear | ( | ) |
| u32 DataStack::getID | ( | ) | const |
| const std::string & DataStack::getName | ( | ) | const |
| u32 DataStack::getSize | ( | ) | const |
| std::string DataStack::getVar | ( | const std::string & | name | ) |
Gets the variable with the given name.
| name | Name of the variable. |
| std::string DataStack::getVar | ( | const std::string & | name | ) | [inline] |
Gets the variable with the given name.
| name | Name of the variable. |
Definition at line 87 of file DataStack.h.
| void DataStack::init | ( | ) |
| bool DataStack::loadBencode | ( | const std::string & | fileName | ) |
Loads the DataStack from a bencoded file.
| fileName | Filename of the file where the data is retrieved from. |
Definition at line 143 of file DataStack.cpp.
| bool DataStack::loadXML | ( | const std::string & | fileName | ) |
Loads the DataStack from a XML file.
| fileName | Filename of the file where the data is retrieved from. |
Definition at line 255 of file DataStack.cpp.
| bool DataStack::removeVar | ( | const std::string & | name | ) |
Removes the variable with the given name.
| name | Name of the variable. |
Definition at line 92 of file DataStack.cpp.
| void DataStack::removeVars | ( | ) |
| bool DataStack::saveBencode | ( | const std::string & | fileName | ) |
Saves the DataStack as a bencoded file.
| fileName | Filename of the file where the data is stored in. |
Definition at line 107 of file DataStack.cpp.
| bool DataStack::saveXML | ( | const std::string & | fileName | ) |
Saves the DataStack as a XML file.
| fileName | Filename of the file where the data is stored in. |
Definition at line 222 of file DataStack.cpp.
| bool DataStack::setVar | ( | const std::string & | name, | |
| const T & | value | |||
| ) | [inline] |
Sets the variable with the given name.
| name | Name of the variable to set. | |
| value | Value of the variable. |
Definition at line 64 of file DataStack.h.
1.5.8