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 Member Functions | List of all members
Hg::detail::DataProxy< datum_trait, kt_idx, format_t > Struct Template Reference

A template to adapt all field types to the Datum assignment. More...

#include <data_proxy.h>

Inheritance diagram for Hg::detail::DataProxy< datum_trait, kt_idx, format_t >:
Hg::Datum< kt_idx, format_t > Hg::detail::FieldTypes< FieldT, TraitT >

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...
 
 operator reference ()
 Conversion operator to a base Datum Type reference. More...
 
 operator value_type () const
 Value Conversion Operator (value_type) More...
 
DataProxyoperator= (const datum_type &value)
 Value assignment.
 
DataProxyoperator= (value_type value)
 Value assignment.
 
- Public Member Functions inherited from Hg::Datum< kt_idx, format_t >
 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_typeget () const
 Returns the current value of this Datum. More...
 
value_typeget ()
 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...
 
Datumoperator= (const Datum &rhs)
 Assignment Operator. More...
 
Datumoperator= (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_typedata () const
 Returns the value of the data buffer.
 
void data (const value_type &value)
 Returns the value of the data buffer.
 
value_typereference ()
 Returns a reference to the internal data storage. More...
 

Additional Inherited Members

- Public Types inherited from Hg::Datum< kt_idx, format_t >
typedef
detail::DefineFieldType< Idx,
format_t >::type 
field_type
 Type mapping for the message format type to the actual value_type.
 
typedef format_t 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.
 
- Static Public Attributes inherited from Hg::Datum< kt_idx, format_t >
static const size_t k_offset
 The offset in the buffer where this msg field is located.
 
- Protected Member Functions inherited from Hg::Datum< kt_idx, format_t >
const value_typeget_data () const
 Returns the value of the data buffer.
 
value_typeget_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.

 

Detailed Description

template<typename datum_trait, size_t kt_idx, typename format_t>
struct Hg::detail::DataProxy< datum_trait, kt_idx, format_t >

A template to adapt all field types to the Datum assignment.

datum_trait The general category of proxy management required by the specified field. kt_idx format_type kt_offset

Definition at line 42 of file data_proxy.h.

Constructor & Destructor Documentation

template<typename datum_trait , size_t kt_idx, typename format_t >
Hg::detail::DataProxy< datum_trait, kt_idx, format_t >::DataProxy ( const DataProxy< datum_trait, kt_idx, format_t > &  proxy)
inline

Copy Constructor.

Makes a complete copy of an existing Proxy object.

Parameters
proxyA reference to the Another instance of a DataProxy.

Definition at line 68 of file data_proxy.h.

template<typename datum_trait , size_t kt_idx, typename format_t >
Hg::detail::DataProxy< datum_trait, kt_idx, format_t >::DataProxy ( const datum_type datum)
inline

Value Constructor: Construct a proxy directly from a datum instance.

Parameters
datumA reference to a datum object used to initilize this.

Definition at line 78 of file data_proxy.h.

Member Function Documentation

template<typename datum_trait , size_t kt_idx, typename format_t >
Hg::detail::DataProxy< datum_trait, kt_idx, format_t >::operator reference ( )
inline

Conversion operator to a base Datum Type reference.

Note
The converted Datum base provides access to value interface of the Datum object.

Definition at line 135 of file data_proxy.h.

template<typename datum_trait , size_t kt_idx, typename format_t >
Hg::detail::DataProxy< datum_trait, kt_idx, format_t >::operator value_type ( ) const
inline

Value Conversion Operator (value_type)

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

Definition at line 146 of file data_proxy.h.


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