seven bits

bit::RecordBase Class Reference
["Record Definitions"]

#include <bit/recordbase.h>

Inheritance diagram for bit::RecordBase:

bit::FieldBase bit::Record bit::RecordVector

List of all members.


Detailed Description

Provides a common interface to both Record and RecordVector classes.

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

Public Types

typedef BitPointer< RecordBasepointer

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 FieldTypetype () 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

Member Typedef Documentation

typedef BitPointer<RecordBase> bit::RecordBase::pointer

Reimplemented from bit::FieldBase.

Reimplemented in bit::Record, and bit::RecordVector.


Constructor & Destructor Documentation

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]


Member Function Documentation

size_t bit::RecordBase::length_units (  )  const [virtual]

Implements bit::FieldBase.

References m_length_units.

void bit::RecordBase::set_length_units ( size_t  units  )  [virtual]

References m_length_units.

int bit::RecordBase::offset (  )  const [virtual]

Returns:
the offset of this object in the offset units of this object

Implements bit::FieldBase.

References m_offset.

int bit::RecordBase::offset ( size_t  units  )  const [virtual]

Reimplemented from bit::FieldBase.

References bit::FieldBase::offset().

void bit::RecordBase::set_offset ( int  offset  )  [virtual]

References m_offset.

size_t bit::RecordBase::offset_units (  )  const [virtual]

Implements bit::FieldBase.

References m_offset_units.

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]

Reimplemented from bit::FieldBase.

References bit::FieldBase::name().

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]

Returns the string description of this object.

Implements bit::FieldBase.

References m_description.

void bit::RecordBase::set_description ( const std::string &  description  )  [virtual]

Sets the description of this record.

References m_description.

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]

Set the data encoding type.

Implements bit::FieldBase.

References m_encoding.


Member Data Documentation

std::string bit::RecordBase::m_name [protected]

size_t bit::RecordBase::m_length_units [protected]

int bit::RecordBase::m_offset [protected]

size_t bit::RecordBase::m_offset_units [protected]

std::string bit::RecordBase::m_description [protected]

Referenced by encoding(), and set_encoding().


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