MFC Grid manual

DataObject.h File Reference

#include <Dapfor/Common/Common.h>
#include <Dapfor/Common/Types.h>
#include <Dapfor/Common/Value.h>
#include <set>
#include <Dapfor/Common/Field.h>
#include <Dapfor/Common/FieldMap.h>
#include <Dapfor/Common/TypeFactory.h>

Namespaces

namespace  Dapfor
namespace  Dapfor::Common

Classes

class  CDataObject
 Base class for the objects presented in GUI::CGrid. More...
class  CDataObject::ISink
 Interface to receive notifications from CDataObject. More...

Defines

Field map declarations
#define DF_DECLARE_FIELD_MAP()
 Declares table of functions in classes derived from Dapfor::Common::CDataObject.
#define DF_BEGIN_FIELD_MAP(__name)
 Begins table of functions for the class derived from the Dapfor::Common::CDataObject.
#define DF_BEGIN_FIELD_MAP_EX(__name, __baseClass)
 Begins table of functions for the class in a chain of inheritance.
#define DF_END_FIELD_MAP()   }
 Ends field map.
#define DF_END_HASH_FIELD_MAP()
 Ends field map and initialises hash map to accelerate access to the fields. It is recommended to use this macro when count of fields is greater than 50.
Field declarations
#define DF_STL_STRING_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the Dapfor::Common::TString type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: TString (ClassName::*pfnGetStlString)() const
__setMethod Set-method with the following prototype: void (ClassName::*pfnSetStlString)(const Dapfor::Common::TString&)
__format Format, used for the field.
#define DF_MFC_STRING_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the CString type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: CString (ClassName::*pfnGetMfcString)() const
__setMethod Set-method with the following prototype: void (ClassName::*pfnSetMfcString)(const CString&)
__format Format, used for the field.
#define DF_CHAR_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the char type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: char (CDataObject::*pfnGetChar)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetChar) (char)
__format Format, used for the field.
#define DF_UCHAR_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the unsigned char type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: unsigned char (CDataObject::*pfnGetUChar)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetUChar) (unsigned char)
__format Format, used for the field.
#define DF_SHORT_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the short type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: short (CDataObject::*pfnGetShort)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetShort) (short)
__format Format, used for the field.
#define DF_USHORT_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the unsigned short type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: unsigned short (CDataObject::*pfnGetUShort)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetUShort) (unsigned short)
__format Format, used for the field.
#define DF_LONG_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the long type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: long (CDataObject::*pfnGetLong)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetLong) (long)
__format Format, used for the field.
#define DF_ULONG_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the unsigned long type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: unsigned long (CDataObject::*pfnGetULong)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetULong) (unsigned long)
__format Format, used for the field.
#define DF_ENUM_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the long type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: long (CDataObject::*pfnGetLong)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetLong) (long)
__format Format, used for the field.
#define DF_INT64_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the __int64 type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: __int64 (CDataObject::*pfnGetInt64)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetInt64) (__int64)
__format Format, used for the field.
#define DF_BOOL_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the bool type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: bool (CDataObject::*pfnGetBool)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetBool)(bool)
__format Format, used for the field.
#define DF_FLOAT_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the float type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: float (CDataObject::*pfnGetFloat)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetFloat)(float)
__format Format, used for the field.
#define DF_DOUBLE_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field of the double type. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: double (CDataObject::*pfnGetDouble)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetDouble) (double)
__format Format, used for the field.
#define DF_OBJECT_PTR_ID(__fid, __name, __getMethod, __setMethod, __format)
 Declares field which points to a CDataObject. __getMethod or __setMethod can be 0.
__fid Numeric identifier
__name Name of the field.
__getMethod Get-method with the following prototype: CDataObject* (CDataObject::*pfnGetObjectPtr)() const
__setMethod Set-method with the following prototype: void (CDataObject::*pfnSetObjectPtr)(CDataObject*)
__format Format, used for the field.
Field declarations
#define DF_DECLARE_SERIALIZABLE_TYPE()
 Declares child class that derives from the CDataObject as serializable. If the class has both set- and get- methods, values of the object can be stored and restored to/from binary archive.
#define DF_IMPLEMENT_SERIALIZABLE_TYPE(__name)
 Implements serializable class.

Detailed Description