channel::Msg< IdType, SynchPolicy > Struct Template Reference

the Message class for channel internal message routing More...

#include <Msg.h>

List of all members.

Public Member Functions

 Msg ()
template<class MsgType>
 Msg (IdType t, MsgType *d, int s=sizeof(MsgType), MsgFreeCallback g=DefaultMsgFreeCallback< MsgType >)
Msgclone (void)
 ~Msg ()
char * data (void)
template<class MsgType>
void set_data (MsgType *d, int s=sizeof(MsgType), MsgFreeCallback g=DefaultMsgFreeCallback< MsgType >)
int marshal (ACE_OutputCDR &cdr, Marshaler *mar)
int demarshal (ACE_InputCDR &cdr, Marshaler *mar)

Public Attributes

IdType type
int size_
MsgDataHolder< SynchPolicy > * data_holder_
MsgFreeCallback gobbler_


Detailed Description

template<class IdType, class SynchPolicy>
struct channel::Msg< IdType, SynchPolicy >

the Message class for channel internal message routing

Definition at line 141 of file Msg.h.


Constructor & Destructor Documentation

template<class IdType, class SynchPolicy>
channel::Msg< IdType, SynchPolicy >::Msg  )  [inline]
 

Definition at line 147 of file Msg.h.

Referenced by channel::Msg< IdType, SynchPolicy >::clone().

template<class IdType, class SynchPolicy>
template<class MsgType>
channel::Msg< IdType, SynchPolicy >::Msg IdType  t,
MsgType *  d,
int  s = sizeof(MsgType),
MsgFreeCallback  g = DefaultMsgFreeCallback<MsgType>
[inline]
 

this constructor detects the msg_type, and construct a DefaultMsgFreeCallback based on detected msg_type. If user pass in an array as Msg to pass: 1. we cannot differentiate a pointer to a object from an array of object automatically, 2. for array, we need to specify the size (num of bytes) separately 3. for array, we should specify DefaultMsgArrayFreeCallback<MsgType>

Definition at line 157 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data_holder_.

template<class IdType, class SynchPolicy>
channel::Msg< IdType, SynchPolicy >::~Msg  )  [inline]
 

Definition at line 172 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data_holder_, and channel::Msg< IdType, SynchPolicy >::gobbler_.


Member Function Documentation

template<class IdType, class SynchPolicy>
Msg* channel::Msg< IdType, SynchPolicy >::clone void   )  [inline]
 

Definition at line 163 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data_holder_, channel::Msg< IdType, SynchPolicy >::gobbler_, channel::Msg< IdType, SynchPolicy >::Msg(), channel::Msg< IdType, SynchPolicy >::size_, and channel::Msg< IdType, SynchPolicy >::type.

Referenced by channel::TrieRouter< IdType, IdTrait, SynchPolicy >::route_msg().

template<class IdType, class SynchPolicy>
char* channel::Msg< IdType, SynchPolicy >::data void   )  [inline]
 

Definition at line 176 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data_holder_.

Referenced by channel::Msg< IdType, SynchPolicy >::demarshal(), channel::RemoteInterface< Channel, Transport >::handle_message(), My_Callback::process(), channel::LocalInterface< Channel >::send_msg(), Pong_Task::work(), Ping_Task::work(), and Demo_Task::work().

template<class IdType, class SynchPolicy>
int channel::Msg< IdType, SynchPolicy >::demarshal ACE_InputCDR &  cdr,
Marshaler mar
[inline]
 

Definition at line 199 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data(), channel::Msg< IdType, SynchPolicy >::data_holder_, channel::DefaultMarshaler::demarshal(), channel::Marshaler::demarshal(), channel::Msg< IdType, SynchPolicy >::gobbler_, and channel::Msg< IdType, SynchPolicy >::size_.

Referenced by channel::ConnHandler< Channel, TcpSockTransport< Channel > >::recv_message().

