Alchemy
1.0
A framework to robustly process network messages and structured data
|
A template to provide access to sequences of data fields. More...
#include <vector_proxy.h>
Public Types | |
typedef value_type::const_iterator | const_iterator |
A const iterator to a value_type index. | |
typedef value_type::const_reference | const_reference |
Const Reference to an element in the vector. | |
typedef value_type::const_reverse_iterator | const_reverse_iterator |
A const reverse iterator to a value_type index. | |
typedef index_type::value_type | data_type |
The value type of the element extracted at the current index defined in the parent TypeList. | |
typedef detail::DefineFieldType< IdxT, format_type >::type | field_type |
Type mapping for the message format type to the actual value_type. | |
typedef field_type::index_type | index_type |
The raw type extracted at the current index defined in the parent TypeList. | |
typedef value_type::iterator | iterator |
An iterator to a value_type index. | |
typedef value_type::reference | reference |
Reference to an element in the vector. | |
typedef value_type::reverse_iterator | reverse_iterator |
A reverse iterator to a value_type index. | |
Public Types inherited from Hg::Datum< IdxT, FormatT > | |
typedef detail::DefineFieldType< Idx, FormatT >::type | field_type |
Type mapping for the message format type to the actual value_type. | |
typedef FormatT | format_type |
format of the parent TypeList. | |
typedef field_type::index_type | index_type |
The type extracted at the current index defined in the parent TypeList. | |
typedef field_type::value_type | value_type |
The data type managed by this Datum. This is the type of data that will be written to the attached buffer. | |
Public Types inherited from Hg::detail::FieldTypes< FieldT, TraitT > | |
typedef FieldT | index_type |
The type at the index of the parent type container. | |
typedef field_data_t < index_type >::value_type | value_type |
The specified value type for the current Datum. | |
Public Member Functions | |
DataProxy () | |
Default Constructor. | |
DataProxy (const DataProxy &proxy) | |
Copy Constructor. More... | |
DataProxy (const datum_type &datum) | |
Value Constructor: Construct a proxy directly from a datum instance. More... | |
DataProxy (const value_type &value) | |
Value Constructor: Construct a proxy directly from a datum instance. More... | |
void | assign (size_t count, const data_type &value) |
Replaces the contents of the container. | |
template<typename InputIt > | |
void | assign (InputIt first, InputIt last) |
Replaces the contents of the container. | |
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 value at the specified index in the vector data.. | |
reference | back () |
Accesses the value at the specified index in the vector data.. | |
iterator | begin () |
Returns an iterator to the first item in the vector. | |
size_t | capacity () const |
Returns the number of elements that this vector can hold based on the current allocated space. | |
void | clear () |
Releases all allocated memory dedicated for storing entry data. | |
bool | empty () |
Indicates if the vector does not have any space allocated for data. | |
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 value at the specified index in the vector data.. | |
reference | front () |
Accesses the value at the specified index in the vector data.. | |
operator reference () | |
Conversion operator to a base Datum Type. More... | |
operator value_type () const | |
Value Conversion Operator (value_type) More... | |
DataProxy & | operator= (const datum_type &value) |
Value assignment. | |
DataProxy & | operator= (const value_type &value) |
Value assignment. | |
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_reference 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 | reserve (size_t new_cap) |
Insures that space is reserved to hold at least new_cap elements. | |
void | resize (size_t count) |
Changes the number of elements stored. More... | |
void | resize (size_t count, data_type value) |
Changes the number of elements stored. More... | |
void | set (const value_type &value) |
Updates the value of this VectorProxy with a std::vector type. More... | |
template<size_t ExtentT> | |
void | set (const data_type(&value)[ExtentT]) |
Updates the value of this Vector with a native array type. More... | |
size_t | size () const |
Returns the number of valid objects managed by this vector structure. | |
void | swap (DataProxy &other) |
Exchanges the contents of this DataProxy 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... | |
Public Member Functions inherited from Hg::Datum< IdxT, FormatT > | |
Datum () | |
Default Constructor. | |
Datum (Datum &datum) | |
Copy Constructor. More... | |
void | clear () |
Zeros the datum. | |
bool | equivalent (const value_type &rhs) const |
Indicates equivalency for a value_type and this Datum's value. More... | |
const value_type & | get () const |
Returns the current value of this Datum. More... | |
value_type & | get () |
Returns a reference to the value managed in this datum. | |
bool | less (const value_type &rhs) const |
Compares a value_type against this Datum's value for less-than relationship. More... | |
operator value_type () const | |
Operator to value_type. More... | |
bool | operator!= (const value_type &rhs) const |
Inequality Value Comparison (value_type) More... | |
bool | operator< (const value_type &rhs) const |
less Than Value Comparison (value_type) More... | |
bool | operator<= (const value_type &rhs) const |
less Than or equal Value Comparison (value_type) More... | |
Datum & | operator= (const Datum &rhs) |
Assignment Operator. More... | |
Datum & | operator= (value_type rhs) |
Assignment Operator (value_type) More... | |
bool | operator== (const value_type &rhs) const |
Equality Value Comparison (value_type) More... | |
bool | operator> (const value_type &rhs) const |
Greater Than Value Comparison (value_type) More... | |
bool | operator>= (const value_type &rhs) const |
Greater Than or equal Value Comparison (value_type) More... | |
void | set (const value_type &value) |
Updates the value of this Datum. More... | |
Public Member Functions inherited from Hg::detail::FieldTypes< FieldT, TraitT > | |
const value_type & | data () const |
Returns the value of the data buffer. | |
void | data (const value_type &value) |
Returns the value of the data buffer. | |
value_type & | reference () |
Returns a reference to the internal data storage. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Hg::Datum< IdxT, FormatT > | |
static const size_t | k_offset |
The offset in the buffer where this msg field is located. | |
Protected Member Functions inherited from Hg::Datum< IdxT, FormatT > | |
const value_type & | get_data () const |
Returns the value of the data buffer. | |
value_type & | get_reference () |
Returns a reference to the internal data storage. More... | |
void | set_data (const value_type &value) |
Returns the value of the data buffer. | |
Protected Attributes inherited from Hg::detail::FieldTypes< FieldT, TraitT > | |
value_type | m_data |
This is a local copy of the data value to shadow the value held in the buffer. | |
A template to provide access to sequences of data fields.
IdxT FormatType
Definition at line 39 of file vector_proxy.h.
|
inline |
Copy Constructor.
Makes a complete copy of an existing Proxy object.
proxy | A reference to the Another instance of a DataProxy. |
Definition at line 107 of file vector_proxy.h.
|
inline |
Value Constructor: Construct a proxy directly from a datum instance.
datum | A reference to a datum object used to initilize this. |
Definition at line 117 of file vector_proxy.h.
|
inline |
Value Constructor: Construct a proxy directly from a datum instance.
datum | A reference to a datum object used to initilize this. |
Definition at line 126 of file vector_proxy.h.
|
inline |
Removes the specified element from this container.
pos | Iterator that points to the element to be removed. |
Definition at line 332 of file vector_proxy.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 345 of file vector_proxy.h.
|
inline |
Conversion operator to a base Datum Type.
Definition at line 235 of file vector_proxy.h.
|
inline |
Value Conversion Operator (value_type)
Allows the entire vector to be extracted and assigned as a value to the host value type.
Definition at line 246 of file vector_proxy.h.
|
inline |
Removes the last element in the container.
Definition at line 365 of file vector_proxy.h.
|
inline |
Removes the specified element from this container.
pos | Iterator that points to the element to be removed. |
Definition at line 357 of file vector_proxy.h.
|
inline |
Changes the number of elements stored.
n | The number of elements the container should now hold. |
Definition at line 180 of file vector_proxy.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 189 of file vector_proxy.h.
|
inline |
Updates the value of this VectorProxy with a std::vector type.
value | The vector which will initialize this object. |
Definition at line 197 of file vector_proxy.h.
|
inline |
Updates the value of this Vector with a native array type.
value | The array which will initialize this object. |
Definition at line 211 of file vector_proxy.h.
|
inline |
Exchanges the contents of this DataProxy 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 380 of file vector_proxy.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 392 of file vector_proxy.h.