bool GetVariableArray(SetArrayType type, const char* ppathToVar, unsigned index, void* pdata, unsigned count); bool GetVariableArray(const char* ppathToVar, unsigned index, Value* pdata, unsigned count);
GetVariableArray populates a buffer with results from an array. The pdata pointer must contain enough space for count items. If a variable path is not found or is not an array, 0 will be returned and no data written to buffer.
The buffers allocated for string content are temporary within the Movie, both when SA_String and SA_Value types are used. These buffers may be overwritten after the next call to GetVariableArray; they will also be lost if Movie dies. This means that users should copy any string data immediately after the call, as access of it later may cause a crash.
Parameters |
Description |
SetArrayType type |
The type of array being set. (SA_Int, SA_Double, SA_Float, SA_Value, SA_String or SA_StringW) |
const char* ppathToVar |
A name or path to the variable whose value is being requested. |
unsigned index |
The index in the array to start getting the data from. |
void* pdata |
Points to the location where the data will be stored. |
unsigned count |
The number of items to be stored. |
A boolean value of 1 is returned if the variable path or array is found and data is written to the buffer.