XrlAtom Class Reference

List of all members.


struct  BadName
struct  NoData
struct  WrongType

Public Member Functions

 XrlAtom (XrlAtomType t)
 XrlAtom (const string &name, XrlAtomType t) throw (BadName)
 XrlAtom (const char *name, XrlAtomType t) throw (BadName)
 XrlAtom (const string &name, XrlAtomType t, const string &serialized_data) throw (InvalidString)
 XrlAtom (const char *name, XrlAtomType t, const string &serialized_data) throw (InvalidString)
 XrlAtom (const char *) throw (InvalidString, BadName)
 Construct an XrlAtom from it's serialized character representation.
 XrlAtom (const int32_t &value)
 XrlAtom (const char *name, int32_t value) throw (BadName)
 XrlAtom (const bool &value)
 XrlAtom (const char *name, bool value) throw (BadName)
 XrlAtom (const uint32_t &value)
 XrlAtom (const char *name, uint32_t value) throw (BadName)
 XrlAtom (const IPv4 &addr)
 XrlAtom (const char *name, const IPv4 &addr) throw (BadName)
 XrlAtom (const IPv4Net &subnet)
 XrlAtom (const char *name, const IPv4Net &subnet) throw (BadName)
 XrlAtom (const IPv6 &addr)
 XrlAtom (const char *name, const IPv6 &addr) throw (BadName)
 XrlAtom (const IPv6Net &subnet)
 XrlAtom (const char *name, const IPv6Net &subnet) throw (BadName)
 XrlAtom (const char *name, const IPvX &ipvx) throw (BadName)
 XrlAtom (const char *name, const IPvXNet &ipvxnet) throw (BadName)
 XrlAtom (const Mac &mac)
 XrlAtom (const char *name, const Mac &mac) throw (BadName)
 XrlAtom (const string &txt)
 XrlAtom (const char *name, const string &txt) throw (BadName)
 XrlAtom (const XrlAtomList &l)
 XrlAtom (const char *name, const XrlAtomList &l) throw (BadName)
 XrlAtom (const char *name, const vector< uint8_t > &data)
 XrlAtom (const char *name, const uint8_t *data, size_t data_bytes)
 XrlAtom (const vector< uint8_t > &data)
 XrlAtom (const uint8_t *data, size_t data_bytes)
 XrlAtom (const int64_t &value)
 XrlAtom (const char *name, int64_t value) throw (BadName)
 XrlAtom (const uint64_t &value)
 XrlAtom (const char *name, uint64_t value) throw (BadName)
 XrlAtom (const fp64_t &value)
 XrlAtom (const char *name, fp64_t value) throw (BadName)
 XrlAtom (const XrlAtom &x)
XrlAtomoperator= (const XrlAtom &x)
void copy (const XrlAtom &x)
const string & name () const
void set_name (const string &n) throw (BadName)
string str () const
const char * type_name () const
const string value () const
const bool & has_data () const
const XrlAtomType & type () const
const bool & boolean () const throw (NoData, WrongType)
const int32_t & int32 () const throw (NoData, WrongType)
const uint32_t & uint32 () const throw (NoData, WrongType)
const IPv4ipv4 () const throw (NoData, WrongType)
const IPv4Netipv4net () const throw (NoData, WrongType)
const IPv6ipv6 () const throw (NoData, WrongType)
const IPv6Netipv6net () const throw (NoData, WrongType)
const IPvX ipvx () const throw (NoData, WrongType)
const IPvXNet ipvxnet () const throw (NoData, WrongType)
const Macmac () const throw (NoData, WrongType)
const string & text () const throw (NoData, WrongType)
const XrlAtomListlist () const throw (NoData, WrongType)
const vector< uint8_t > & binary () const throw (NoData, WrongType)
const int64_t & int64 () const throw (NoData, WrongType)
const uint64_t & uint64 () const throw (NoData, WrongType)
const fp64_t & fp64 () const throw (NoData, WrongType)
 SET (vector< uint8_t >, _binary,&)
void set (const IPv4 &v)
void set (const IPv4Net &v)
bool operator== (const XrlAtom &x) const
bool packed_bytes_fixed () const
size_t packed_bytes () const
size_t pack (uint8_t *buffer, size_t bytes_available) const
size_t unpack (const uint8_t *buffer, size_t buffer_bytes)

Static Public Member Functions

static bool valid_type (const string &s)
static bool valid_name (const string &s)
static XrlAtomType lookup_type (const string &s)
static size_t peek_text (const char *&t, uint32_t &tl, const uint8_t *buf, size_t len)

Private Member Functions

void discard_dynamic ()
void abandon_data ()
void type_and_data_okay (const XrlAtomType &t) const throw (NoData, WrongType)
void set_name (const char *n) throw (BadName)
ssize_t data_from_c_str (const char *c_str)
size_t pack_name (uint8_t *buffer) const
size_t pack_boolean (uint8_t *buffer) const
size_t pack_uint32 (uint8_t *buffer) const
size_t pack_ipv4 (uint8_t *buffer) const
size_t pack_ipv4net (uint8_t *buffer) const
size_t pack_ipv6 (uint8_t *buffer) const
size_t pack_ipv6net (uint8_t *buffer) const
size_t pack_mac (uint8_t *buffer) const
size_t pack_text (uint8_t *buffer) const
size_t pack_list (uint8_t *buffer, size_t buffer_bytes) const
size_t pack_binary (uint8_t *buffer) const
size_t pack_uint64 (uint8_t *buffer) const
size_t pack_fp64 (uint8_t *buffer) const
size_t unpack_name (const uint8_t *buffer, size_t buffer_bytes) throw (BadName)
size_t unpack_boolean (const uint8_t *buffer)
size_t unpack_uint32 (const uint8_t *buffer)
size_t unpack_ipv4 (const uint8_t *buffer)
size_t unpack_ipv4net (const uint8_t *buffer)
size_t unpack_ipv6 (const uint8_t *buffer)
size_t unpack_ipv6net (const uint8_t *buffer)
size_t unpack_mac (const uint8_t *buffer, size_t buffer_bytes)
size_t unpack_text (const uint8_t *buffer, size_t buffer_bytes)
size_t unpack_list (const uint8_t *buffer, size_t buffer_bytes)
size_t unpack_binary (const uint8_t *buffer, size_t buffer_bytes)
size_t unpack_uint64 (const uint8_t *buffer)
size_t unpack_fp64 (const uint8_t *buffer)

Static Private Member Functions

static XrlAtomType resolve_type_c_str (const char *)

Private Attributes

XrlAtomType _type
bool _have_data
string _atom_name
bool _own
union {
   bool   _boolean
   int32_t   _i32val
   uint32_t   _u32val
   IPv6 *   _ipv6
   IPv6Net *   _ipv6net
   Mac *   _mac
   string *   _text
   XrlAtomList *   _list
   vector< uint8_t > *   _binary
   int64_t   _i64val
   uint64_t   _u64val
   fp64_t   _fp64val
IPv4 _ipv4
IPv4Net _ipv4net

Constructor & Destructor Documentation

XrlAtom::XrlAtom ( const char *  serialized) throw (InvalidString, BadName) [explicit]

Construct an XrlAtom from it's serialized character representation.

Be careful not confuse this with the unnamed string atom constructor XrlAtom(const string&).

Member Function Documentation

bool XrlAtom::packed_bytes_fixed ( ) const [inline]
true if packed size of atom type is fixed, false if depends packed size depends on data content (eg list, text, binary)

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations