Public Member Functions | |
| DataStack (const std::string &name) | |
| Constructor. | |
| ~DataStack () | |
| Deconstructor. | |
| void | init () |
| Initialises the DataStack. | |
| void | clear () |
| Clears the DataStack. | |
| void | refAdd () |
| Increases the reference counter. | |
| void | refRelease () |
| Decreases the reference counter. | |
| 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 | removeAll () |
| 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. | |
Static Public Member Functions | |
| static DataStack * | refFactory (const std::string &name) |
| Will be used to instanciate objects of this class. | |
Definition at line 32 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 97 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 165 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 277 of file DataStack.cpp.
| void DataStack::refAdd | ( | ) |
Increases the reference counter.
Definition at line 59 of file DataStack.cpp.
| DataStack * DataStack::refFactory | ( | const std::string & | name | ) | [static] |
Will be used to instanciate objects of this class.
Definition at line 53 of file DataStack.cpp.
| void DataStack::refRelease | ( | ) |
Decreases the reference counter.
Definition at line 65 of file DataStack.cpp.
| void DataStack::removeAll | ( | ) |
| bool DataStack::removeVar | ( | const std::string & | name | ) |
Removes the variable with the given name.
| name | Name of the variable. |
Definition at line 114 of file DataStack.cpp.
| 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 129 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 244 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 74 of file DataStack.h.
1.5.8