Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

ACE_RMCast::Message Class Reference

#include <Protocol.h>

Collaboration diagram for ACE_RMCast::Message:
Collaboration graph
[legend]

List of all members.

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

Messageoperator= (Message const &)

Private Attributes

Profiles profiles_

Friends

ostreamoperator<< (ostream &os, Message const &m)

Detailed Description

Definition at line 248 of file Protocol.h.


Member Typedef Documentation

Definition at line 324 of file Protocol.h.

Definition at line 252 of file Protocol.h.


Constructor & Destructor Documentation

ACE_RMCast::Message::Message (  )  [inline]

Definition at line 255 of file Protocol.h.

        : profiles_ (4)
    {
    }

ACE_RMCast::Message::Message ( Message const &  m  )  [inline, protected]

Definition at line 268 of file Protocol.h.

        : profiles_ (4)
    {
      for (Profiles::const_iterator i (m.profiles_); !i.done (); i.advance ())
      {
        // Shallow copy of profiles. This implies that profiles are not
        // modified as they go up/down the stack.
        //
        profiles_.bind ((*i).ext_id_, (*i).int_id_);
      }
    }


Member Function Documentation

bool ACE_RMCast::Message::add ( Profile_ptr  p  )  [inline]

Definition at line 286 of file Protocol.h.

    {
      u16 id (p->id ());

      if (profiles_.find (id) == 0)
      {
        return false;
      }

      profiles_.bind (id, p);

      return true;
    }

ProfileIterator ACE_RMCast::Message::begin ( void   )  const [inline]

Definition at line 327 of file Protocol.h.

    {
      return ProfileIterator (profiles_);
    }

Message_ptr ACE_RMCast::Message::clone ( void   )  [inline]

Definition at line 261 of file Protocol.h.

    {
      Message_ptr cloned (new Message (*this));
      return cloned;
    }

Profile const* ACE_RMCast::Message::find ( u16  id  )  const [inline]

Definition at line 313 of file Protocol.h.

    {
      Profiles::ENTRY* e = 0;

      if (profiles_.find (id, e) == -1) return 0;

      return e->int_id_.get ();
    }

Message& ACE_RMCast::Message::operator= ( Message const &   )  [private]
void ACE_RMCast::Message::remove ( u16  id  )  [inline]

Definition at line 307 of file Protocol.h.

    {
      profiles_.unbind (id);
    }

void ACE_RMCast::Message::replace ( Profile_ptr  p  )  [inline]

Definition at line 301 of file Protocol.h.

    {
      profiles_.rebind (p->id (), p);
    }

size_t ACE_RMCast::Message::size ( void   )  const [inline]

Definition at line 334 of file Protocol.h.

    {
      sstream ss;

      u32 s (0);

      ss << s;

      for (Profiles::const_iterator i (profiles_); !i.done (); i.advance ())
      {
        ss << *((*i).int_id_);
      }

      return ss.total_length ();
    }


Friends And Related Function Documentation

ostream& operator<< ( ostream os,
Message const &  m 
) [friend]

Definition at line 352 of file Protocol.h.

    {
      u32 s (m.size ());

      os << s;

      for (Profiles::const_iterator i (m.profiles_); !i.done (); i.advance ())
      {
        os << *((*i).int_id_);
      }

      return os;
    }


Member Data Documentation

Definition at line 367 of file Protocol.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines