CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csDataBuffer Class Reference

This is a implementation of iDataBuffer interface. More...

#include <databuf.h>

Inheritance diagram for csDataBuffer:

iDataBuffer iBase List of all members.

Public Methods

 csDataBuffer (size_t iSize)
 Construct an preallocated data buffer (filled with garbage initially).

 csDataBuffer (char *iData, size_t iSize, bool should_delete=true)
 Construct an data buffer object given a existing (new char []) pointer.

 csDataBuffer (iDataBuffer *source)
 Duplicate an existing data buffer. Also appends a 0 char.

virtual ~csDataBuffer ()
 Destroy (free) the buffer.

virtual size_t GetSize () const
 Query the buffer size.

virtual char * GetData () const
 Get the buffer as an abstract pointer.


Detailed Description

This is a implementation of iDataBuffer interface.

The object is extremely lightweight and is recommended for use in plugins as a mean to transparently exchange abstract data between plugins.

Definition at line 31 of file databuf.h.


Constructor & Destructor Documentation

csDataBuffer::csDataBuffer size_t    iSize [inline]
 

Construct an preallocated data buffer (filled with garbage initially).

Definition at line 44 of file databuf.h.

References SCF_CONSTRUCT_IBASE.

csDataBuffer::csDataBuffer char *    iData,
size_t    iSize,
bool    should_delete = true
[inline]
 

Construct an data buffer object given a existing (new char []) pointer.

Definition at line 53 of file databuf.h.

References SCF_CONSTRUCT_IBASE.

csDataBuffer::csDataBuffer iDataBuffer   source [inline]
 

Duplicate an existing data buffer. Also appends a 0 char.

Definition at line 62 of file databuf.h.

References iDataBuffer::GetData(), iDataBuffer::GetSize(), and SCF_CONSTRUCT_IBASE.

virtual csDataBuffer::~csDataBuffer   [inline, virtual]
 

Destroy (free) the buffer.

Definition at line 73 of file databuf.h.

References SCF_DESTRUCT_IBASE.


Member Function Documentation

virtual char* csDataBuffer::GetData   const [inline, virtual]
 

Get the buffer as an abstract pointer.

Implements iDataBuffer.

Definition at line 85 of file databuf.h.

virtual size_t csDataBuffer::GetSize   const [inline, virtual]
 

Query the buffer size.

Implements iDataBuffer.

Definition at line 81 of file databuf.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18