MFC Grid manual

CHexFormatter Class Reference

Helper that converts value to a hexadecimal string and vice versa. More...

#include <Dapfor/Common/HexFormatter.h>

List of all members.


Static Public Member Functions

ToString functions
static TString ToString (char val, bool showNonSignificantZeros)
 Converts value of char type to a hexadecimal string.
static TString ToString (unsigned char val, bool showNonSignificantZeros)
 Converts value of unsigned char type to a hexadecimal string.
static TString ToString (short val, bool showNonSignificantZeros)
 Converts value of short type to a hexadecimal string.
static TString ToString (unsigned short val, bool showNonSignificantZeros)
 Converts value of unsigned short type to a hexadecimal string.
static TString ToString (long val, bool showNonSignificantZeros)
 Converts value of long type to a hexadecimal string.
static TString ToString (unsigned long val, bool showNonSignificantZeros)
 Converts value of unsigned long type to a hexadecimal string.
static TString ToString (int64 val, bool showNonSignificantZeros)
 Converts value of __int64 type to a hexadecimal string.
static TString ToString (int64 val, int minDigitsCount, bool showNonSignificantZeros)
 Converts value of __int64 type to a hexadecimal string.
ToHex functions
static bool ToHex (const TString &str, char &val)
 Converts the formatted string to the value of char type.
static bool ToHex (const TString &str, unsigned char &val)
 Converts the formatted string to the value of unsigned char type.
static bool ToHex (const TString &str, short &val)
 Converts the formatted string to the value of short type.
static bool ToHex (const TString &str, unsigned short &val)
 Converts the formatted string to the value of unsigned short type.
static bool ToHex (const TString &str, long &val)
 Converts the formatted string to the value of long type.
static bool ToHex (const TString &str, unsigned long &val)
 Converts the formatted string to the value of unsigned long type.
static bool ToHex (const TString &str, int64 &val)
 Converts the formatted string to the value of __int64 type.

Detailed Description

Helper that converts value to a hexadecimal string and vice versa.

Member Function Documentation

TString ToString ( char  val,
bool  showNonSignificantZeros 
) [static]

Converts value of char type to a hexadecimal string.

Parameters:
[in] val non-formatted value of char type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( unsigned char  val,
bool  showNonSignificantZeros 
) [static]

Converts value of unsigned char type to a hexadecimal string.

Parameters:
[in] val non-formatted value of unsigned char type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( short  val,
bool  showNonSignificantZeros 
) [static]

Converts value of short type to a hexadecimal string.

Parameters:
[in] val non-formatted value of short type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( unsigned short  val,
bool  showNonSignificantZeros 
) [static]

Converts value of unsigned short type to a hexadecimal string.

Parameters:
[in] val non-formatted value of unsigned short type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( long  val,
bool  showNonSignificantZeros 
) [static]

Converts value of long type to a hexadecimal string.

Parameters:
[in] val non-formatted value of long type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( unsigned long  val,
bool  showNonSignificantZeros 
) [static]

Converts value of unsigned long type to a hexadecimal string.

Parameters:
[in] val non-formatted value of unsigned long type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( int64  val,
bool  showNonSignificantZeros 
) [static]

Converts value of __int64 type to a hexadecimal string.

Parameters:
[in] val non-formatted value of __int64 type
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

TString ToString ( int64  val,
int  minDigitsCount,
bool  showNonSignificantZeros 
) [static]

Converts value of __int64 type to a hexadecimal string.

Parameters:
[in] val non-formatted value of __int64 type
[in] minDigitsCount Minimal count of digits.
[in] showNonSignificantZeros indicates whether it should show non-significant zeros in order to hold a constant number of digits.
Returns:
Hexadecimal string

bool ToHex ( const TString &  str,
char &  val 
) [static]

Converts the formatted string to the value of char type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of char type
Returns:
True if the string has been successfully parsed. Otherwise false.

bool ToHex ( const TString &  str,
unsigned char &  val 
) [static]

Converts the formatted string to the value of unsigned char type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of unsigned char type
Returns:
True if the string has been successfully parsed. Otherwise false.

bool ToHex ( const TString &  str,
short &  val 
) [static]

Converts the formatted string to the value of short type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of short type
Returns:
True if the string has been successfully parsed. Otherwise false.

bool ToHex ( const TString &  str,
unsigned short &  val 
) [static]

Converts the formatted string to the value of unsigned short type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of unsigned short type
Returns:
True if the string has been successfully parsed. Otherwise false.

bool ToHex ( const TString &  str,
long &  val 
) [static]

Converts the formatted string to the value of long type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of long type
Returns:
True if the string has been successfully parsed. Otherwise false.

bool ToHex ( const TString &  str,
unsigned long &  val 
) [static]

Converts the formatted string to the value of unsigned long type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of unsigned long type
Returns:
True if the string has been successfully parsed. Otherwise false.

bool ToHex ( const TString &  str,
int64 &  val 
) [static]

Converts the formatted string to the value of __int64 type.

Parameters:
[in] str formatted hexadecimal string
[in,out] val Value of __int64 type
Returns:
True if the string has been successfully parsed. Otherwise false.