|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class BufferRC is a basic reference counted container
based of continuous storing of elements randomly accessed by indexing.
Variables:
- BRCPtrC> head;
-
The pointer to the body of this buffer.
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.
- BufferRC(BufferHeadC<DataC> & bod)
-
Body constructor.
- BufferRC<DataC> Copy() const
-
Creates a physical copy of this buffer.
Can't be done, we don't know the size!
Object representation
---------------------
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|