HUserOptions
Fields
char * |
|
int |
|
bool |
Functions
bool |
|
char const * |
|
char const * |
|
char const * |
|
char const * |
Detailed Description
-
class HUserOptions
The HUserOptions class is a helper class which wraps up memory management for variable size user options returned from HOOPS.
HUserOptions uses Show_User_Option_Length (or variation) to get the length of user option and manages memory allocation and free for Show_User_Option. Following shows an example usage
without HUserOption class: problem is assumption that option is max 1024 char * options[MVO_BUFFER_SIZE]; HC_Show_User_Option(options); if( strstr(options, “true”) return true;
with HUserOption class: automatically allocates enough memory required (by using Show_XXX_Length routene) and free the memory in the destructor HUserOptions options; options.Show_User_Option(); if( strstr(options.m_data, “true”) return true;
Public Functions
-
HUserOptions()
constructor
-
HUserOptions(HUserOptions const &in_data)
copy constructor
-
~HUserOptions()
destructor
-
bool IsValid()
IsValid returns true if the user option held in this object is valid i.e. if m_length > 0
-
char const *Show_User_Options()
Show_User_Options Wraps HC_Show_User_Options to use Show_XXX_Length routene and perform memory management. Please refer to the documentation of HC_Show_User_Options from HOOPS/3dGS reference manual for details
- Returns
A char * to the user options string. You can also access the same via HUserOptions.m_data
-
char const *Show_One_Net_User_Option(char const *which)
Show_One_Net_User_Option Wraps HC_Show_One_Net_User_Option to use Show_XXX_Length routene and perform memory management. Please refer to the documentation of HC_Show_One_Net_User_Option from HOOPS/3dGS reference manual for details
- Returns
A char * to the user options string. You can also access the same via HUserOptions.m_data
-
char const *Show_One_User_Option(char const *which)
Show_One_User_Option Wraps HC_Show_One_User_Option to use Show_XXX_Length routene and perform memory management. Please refer to the documentation of HC_Show_One_User_Option from HOOPS/3dGS reference manual for details
- Returns
A char * to the user options string. You can also access the same via HUserOptions.m_data
-
char const *Show_Net_User_Options()
Show_Net_User_Options Wraps HC_Show_Net_User_Options to use Show_XXX_Length routene and perform memory management. Please refer to the documentation of HC_Show_Net_User_Options from HOOPS/3dGS reference manual for details
- Returns
A char * to the user options string. You can also access the same via HUserOptions.m_data
-
HUserOptions()