g4tools  5.4.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tools::wroot::bufobj Class Reference
Inheritance diagram for tools::wroot::bufobj:
Inheritance graph
[legend]
Collaboration diagram for tools::wroot::bufobj:
Collaboration graph
[legend]

Public Member Functions

virtual const std::string & name () const
 
virtual const std::string & title () const
 
virtual const std::string & store_class_name () const
 
virtual bool stream (buffer &a_buffer) const
 
 bufobj (std::ostream &a_out, bool a_byte_swap, uint32 a_size, const std::string &a_name, const std::string &a_title, const std::string &a_store_cls)
 
virtual ~bufobj ()
 
- Public Member Functions inherited from tools::wroot::iobject
virtual ~iobject ()
 
- Public Member Functions inherited from tools::wroot::buffer
 buffer (std::ostream &a_out, bool a_byte_swap, uint32 a_size)
 
virtual ~buffer ()
 
bool byte_swap () const
 
std::ostream & out () const
 
char * buf ()
 
const char * buf () const
 
uint32 length () const
 
uint32 size () const
 
char *& pos ()
 
char * max_pos () const
 
template<class T >
bool write (T x)
 
bool write (bool x)
 
bool write (const std::string &x)
 
bool write_fast_array (const char *a_a, uint32 a_n)
 
bool write_cstring (const char *a_s)
 
template<class T >
bool write_fast_array (const T *a_a, uint32 a_n)
 
template<class T >
bool write_fast_array (const std::vector< T > &a_v)
 
template<class T >
bool write_array (const T *a_a, uint32 a_n)
 
template<class T >
bool write_array (const std::vector< T > a_v)
 
template<class T >
bool write_array2 (const std::vector< std::vector< T > > a_v)
 
bool write_version (short a_version)
 
bool write_version (short a_version, uint32 &a_pos)
 
bool set_byte_count (uint32 a_pos)
 
bool write_object (const ibo &a_obj)
 
bool expand2 (uint32 a_new_size)
 
bool expand (uint32 a_new_size)
 
size_t to_displace () const
 
bool displace_mapped (unsigned int a_num)
 
void reset_objs_map ()
 

Static Public Member Functions

static const std::string & s_class ()
 

Protected Member Functions

 bufobj (const bufobj &a_from)
 
bufobjoperator= (const bufobj &)
 
- Protected Member Functions inherited from tools::wroot::buffer
 buffer (const buffer &a_from)
 
bufferoperator= (const buffer &)
 
bool write_class (const std::string &a_cls)
 
bool set_byte_count_obj (uint32 a_pos)
 

Protected Attributes

std::string m_name
 
std::string m_title
 
std::string m_store_cls
 
- Protected Attributes inherited from tools::wroot::buffer
std::ostream & m_out
 
bool m_byte_swap
 
uint32 m_size
 
char * m_buffer
 
char * m_max
 
char * m_pos
 
wbuf m_wb
 
std::map< ibo *, uint32m_objs
 
std::vector< std::pair< uint32, uint32 > > m_obj_mapped
 
std::map< std::string, uint32m_clss
 
std::vector< std::pair< uint32, uint32 > > m_cls_mapped
 

Additional Inherited Members

- Static Protected Member Functions inherited from tools::wroot::buffer
static short kMaxVersion ()
 
static uint32 kMaxMapCount ()
 
static short kByteCountVMask ()
 
static uint32 kNewClassTag ()
 
static int kMapOffset ()
 
static unsigned int kClassMask ()
 
static uint32 kByteCountMask ()
 

Detailed Description

Definition at line 13 of file bufobj.

Constructor & Destructor Documentation

◆ bufobj() [1/2]

tools::wroot::bufobj::bufobj ( std::ostream &  a_out,
bool  a_byte_swap,
uint32  a_size,
const std::string &  a_name,
const std::string &  a_title,
const std::string &  a_store_cls 
)
inline

Definition at line 25 of file bufobj.

29  :buffer(a_out,a_byte_swap,a_size)
30  ,m_name(a_name)
31  ,m_title(a_title)
32  ,m_store_cls(a_store_cls)
33  {
34 #ifdef TOOLS_MEM
35  mem::increment(s_class().c_str());
36 #endif
37  }

◆ ~bufobj()

virtual tools::wroot::bufobj::~bufobj ( )
inlinevirtual

Definition at line 38 of file bufobj.

38  {
39 #ifdef TOOLS_MEM
40  mem::decrement(s_class().c_str());
41 #endif
42  }

◆ bufobj() [2/2]

tools::wroot::bufobj::bufobj ( const bufobj a_from)
inlineprotected

Definition at line 44 of file bufobj.

44  : iobject(a_from),buffer(a_from){
45 #ifdef TOOLS_MEM
46  mem::increment(s_class().c_str());
47 #endif
48  }

Member Function Documentation

◆ name()

virtual const std::string& tools::wroot::bufobj::name ( ) const
inlinevirtual

Implements tools::wroot::iobject.

Definition at line 20 of file bufobj.

20 {return m_name;}

◆ operator=()

bufobj& tools::wroot::bufobj::operator= ( const bufobj )
inlineprotected

Definition at line 49 of file bufobj.

49 {return *this;}

◆ s_class()

static const std::string& tools::wroot::bufobj::s_class ( )
inlinestatic

Definition at line 15 of file bufobj.

15  {
16  static const std::string s_v("tools::wroot::bufobj");
17  return s_v;
18  }

◆ store_class_name()

virtual const std::string& tools::wroot::bufobj::store_class_name ( ) const
inlinevirtual

Implements tools::wroot::iobject.

Definition at line 22 of file bufobj.

22 {return m_store_cls;}

◆ stream()

virtual bool tools::wroot::bufobj::stream ( buffer a_buffer) const
inlinevirtual

Implements tools::wroot::iobject.

Definition at line 23 of file bufobj.

23 {return a_buffer.write_fast_array(m_buffer,length());}

◆ title()

virtual const std::string& tools::wroot::bufobj::title ( ) const
inlinevirtual

Implements tools::wroot::iobject.

Definition at line 21 of file bufobj.

21 {return m_title;}

Member Data Documentation

◆ m_name

std::string tools::wroot::bufobj::m_name
protected

Definition at line 51 of file bufobj.

◆ m_store_cls

std::string tools::wroot::bufobj::m_store_cls
protected

Definition at line 53 of file bufobj.

◆ m_title

std::string tools::wroot::bufobj::m_title
protected

Definition at line 52 of file bufobj.


The documentation for this class was generated from the following file:
tools::wroot::buffer::length
uint32 length() const
Definition: buffer:89
tools::wroot::bufobj::m_store_cls
std::string m_store_cls
Definition: bufobj:53
tools::wroot::buffer::buffer
buffer(std::ostream &a_out, bool a_byte_swap, uint32 a_size)
Definition: buffer:34
tools::wroot::bufobj::m_name
std::string m_name
Definition: bufobj:51
tools::wroot::bufobj::s_class
static const std::string & s_class()
Definition: bufobj:15
tools::wroot::bufobj::m_title
std::string m_title
Definition: bufobj:52
tools::wroot::buffer::m_buffer
char * m_buffer
Definition: buffer:393