Classdesc 3.44
pack_t Class Reference

#include <pack_base.h>

Inheritance diagram for pack_t:
Inheritance graph
Collaboration diagram for pack_t:
Collaboration graph

Public Member Functions

const char * data () const
 actual buffer
char * data ()
 actual buffer
size_t size () const
 size of buffer
size_t pos () const
 position of read pointer
char * realloc (char *d, size_t s)
void realloc (size_t s)
void resize (size_t s)
virtual void append (const basic_type &x)
virtual void popoff (basic_type &x)
 pack_t (size_t sz=0)
 pack_t (const char *fname, const char *rw)
 operator bool ()
virtual pack_treseti ()
virtual pack_treseto ()
virtual pack_tseeki (long offs)
virtual pack_tseeko (long offs)
void clear ()
virtual void packraw (const char *x, size_t s)
virtual void unpackraw (char *x, size_t s)
virtual void swap (pack_t &other)
virtual int cmp (const pack_t &x) const
bool operator< (const pack_t &x) const
bool operator> (const pack_t &x) const
bool operator== (const pack_t &x) const
bool operator!= (const pack_t &x) const
const char * data () const
 actual buffer
char * data ()
 actual buffer
size_t size () const
 size of buffer
size_t pos () const
 position of read pointer
char * realloc (char *d, size_t s)
void realloc (size_t s)
void resize (size_t s)
virtual void append (const basic_type &x)
virtual void popoff (basic_type &x)
 pack_t (size_t sz=0)
 pack_t (const char *fname, const char *rw)
 operator bool ()
virtual pack_treseti ()
virtual pack_treseto ()
virtual pack_tseeki (long offs)
virtual pack_tseeko (long offs)
void clear ()
virtual void packraw (const char *x, size_t s)
virtual void unpackraw (char *x, size_t s)
virtual void swap (pack_t &other)
virtual int cmp (const pack_t &x) const
bool operator< (const pack_t &x) const
bool operator> (const pack_t &x) const
bool operator== (const pack_t &x) const
bool operator!= (const pack_t &x) const

Public Attributes

Ptr_flag ptr_flag
unsigned recur_max
 recursion limit for pack_graph
std::vector< PtrStoreRefalloced

Protected Types

enum  mode_t {
  buf , readf , writef , buf ,
  readf , writef
}
enum  mode_t {
  buf , readf , writef , buf ,
  readf , writef
}

Protected Member Functions

void swap_base (pack_t &other)
void swap_base (pack_t &other)

Protected Attributes

FILE * f
mode_t mode
char * m_data
 actual buffer
size_t m_size
 size of buffer
size_t m_pos
 position of read pointer

Detailed Description

basic serialisation buffer object

Member Function Documentation

◆ cmp() [1/2]

virtual int cmp ( const pack_t & x) const
inlinevirtual

returns -1, 0 or 1 if this is lexicographically less, equal or greater than x

References m_data, and m_size.

Referenced by classdesc::deepCmp(), and classdesc::deepEq().

◆ cmp() [2/2]

virtual int cmp ( const pack_t & x) const
inlinevirtual

returns -1, 0 or 1 if this is lexicographically less, equal or greater than x

References m_data, and m_size.

◆ resize() [1/2]

void resize ( size_t s)
inline

resizes the buffer, leaving any extra allocated space uninitialised use this for expanding an input buffer when reading from a stream

References m_data, and m_size.

◆ resize() [2/2]

void resize ( size_t s)
inline

resizes the buffer, leaving any extra allocated space uninitialised use this for expanding an input buffer when reading from a stream

References m_data, and m_size.


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