Class AttributesBucket#

Class Documentation#

class AttributesBucket#

A class is a collection of int and double key(string)-value pairs. Users have to keep in mind that operations with dictionaries are slow.

Public Functions

AttributesBucket()#

Constructor for an empty dictinary.

~AttributesBucket()#

Destructor.

int intVal(const std::string attName)#

Returns the int value from the dictionary for the key string.

double doubleVal(const std::string attName)#

Returns the double value from the dictionary for the key string.

int intVal(const std::string attName, int val)#

Sets the int value to the dictionary for the key string.

double doubleVal(const std::string attName, double val)#

Sets the double value to the dictionary for the key string.

int hasIntAttribute(const std::string attName)#

Returns 0 if there is no attribute associated with this name

int hasDoubleAttribute(const std::string attName)#

Returns 0 if there is no attribute associated with this name

void getIntAttributeNames(std::vector<std::string> &names)#

Returns a vector with integer attributes keys.

void getDoubleAttributeNames(std::vector<std::string> &names)#

Returns a vector with doule attributes keys.

void addTo(AttributesBucket *bckt)#

Adds all atributes from one bucket to another.

void clear()#

Removes all values from the dictionary.