dtn::NamedAttribute Class Reference

Class for a generic list of attributes/parameters, used for various configuration functions. More...

#include <NamedAttribute.h>

List of all members.

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_


Detailed Description

Class for a generic list of attributes/parameters, used for various configuration functions.

Definition at line 48 of file NamedAttribute.h.


Member Enumeration Documentation

Attribute Types.

Enumerator:
ATTRIBUTE_TYPE_INVALID 
ATTRIBUTE_TYPE_INTEGER 
ATTRIBUTE_TYPE_UNSIGNED_INTEGER 
ATTRIBUTE_TYPE_BOOLEAN 
ATTRIBUTE_TYPE_STRING 

Definition at line 53 of file NamedAttribute.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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]

Definition at line 102 of file NamedAttribute.h.

References dtn::AttributeName::name(), and name_.

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]

Definition at line 103 of file NamedAttribute.h.

References type_.

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_.


Member Data Documentation

Definition at line 145 of file NamedAttribute.h.

Referenced by bool_val().

Definition at line 143 of file NamedAttribute.h.

Referenced by int_val().

Definition at line 139 of file NamedAttribute.h.

Referenced by name().

std::string dtn::NamedAttribute::sval_ [private]

Definition at line 146 of file NamedAttribute.h.

Referenced by string_val().

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]

Definition at line 144 of file NamedAttribute.h.

Referenced by u_int_val().


The documentation for this class was generated from the following file:

Generated on Fri Jan 30 09:43:14 2009 for DTN Reference Implementation by  doxygen 1.5.8