37 std::vector< std::vector< std::string > >
values;
46 bool getItem(
unsigned int index, std::vector< std::string > &item);
51 void add(std::string attribute, std::string value,
bool replace =
false);
63 int getIndex(std::string attr, std::vector<unsigned int> &ids);
73 void getStrings(std::string str, std::vector<std::string> &result);
77 int getInt(std::string str,
int defaultValue = 0);
79 float getFloat(std::string str,
float defaultValue = 0.0);
81 std::string
getString(std::string str, std::string defaultValue =
"");
83 bool getBool(std::string str,
bool defaultValue =
false);
bool getFloatValue(std::string str, float &result)
void copyFrom(DataPairs &other)
Copies all Attribute-Value pairs.
bool getItem(unsigned int index, std::vector< std::string > &item)
int getInt(std::string str, int defaultValue=0)
int getIndex(std::string attr, std::vector< unsigned int > &ids)
Retrieves all indexes of Attribute-Value pairs with Attribute name equal to attr. ...
bool getBoolValue(std::string str, bool &result)
std::string getString(std::string str, std::string defaultValue="")
void resolveString(std::string input, std::string &output)
Data Storage Class (Attribute-Value Pairs)
unsigned int getMaxSize()
Returns Max. number of stored pairs.
int getFirstIndex(std::string str)
void clear()
Clears storage buffer.
bool getBool(std::string str, bool defaultValue=false)
void getStrings(std::string str, std::vector< std::string > &result)
Retrieves all Attribute-Value pairs with Attribute name equal to attr.
bool getStringValue(std::string str, std::string &result)
void print()
Prints all Attribute-Value pairs.
float getFloat(std::string str, float defaultValue=0.0)
bool getIntValue(std::string str, int &result)
void setMaxSize(unsigned int size)
Sets number of storable items to size.
std::vector< std::vector< std::string > > values
Attribute Names and Values.
Configuration file wrapper.
void loadFromXml(CConfiguration &config, TiXmlElement *node, DataPairs *replace=NULL)
unsigned int getLength()
Returns Number of pairs stored.
void add(std::string attribute, std::string value, bool replace=false)
Adds the attribute-value pair attribute, value.