Dapfor home  

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 a field identifier.
void SetReverseSort (bool bReverse)
 Reverses a sort.
bool GetReverseSort () const
 Gets the value indicating whether a sort 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. In total the grid supports up to 5 levels of sorting (up to 5 columns simultaneously take part in sorting). The set of �SortInfo objects is stored in the header. At replacing the header in the grid, the grid makes automatic sorting of lines according to the new rules. Besides at adding lines in the grid, or at receiving notifications from ISink interface and also at calling functions... the grid 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). For correct data comparing, the types of the returned values should be identical.


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 a field identifier.

Returns:
Field identifier

void SetReverseSort ( bool  bReverse  )  [inline]

Reverses a sort.

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

bool GetReverseSort (  )  const [inline]

Gets the value indicating whether a sort 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


Copyright Dapfor 2007-2009
Generated on Sat Jan 30 15:01:29 2010 for MFCGrid by doxygen 1.5.5