template<class IdType, class SynchPolicy>
int channel::Msg< IdType, SynchPolicy >::marshal ACE_OutputCDR &  cdr,
Marshaler mar
[inline]
 

marshal IdType

marshal msg data

Definition at line 186 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data_holder_, channel::DefaultMarshaler::marshal(), channel::Marshaler::marshal(), channel::Msg< IdType, SynchPolicy >::size_, and channel::Msg< IdType, SynchPolicy >::type.

Referenced by channel::ConnHandler< Channel, TcpSockTransport< Channel > >::send_msg().

template<class IdType, class SynchPolicy>
template<class MsgType>
void channel::Msg< IdType, SynchPolicy >::set_data MsgType *  d,
int  s = sizeof(MsgType),
MsgFreeCallback  g = DefaultMsgFreeCallback<MsgType>
[inline]
 

Definition at line 180 of file Msg.h.

References channel::Msg< IdType, SynchPolicy >::data_holder_, channel::Msg< IdType, SynchPolicy >::gobbler_, and channel::Msg< IdType, SynchPolicy >::size_.


Member Data Documentation

template<class IdType, class SynchPolicy>
MsgDataHolder<SynchPolicy>* channel::Msg< IdType, SynchPolicy >::data_holder_
 

Definition at line 144 of file Msg.h.

Referenced by channel::Msg< IdType, SynchPolicy >::clone(), channel::Msg< IdType, SynchPolicy >::data(), channel::Msg< IdType, SynchPolicy >::demarshal(), channel::Msg< IdType, SynchPolicy >::marshal(), channel::Msg< IdType, SynchPolicy >::Msg(), channel::Msg< IdType, SynchPolicy >::set_data(), and channel::Msg< IdType, SynchPolicy >::~Msg().

template<class IdType, class SynchPolicy>
MsgFreeCallback channel::Msg< IdType, SynchPolicy >::gobbler_
 

Definition at line 145 of file Msg.h.

Referenced by channel::Msg< IdType, SynchPolicy >::clone(), channel::Msg< IdType, SynchPolicy >::demarshal(), channel::Msg< IdType, SynchPolicy >::set_data(), and channel::Msg< IdType, SynchPolicy >::~Msg().

template<class IdType, class SynchPolicy>
int channel::Msg< IdType, SynchPolicy >::size_
 

Definition at line 143 of file Msg.h.

Referenced by channel::Msg< IdType, SynchPolicy >::clone(), channel::Msg< IdType, SynchPolicy >::demarshal(), channel::Msg< IdType, SynchPolicy >::marshal(), channel::ConnHandler< Channel, TcpSockTransport< Channel > >::send_msg(), and channel::Msg< IdType, SynchPolicy >::set_data().

template<class IdType, class SynchPolicy>
IdType channel::Msg< IdType, SynchPolicy >::type
 

Definition at line 142 of file Msg.h.

Referenced by channel::Msg< IdType, SynchPolicy >::clone(), channel::RemoteInterface< Channel, Transport >::handle_message(), channel::Msg< IdType, SynchPolicy >::marshal(), channel::RemoteInterface< Channel, Transport >::put_msg(), channel::LocalInterface< Channel >::put_msg(), channel::ConnHandler< Channel, TcpSockTransport< Channel > >::recv_message(), channel::TrieRouter< IdType, IdTrait, SynchPolicy >::route_msg(), channel::MapRouter< IdType, IdTrait, SynchPolicy >::route_msg(), channel::Source< Channel, NAMESPACE_HIERARCHICAL >::send_msg(), channel::Source< Channel, NAMESPACE_LINEAR >::send_msg(), channel::LocalInterface< Channel >::send_msg(), channel::ConnHandler< Channel, TcpSockTransport< Channel > >::send_msg(), Pong_Task::work(), Ping_Task::work(), and Demo_Task::work().


The documentation for this struct was generated from the following file:
Generated on Mon Feb 27 19:59:24 2006 for channel by  doxygen 1.4.6-NO