# ACE_RMCast::NAK Class Reference

`#include <Protocol.h>`

Inheritance diagram for ACE_RMCast::NAK:

[legend]
Collaboration diagram for ACE_RMCast::NAK:

[legend]
List of all members.

## Public Types

typedef ACE_Vector< u64, ACE_VECTOR_DEFAULT_SIZE > | SerialNumbers
typedef SerialNumbers::Iterator | iterator

## Public Member Functions

u32 | addr (0)
u16 | port (0)
u32 | addr (address_.get_ip_address())
u16 | port (address_.get_port_number())
u32 | addr (0)
u16 | port (0)

## Public Attributes

| __pad0__: Profile (h) { u64 sn (0)
sstream | ss

ss<< sn;size_t sn_size(ss.total_length());ss.reset();ss<< addr;ss<< port;size_t
addr_size(ss.total_length());is >> addr;is >> port;for(unsigned long i(0);i<
((h.size()-addr_size)/sn_size);++i){is >> sn;sns_.push_back(sn);}address_=Address(port,
addr);}:Profile(id), address_(src){size(calculate_size());}NAK_ptr clone(){return
NAK_ptr(static_cast< NAK
* >clone_().release()));}protected:virtual
Profile_ptr clone_(){return
new NAK(*this);}:Profile(nak),
address_(nak.address_), sns_(nak.sns_){}public:void add(u64 sn){sns_.push_back(sn);size(calculate_size());}public:Address const
&address() const {return address_;}iterator begin(){return
iterator(sns_);}size_t count()
const {return sns_.size();}public:static u32 max_count(u32 max_size){u32 n(0);sstream
ss;Profile::Header hdr(0,
0);ss<< hdr;u32 addr(0);u16
port(0);ss<< addr;ss<< port;while(true){u64 sn(0);ss<
< sn;if(ss.total_length()<
=max_size)++n;if(ss.total_length()
>=max_size) break;}return
n;}public:virtual void serialize_body(ostream &os) const {NAK
&this_=const_cast< NAK & >

this )

os<< addr;os<< port;for(iterator i(this_.begin());!i.done();i.advance()){u64 *psn;i.next(psn);os<< *psn;}}virtual void serialize_body(sstream &ss) const {NAK &this_=const_cast< NAK & > | this )

## Static Public Attributes

u16 const | id = 0x0005

## Member Typedef Documentation

typedef SerialNumbers::Iterator ACE_RMCast::NAK::iterator

typedef ACE_Vector<u64, ACE_VECTOR_DEFAULT_SIZE> ACE_RMCast::NAK::SerialNumbers

## Member Function Documentation

u32 ACE_RMCast::NAK::addr | ( | 0 |  | ) |

u32 ACE_RMCast::NAK::addr | ( | address_. | get_ip_address() | ) |

u32 ACE_RMCast::NAK::addr | ( | 0 |  | ) |

u16 ACE_RMCast::NAK::port | ( | 0 |  | ) |

u16 ACE_RMCast::NAK::port | ( | address_. | get_port_number() | ) |

u16 ACE_RMCast::NAK::port | ( | 0 |  | ) |

## Member Data Documentation

ACE_RMCast::NAK::__pad0__

u16 const ACE_RMCast::NAK::id = 0x0005`[static]`

sstream ACE_RMCast::NAK::ss

os<< addr; os << port; for (iterator i (this_.begin ()); !i.done (); i.advance ()) { u64* psn; i.next (psn); os << *psn; } } virtual void serialize_body (sstream& ss) const { NAK& this_ = const_cast<NAK&> ACE_RMCast::NAK::this)

ss<< sn; size_t sn_size (ss.total_length ()); ss.reset (); ss << addr; ss << port; size_t addr_size (ss.total_length ()); is >> addr; is >> port; for (unsigned long i (0); i < ((h.size () - addr_size) / sn_size); ++i) { is >> sn; sns_.push_back (sn); } address_ = Address (port, addr); } : Profile (id), address_ (src) { size (calculate_size ()); } NAK_ptr clone () { return NAK_ptr (static_cast<NAK*>clone_ ().release ())); } protected: virtual Profile_ptr clone_ () { return new NAK (*this); } : Profile (nak), address_ (nak.address_), sns_ (nak.sns_) { } public: void add (u64 sn) { sns_.push_back (sn); size (calculate_size ()); } public: Address const& address () const { return address_; } iterator begin () { return iterator (sns_); } size_t count () const { return sns_.size (); } public: static u32 max_count (u32 max_size) { u32 n (0); sstream ss; Profile::Header hdr (0, 0); ss << hdr; u32 addr (0); u16 port (0); ss << addr; ss << port; while (true) { u64 sn (0); ss << sn; if (ss.total_length () <= max_size) ++n; if (ss.total_length () >= max_size) break; } return n; } public: virtual void serialize_body (ostream& os) const { NAK& this_ = const_cast<NAK&> ACE_RMCast::NAK::this)

The documentation for this class was generated from the following files:

- Protocol.h
- Protocol.cpp