Scopira 20080306

scopira::tool::bufferflow Class Reference

#include <bufferflow.h>

Inheritance diagram for scopira::tool::bufferflow:
scopira::tool::iflow_i scopira::tool::oflow_i scopira::tool::flow_i scopira::tool::flow_i scopira::tool::object scopira::tool::object

List of all members.

Public Types

typedef std::vector
< tool::flow_i::byte_t
byte_buffer_t

Public Member Functions

 bufferflow (void)
 default constructor
virtual ~bufferflow (void)
 destructor
virtual bool failed (void) const
 are we in a failed state?
virtual size_t read (byte_t *buf, size_t maxsize)
 read raw block data, returns num read in
virtual size_t write (const byte_t *buf, size_t size)
 write a raw block of data
byte_tc_array (void)
 returns the buffer as a raw c array
const byte_tc_array (void) const
 returns the buffer as a raw c array
size_t size (void) const
 return the size of the internal buffer
size_t capacity (void) const
void reset (void)
 resets the buffer index
void reserve (size_t _size)
 reserve an internal buffer
void reset_resize (size_t _size)
 resizes the internal buffer. this also resets the index pointer

Detailed Description

A flow that reads and writes to an internal byte buffer (ie to memory).

Author:
Aleksander Demko

Member Function Documentation

byte_t* scopira::tool::bufferflow::c_array ( void  ) [inline]

returns the buffer as a raw c array

returns a pointer to the internal buffer is this legal? -ademko

References size().

size_t scopira::tool::bufferflow::capacity ( void  ) const [inline]

returns the capacity of the internal buffer. this is related to reserve, see std::vector for information


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