ACE_RMCast::NRTM Struct Reference

#include <Protocol.h>

Inheritance diagram for ACE_RMCast::NRTM:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast::NRTM:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 map_ (10)
 map_ (10)
NRTM_ptr clone ()
void insert (Address const &addr, u64 sn)
u64 find (Address const &addr) const
bool empty () const
virtual void serialize_body (ostream &os) const
virtual void serialize_body (sstream &ss) const

Static Public Member Functions

u32 max_count (u32 max_size)

Public Attributes

 __pad0__: Profile (h)
 __pad1__: Profile (id)

Static Public Attributes

u16 const  id = 0x0006

Protected Member Functions

virtual Profile_ptr clone_ ()
done ()
advance ())

Protected Attributes

 __pad2__: Profile (nrtm) { for (Map::const_iterator i (nrtm.map_)

Private Types

typedef ACE_Hash_Map_Manager_Ex<
Address, u64, AddressHasher,
ACE_Equal_To< Address >,
ACE_Null_Mutex
Map

Private Attributes

Map map_

Member Typedef Documentation

typedef ACE_Hash_Map_Manager_Ex<Address, u64, AddressHasher, ACE_Equal_To<Address>, ACE_Null_Mutex> ACE_RMCast::NRTM::Map [private]
 

Definition at line 1101 of file Protocol.h.


Member Function Documentation

i ACE_RMCast::NRTM::advance  )  [inline, protected]
 

Definition at line 997 of file Protocol.h.

References map_.

00998         : Profile (nrtm)
00999     {
01000       for (Map::const_iterator i (nrtm.map_); !i.done (); i.advance ())

NRTM_ptr ACE_RMCast::NRTM::clone void   )  [inline]
 

Reimplemented from ACE_RMCast::Profile.

Definition at line 982 of file Protocol.h.

00986     {

virtual Profile_ptr ACE_RMCast::NRTM::clone_  )  [inline, protected, virtual]
 

Implements ACE_RMCast::Profile.

Definition at line 989 of file Protocol.h.

References ACE_RMCast::Profile_ptr.

00990            :
00991     virtual Profile_ptr
00992     clone_ ()
    {

i ACE_RMCast::NRTM::done  )  [protected]
 

bool ACE_RMCast::NRTM::empty void   )  const [inline]
 

Definition at line 1023 of file Protocol.h.

01027     {

u64 ACE_RMCast::NRTM::find Address const &  addr  )  const [inline]
 

Definition at line 1013 of file Protocol.h.

Referenced by ACE_RMCast::Acknowledge::recv().

01017     {
01018       u64 sn;
01019 
01020       if (map_.find (addr, sn) == -1) return 0;

void ACE_RMCast::NRTM::insert Address const &  addr,
u64  sn
[inline]
 

Definition at line 1005 of file Protocol.h.

References ACE_RMCast::Address, ACE_RMCast::Profile::size(), and ACE_RMCast::u64.

01006         :
01007     void
01008     insert (Address const& addr, u64 sn)
01009     {
01010       map_.bind (addr, sn);

ACE_RMCast::NRTM::map_ 10   )  [inline]
 

Definition at line 976 of file Protocol.h.

00979         : Profile (id), map_ (10)

ACE_RMCast::NRTM::map_ 10   )  [inline]
 

Definition at line 948 of file Protocol.h.

References ACE_RMCast::Address, ACE_RMCast::istream, ACE_RMCast::sstream, ACE_SizeCDR::total_length(), ACE_RMCast::u16, ACE_RMCast::u32, and ACE_RMCast::u64.

00949         :
00950     NRTM (Header const& h, istream& is)
00951         : Profile (h), map_ (10)
00952     {
00953       u32 addr (0);
00954       u16 port (0);
00955       u64 sn (0);
00956 
00957       sstream ss;
00958 
00959       ss << sn;
00960       ss << addr;
00961       ss << port;
00962 
00963       size_t block_size (ss.total_length ());
00964 
00965 
00966       // num_of_blocks = size / block_size
00967       //
00968       for (size_t i (0); i < (h.size () / block_size); ++i)
00969       {
00970         is >> sn;
00971         is >> addr;
00972         is >> port;
00973 
        map_.bind (Address (port, addr), sn);

u32 ACE_RMCast::NRTM::max_count u32  max_size  )  [inline, static]
 

Definition at line 1033 of file Protocol.h.

References ACE_RMCast::sstream, ACE_SizeCDR::total_length(), ACE_RMCast::u16, ACE_RMCast::u32, and ACE_RMCast::u64.

01037     {
01038       u32 n (0);
01039 
01040       sstream ss;
01041 
01042       Profile::Header hdr (0, 0);
01043       ss << hdr;
01044 
01045       while (true)
01046       {
01047         u32 addr (0);
01048         u16 port (0);
01049         u64 sn (0);
01050 
01051         ss << sn;
01052         ss << addr;
01053         ss << port;
01054 
01055         if (ss.total_length () <= max_size)
01056           ++n;
01057 
01058         if (ss.total_length () >= max_size)
01059           break;
01060       }

virtual void ACE_RMCast::NRTM::serialize_body sstream ss  )  const [inline, virtual]
 

Implements ACE_RMCast::Profile.

Definition at line 1080 of file Protocol.h.

01084     {
01085       for (Map::const_iterator i (map_), e (map_, 1); i != e; ++i)
01086       {
01087         u32 addr (0);
01088         u16 port (0);
01089         u64 sn (0);
01090 
01091         ss << sn;
01092         ss << addr;

virtual void ACE_RMCast::NRTM::serialize_body ostream os  )  const [inline, virtual]
 

Implements ACE_RMCast::Profile.

Definition at line 1064 of file Protocol.h.

References ACE_RMCast::ostream, ACE_RMCast::u16, ACE_RMCast::u32, and ACE_RMCast::u64.

01065         :
01066     virtual void
01067     serialize_body (ostream& os) const
01068     {
01069       for (Map::const_iterator i (map_), e (map_, 1); i != e; ++i)
01070       {
01071         u32 addr ((*i).ext_id_.get_ip_address ());
01072         u16 port ((*i).ext_id_.get_port_number ());
01073         u64 sn ((*i).int_id_);
01074 
01075         os << sn;
01076         os << addr;
01077         os << port;


Member Data Documentation

ACE_RMCast::NRTM::__pad0__
 

Definition at line 948 of file Protocol.h.

ACE_RMCast::NRTM::__pad1__
 

Definition at line 976 of file Protocol.h.

ACE_RMCast::NRTM::__pad2__ [protected]
 

Definition at line 997 of file Protocol.h.

u16 const ACE_RMCast::NRTM::id = 0x0006 [static]
 

Definition at line 14 of file Protocol.cpp.

Map ACE_RMCast::NRTM::map_ [private]
 

Definition at line 1103 of file Protocol.h.

Referenced by advance().


The documentation for this struct was generated from the following files:
Generated on Thu Nov 9 11:41:16 2006 for ACE_RMCast by doxygen 1.3.6