Public Types | |
| enum | Style { Decimal, Hex, Char } |
| Format styles. More... | |
Public Member Functions | |
| CUCharFormat (Style style=Char, bool showZero=true, bool showHexPrefix=true, bool showNonSignificantZero=true) | |
| Constructor. | |
| CUCharFormat (const CUCharFormat &) | |
| Copy constructor. | |
| ~CUCharFormat () | |
| virtual destructor | |
| virtual TString | FormatStl (unsigned char val, const CDataObject *pDO) const |
| The function converts non-formatted value of unsigned char type to the formatted string. | |
| virtual bool | ParseStl (const TString &, unsigned char &val, const CDataObject *pDO) const |
| The function converts the formatted string to the non-formatted value of unsigned char type. | |
| virtual CString | FormatMfc (unsigned char val, const CDataObject *pDO) const |
| The function converts non-formatted value of unsigned char type to the formatted MFC string. | |
| virtual bool | ParseMfc (const CString &str, unsigned char &val, const CDataObject *pDO) const |
| The function converts the formatted MFC string to the non-formatted unsigned char-type value. | |
| virtual CFormat * | Clone () const |
| Creates a deep copy of a format. | |
| virtual void | Serialize (CSerializer &serializer) |
| Serializes a format. | |
Static Public Member Functions | |
| static int | GetSerializeVertion () |
| Serialization version. | |
Format examples: Format examples: 1. CUCharFormat(CUCharFormat::Decimal).FormatStl(65, 0); 2. CUCharFormat(CUCharFormat::Decimal).FormatStl(165, 0); 3. CUCharFormat(CUCharFormat::Hex, true, false, false).FormatStl(15, 0); 4. CUCharFormat(CUCharFormat::Hex, true, true, false).FormatStl(15, 0); 5. CUCharFormat(CUCharFormat::Hex, true, true, true).FormatStl(15, 0); 6. CUCharFormat(CUCharFormat::Char).FormatStl(65, 0); Output strings: 1. 65 2. 165 3. F 4. 0xF 5. 0x0F 6. A
| enum Style |
| CUCharFormat | ( | Style | style = Char, |
|
| bool | showZero = true, |
|||
| bool | showHexPrefix = true, |
|||
| bool | showNonSignificantZero = true | |||
| ) |
Constructor.
| [in] | style | Style of a format. |
| [in] | showZero | Indicates whether it should show symbols if unformatted value equals to 0. |
| [in] | showHexPrefix | indicates whether it should add a hexadecimal prefix '0x'. |
| [in] | showNonSignificantZero | indicates whether it should show non-significant zeros in order to keep a constant number of digits for a hexadecimal style. |
| CUCharFormat | ( | const CUCharFormat & | format | ) |
Copy constructor.
| [in] | format | Format to be copied. |
| TString FormatStl | ( | unsigned char | val, | |
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts non-formatted value of unsigned char type to the formatted string.
| [in] | val | Non formatted value of unsigned char type. |
| [in] | pDO | Pointer to CDataObject. This parameter is optional and may be zero. |
Reimplemented from CFormat.
| bool ParseStl | ( | const TString & | str, | |
| unsigned char & | val, | |||
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts the formatted string to the non-formatted value of unsigned char type.
| [in] | str | Formatted string. |
| [in,out] | val | Value of unsigned char type that is a result of conversion. |
| [in] | pDO | Pointer to CDataObject. This parameter is optional and may be zero. |
Reimplemented from CFormat.
| CString FormatMfc | ( | unsigned char | val, | |
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts non-formatted value of unsigned char type to the formatted MFC string.
| [in] | val | Non-formatted MFC string to be formatted. |
| [in] | pDO | Pointer to CDataObject. This parameter is optional and may be zero. |
Reimplemented from CFormat.
| bool ParseMfc | ( | const CString & | str, | |
| unsigned char & | val, | |||
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts the formatted MFC string to the non-formatted unsigned char-type value.
| [in] | str | MFC string to be formatted. |
| [in,out] | val | A value of the unsigned char type that is a result of the parsing. |
| [in] | pDO | Pointer to CDataObject. This parameter is optional and may be zero. |
Reimplemented from CFormat.
| CFormat * Clone | ( | ) | const [virtual] |
| void Serialize | ( | CSerializer & | serializer | ) | [virtual] |
Serializes a format.
| [in] | serializer | Object, into which a format object is serialized. |
Reimplemented from CFormat.
| Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |