#include <bit/fieldtype.h>
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 [] |
bit::FieldType::FieldType | ( | Type | type = TYPE_NONE , |
|
ByteOrder | byte_order = BYTEORDER_NETWORK , |
|||
Sign | sign = SIGN_UNSIGNED | |||
) |
bit::FieldType::~FieldType | ( | ) |
Type bit::FieldType::type | ( | ) | const |
References m_type.
Referenced by bit::Record::xml(), bit::FieldVector::xml(), and bit::Field::xml().
void bit::FieldType::set_type | ( | Type | 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 | ) |
const char * bit::FieldType::byte_order_string | ( | ) | const |
References m_byte_order.
void bit::FieldType::set_sign | ( | Sign | sign | ) |
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 |
References bit::BYTEORDER_BIG_ENDIAN, bit::BYTEORDER_HOST, bit::BYTEORDER_LITTLE_ENDIAN, bit::BYTEORDER_NETWORK, m_byte_order, m_sign, m_type, bit::SIGN_BIT, bit::SIGN_ONES_COMPLEMENT, bit::SIGN_TWOS_COMPLEMENT, bit::SIGN_UNSIGNED, bit::TYPE_ASCII, bit::TYPE_BCD, bit::TYPE_FLOATING, bit::TYPE_INTEGER, bit::TYPE_NONE, and bit::TYPE_UTF8.
Referenced by bit::RecordVector::xml(), bit::Record::xml(), bit::FieldVector::Element::xml(), bit::FieldVector::xml(), and bit::Field::xml().
Type bit::FieldType::m_type [protected] |
Referenced by operator!=(), operator==(), set_type(), type(), type_string(), and xml().
ByteOrder bit::FieldType::m_byte_order [protected] |
Referenced by byte_order(), byte_order_string(), operator!=(), operator==(), set_byte_order(), and xml().
Sign bit::FieldType::m_sign [protected] |
Referenced by operator!=(), operator==(), set_sign(), sign(), sign_string(), and xml().
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] |
const char * bit::FieldType::m_sign_string [static, protected] |
Initial value:
{ "Unsigned", "Two's Complement", "One's Complement", "Sign Bit", }
Referenced by sign_string().