MFC Grid manual

CSortInfo Class Reference

Contains sorting related information. More...

#include <Dapfor/GUI/SortInfo.h>

List of all members.


Public Member Functions

 CSortInfo (Common::FID fid, bool reverseSort)
 Constructor.
 CSortInfo (const CSortInfo &sortInfo)
 Copy constructor.
void SetFid (Common::FID fid)
 Sets a new field identifier.
Common::FID GetFid () const
 Gets field identifier.
void SetReverseSort (bool bReverse)
 Reverses sorting.
bool GetReverseSort () const
 Gets the value indicating whether sorting is reversed.
bool operator== (const CSortInfo &sortInfo) const
 Equality operator.
virtual void Serialize (CArchive &ar)
 Serializes data to/from the archive.

Static Public Member Functions

static int GetSerializeVersion ()
 Serialization version.

Detailed Description

Contains sorting related information.

It is intended for storing information about sorting. The grid supports up to 5 levels of sorting (up to 5 columns simultaneously may be used for sorting). The set of �SortInfo objects is stored in the header. When the grid replaces the header, it automatically sorts lines according to the new rules. Besides, when the grid adds lines, gets notifications from ISink interface and calls functions... it automatically replaces a line to the corresponding location.

It is important to note, that definition of lines locations in the grid is carried out while comparing the unformatted values returned while calling data object functions by the identifier. It excludes the mistakes arising at comparing formatted strings (for example dates). To ensure correct data comparing, the returned values should have identical types.


Constructor & Destructor Documentation

CSortInfo ( Common::FID  fid,
bool  reverseSort 
)

Constructor.

Parameters:
[in] fid Field identifier
[in] reverseSort Value indicating whether the sort is reversed

CSortInfo ( const CSortInfo sortInfo  ) 

Copy constructor.

Parameters:
[in] sortInfo Value to be copied


Member Function Documentation

void SetFid ( Common::FID  fid  )  [inline]

Sets a new field identifier.

Parameters:
[in] fid field identifier

Common::FID GetFid (  )  const [inline]

Gets field identifier.

Returns:
Field identifier

void SetReverseSort ( bool  bReverse  )  [inline]

Reverses sorting.

Parameters:
[in] bReverse Value indicating whether the sort is reversed

bool GetReverseSort (  )  const [inline]

Gets the value indicating whether sorting is reversed.

Returns:
True - the sort is reversed. Otherwise - false.

bool operator== ( const CSortInfo sortInfo  )  const [inline]

Equality operator.

Parameters:
[in] sortInfo Value to be compared
Returns:
True if sortInfo equals to 'this' object. Otherwise false.

void Serialize ( CArchive &  ar  )  [virtual]

Serializes data to/from the archive.

Parameters:
[in] ar Archive to store or restore the object's data.

int GetSerializeVersion (  )  [static]

Serialization version.

Returns:
Current serialization version