//////////////////////////////////////////////////////////////// // Technomaint 2004 (c) SofTech di Germinara Francesco 2000,2004 // www.germinara.it info@germinara.it // Story: // //////////////////////////////////////////////////////////////// // Checked Version: 6/5/2004 //////////////////////////////////////////////////////////////// #ifndef CLASS_CFGField_INCLUDED #define CLASS_CFGField_INCLUDED #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define _FPFIELDLEN 200 class CFGField{ private: //Fields CString m_strName; //Name int m_Len; //Lenght CString m_strDesc; //Description int m_nType; //Type =0 -> Alpha Numeric 1 -> Numeric int m_nDec; //Numeber of Decimal place CString m_strDefVal; //Default Value CString m_strValue; //Value int m_nIndex; //Index char m_rowBufferData[_FPFIELDLEN]; //Row Buffer Data BOOL m_bFillZero; //TRUE=Numeric Data Fill With Zero void ZeroFill(CString& strValue); //Fill blanks with Zero double m_nValue; //Real value for numeric data public: CFGField(); //Standard contructor enum eFGTypeFields{eFieldTypeAlfaNumeric=0,eFieldTypeNumeric=1}; //Type Field Enum //Data manipulation void SetDataField(CString strName,CString Descr, CString ValoreDefault, int Tipo, int Len, int Dec=0,bool FillZero=false); //Set all data for field void SetDataField(CString valore); //Set only Value field void SetDataField(double valore); //Set only Value field char *GetDataBuffer(); //Get Row Buffer data buffer //Access method CString GetName(); //Return Name of field CString GetDescr(); //Return Description of field int GetType(); //Return Type of field CString StrGetType(); //Return Type of field int GetLen(); //Return Lenght of field CString StrGetLen(); //Return Lenght of field int GetDec(); //Return Number of decimal place of field CString StrGetDec(); //Return Number of decimal place of field CString GetValue(); //Return "row" value of field CString GetDefaultValue(); //Return Default value of field double GetNumericValue(); //Return numeric value of field CString GetStringValue(); //Return string value of field CString StrGetNumericValue(); //Return numeric value of field }; #endif //Fine