The HUnicodeOptions class is a helper class which wraps up memory management for variable size Unicode options returned from HOOPS. More...
#include <HUtility.h>
Public Member Functions | |
HUnicodeOptions () | |
HUnicodeOptions (const HUnicodeOptions &in_data) | |
bool | IsValid () |
const __wchar_t * | Show_Net_Unicode_Options () |
const wchar_t * | Show_One_Net_Unicode_Option (const __wchar_t *which) |
const wchar_t * | Show_One_Unicode_Option (const __wchar_t *which) |
const __wchar_t * | Show_Unicode_Options () |
~HUnicodeOptions () | |
Public Attributes | |
wchar_t * | m_data |
actual char* to the user options | |
int | m_length |
length of current user option | |
bool | m_valid |
The HUnicodeOptions class is a helper class which wraps up memory management for variable size Unicode options returned from HOOPS.
HUnicodeOptions uses *Show_Unicode_Options_Length* (or variation) to get the length of user option and manages memory allocation and free for Show_Unicode_Options. Following shows an example usage
without HUnicodeOptions class: problem is assumption that option is max 1024 unsigned short * options[MVO_BUFFER_SIZE]; HC_Show_Unicode_Options(options);
with HUnicodeOptions class: automatically allocates enough memory required (by using Show_XXX_Length routene) and free the memory in the destructor HUnicodeOptions options; options.Show_Unicode_Options();
HUnicodeOptions::HUnicodeOptions | ( | ) |
constructor
HUnicodeOptions::HUnicodeOptions | ( | const HUnicodeOptions & | in_data | ) |
copy constructor
HUnicodeOptions::~HUnicodeOptions | ( | ) |
destructor
bool HUnicodeOptions::IsValid | ( | ) |
IsValid returns true if the user option held in this object is valid i.e. if m_length > 0
const __wchar_t* HUnicodeOptions::Show_Net_Unicode_Options | ( | ) |
Show_Net_Unicode_Options Wraps HC_Show_Net_User_Options to use Show_XXX_Length routene and perform memory management.
const wchar_t* HUnicodeOptions::Show_One_Net_Unicode_Option | ( | const __wchar_t * | which | ) |
Show_One_Net_Unicode_Option Wraps HC_Show_One_Net_Unicode_Option to use Show_XXX_Length routene and perform memory management.
const wchar_t* HUnicodeOptions::Show_One_Unicode_Option | ( | const __wchar_t * | which | ) |
Show_One_Unicode_Option Wraps HC_Show_One_Unicode_Option to use Show_XXX_Length routene and perform memory management.
const __wchar_t* HUnicodeOptions::Show_Unicode_Options | ( | ) |
Show_Unicode_Options Wraps HC_Show_User_Options to use Show_XXX_Length routene and perform memory management.