|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class PairC represents a pair of objects of the same type.
It has basic features of arrays. The object class must provide
the default constructor, the copy constructor, the assigment operator,
and the destructor.
Enumerated types:
- enum anon_enum?4 { n = 2 } ;
-
Variables:
- DataC item[];
-
The pair of items.
Methods:
- PairC()
-
The default constructor.
- PairC(const PairC & p)
-
The copy constructor.
- PairC(const DataC & o1,const DataC & o2)
-
Creates the pair of the objects 'o1' and 'o2'.
- const PairC & operator=(const PairC & p)
-
The assigment.
Access to the objects
---------------------
- const DataC & operator[](IndexT i) const
-
Returns the i-th object of the pair.
- DataC & operator[](IndexT i)
-
Access to the i-th object of the pair.
- const DataC & A() const
-
Returns the first object of the pair.
- DataC & A()
-
Access to the first object of the pair.
- const DataC & B() const
-
Returns the first object of the pair.
- DataC & B()
-
Access to the first object of the pair.
- IndexT N() const
-
Returns 2 as the number of elements of the pair.
- IndexT Size() const
-
Returns 2 as the number of elements of the pair.
- IndexT Dim() const
-
Returns 2 as the number of elements of the pair.
- BooleanT IsValid() const
-
Returns always TRUE confirming that the pair exists.
- BooleanT Contains(const IndexT i) const
-
Returns TRUE if the pair contains an item with the index 'i'.
Special operations
------------------
- PairC & Swap()
-
Exchanges the order of items in the pair.
- PairC & Reverse()
-
Exchanges the order of items in the pair.
- const PairC<DataC> & operator=(const PairC<DataC> & p)
-
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|