#include <NamedAttribute.h>
Public Types | |
enum | attribute_type_t { ATTRIBUTE_TYPE_INVALID = 0, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_UNSIGNED_INTEGER, ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_STRING } |
Attribute Types. More... | |
Public Member Functions | |
NamedAttribute (const std::string &name, int v) | |
NamedAttribute (const std::string &name, u_int v) | |
NamedAttribute (const std::string &name, bool v) | |
NamedAttribute (const std::string &name, const std::string &v) | |
NamedAttribute (const oasys::Builder &) | |
const std::string & | name () const |
attribute_type_t | type () const |
int | int_val () const |
u_int | u_int_val () const |
bool | bool_val () const |
const std::string & | string_val () const |
Static Public Member Functions | |
static const char * | type_to_str (int type) |
Attribute type to string conversion. | |
Private Attributes | |
AttributeName | name_ |
attribute_type_t | type_ |
int | ival_ |
u_int | uval_ |
bool | bval_ |
std::string | sval_ |
Definition at line 48 of file NamedAttribute.h.
Attribute Types.
ATTRIBUTE_TYPE_INVALID | |
ATTRIBUTE_TYPE_INTEGER | |
ATTRIBUTE_TYPE_UNSIGNED_INTEGER | |
ATTRIBUTE_TYPE_BOOLEAN | |
ATTRIBUTE_TYPE_STRING |
Definition at line 53 of file NamedAttribute.h.
dtn::NamedAttribute::NamedAttribute | ( | const std::string & | name, | |
int | v | |||
) | [inline] |
Definition at line 75 of file NamedAttribute.h.
dtn::NamedAttribute::NamedAttribute | ( | const std::string & | name, | |
u_int | v | |||
) | [inline] |
Definition at line 80 of file NamedAttribute.h.
dtn::NamedAttribute::NamedAttribute | ( | const std::string & | name, | |
bool | v | |||
) | [inline] |
Definition at line 85 of file NamedAttribute.h.
dtn::NamedAttribute::NamedAttribute | ( | const std::string & | name, | |
const std::string & | v | |||
) | [inline] |
Definition at line 90 of file NamedAttribute.h.
dtn::NamedAttribute::NamedAttribute | ( | const oasys::Builder & | ) | [inline] |
Definition at line 96 of file NamedAttribute.h.
bool dtn::NamedAttribute::bool_val | ( | ) | const [inline] |
Definition at line 121 of file NamedAttribute.h.
References ATTRIBUTE_TYPE_BOOLEAN, bval_, type_, and type_to_str().
int dtn::NamedAttribute::int_val | ( | ) | const [inline] |
Definition at line 105 of file NamedAttribute.h.
References ATTRIBUTE_TYPE_INTEGER, ival_, type_, and type_to_str().
const std::string& dtn::NamedAttribute::name | ( | ) | const [inline] |
const std::string& dtn::NamedAttribute::string_val | ( | ) | const [inline] |
Definition at line 129 of file NamedAttribute.h.
References ATTRIBUTE_TYPE_STRING, sval_, type_, and type_to_str().
attribute_type_t dtn::NamedAttribute::type | ( | ) | const [inline] |
static const char* dtn::NamedAttribute::type_to_str | ( | int | type | ) | [inline, static] |
Attribute type to string conversion.
Definition at line 64 of file NamedAttribute.h.
References ATTRIBUTE_TYPE_BOOLEAN, ATTRIBUTE_TYPE_INTEGER, ATTRIBUTE_TYPE_INVALID, ATTRIBUTE_TYPE_STRING, and ATTRIBUTE_TYPE_UNSIGNED_INTEGER.
Referenced by bool_val(), int_val(), string_val(), and u_int_val().
u_int dtn::NamedAttribute::u_int_val | ( | ) | const [inline] |
Definition at line 113 of file NamedAttribute.h.
References ATTRIBUTE_TYPE_UNSIGNED_INTEGER, type_, type_to_str(), and uval_.
bool dtn::NamedAttribute::bval_ [private] |
int dtn::NamedAttribute::ival_ [private] |
AttributeName dtn::NamedAttribute::name_ [private] |
std::string dtn::NamedAttribute::sval_ [private] |
attribute_type_t dtn::NamedAttribute::type_ [private] |
Definition at line 141 of file NamedAttribute.h.
Referenced by bool_val(), int_val(), string_val(), type(), and u_int_val().
u_int dtn::NamedAttribute::uval_ [private] |