|
#pragma once
// CMCCell
class CMCCell : public CObject
{
public:
enum CellType
{
CT_Unknown = 0,
CT_String,
CT_Integer,
CT_Long,
CT_Decimal,
CT_Date,
CT_Time,
CT_DateTime,
CT_Boolean
};
CMCCell ( );
CMCCell ( CString strValue );
CMCCell ( int nValue );
CMCCell ( long lValue );
CMCCell ( double dValue );
CMCCell ( bool bValue );
CMCCell ( COleDateTime dtValue, CellType eCellType = CMCCell::CT_DateTime );
~CMCCell ( );
// returns the cell type
CellType Get_CellType ( void );
// the following functions sets the cell value and define the cell type as needed
void Set_Value ( CString strValue );
void Set_Value ( int nValue );
void Set_Value ( long lValue );
void Set_Value ( double dValue );
void Set_Value ( bool bValue );
void Set_Value ( COleDateTime dtValue, CellType eCellType = CMCCell::CT_DateTime );
// returns the compare value for the cell (f. e. datetime 20070509145630)
CString Get_ComparisonValue ( void );
// returns the display value for the cell (f. e. datetime 09.05.2007 12:56:30)
CString Get_DisplayValue ( void );
private:
CellType m_eCellType;
CString m_strValue;
int m_nValue;
long m_lValue;
double m_dValue;
bool m_bValue;
COleDateTime m_dtValue;
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.