Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

olsr::utl::Data_< Self > Struct Template Reference

Base class for Data and ConstData. More...

#include <data.hh>

List of all members.

Public Member Functions

template<class T>
Self & operator= (const Data_< T > &other)
 Affectation.
Self & operator= (const Data_< Self > &other)
bool empty () const
::size_t size () const
 Get the available size at raw().
void fit (unsigned len)
 Resize the buffer.
template<class T>
::size_t operator- (const Data_< T > &rhs) const
 Return size() - rhs.size().
const u_int8_t * raw () const
 Access the raw data.
 Data_ ()
 Data_ (const ::size_t size)
 Data_ (const Data_ &other)
template<class T>
 Data_ (const Data_< T > &other)
 ~Data_ ()
Self shrink_by (unsigned len) const
Self shrink_to (unsigned len) const
Self operator+ (unsigned offset) const
Self & operator+= (unsigned offset)
void dump (u_int8_t *p) const
void dump (Data_< Data > &d) const
Self & exact ()
const Self & exact () const

Protected Member Functions

void use ()
 Increment the buffer's usecount.
void unuse ()
 Decrement the buffer's usecount.

Protected Attributes

internal::shared_datadata_
::size_t instance_size_
unsigned offset_

Friends

class Data_<typename internal::other<Self>::return_type>


Detailed Description

template<class Self>
struct olsr::utl::Data_< Self >

Base class for Data and ConstData.


Constructor & Destructor Documentation

template<class Self>
olsr::utl::Data_< Self >::Data_  ) 
 

template<class Self>
olsr::utl::Data_< Self >::Data_ const ::size_t  size  )  [explicit]
 

template<class Self>
olsr::utl::Data_< Self >::Data_ const Data_< Self > &  other  ) 
 

template<class Self>
template<class T>
olsr::utl::Data_< Self >::Data_ const Data_< T > &  other  ) 
 

template<class Self>
olsr::utl::Data_< Self >::~Data_  ) 
 


Member Function Documentation

template<class Self>
void olsr::utl::Data_< Self >::dump Data_< Data > &  d  )  const
 

template<class Self>
void olsr::utl::Data_< Self >::dump u_int8_t *  p  )  const
 

template<class Self>
bool olsr::utl::Data_< Self >::empty  )  const
 

Tell whether this object has an attached buffer or not.

Warning:
*Not* equivalent to size() == 0.

template<class Self>
const Self & olsr::utl::Data_< Self >::exact  )  const
 

template<class Self>
Self & olsr::utl::Data_< Self >::exact  ) 
 

template<class Self>
void olsr::utl::Data_< Self >::fit unsigned  len  ) 
 

Resize the buffer.

template<class Self>
Self olsr::utl::Data_< Self >::operator+ unsigned  offset  )  const
 

template<class Self>
Self & olsr::utl::Data_< Self >::operator+= unsigned  offset  ) 
 

template<class Self>
template<class T>
size_t olsr::utl::Data_< Self >::operator- const Data_< T > &  rhs  )  const
 

Return size() - rhs.size().

template<class Self>
Self & olsr::utl::Data_< Self >::operator= const Data_< Self > &  other  ) 
 

template<class Self>
template<class T>
Self & olsr::utl::Data_< Self >::operator= const Data_< T > &  other  ) 
 

Affectation.

template<class Self>
const u_int8_t * olsr::utl::Data_< Self >::raw  )  const
 

Access the raw data.

template<class Self>
Self olsr::utl::Data_< Self >::shrink_by unsigned  len  )  const
 

template<class Self>
Self olsr::utl::Data_< Self >::shrink_to unsigned  len  )  const
 

template<class Self>
size_t olsr::utl::Data_< Self >::size  )  const
 

Get the available size at raw().

template<class Self>
void olsr::utl::Data_< Self >::unuse  )  [protected]
 

Decrement the buffer's usecount.

template<class Self>
void olsr::utl::Data_< Self >::use  )  [protected]
 

Increment the buffer's usecount.


Friends And Related Function Documentation

template<class Self>
friend class Data_<typename internal::other<Self>::return_type> [friend]
 


Member Data Documentation

template<class Self>
internal::shared_data* olsr::utl::Data_< Self >::data_ [protected]
 

template<class Self>
::size_t olsr::utl::Data_< Self >::instance_size_ [protected]
 

template<class Self>
unsigned olsr::utl::Data_< Self >::offset_ [protected]
 


The documentation for this struct was generated from the following files:
Generated on Thu Jul 28 21:21:52 2005 for Qolyester daemon by  doxygen 1.4.1