Alchemy
1.0
A framework to robustly process network messages and structured data
|
Provides the data field type definitions. More...
#include <basic_datum.h>
Public Types | |
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 | |
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... | |
Protected Attributes | |
value_type | m_data |
This is a local copy of the data value to shadow the value held in the buffer. | |
Provides the data field type definitions.
This class acts as a discriminator object to choose the proper msg field types. This method of field and data definition allows the use of virtual interfaces to be avoided for message fields.
In cases such as a uint8_t, this would cause a 400% increase in size for no value. This extra hidden complexity of implementation is well worth the runtime value of the final structure.
FieldT This parameterized type declares the type at the associated location in the parent type container.
Definition at line 236 of file basic_datum.h.
|
inline |
Returns a reference to the internal data storage.
Returns a reference to the internal data storage managed by this Datum. The reference to the data can be useful, and necessary for
Definition at line 252 of file basic_datum.h.