User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
BufferRC::BufferRC(void)
BufferRC::BufferRC(const SizeT)
BufferRC::BufferRC(DataC *,BooleanT)
BufferRC::BufferRC(const BufferRC &)
BufferRC::operator=(const BufferRC &)
BufferRC::operator[](const IndexT) const
BufferRC::operator[](const IndexT)
BufferRC::Access(void) const
BufferRC::operator const BufferAccessC &(void) const
BufferRC::Buffer(void)
BufferRC::IsValid(void) const
BufferRC::IsSharing(const BufferRC &) const
BufferRC::Swap(BufferRC &)
BufferRC::RefCounter(void) const
BufferRC::ReferenceElm(void) const
BufferRC::Invalidate(void)
BufferRC::Head(void)
BufferRC::Head(void) const
BufferRC<class DataC>
 
A set of elements with random access
 
include "amma/BufferR.hh"
User Level:Default
Library:Mbuff
Example:exBuffer.cc
Section:Containers.Arrays.Buffer
In Scope:std

Comments:
The class BufferRC is a basic reference counted container based of continuous storing of elements randomly accessed by indexing.

Variables:
Methods:
BufferRC()
Creates a default empty buffer that is not valid.

BufferRC(const SizeT n)
Creates the buffer able to contain up to 'n' elements. If 'n'==0, a default empty buffer is created.

BufferRC(DataC * bp,BooleanT removable = TRUE)
Creates a buffer using pointer 'bp' to a sufficient memory. The memory is deallocated using delete operator during destroying of this object. If flag 'removable' is FALSE, the memory pointed by 'bp' will not be deallocated during destructing of this buffer.

BufferRC(const BufferRC<DataC> & ba)
Creates a buffer that will share a memory with buffer 'ba'.

const BufferRC<DataC> & operator=(const BufferRC<DataC> & b)
This buffer will share the memory with buffer 'b'. Access methods --------------

const DataC & operator[](const IndexT i) const
Read-only access to the ('i'+1)-th element of the buffer.

DataC & operator[](const IndexT i)
Read-write access to the ('i'+1)-th element of the buffer.

const BufferAccessC<DataC> & Access() const
Returns the access function of this buffer.

operator const BufferAccessC<DataC> &() const
Put here because of Visual C++. Returns the access function of this buffer.

BufferRC<DataC> & Buffer()
Returns the reference counted body of the buffer. Logical operators -----------------

BooleanT IsValid(void) const
Returns TRUE if at least the head of the buffer exists.

BooleanT IsSharing(const BufferRC<DataC> & b) const
Returns TRUE if this buffer and buffer 'b' are subbuffers of the the same parent buffer. Special operations ------------------

void Swap(BufferRC<DataC> & b)
Swaps the contents of both buffers.

const BodyRefCounterC & RefCounter() const
Returns access to reference counter.

DataC * ReferenceElm() const
Returns the pointer to the reference element of the attached buffer.

void Invalidate()
Invalidate this refrence to the buffer.
Make this an invalid handle.

BufferHeadC<DataC> & Head()
Access buffer head.

const BufferHeadC<DataC> & Head() const
Access buffer head.


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001