Houdini Engine 6.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Strings

Functions

HAPI_DECL HAPI_GetStringBufLength (const HAPI_Session *session, HAPI_StringHandle string_handle, int *buffer_length)
 Gives back the string length of the string with the given handle. More...
 
HAPI_DECL HAPI_GetString (const HAPI_Session *session, HAPI_StringHandle string_handle, char *string_value, int length)
 Gives back the string value of the string with the given handle. More...
 
HAPI_DECL HAPI_SetCustomString (const HAPI_Session *session, const char *string_value, HAPI_StringHandle *handle_value)
 Adds the given string to the string table and returns the handle. It is the responsibility of the caller to manage access to the string. The intended use for custom strings is to allow structs that reference strings to be passed in to HAPI. More...
 
HAPI_DECL HAPI_RemoveCustomString (const HAPI_Session *session, const HAPI_StringHandle string_handle)
 Removes the specified string from the server and invalidates the handle. More...
 
HAPI_DECL HAPI_GetStringBatchSize (const HAPI_Session *session, const int *string_handle_array, int string_handle_count, int *string_buffer_size)
 Gives back the length of the buffer needed to hold all the values null-separated for the given string handles. Used with HAPI_GetStringBatch(). More...
 
HAPI_DECL HAPI_GetStringBatch (const HAPI_Session *session, char *char_buffer, int char_array_length)
 Gives back the values of the given string handles. The given char array is filled with null-separated values, and the final value is null-terminated. Used with HAPI_GetStringBatchSize(). Using this function instead of repeated calls to HAPI_GetString() can be more more efficient for a large number of strings. More...
 

Detailed Description

Functions for handling strings.

Function Documentation

HAPI_DECL HAPI_GetString ( const HAPI_Session session,
HAPI_StringHandle  string_handle,
char *  string_value,
int  length 
)

Gives back the string value of the string with the given handle.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]string_handleHandle of the string to query.
[out]string_valueActual string value (character array).
[in]lengthLength of the string buffer (must match size of string_value - so including NULL terminator).
HAPI_DECL HAPI_GetStringBatch ( const HAPI_Session session,
char *  char_buffer,
int  char_array_length 
)

Gives back the values of the given string handles. The given char array is filled with null-separated values, and the final value is null-terminated. Used with HAPI_GetStringBatchSize(). Using this function instead of repeated calls to HAPI_GetString() can be more more efficient for a large number of strings.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[out]char_bufferArray of characters to hold string values.
[in]char_array_lengthLength of char_array. Must be large enough to hold all the string values including null separators.
HAPI_DECL HAPI_GetStringBatchSize ( const HAPI_Session session,
const int *  string_handle_array,
int  string_handle_count,
int *  string_buffer_size 
)

Gives back the length of the buffer needed to hold all the values null-separated for the given string handles. Used with HAPI_GetStringBatch().

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]string_handle_arrayArray of string handles to be read.
[in]string_handle_countLength of string_handle_array
[out]string_buffer_sizeBuffer length required for subsequent call to HAPI_GetStringBatch to hold all the given string values null-terminated
HAPI_DECL HAPI_GetStringBufLength ( const HAPI_Session session,
HAPI_StringHandle  string_handle,
int *  buffer_length 
)

Gives back the string length of the string with the given handle.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]string_handleHandle of the string to query.
[out]buffer_lengthBuffer length of the queried string (including NULL terminator).
HAPI_DECL HAPI_RemoveCustomString ( const HAPI_Session session,
const HAPI_StringHandle  string_handle 
)

Removes the specified string from the server and invalidates the handle.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]string_handleHandle of the string that was added
HAPI_DECL HAPI_SetCustomString ( const HAPI_Session session,
const char *  string_value,
HAPI_StringHandle handle_value 
)

Adds the given string to the string table and returns the handle. It is the responsibility of the caller to manage access to the string. The intended use for custom strings is to allow structs that reference strings to be passed in to HAPI.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]string_valueActual string value (character array).
[out]handle_valueHandle of the string that was added