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::Message< MsgT, StorageT > Class Template Reference

An object that defines and manages access to a formatted message buffer. More...

#include <Hg.h>

Inherits HgT.

Public Member Functions

 Message ()
 Default Constructor.
 
 Message (const message_type &rhs)
 Copy Constructor. More...
 
 Message (const base_type &rhs)
 Copy Constructor. More...
 
 Message (const_pointer p, size_t n)
 Value constructor. Constructs an initialized message from a raw data buffer. More...
 
bool is_host_order () const
 Indicates if the byte-order of the message is host-order. More...
 
Messageoperator= (const message_type &rhs)
 Assignment Operator. More...
 

Detailed Description

template<typename MsgT, typename StorageT>
class Hg::Message< MsgT, StorageT >

An object that defines and manages access to a formatted message buffer.

HgT A message description that has defined the format and utilities for field access. ByteOrderT The specified byte-order for this message definition. HostByteOrder is the default.

Definition at line 19 of file msg_view.h.

Constructor & Destructor Documentation

template<typename MsgT, typename StorageT>
Hg::Message< MsgT, StorageT >::Message ( const message_type &  rhs)
inline

Copy Constructor.

Parameters
rhsThe Hg message object from which data is copied.

Definition at line 111 of file Hg.h.

template<typename MsgT, typename StorageT>
Hg::Message< MsgT, StorageT >::Message ( const base_type &  rhs)
inline

Copy Constructor.

Parameters
rhsThe Hg message object from which data is copied.

Definition at line 121 of file Hg.h.

template<typename MsgT, typename StorageT>
Hg::Message< MsgT, StorageT >::Message ( const_pointer  p,
size_t  n 
)
inline

Value constructor. Constructs an initialized message from a raw data buffer.

Parameters
pThe initialization data. The contents will only be verified for validity of the pointer if the size n is larger than zero.
nThe size of the buffer in sp.

Definition at line 133 of file Hg.h.

Member Function Documentation

template<typename MsgT, typename StorageT>
bool Hg::Message< MsgT, StorageT >::is_host_order ( ) const
inline

Indicates if the byte-order of the message is host-order.

Returns
true - The message is defined in host byte-order. false - The mesage is not in host byte-order. Most likely net byte-order.

Definition at line 160 of file Hg.h.

template<typename MsgT, typename StorageT>
Message& Hg::Message< MsgT, StorageT >::operator= ( const message_type &  rhs)
inline

Assignment Operator.

Parameters
rhsBasic message values to initialize this instance.

Definition at line 143 of file Hg.h.


The documentation for this class was generated from the following files: