Public Types | |
| enum | Style { Decimal, Hex } |
| Format styles. More... | |
Public Member Functions | |
| CInt64Format (Style style=Decimal, bool showZero=true, TCHAR thousandSeparator=_T(' '), bool showHexPrefix=true, bool showNonSignificantZero=false) | |
| Constructor. | |
| CInt64Format (const CInt64Format &) | |
| Copy constructor. | |
| virtual TString | FormatStl (int64 val, const CDataObject *pDO) const |
| The function converts non-formatted value of __int64 type to the formatted string. | |
| virtual bool | ParseStl (const TString &, int64 &val, const CDataObject *pDO) const |
| The function converts the formatted string to the non-formatted value of __int64 type. | |
| virtual CString | FormatMfc (int64 val, const CDataObject *pDO) const |
| The function converts non-formatted value of __int64 type to the formatted MFC string. | |
| virtual bool | ParseMfc (const CString &str, int64 &val, const CDataObject *pDO) const |
| The function converts the formatted MFC string to the non-formatted __int64-type value. | |
| virtual CFormat * | Clone () const |
| Creates a deep copy of a format. | |
| virtual void | Serialize (CSerializer &serializer) |
| Serializes a format. | |
| TCHAR | GetSeparator () const |
| Gets ASCII symbol, representing a thousand separator. | |
| void | SetSeparator (TCHAR chSeparator) |
| Sets a new thousand separator. | |
| Style | GetStyle () const |
| Gets a current style of the format. | |
| void | SetStyle (Style style) |
| Sets a new format style. | |
Static Public Member Functions | |
| static int | GetSerializeVertion () |
| Serialization version. | |
Format examples: 1. CInt64Format(CInt64Format::Decimal).FormatStl(123456789012, 0); 2. CInt64Format(CInt64Format::Decimal).FormatStl(-123456789012, 0); 3. CInt64Format(CInt64Format::Hex, true, _T(' '), false, false).FormatStl(123456789012, 0); 4. CInt64Format(CInt64Format::Hex).FormatStl(123456789012, 0); 5. CInt64Format(CInt64Format::Hex, true, _T(' '), true, true).FormatStl(123456789012, 0); Output strings: 1. 123 456 789 012 2. -123 456 789 012 3. 1CBE991A14 4. 0x1CBE991A14 5. 0x0000001CBE991A14
| enum Style |
| CInt64Format | ( | Style | style = Decimal, |
|
| bool | showZero = true, |
|||
| TCHAR | thousandSeparator = _T(' '), |
|||
| bool | showHexPrefix = true, |
|||
| bool | showNonSignificantZero = false | |||
| ) |
Constructor.
| [in] | style | Style of the format. |
| [in] | showZero | Indicates whether it should show the symbols if unformatted value equals to 0. |
| [in] | thousandSeparator | ACSII symbol, to separate the thousands. |
| [in] | showHexPrefix | indicates whether it should add the hexadecimal prefix '0x'. |
| [in] | showNonSignificantZero | indicates whether it should show non-significant zeros in order to keep a constant number of digits for the hexadecimal style. |
| CInt64Format | ( | const CInt64Format & | format | ) |
Copy constructor.
| [in] | format | Format to be copied. |
| TString FormatStl | ( | int64 | val, | |
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts non-formatted value of __int64 type to the formatted string.
| [in] | val | Non formatted value of __int64 type. |
| [in] | pDO | Pointer to CDataObject. This parameter is optional and may be zero. |
Reimplemented from CFormat.
| bool ParseStl | ( | const TString & | str, | |
| int64 & | val, | |||
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts the formatted string to the non-formatted value of __int64 type.
| [in] | str | Formatted string. |
| [in,out] | val | Value of __int64 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 | ( | int64 | val, | |
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts non-formatted value of __int64 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, | |
| int64 & | val, | |||
| const CDataObject * | pDO | |||
| ) | const [virtual] |
The function converts the formatted MFC string to the non-formatted __int64-type value.
| [in] | str | MFC string to be formatted. |
| [in,out] | val | A value of the __int64 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.
| TCHAR GetSeparator | ( | ) | const [inline] |
Gets ASCII symbol, representing a thousand separator.
| void SetSeparator | ( | TCHAR | separator | ) | [inline] |
Sets a new thousand separator.
| [in] | separator | ASCII symbol, representing a thousand separator |
| CInt64Format::Style GetStyle | ( | ) | const [inline] |
Gets a current style of the format.
| void SetStyle | ( | Style | style | ) | [inline] |
Sets a new format style.
| [in] | style | A new format style |
| Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |