casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::BaseCompare Class Reference

abstract base class for comparing two objects More...

#include <Compare.h>

Inheritance diagram for casa::BaseCompare:
casa::MSInterval casa::ObjCompare< T >

List of all members.

Public Member Functions

virtual ~BaseCompare ()
virtual int comp (const void *obj1, const void *obj2) const =0
 Compare two objects, and return.
virtual DataType dataType () const
 Get the data type of the comparison.

Detailed Description

abstract base class for comparing two objects

Intended use:

Public interface

Review Status

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

Synopsis

The abstract class BaseCompare<T> is used for comparisons in sorting or iterating. One can derive a concrete comparison class from it.

Definition at line 64 of file Compare.h.


Constructor & Destructor Documentation

virtual casa::BaseCompare::~BaseCompare ( ) [inline, virtual]

Definition at line 67 of file Compare.h.


Member Function Documentation

virtual int casa::BaseCompare::comp ( const void *  obj1,
const void *  obj2 
) const [pure virtual]

Compare two objects, and return.

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

Implemented in casa::ObjCompare< T >, and casa::MSInterval.

virtual DataType casa::BaseCompare::dataType ( ) const [inline, virtual]

Get the data type of the comparison.

By default it returns TpOther.

Reimplemented in casa::ObjCompare< T >.

Definition at line 79 of file Compare.h.


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