seven bits

bit::FieldType Class Reference

#include <bit/fieldtype.h>

List of all members.


Detailed Description

Author:
Rick L. Vinyard, Jr. <rvinyard@cs.nmsu.edu>

Public Member Functions

 FieldType (Type type=TYPE_NONE, ByteOrder byte_order=BYTEORDER_NETWORK, Sign sign=SIGN_UNSIGNED)
 ~FieldType ()
Type type () const
void set_type (Type)
const char * type_string () const
ByteOrder byte_order () const
void set_byte_order (ByteOrder)
const char * byte_order_string () const
Sign sign () const
void set_sign (Sign)
const char * sign_string () const
bool operator== (const FieldType &other) const
bool operator!= (const FieldType &other) const
std::string xml () const

Static Public Member Functions

static const char * type_string (Type)
static const char * byte_order_string (ByteOrder)
static const char * sign_string (Sign)

Protected Attributes

Type m_type
ByteOrder m_byte_order
Sign m_sign

Static Protected Attributes

static const char * m_type_string []
static const char * m_byte_order_string []
static const char * m_sign_string []

Constructor & Destructor Documentation

bit::FieldType::FieldType ( Type  type = TYPE_NONE,
ByteOrder  byte_order = BYTEORDER_NETWORK,
Sign  sign = SIGN_UNSIGNED 
)

bit::FieldType::~FieldType (  ) 


Member Function Documentation

Type bit::FieldType::type (  )  const

void bit::FieldType::set_type ( Type  type  ) 

References m_type.

Referenced by bit::xml_read_type().

const char * bit::FieldType::type_string (  )  const

References m_type.

ByteOrder bit::FieldType::byte_order (  )  const

References m_byte_order.

void bit::FieldType::set_byte_order ( ByteOrder  byte_order  ) 

References m_byte_order.

Referenced by bit::xml_read_type().

const char * bit::FieldType::byte_order_string (  )  const

References m_byte_order.

Sign bit::FieldType::sign (  )  const

References m_sign.

void bit::FieldType::set_sign ( Sign  sign  ) 

References m_sign.

Referenced by bit::xml_read_type().

const char * bit::FieldType::sign_string (  )  const

References m_sign.

const char * bit::FieldType::type_string ( Type  type  )  [static]

References m_type_string.

const char * bit::FieldType::byte_order_string ( ByteOrder  byteorder  )  [static]

References m_byte_order_string.

const char * bit::FieldType::sign_string ( Sign  sign  )  [static]

References m_sign_string.

bool bit::FieldType::operator== ( const FieldType other  )  const

References m_byte_order, m_sign, and m_type.

bool bit::FieldType::operator!= ( const FieldType other  )  const

References m_byte_order, m_sign, and m_type.

std::string bit::FieldType::xml (  )  const


Member Data Documentation

const char * bit::FieldType::m_type_string [static, protected]

Initial value:

      {
          "None",
          "Integer",
          "Floating Point",
          "ASCII",
          "BCD (Binary Coded Decimal)",
          "UTF8",
      }

Referenced by type_string().

const char * bit::FieldType::m_byte_order_string [static, protected]

Initial value:

      {
          "Network",
          "Big Endian",
          "Little Endian",
      }

Referenced by byte_order_string().

const char * bit::FieldType::m_sign_string [static, protected]

Initial value:

      {
          "Unsigned",
          "Two's Complement",
          "One's Complement",
          "Sign Bit",
      }

Referenced by sign_string().


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

Generated on Mon Nov 3 10:50:01 2008 for bit by doxygen 1.5.6