UAPAttribute instances are used to construct a UAP model.
More...
#include <UAPAttribute.hpp>
Public Member Functions | |
| UAPAttribute (const std::string &_name, const std::string &_value) | |
Creates a UAPAttribute with the specified name and value. | |
| void | setName (const std::string &_name) |
| Sets the name of this attribute. | |
| void | setValue (const std::string &_value) |
| Sets the value of this attribute. | |
| std::string | getName () const |
| Returns the name of this attribute. | |
| std::string | getValue () const |
| Returns the value of this attribute. | |
| bool | getInt (int &num) |
| Returns the integer representation of the attribute value. | |
| bool | getDouble (double &num) |
| Returns the real (double) representation of the attribute value. | |
| bool | getBool (bool &num) |
| Returns the logical (bool) representation of the attribute value. | |
| std::string | toString () const |
| Returns a string object representing this attribute. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const UAPAttribute &attr) |
| Overrides the default output stream operator. | |
UAPAttribute instances are used to construct a UAP model.
The UAPAttribute class provides a mutable wrapper for translation so that it is safe to use as an attribute.
Each UAP attribute describes:
The value of an attribute is a string.
Definition at line 46 of file UAPAttribute.hpp.
| UAPAttribute::UAPAttribute | ( | const std::string & | _name, | |
| const std::string & | _value | |||
| ) |
Creates a UAPAttribute with the specified name and value.
| _name | the name | |
| _value | the value |
Definition at line 29 of file UAPAttribute.cpp.
| bool UAPAttribute::getBool | ( | bool & | num | ) |
Returns the logical (bool) representation of the attribute value.
Definition at line 69 of file UAPAttribute.cpp.
| bool UAPAttribute::getDouble | ( | double & | num | ) |
Returns the real (double) representation of the attribute value.
Definition at line 63 of file UAPAttribute.cpp.
| bool UAPAttribute::getInt | ( | int & | num | ) |
Returns the integer representation of the attribute value.
Definition at line 57 of file UAPAttribute.cpp.
| string UAPAttribute::getName | ( | ) | const |
Returns the name of this attribute.
Definition at line 42 of file UAPAttribute.cpp.
| string UAPAttribute::getValue | ( | ) | const |
Returns the value of this attribute.
Definition at line 47 of file UAPAttribute.cpp.
| void UAPAttribute::setName | ( | const std::string & | _name | ) |
Sets the name of this attribute.
| _name | the name |
Definition at line 32 of file UAPAttribute.cpp.
| void UAPAttribute::setValue | ( | const std::string & | _value | ) |
Sets the value of this attribute.
| _value | the value |
Definition at line 37 of file UAPAttribute.cpp.
| string UAPAttribute::toString | ( | ) | const |
Returns a string object representing this attribute.
Definition at line 52 of file UAPAttribute.cpp.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const UAPAttribute & | attr | |||
| ) | [friend] |
Overrides the default output stream operator.
Definition at line 75 of file UAPAttribute.cpp.
1.5.7