Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HUnicodeOptions Class Reference

The HUnicodeOptions class is a helper class which wraps up memory management for variable size Unicode options returned from HOOPS. More...

#include <HUtility.h>

List of all members.

Public Member Functions

 HUnicodeOptions (const HUnicodeOptions &in_data)
 HUnicodeOptions ()
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


Detailed Description

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();


Constructor & Destructor Documentation

HUnicodeOptions::HUnicodeOptions (  ) 

constructor

HUnicodeOptions::HUnicodeOptions ( const HUnicodeOptions in_data  ) 

copy constructor

HUnicodeOptions::~HUnicodeOptions (  ) 

destructor


Member Function Documentation

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.

Returns:
A __wchar_t* to the user options string. You can also access the same via HUserOptions.m_data

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.

Returns:
A __wchar_t* to the user options string. You can also access the same via HUserOptions.m_data

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.

Returns:
A Show_One_Unicode_Option * to the user options string. You can also access the same via HUserOptions.m_data

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.

Returns:
A __wchar_t* to the user options string. You can also access the same via HUserOptions.m_data


The documentation for this class was generated from the following file: