ACE_RMCast::Data Struct Reference

#include <Protocol.h>

Inheritance diagram for ACE_RMCast::Data:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~Data ()
 Data (Header const &h, istream &is)
 Data (void const *buf, size_t s, size_t capacity=0)
Data_ptr clone ()
char const * buf () const
char * buf ()
size_t size () const
void size (size_t s)
size_t capacity () const
virtual void serialize_body (ostream &os) const
virtual void serialize_body (sstream &ss) const

Static Public Attributes

u16 const  id = 0x0003

Protected Member Functions

virtual Profile_ptr clone_ ()
 Data (Data const &d)

Private Attributes

char * buf_
size_t size_
size_t capacity_

Constructor & Destructor Documentation

virtual ACE_RMCast::Data::~Data  )  [inline, virtual]
 

Definition at line 554 of file Protocol.h.

00555         :
00556     virtual
00557     ~Data ()
00558     {
      if (buf_)

ACE_RMCast::Data::Data Header const &  h,
istream is
[inline]
 

Definition at line 560 of file Protocol.h.

00564         : Profile (h),
00565           buf_ (0),
00566           size_ (h.size ()),
00567           capacity_ (size_)
00568     {
00569       if (size_)
00570       {
00571         buf_ = reinterpret_cast<char*> (operator new (capacity_));

ACE_RMCast::Data::Data void const *  buf,
size_t  s,
size_t  capacity = 0
[inline]
 

Definition at line 573 of file Protocol.h.

00577         : Profile (id),
00578           buf_ (0),
00579           size_ (s),
00580           capacity_ (capacity < size_ ? size_ : capacity)
00581     {
00582       if (size_)
00583       {
00584         buf_ = reinterpret_cast<char*> (operator new (capacity_));
00585         ACE_OS::memcpy (buf_, buf, size_);
00586       }

ACE_RMCast::Data::Data Data const &  d  )  [inline, protected]
 

Definition at line 602 of file Protocol.h.

00606         : Profile (d),
00607           buf_ (0),
00608           size_ (d.size_),
00609           capacity_ (d.capacity_)
00610     {
00611       if (size_)
00612       {
00613         buf_ = reinterpret_cast<char*> (operator new (capacity_));
00614         ACE_OS::memcpy (buf_, d.buf_, size_);
00615       }


Member Function Documentation

char* ACE_RMCast::Data::buf void   )  [inline]
 

Definition at line 625 of file Protocol.h.

00629     {

char const* ACE_RMCast::Data::buf void   )  const [inline]
 

Definition at line 619 of file Protocol.h.

Referenced by ACE_RMCast::Reassemble::recv(), ACE_RMCast::Socket_Impl::recv_(), and ACE_RMCast::Fragment::send().

00620         :
00621     char const*
00622     buf () const
    {

size_t ACE_RMCast::Data::capacity void   )  const [inline]
 

Definition at line 648 of file Protocol.h.

00652     {

Data_ptr ACE_RMCast::Data::clone void   )  [inline]
 

Reimplemented from ACE_RMCast::Profile.

Definition at line 589 of file Protocol.h.

00593     {

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

Implements ACE_RMCast::Profile.

Definition at line 596 of file Protocol.h.

References ACE_RMCast::Profile_ptr.

00597            :
00598     virtual Profile_ptr
00599     clone_ ()
00600     {
      Profile_ptr p (new Data (*this));

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

Implements ACE_RMCast::Profile.

Definition at line 661 of file Protocol.h.

00665     {

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

Implements ACE_RMCast::Profile.

Definition at line 655 of file Protocol.h.

References ACE_RMCast::ostream, and ACE_OutputCDR::write_char_array().

00656         :
00657     virtual void
00658     serialize_body (ostream& os) const
    {

void ACE_RMCast::Data::size size_t  s  )  [inline]
 

Definition at line 637 of file Protocol.h.

00641     {
00642       if (s > capacity_)
00643         ACE_OS::abort ();
00644 
00645       size_ = s;

size_t ACE_RMCast::Data::size void   )  const [inline]
 

Reimplemented from ACE_RMCast::Profile.

Definition at line 631 of file Protocol.h.

Referenced by ACE_RMCast::Reassemble::recv(), ACE_RMCast::Socket_Impl::recv_(), ACE_RMCast::Fragment::send(), ACE_RMCast::Flow::send(), ACE_RMCast::Acknowledge::send(), and ACE_RMCast::Socket_Impl::size_().

00635     {


Member Data Documentation

char* ACE_RMCast::Data::buf_ [private]
 

Definition at line 667 of file Protocol.h.

size_t ACE_RMCast::Data::capacity_ [private]
 

Definition at line 669 of file Protocol.h.

u16 const ACE_RMCast::Data::id = 0x0003 [static]
 

Definition at line 11 of file Protocol.cpp.

size_t ACE_RMCast::Data::size_ [private]
 

Definition at line 668 of file Protocol.h.


The documentation for this struct was generated from the following files:
Generated on Sun Jan 27 13:03:08 2008 for ACE_RMCast by doxygen 1.3.6