Loading...
Searching...
No Matches
casacore::ObjCompare< T > Class Template Reference
casa package (libcasa_casa) » Utilities_module

compare two objects More...

`#include <Compare.h>`

## Public Member Functions

virtual | ~ObjCompare ()
virtual int | comp (const void *obj1, const void *obj2) const
| Compare two objects, and return.
virtual DataType | dataType () const
| Get the data type of the sort comparison.
Public Member Functions inherited from casacore::BaseCompare
virtual | ~BaseCompare ()

## Static Public Member Functions

static int | compare (const void *obj1, const void *obj2)
| Compare two objects, and return.

## Detailed Description

template<class T>
class casacore::ObjCompare< T >

compare two objects

### Intended use:

Public interface

### Review Status

Reviewed By:
  Friso Olnon
Date Reviewed:
  1995/02/24

### Synopsis

The templated class ObjCompare<T> really is only a place holder for the static function compare which compares two objects of type T.

### Template Type Argument Requirements (T)

- operator==
- operator<

Definition at line 98 of file Compare.h.

## Constructor & Destructor Documentation

## ~ObjCompare()

template<class T>

virtual casacore::ObjCompare< T >::~ObjCompare | ( |  | ) |

virtual

## Member Function Documentation

## comp()

template<class T>

virtual int casacore::ObjCompare< T >::comp | ( | const void * | obj1,
|  | const void * | obj2 ) const

virtual

Compare two objects, and return.

- -1 if obj1 < obj2;
- 0 if obj1 == obj2;
- 1 otherwise.

Implements casacore::BaseCompare.

## compare()

template<class T>

int casacore::ObjCompare< T >::compare | ( | const void * | obj1,
|  | const void * | obj2 )

static

Compare two objects, and return.

- -1 if obj1 < obj2;
- 0 if obj1 == obj2;
- 1 otherwise.

The static function is not inlined allowing one to take the address of it. Furthermore, the function's signature agrees with ObjCompareFunc.

## dataType()

template<class T>

virtual DataType casacore::ObjCompare< T >::dataType | ( |  | ) | const

virtual

Get the data type of the sort comparison.

Reimplemented from casacore::BaseCompare.

The documentation for this class was generated from the following file:

- casa/Utilities/Compare.h