#include <Protocol.h>
Collaboration diagram for ACE_RMCast::Message:
Public Types | |
typedef Profiles::const_iterator | ProfileIterator |
Public Member Functions | |
Message () | |
Message_ptr | clone () |
bool | add (Profile_ptr p) |
void | replace (Profile_ptr p) |
void | remove (u16 id) |
Profile const * | find (u16 id) const |
ProfileIterator | begin () const |
size_t | size () const |
Protected Member Functions | |
Message (Message const &m) | |
Private Types | |
typedef ACE_Hash_Map_Manager< u16, Profile_ptr, ACE_Null_Mutex > | Profiles |
Private Member Functions | |
Message & | operator= (Message const &) |
Private Attributes | |
Profiles | profiles_ |
Friends | |
ostream & | operator<< (ostream &os, Message const &m) |
Definition at line 248 of file Protocol.h.
Definition at line 324 of file Protocol.h.
typedef ACE_Hash_Map_Manager<u16, Profile_ptr, ACE_Null_Mutex> ACE_RMCast::Message::Profiles [private] |
Definition at line 252 of file Protocol.h.
ACE_RMCast::Message::Message | ( | ) | [inline] |
ACE_RMCast::Message::Message | ( | Message const & | m | ) | [inline, protected] |
Definition at line 268 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done(), and profiles_.
00269 : profiles_ (4) 00270 { 00271 for (Profiles::const_iterator i (m.profiles_); !i.done (); i.advance ()) 00272 { 00273 // Shallow copy of profiles. This implies that profiles are not 00274 // modified as they go up/down the stack. 00275 // 00276 profiles_.bind ((*i).ext_id_, (*i).int_id_); 00277 } 00278 }
bool ACE_RMCast::Message::add | ( | Profile_ptr | p | ) | [inline] |
Definition at line 286 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find(), and profiles_.
00287 { 00288 u16 id (p->id ()); 00289 00290 if (profiles_.find (id) == 0) 00291 { 00292 return false; 00293 } 00294 00295 profiles_.bind (id, p); 00296 00297 return true; 00298 }
ProfileIterator ACE_RMCast::Message::begin | ( | void | ) | const [inline] |
Definition at line 327 of file Protocol.h.
References profiles_.
00328 { 00329 return ProfileIterator (profiles_); 00330 }
Message_ptr ACE_RMCast::Message::clone | ( | void | ) | [inline] |
Definition at line 261 of file Protocol.h.
00262 { 00263 Message_ptr cloned (new Message (*this)); 00264 return cloned; 00265 }
Definition at line 313 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find(), and profiles_.
00314 { 00315 Profiles::ENTRY* e = 0; 00316 00317 if (profiles_.find (id, e) == -1) return 0; 00318 00319 return e->int_id_.get (); 00320 }
void ACE_RMCast::Message::remove | ( | u16 | id | ) | [inline] |
Definition at line 307 of file Protocol.h.
References profiles_, and ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind().
void ACE_RMCast::Message::replace | ( | Profile_ptr | p | ) | [inline] |
Definition at line 301 of file Protocol.h.
References profiles_, and ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind().
size_t ACE_RMCast::Message::size | ( | void | ) | const [inline] |
Definition at line 334 of file Protocol.h.
References ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done(), profiles_, and ACE_SizeCDR::total_length().
00335 { 00336 sstream ss; 00337 00338 u32 s (0); 00339 00340 ss << s; 00341 00342 for (Profiles::const_iterator i (profiles_); !i.done (); i.advance ()) 00343 { 00344 ss << *((*i).int_id_); 00345 } 00346 00347 return ss.total_length (); 00348 }
Definition at line 352 of file Protocol.h.
00353 { 00354 u32 s (m.size ()); 00355 00356 os << s; 00357 00358 for (Profiles::const_iterator i (m.profiles_); !i.done (); i.advance ()) 00359 { 00360 os << *((*i).int_id_); 00361 } 00362 00363 return os; 00364 }
Profiles ACE_RMCast::Message::profiles_ [private] |