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< packed_trait, kt_idx, format_t > Struct Template Reference

A proxy template specialization for bitfield data types. More...

#include <bitlist_field_proxy.h>

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

Public Member Functions

 DataProxy ()
 Default Constructor. More...
 
 DataProxy (DataProxy &proxy)
 Copy Constructor. More...
 
 operator reference ()
 Conversion operator to a base Datum Type. More...
 
 operator value_type () const
 Value Conversion Operator (value_type) const. More...
 
 operator value_type ()
 Value Conversion Operator (value_type) More...
 
DataProxyoperator= (value_type rhs)
 Assignment Operator (value_type) More...
 
- 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<size_t kt_idx, typename format_t>
struct Hg::detail::DataProxy< packed_trait, kt_idx, format_t >

A proxy template specialization for bitfield data types.

Parameters
kt_idx
format_type

Definition at line 29 of file bitlist_field_proxy.h.

Constructor & Destructor Documentation

template<size_t kt_idx, typename format_t >
Hg::detail::DataProxy< packed_trait, kt_idx, format_t >::DataProxy ( )
inline

Default Constructor.

Initializes the internal buffer to a static nil instance that is legal to call into with no actions performed.

Definition at line 48 of file bitlist_field_proxy.h.

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

Copy Constructor.

Makes a complete copy of an existing Proxy object, including internal references to the MsgBuffer that is associated with the base Datum instance.

Parameters
proxyA reference to the Another instance of a DataProxy.

Definition at line 59 of file bitlist_field_proxy.h.

Member Function Documentation

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

Conversion operator to a base Datum Type.

Note
The converted Datum base provides access to the Attach and Flush functions of the Datum.

Definition at line 71 of file bitlist_field_proxy.h.

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

Value Conversion Operator (value_type) const.

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

Definition at line 82 of file bitlist_field_proxy.h.

template<size_t kt_idx, typename format_t >
Hg::detail::DataProxy< packed_trait, kt_idx, format_t >::operator value_type ( )
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 93 of file bitlist_field_proxy.h.

template<size_t kt_idx, typename format_t >
DataProxy& Hg::detail::DataProxy< packed_trait, kt_idx, format_t >::operator= ( value_type  rhs)
inline

Assignment Operator (value_type)

Allows assignment to this Datum type from it's parameter type, value_type. This function is the key to allowing the Datum to behave as if the assignment was performed directly on the the managed type.

Parameters
rhsA value of the Datum value_type that will be used to directly modify the value of the object.

Definition at line 109 of file bitlist_field_proxy.h.


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