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

Define a Sort key. More...

#include <Sort.h>

List of all members.

Public Member Functions

 SortKey (const void *data, const CountedPtr< BaseCompare > &, uInt increment, int order)
 Define a sort key in a given data array using the indicated comparison object, stride and sort order.
 SortKey (const SortKey &)
 Copy constructor (copy semantics).
 ~SortKey ()
SortKeyoperator= (const SortKey &)
 Assignment (copy semantics).
uInt tryGenSort (Vector< uInt > &indexVector, uInt nrrec, int opt) const
 Try if GenSort can be used for this single key.

Protected Attributes

int order_p
 sort order; -1 = ascending, 1 = descending
const void * data_p
 address of first data point
uInt incr_p
 increment for next data point
CountedPtr< BaseCompareccmpObj_p
 comparison object; use CountedPtr for memory management
BaseComparecmpObj_p
 comparison object; use raw ponter for performance

Friends

class Sort

Detailed Description

Define a Sort key.

Intended use:

Internal

Review Status

Reviewed By:
Friso Olnon
Date Reviewed:
1995/03/01
Test programs:
tSort, tSort_1

Synopsis

SortKey is a helper class for the Sort class. It holds the following information about a sort key:

Definition at line 62 of file Sort.h.


Constructor & Destructor Documentation

casa::SortKey::SortKey ( const void *  data,
const CountedPtr< BaseCompare > &  ,
uInt  increment,
int  order 
)

Define a sort key in a given data array using the indicated comparison object, stride and sort order.

Copy constructor (copy semantics).


Member Function Documentation

SortKey& casa::SortKey::operator= ( const SortKey )

Assignment (copy semantics).

uInt casa::SortKey::tryGenSort ( Vector< uInt > &  indexVector,
uInt  nrrec,
int  opt 
) const

Try if GenSort can be used for this single key.

If it succeeds, it returns the resulting number of elements. Otherwise it returns 0.


Friends And Related Function Documentation

friend class Sort [friend]

Definition at line 65 of file Sort.h.


Member Data Documentation

comparison object; use CountedPtr for memory management

Definition at line 93 of file Sort.h.

comparison object; use raw ponter for performance

Definition at line 95 of file Sort.h.

const void* casa::SortKey::data_p [protected]

address of first data point

Definition at line 89 of file Sort.h.

increment for next data point

Definition at line 91 of file Sort.h.

int casa::SortKey::order_p [protected]

sort order; -1 = ascending, 1 = descending

Definition at line 87 of file Sort.h.


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