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

  PUBLIC
RangeBufferAccessC::RangeBufferAccessC(DataC *,const IndexRangeC &)
RangeBufferAccessC::RangeBufferAccessC(const IndexRangeC &,DataC *)
RangeBufferAccessC::RangeBufferAccessC(const BufferAccessC &,const IndexRangeC &)
RangeBufferAccessC::RangeBufferAccessC(const RangeBufferAccessC &)
RangeBufferAccessC::RangeBufferAccessC(const RangeBufferAccessC &,const IndexRangeC &)
RangeBufferAccessC::operator=(DataC *)
RangeBufferAccessC::ReferenceElm(void) const
RangeBufferAccessC::ReferenceVoid(void) const
RangeBufferAccessC::Access(void) const
RangeBufferAccessC::DataStart(void)
RangeBufferAccessC::DataStart(void) const
RangeBufferAccessC::N(void) const
RangeBufferAccessC::Size(void) const
RangeBufferAccessC::Limits(void) const
RangeBufferAccessC::Range(void) const
RangeBufferAccessC::IMin(void) const
RangeBufferAccessC::IMax(void) const
RangeBufferAccessC::operator[](const IndexT) const
RangeBufferAccessC::operator[](const IndexT)
RangeBufferAccessC::RAccess(void) const
RangeBufferAccessC::IsValid(void) const
RangeBufferAccessC::IsEmpty(void) const
RangeBufferAccessC::Contains(const IndexT) const
RangeBufferAccessC::IsOverlapping(const RangeBufferAccessC &) const
RangeBufferAccessC::operator+=(const SizeT)
RangeBufferAccessC::operator+(const SizeT) const
RangeBufferAccessC::ShrinkHigh(const SizeT)
RangeBufferAccessC::ShiftIndexes(const IndexT)
RangeBufferAccessC::SetSubRange(const IndexT,const IndexT)
RangeBufferAccessC::Swap(RangeBufferAccessC &)
RangeBufferAccessC::Swap(const IndexT,const IndexT)
RangeBufferAccessC::Attach(const RangeBufferAccessC &)
RangeBufferAccessC::Attach(const BufferAccessC &,const IndexRangeC &)
RangeBufferAccessC::Fill(const DataC &)
RangeBufferAccessC::Copy(void) const
RangeBufferAccessC<class DataC>
 
Basic access to buffer with limited range
 
include "amma/RBfAcc.hh"
User Level:Default
Library:Mbuff
Example:exRBfAcc.cc
Section:Containers.Arrays.Buffer
In Scope:std

Comments:
The class RangeBufferAccessC enables to random indexed access to a sequentially organised continous part of memory called buffer. The access functions check if an accessed element is valid only in debug mode.

Parent Classes: Derived Classes: Typedefs:
typedef DataC ElementT;
Constructors, copies, assigment, and destructor -----------------------------------------------

Variables:
IndexRangeC range;
Information on the limits of the buffer

Methods:
RangeBufferAccessC(DataC * bp = 0,const IndexRangeC & r = 0)
Creates an access to a buffer pointed by the pointer 'bp'.
If 'bp' is 0, the access is not valid. 'bp' Is assumed to point to the r.Min() element of the array.

RangeBufferAccessC(const IndexRangeC & r,DataC * bp)
Creates an access to a buffer pointed by the pointer 'bp'.
Where bp has already had r.LCol() subtracted from it. This is has been introduced to allow a bug fix in the class ImageC.

RangeBufferAccessC(const BufferAccessC<DataC> & bp,const IndexRangeC & r)
Creates an access to a buffer referenced by 'bp' with range 'r'.

RangeBufferAccessC(const RangeBufferAccessC<DataC> & ba)
Creates a physical copy of the access 'ba'.

RangeBufferAccessC(const RangeBufferAccessC<DataC> & ba,const IndexRangeC & r)
Creates a physical copy of the access 'ba' limited by new range 'r'.

const RangeBufferAccessC<DataC> & operator=(DataC * bp)
Changes the reference element to the element pointed by 'bp'.
Access to the object --------------------

DataC * ReferenceElm(void) const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer.

void * ReferenceVoid(void) const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer. The function is intended to be used in printing.

const BufferAccessC<DataC> & Access(void) const
Returns this object.

DataC * DataStart()
Returns the address of the first element of the buffer..

const DataC * DataStart() const
Returns the address of the first element of the buffer..

SizeT N() const
Returns the number of elements of the array.

SizeT Size() const
Returns the number of elements of the array.

const IndexRangeC & Limits() const
Returns the usable range of indeces expressed by this object.

const IndexRangeC & Range() const
Returns the usable range of indeces expressed by this object.

IndexT IMin() const
Returns the minimum index of the range of this access.

IndexT IMax() const
Returns the maximum index of the range of this access.

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 RangeBufferAccessC<DataC> & RAccess(void) const
Returns this object. Logical functions -----------------

BooleanT IsValid() const
Returns TRUE if this buffer access is not a default access object.

BooleanT IsEmpty() const
Returns TRUE if the size of the array is zero.

BooleanT Contains(const IndexT i) const
Returns TRUE if the array contains an item with the index 'i'.

BooleanT IsOverlapping(const RangeBufferAccessC<DataC> & acc) const
Returns TRUE if this access has an item with the same index as an item of the access 'acc'. Modifications of the access ---------------------------

const RangeBufferAccessC<DataC> & operator+=(const SizeT i)
Changes indeces of the access to be 'i' units higher.

RangeBufferAccessC<DataC> operator+(const SizeT i) const
Creates the new access object with the indeces 'i' units higher than those used in this access object.

const IndexRangeC & ShrinkHigh(const SizeT k)
Changes the number of elements by subtracting the last 'k' elements.

void ShiftIndexes(const IndexT offset)
All indexes of the items will be changed by 'offset'.
The range will be shifted by -offset.

void SetSubRange(const IndexT newMin,const IndexT newMax)
The range of indexes of this array will be constrained to cover the index range at most.

const RangeBufferAccessC<DataC> & Swap(RangeBufferAccessC<DataC> & a)
Exchanges the contents of this buffer with buffer 'a'.

void Swap(const IndexT i1,const IndexT i2)
Exchanges the contents of elements with indeces 'i1' and 'i2'.

void Attach(const RangeBufferAccessC<DataC> & b)
Changes this buffer access to have the same access rights as 'b'.

void Attach(const BufferAccessC<DataC> & b,const IndexRangeC & r)
Changes this buffer access to have the access rights as 'b' limited by range 'r'. Modifications of the buffer contents ------------------------------------

void Fill(const DataC & d)
'd' value is assigned to all elements of the buffer.

RangeBufferAccessC<DataC> Copy(void) const
Returns a physical copy of this access pointing to the physical copy of the accessed buffer in the range accessible by this access. The new copy is necessary to attach to reference counted buffer or to delete at the end of the life of this object.


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001