Public Member Functions | |
Attributes () | |
~Attributes () | |
Attributes (const Attributes &other) | |
Attributes & | operator= (const Attributes &other) |
void | networkInterface (const std::string &ifName) |
std::string | getString (const std::string &name) |
void | set (const std::string &name, const std::string &value) |
int64_t | getInt (const std::string &name) |
void | set (const std::string &name, uint64_t value) |
Friends | |
class | Stack |
The default values for attributes may be overridden by setting the environment variable ZF_Attributes. For example:
Definition at line 40 of file TcpDirectAttr.h.
Attributes | ( | ) |
Allocate an attribute object.
The | std::bad_alloc is thrown if the memory could not be allocated. |
The | std::runtime_error if the ZF_Attributes environment variable is malformed. |
~Attributes | ( | ) |
Attributes | ( | const Attributes & | other | ) |
int64_t getInt | ( | const std::string & | name | ) |
Gets the attribute value.
name | The name of the attribute. |
The | std::logic_error is thrown if the name is not a valid attribute name or if the name does not have an integer type. |
std::string getString | ( | const std::string & | name | ) |
Gets the attribute value.
name | The name of the attribute. |
The | std::logic_error is thrown if the name is not a valid attribute name or if the name does not have a string type. |
|
inline |
Sets the network interface name.
Definition at line 57 of file TcpDirectAttr.h.
Attributes & operator= | ( | const Attributes & | other | ) |
void set | ( | const std::string & | name, |
const std::string & | value ) |
Sets an attribute to a string value.
name | The name of the attribute. |
value | The new value for the attribute. |
The | std::logic_error is thrown if the name is not a valid attribute name or if the attribute is not a string attribute. |
void set | ( | const std::string & | name, |
uint64_t | value ) |
Sets an attribute to an integer value.
name | The name of the attribute. |
value | The new value for the attribute. |
The | std::logic_error is thrown if the name is not a valid attribute name. |
The | std::domain_error is thrown if the value is not within the range of values this attribute can take. |
|
friend |
Definition at line 109 of file TcpDirectAttr.h.