Alchemy
1.0
A framework to robustly process network messages and structured data
|
Represents a set of fields that provide homogeneous bit-field access to each of the data values. More...
#include <bit_field_vector.h>
Public Types | |
typedef A | allocator_type |
The allocator used by this vector. | |
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 vector_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 vector. | |
typedef vector_type::const_reverse_iterator | const_reverse_iterator |
A const reverse iterator to a value_type index. | |
typedef vector_type::iterator | iterator |
An iterator to a value_type index. | |
typedef bit_field_type | reference |
Reference to an element in the vector. | |
typedef vector_type::reverse_iterator | reverse_iterator |
A reverse iterator to a value_type index. | |
typedef BitFieldVector< T, A > | 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 vector. | |
typedef T::value_type | value_type |
The data type managed by this vector. This is the type of data that will be written to the attached buffer. | |
Public Member Functions | |
BitFieldVector () | |
Default Constructor. | |
BitFieldVector (const BitFieldVector &rhs) | |
Copy Constructor. | |
~BitFieldVector () | |
Destructor. | |
const_reference | at (size_t idx) const |
Accesses the value at the specified index in the vector data.. | |
reference | at (size_t idx) |
Accesses the value at the specified index in the vector data.. | |
const_reference | back () const |
Accesses the last valid value in the vector data.. | |
reference | back () |
Accesses the last valid value in the vector data.. | |
iterator | begin () |
Returns an iterator to the first item in the vector. | |
void | clear () |
Erases every element in the vector. | |
const value_type * | data () const |
Returns a pointer to the raw data buffer for the container for reference. | |
value_type * | data () |
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 vector 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 vector. | |
iterator | erase (iterator pos) |
Removes the specified element from this container. More... | |
iterator | erase (iterator first, iterator last) |
Removes the range of specified elements from this container. More... | |
const_reference | front () const |
Accesses the first value in the vector data.. | |
reference | front () |
Accesses the first value in the vector data.. | |
operator reference () | |
Conversion operator to the value_type reference. More... | |
operator value_type () const | |
Value Conversion Operator (value_type) More... | |
BitFieldVector & | operator= (const BitFieldVector &rhs) |
Assignment operator. | |
const_reference | operator[] (size_t idx) const |
Accesses the value at the specified index in the vector data.. | |
reference | operator[] (size_t idx) |
Accesses the value at the specified index in the vector data.. | |
void | pop_back () |
Removes the last element in the container. More... | |
void | push_back (const vector_type &value) |
Removes the specified element from this container. More... | |
reverse_iterator | rbegin () |
Returns an iterator to the last item of the vector moving in reverse. | |
reverse_iterator | rend () |
Returns an iterator to the item one passed the beginning of the vector, moving in reverse. | |
void | resize (size_t count) |
Changes the number of elements stored. More... | |
void | resize (size_t count, value_type value) |
Changes the number of elements stored. More... | |
size_t | size () const |
Returns the number of elements within the vector. | |
void | swap (BitFieldVector &other) |
Exchanges the contents of this BitFieldVector container with those of other. This version does not invoke any move, copy, or swap operations on the individual elements. More... | |
void | swap (value_type &other) |
Exchanges the contents of the container with those of other. This version does not invoke any move, copy, or swap operations on the individual elements. More... | |
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 vector.
Each field allocated in the vector 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_vector.h.
|
inline |
Removes the specified element from this container.
pos | Iterator that points to the element to be removed. |
Definition at line 359 of file bit_field_vector.h.
|
inline |
Removes the range of specified elements from this container.
first | Iterator that points to the first element to be removed. |
last | Iterator that points to the last element to be removed. |
Definition at line 372 of file bit_field_vector.h.
|
inline |
Conversion operator to the value_type reference.
Definition at line 216 of file bit_field_vector.h.
|
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 228 of file bit_field_vector.h.
|
inline |
Removes the last element in the container.
Definition at line 392 of file bit_field_vector.h.
|
inline |
Removes the specified element from this container.
pos | Iterator that points to the element to be removed. |
Definition at line 384 of file bit_field_vector.h.
|
inline |
Changes the number of elements stored.
n | The number of elements the container should now hold. |
Definition at line 199 of file bit_field_vector.h.
|
inline |
Changes the number of elements stored.
n | The number of elements the container should now hold. |
value | Default value to initialize elements if the resize causes new elements to be added to the container. |
Definition at line 208 of file bit_field_vector.h.
|
inline |
Exchanges the contents of this BitFieldVector container with those of other. This version does not invoke any move, copy, or swap operations on the individual elements.
Iterators and references will remain valid, with the exception to the end iterators.
other | The other vector to swap elements. |
Definition at line 407 of file bit_field_vector.h.
|
inline |
Exchanges the contents of the container with those of other. This version does not invoke any move, copy, or swap operations on the individual elements.
Iterators and references will remain valid, with the exception to the end iterators.
other | The other vector to swap elements. |
Definition at line 419 of file bit_field_vector.h.