#include <bit/recordbase.h>
Public Types | |
typedef BitPointer< RecordBase > | pointer |
Public Member Functions | |
RecordBase (std::string name="", size_t length_units=BITS, int offset=0, size_t offset_units=BITS, std::string descr="") | |
virtual | ~RecordBase () |
virtual size_t | length_units () const |
virtual void | set_length_units (size_t units) |
virtual int | offset () const |
virtual int | offset (size_t units) const |
virtual void | set_offset (int offset) |
virtual size_t | offset_units () const |
virtual void | set_offset_units (size_t units) |
virtual std::string | name () const |
Returns the string name associated with this object. | |
virtual std::string | name (int depth) const |
virtual void | set_name (const std::string &name) |
Sets the name of this record. | |
virtual std::string | description () const |
Returns the string description of this object. | |
virtual void | set_description (const std::string &description) |
Sets the description of this record. | |
virtual void | add_field (FieldBase::pointer child)=0 |
virtual void | remove_field (const std::string &name)=0 |
virtual const FieldType & | type () const |
Returns a FieldType object that describes the default type for this record. | |
virtual void | set_type (const FieldType &) |
Sets the FieldType object describing the default type for this record. | |
virtual Encoding | encoding () const |
Return the data encoding type. | |
virtual void | set_encoding (Encoding en) |
Set the data encoding type. | |
Protected Attributes | |
std::string | m_name |
size_t | m_length_units |
int | m_offset |
size_t | m_offset_units |
std::string | m_description |
FieldType | m_type |
Encoding | m_encoding |
typedef BitPointer<RecordBase> bit::RecordBase::pointer |
bit::RecordBase::RecordBase | ( | std::string | name = "" , |
|
size_t | length_units = BITS , |
|||
int | offset = 0 , |
|||
size_t | offset_units = BITS , |
|||
std::string | descr = "" | |||
) |
References set_name().
bit::RecordBase::~RecordBase | ( | ) | [virtual] |
size_t bit::RecordBase::length_units | ( | ) | const [virtual] |
void bit::RecordBase::set_length_units | ( | size_t | units | ) | [virtual] |
References m_length_units.
int bit::RecordBase::offset | ( | ) | const [virtual] |
Implements bit::FieldBase.
References m_offset.
int bit::RecordBase::offset | ( | size_t | units | ) | const [virtual] |
void bit::RecordBase::set_offset | ( | int | offset | ) | [virtual] |
References m_offset.
size_t bit::RecordBase::offset_units | ( | ) | const [virtual] |
void bit::RecordBase::set_offset_units | ( | size_t | units | ) | [virtual] |
References m_offset_units.
std::string bit::RecordBase::name | ( | ) | const [virtual] |
Returns the string name associated with this object.
This pure virtual method is reimplemented by children to provide the proper notation, such as the array notation of elements, by children.
Implements bit::FieldBase.
References m_name.
std::string bit::RecordBase::name | ( | int | depth | ) | const [virtual] |
void bit::RecordBase::set_name | ( | const std::string & | name | ) | [virtual] |
Sets the name of this record.
References m_name.
Referenced by bit::Record::Record(), and RecordBase().
std::string bit::RecordBase::description | ( | ) | const [virtual] |
void bit::RecordBase::set_description | ( | const std::string & | description | ) | [virtual] |
virtual void bit::RecordBase::add_field | ( | FieldBase::pointer | child | ) | [pure virtual] |
Implemented in bit::Record, and bit::RecordVector.
virtual void bit::RecordBase::remove_field | ( | const std::string & | name | ) | [pure virtual] |
Implemented in bit::Record, and bit::RecordVector.
const FieldType & bit::RecordBase::type | ( | ) | const [virtual] |
Returns a FieldType object that describes the default type for this record.
Implements bit::FieldBase.
References m_type.
Referenced by bit::RecordVector::xml().
void bit::RecordBase::set_type | ( | const FieldType & | type | ) | [virtual] |
Sets the FieldType object describing the default type for this record.
Implements bit::FieldBase.
References m_type.
Encoding bit::RecordBase::encoding | ( | ) | const [virtual] |
Return the data encoding type.
If encoding type of this record is set to ENCODING_NONE and this record has a parent, then the parent's encoding type is returned.
Implements bit::FieldBase.
References bit::FieldBase::encoding(), bit::ENCODING_NONE, m_encoding, and bit::FieldBase::m_parent.
void bit::RecordBase::set_encoding | ( | Encoding | en | ) | [virtual] |
std::string bit::RecordBase::m_name [protected] |
Referenced by bit::RecordVector::clone(), name(), set_name(), bit::RecordVector::xml(), and bit::Record::xml().
size_t bit::RecordBase::m_length_units [protected] |
int bit::RecordBase::m_offset [protected] |
Referenced by bit::RecordVector::clone(), offset(), set_offset(), bit::RecordVector::xml(), and bit::Record::xml().
size_t bit::RecordBase::m_offset_units [protected] |
Referenced by bit::RecordVector::clone(), offset_units(), set_offset_units(), bit::RecordVector::xml(), and bit::Record::xml().
std::string bit::RecordBase::m_description [protected] |
Referenced by bit::RecordVector::clone(), description(), and set_description().
FieldType bit::RecordBase::m_type [protected] |
Referenced by bit::RecordVector::add_field(), bit::RecordVector::clone(), bit::Record::clone(), set_type(), type(), and bit::Record::xml().
Encoding bit::RecordBase::m_encoding [protected] |
Referenced by encoding(), and set_encoding().