Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

memory_output_stream Class Reference

interface of stream for xml in memory More...

#include <miscxml.h>

Inheritance diagram for memory_output_stream:

byte_consumer

List of all members.

Public Member Functions

 memory_output_stream (mem_pool_t &small_pool, mem_pool_t &big_pool, size_t xml_size, ub1_t *buf, size_t buf_size)
 constructor
size_t get_required_size () const
 returns required size
bool is_overflow () const
 checks if the buffer would overflow

Protected Member Functions

virtual bool data_persist (const ub1_t *buf, size_t len)
 saves the actual bytes

Private Attributes

ub1_t_buf
 internal buffer
size_t _buf_size
 internal buffer size
size_t _filled_size
 bytes processed
size_t _required_size
 required size


Detailed Description

interface of stream for xml in memory

Definition at line 174 of file miscxml.h.


Constructor & Destructor Documentation

memory_output_stream::memory_output_stream ( mem_pool_t small_pool,
mem_pool_t big_pool,
size_t  xml_size,
ub1_t buf,
size_t  buf_size 
)

constructor

Parameters:
small_pool  small memory pool
big_pool  big memory pool
xml_size  xml size - just a tip
buf  output buffer
buf_size  output buffer size

Definition at line 835 of file miscxml.cpp.


Member Function Documentation

size_t memory_output_stream::get_required_size (  )  const

returns required size

Definition at line 841 of file miscxml.cpp.

References _required_size.

Referenced by xml_designer_impl::save().

bool memory_output_stream::is_overflow (  )  const

checks if the buffer would overflow

Definition at line 847 of file miscxml.cpp.

References _filled_size, and _required_size.

Referenced by xml_designer_impl::save().

bool memory_output_stream::data_persist ( const ub1_t buf,
size_t  len 
) [protected, virtual]

saves the actual bytes

Parameters:
buf  buffer to save
len  buffer length

Implements byte_consumer.

Definition at line 854 of file miscxml.cpp.

References _buf, _buf_size, _filled_size, and _required_size.


Member Data Documentation

internal buffer

Definition at line 198 of file miscxml.h.

Referenced by data_persist().

internal buffer size

Definition at line 199 of file miscxml.h.

Referenced by data_persist().

bytes processed

Definition at line 200 of file miscxml.h.

Referenced by data_persist(), and is_overflow().

required size

Definition at line 201 of file miscxml.h.

Referenced by data_persist(), get_required_size(), and is_overflow().


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


© Copyright Terimber 2003-.