[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
Data Accessors | ![]() |
---|
Modules | |
Accessors for FFTWComplex | |
Accessors for RGBValue | |
Classes | |
class | BilinearInterpolatingAccessor |
Bilinear interpolation at non-integer positions. More... | |
class | MultiImageAccessor2 |
Access two images simultaneously. More... | |
class | SequenceAccessor |
Accessor for items that are STL compatible sequences. More... | |
class | StandardAccessor |
Encapsulate access to the values an iterator points to. More... | |
class | StandardConstAccessor |
Encapsulate read access to the values an iterator points to. More... | |
class | StandardConstValueAccessor |
Encapsulate access to the values an iterator points to. More... | |
class | StandardValueAccessor |
Encapsulate access to the values an iterator points to. More... | |
class | VectorAccessor |
Accessor for items that are STL compatible vectors. More... | |
class | VectorComponentAccessor |
Accessor for one component of a vector. More... | |
class | VectorComponentValueAccessor |
Accessor for one component of a vector. More... | |
class | VectorElementAccessor |
Accessor for one component of a vector. More... |
Detailed Description |
Data accessors are used to allow for flexible access to the data an interator points to. When we access the data directly, we are bound to what operator *()
returns, if this method exists at all. Encapsulating access in an accessor enables a better decoupling of data structures and algorithms. This paper contains a detailed description of the concept. Here is a brief list of the basic accessor requirements:
Operation | Result | Semantics |
---|---|---|
accessor(iter) | convertible to Iterator::value_type const & | read data at the current position of the iterator |
accessor(iter, index) | convertible to Accessor::value_type const & | read data at offset index relative to iterator's current position (random-access iterator only) |
accessor.set(value, iter) | void | write data value at the current position of the iterator (mutable iterator only) |
accessor.set(value, iter, index) | void | write data value at offset index relative to iterator's current position (mutable random-access iterator only) |
Accessor::value_type | type of the data field the accessor refers to | |
iter is an iteratorindex has the iterator's index type (Iterator::difference_type )value is convertible to Accessor::value_type const & |
The template AccessorTraits<T>
can be used to find the default accessor associated with the type T
, e.g.
typedef typename AccessorTraits<typename Image::value_type>::default_accessor Accessor; typedef typename AccessorTraits<typename Image::value_type>::default_const_accessor ConstAccessor;
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|