|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
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:
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.
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|