S3FC project page S3FC home page

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

s3_txport_data Class Template Reference

Data class used by the s3_txport system. More...

#include <s3_txport_base.h>

Inheritance diagram for s3_txport_data:

Inheritance graph
[legend]
Collaboration diagram for s3_txport_data:

Collaboration graph
[legend]
List of all members.

Public Methods

 s3_txport_data (const T_Data &a_data, s3_txport_client_id a_id)
 Quick constructor for single destination. More...

 s3_txport_data (const T_Data &a_data, const std::list< s3_txport_client_id > &a_idl)
 Quick constructor for multiple destinations. More...

 s3_txport_data ()
 Default constructor. More...

void erase_client_ids ()
 Erase target client list. More...

void set_id (const std::list< s3_txport_client_id > &id_list)
 Set list of target clients to send data to. More...

void set_id (s3_txport_client_id id)
 Erase the existing list, and set the new target to id. More...

s3_txport_client_id get_id () const
 Returns the id associated with the received packet. More...

std::list< s3_txport_client_idget_id_list () const

Public Attributes

T_Data data
 Data received from client. More...


Private Attributes

std::list< s3_txport_client_ididl
 Client identifier list. More...


Detailed Description

template<typename T_Data>
class s3_txport_data< T_Data >

Data class used by the s3_txport system.

Note that it contains both the data payload as well as a handle that uniquely identifies the client to which/from which the data is sent/received. This object must be templated a s3_streamable derived type, or a type for which an overloaded version of s3_streamable::pack() exists.

Definition at line 50 of file s3_txport_base.h.


Constructor & Destructor Documentation

template<typename T_Data>
s3_txport_data< T_Data >::s3_txport_data const T_Data &    a_data,
s3_txport_client_id    a_id
[inline]
 

Quick constructor for single destination.

Definition at line 61 of file s3_txport_base.h.

template<typename T_Data>
s3_txport_data< T_Data >::s3_txport_data const T_Data &    a_data,
const std::list< s3_txport_client_id > &    a_idl
[inline]
 

Quick constructor for multiple destinations.

Definition at line 68 of file s3_txport_base.h.

template<typename T_Data>
s3_txport_data< T_Data >::s3_txport_data   [inline]
 

Default constructor.

Definition at line 74 of file s3_txport_base.h.


Member Function Documentation

template<typename T_Data>
void s3_txport_data< T_Data >::erase_client_ids   [inline]
 

Erase target client list.

Definition at line 77 of file s3_txport_base.h.

template<typename T_Data>
s3_txport_client_id s3_txport_data< T_Data >::get_id   const [inline]
 

Returns the id associated with the received packet.

As the data can only be from one source, only one ID can be present, so an exception is thrown if the ID list contains more than one ID. In a nutshell, only call this for data you have just popped from the receive queue.

Returns:
The ID of the sender of the data.

Definition at line 108 of file s3_txport_base.h.

Referenced by s3_post_office_switch::main_loop, s3_post_office_switch::reply_failure, and s3_post_office_switch::reply_success.

template<typename T_Data>
std::list<s3_txport_client_id> s3_txport_data< T_Data >::get_id_list   const [inline]
 

Definition at line 119 of file s3_txport_base.h.

template<typename T_Data>
void s3_txport_data< T_Data >::set_id s3_txport_client_id    id [inline]
 

Erase the existing list, and set the new target to id.

Parameters:
id  The ID of the target client

Definition at line 95 of file s3_txport_base.h.

template<typename T_Data>
void s3_txport_data< T_Data >::set_id const std::list< s3_txport_client_id > &    id_list [inline]
 

Set list of target clients to send data to.

Parameters:
id_list  A list of clients which must receive the data payload.

Definition at line 86 of file s3_txport_base.h.


Member Data Documentation

template<typename T_Data>
T_Data s3_txport_data::data
 

Data received from client.

Definition at line 58 of file s3_txport_base.h.

Referenced by s3_post_office_switch::main_loop, s3_post_office_switch::reply_failure, s3_post_office_switch::reply_success, and s3_txport_data< s3_message >::s3_txport_data.

template<typename T_Data>
std::list<s3_txport_client_id> s3_txport_data::idl [private]
 

Client identifier list.

Definition at line 54 of file s3_txport_base.h.

Referenced by s3_txport_data< s3_message >::erase_client_ids, s3_txport_data< s3_message >::get_id, s3_txport_data< s3_message >::get_id_list, s3_txport_data< s3_message >::s3_txport_data, and s3_txport_data< s3_message >::set_id.


The documentation for this class was generated from the following file:
Send comments to: s3fc@stonethree.com SourceForge Logo