bit::Record Class Reference
[Records]

#include <bit/record.h>

Inheritance diagram for bit::Record:

Inheritance graph
[legend]
List of all members.

Detailed Description

bit::Record is a tree of bit::Field and bit::Record types sorted by their starting bit positions.

FOLDOC defines record as: "An ordered set of fields, usually stored contiguously. ... Some programming languages use the term to mean a type composed of fields of several other types (C calls this a "struct")."

In the context of the bit library, a record stores an ordered set of bit::Field types.

The Record class extends the RecordBase by providing storage for Field objects as well as providing the concept of a name and description strings.

Author:
Rick L. Vinyard, Jr.


Public Types

typedef boost::shared_ptr<
Record
pointer
 Convenience typedef to a smart pointer to bit::Record.

Public Member Functions

 Record (std::string name="", size_t length_units=BITS, int offset=0, size_t offset_units=BITS, std::string descr="")
 Default constructor.
virtual ~Record ()
 Destructor.
virtual size_t length () const
virtual size_t length (size_t units) const
virtual iterator begin ()
virtual iterator end ()
virtual FieldBase::pointer field (std::string s)
virtual FieldBase::pointer field (size_t i)
virtual void add_field (FieldBase::pointer field)
virtual void remove_field (FieldBase::pointer field)
virtual void remove_field (const std::string &name)
virtual size_t fields ()
virtual FieldBase::pointer clone ()

Static Public Member Functions

static Record::pointer create (std::string name="", size_t length_units=BITS, int offset=0, size_t offset_units=BITS, std::string descr="")
 Static method returns a smart pointer to a new Record object.

Protected Member Functions

virtual FieldBase::pointer previous_field (FieldBase::pointer current_field) throw (error::invalid_container_op)
virtual FieldBase::pointer next_field (FieldBase::pointer current_field) throw (error::invalid_container_op)

Protected Attributes

RecordStorage m_fields


Member Function Documentation

size_t bit::Record::length  )  const [virtual]
 

Returns:
the length of this object in it's length units

Implements bit::FieldBase.


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 14:38:09 2006 by  doxygen 1.4.6