Alchemy  1.0
A framework to robustly process network messages and structured data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | List of all members
Hg::BitFieldArray< T, N > Struct Template Reference

Represents a set of fields that provide homogeneous bit-field access to each of the data values. More...

#include <bit_field_array.h>

Inheritance diagram for Hg::BitFieldArray< T, N >:
Hg::array_trait Hg::sequence_trait Hg::static_size_trait Hg::nested_trait Hg::container_trait

Public Types

typedef user_bit_field_type bit_field_type
 The Hg type required to properly initialized nested structures to provide the natural bit-field syntax.
 
typedef array_type::const_iterator const_iterator
 A const iterator to a value_type index.
 
typedef const bit_field_type const_reference
 Const Reference to an element in the array.
 
typedef
array_type::const_reverse_iterator 
const_reverse_iterator
 A const reverse iterator to a value_type index.
 
typedef array_type::iterator iterator
 An iterator to a value_type index.
 
typedef bit_field_type reference
 Reference to an element in the array.
 
typedef
array_type::reverse_iterator 
reverse_iterator
 A reverse iterator to a value_type index.
 
typedef BitFieldArray< T, N > this_type
 An alias for this classes definition.
 
typedef T user_bit_field_type
 The type of bit-field interface defined by the user to access individual value entries in the array.
 
typedef T::value_type value_type
 The data type managed by this Array. This is the type of data that will be written to the attached buffer.
 

Public Member Functions

 BitFieldArray ()
 Default Constructor.
 
 BitFieldArray (const BitFieldArray &rhs)
 Copy Constructor.
 
 BitFieldArray (const value_type(&rhs)[N])
 Value constructor based on an array of raw integer type data.
 
 ~BitFieldArray ()
 Destructor.
 
const_reference at (size_t idx) const
 Accesses the value at the specified index in the array data..
 
reference at (size_t idx)
 Accesses the value at the specified index in the array data..
 
const_reference back () const
 Accesses the last valid value in the array data..
 
reference back ()
 Accesses the last valid value in the array data..
 
iterator begin ()
 Returns an iterator to the first item in the array.
 
const value_typedata () const
 Returns a pointer to the raw data buffer for the container for reference.
 
value_typedata ()
 Returns a pointer to the raw data buffer for the container for assignment.
 
size_t data_size () const
 Returns the number of bytes required to hold the entire array of data.
 
bool empty () const
 Indicates if this container contains 0 elements.
 
iterator end ()
 Returns an iterator to the item one passed the end of the array.
 
const_reference front () const
 Accesses the first value in the array data..
 
reference front ()
 Accesses the first value in the array data..
 
 operator reference ()
 Conversion operator to the value_type reference. More...
 
 operator value_type () const
 Value Conversion Operator (value_type) More...
 
BitFieldArrayoperator= (const BitFieldArray &rhs)
 Assignment operator.
 
BitFieldArrayoperator= (const value_type(&rhs)[N])
 Value Assignment operator (Assigns a raw array of the correct size.)
 
const_reference operator[] (size_t idx) const
 Accesses the value at the specified index in the array data..
 
reference operator[] (size_t idx)
 Accesses the value at the specified index in the array data..
 
reverse_iterator rbegin ()
 Returns an iterator to the last item of the array moving in reverse.
 
reverse_iterator rend ()
 Returns an iterator to the item one passed the beginning of the array, moving in reverse.
 
size_t size () const
 Returns the number of elements within the array.
 

Detailed Description

template<typename T, size_t N>
struct Hg::BitFieldArray< T, N >

Represents a set of fields that provide homogeneous bit-field access to each of the data values.

This object requires a Hg bit-field definition for the type definition of this object. The base integer type that is defined for the bit-field will be used to define the type for allocation of memory for the array.

Each field allocated in the array will accessible either by the base integer type or with the bit-field interface provided supplied to the definition.

Definition at line 49 of file bit_field_array.h.

Member Function Documentation

template<typename T , size_t N>
Hg::BitFieldArray< T, N >::operator reference ( )
inline

Conversion operator to the value_type reference.

Note
The converted array interface provides direct access values.

Definition at line 201 of file bit_field_array.h.

template<typename T , size_t N>
Hg::BitFieldArray< T, N >::operator value_type ( ) const
inline

Value Conversion Operator (value_type)

Allows the entire BitSet to be extracted and assigned as a value to the host value type.

Definition at line 214 of file bit_field_array.h.


The documentation for this struct was generated from the following file: