Parser utility for plugin chunks.
- Todo:
- Update this documentation for AAX
This class acts as generic repository for data that is stuffed into or extracted from a SFicPlugInChunk. It has an abstracted Add/Find interface to add or retrieve data values, each uniquely referenced by a c-string. In conjuction with the Effect Layer and the "ControlManager" aspects of the CProcess class, this provides a more transparent & resilent system for performing save-and-restore on settings that won't break so easily from endian issues or from the hard-coded structs that have typically been used to build chunk data.
- Format of the Chunk Data
- The first 4 bytes of the data are the version number (repeated 4 times to be immune to byte swapping). Data follows next.
Example: "f_bypa %$#@d_gain #$!#@$%$s_omsi #$" type name value
----------------------------
float bypa %$#@
double gain #$!#@$%$
int16_t omsi #$
- The first character denotes the data type:
'f' = float
'd' = double
'l' = int32
's' = int16
- "_" is an empty placekeeper that could be used to addition future information. Currently, it's ignored when a chunk is parsed.
- The string name identifier follows next, and can up to 255 characters int32_t. The Effect Layer builds chunks it always converts the AAX_FourCharCode of the control to a string. So, this will always be 4 characters int32_t. The string is null terminated to indicate the start of the data value.
- The data value follows next, but is possible shifted to aligned word aligned. The size of is determined, of course, by the data type.
|
| | AAX_CChunkDataParser () |
| |
| virtual | ~AAX_CChunkDataParser () |
| |
| void | AddFloat (const char *name, float value) |
| | CALL: Adds some data of type float with name and value to the current chunk.
|
| |
| void | AddDouble (const char *name, double value) |
| | CALL: See AddFloat()
|
| |
| void | AddInt32 (const char *name, int32_t value) |
| | CALL: See AddFloat()
|
| |
| void | AddInt16 (const char *name, int16_t value) |
| | CALL: See AddFloat()
|
| |
| void | AddString (const char *name, AAX_CString value) |
| |
| bool | FindFloat (const char *name, float *value) |
| | CALL: Finds some data of type float with name and value in the current chunk.
|
| |
| bool | FindDouble (const char *name, double *value) |
| | CALL: See FindFloat()
|
| |
| bool | FindInt32 (const char *name, int32_t *value) |
| | CALL: See FindFloat()
|
| |
| bool | FindInt16 (const char *name, int16_t *value) |
| | CALL: See FindFloat()
|
| |
| bool | FindString (const char *name, AAX_CString *value) |
| |
| bool | ReplaceDouble (const char *name, double value) |
| |
| int32_t | GetChunkData (AAX_SPlugInChunk *chunk) |
| | CALL: Fills passed in chunk with data from current chunk; returns 0 if successful.
|
| |
| int32_t | GetChunkDataSize () |
| | CALL: Returns size of current chunk.
|
| |
| int32_t | GetChunkVersion () |
| | CALL: Lists fVersion in chunk header for convenience.
|
| |
| bool | IsEmpty () |
| | CALL: Returns true if no data is in the chunk.
|
| |
| void | Clear () |
| | Resets chunk.
|
| |
|
An Effect Layer plugin can ignore these methods. They are handled by or used internally by the Effect Layer.
|
| int32_t | mLastFoundIndex |
| | The last index found in the chunk.
|
| |
| char * | mChunkData |
| |
| int32_t | mChunkVersion |
| | Equal to fVersion from the chunk header. Equal to -1 if no chunk is loaded.
|
| |
| std::vector< DataValue > | mDataValues |
| |
| void | LoadChunk (const AAX_SPlugInChunk *chunk) |
| | Sets current chunk to data in chunk parameter.
|
| |
| void | WordAlign (uint32_t &index) |
| | sets index to 4-byte boundary
|
| |
| void | WordAlign (int32_t &index) |
| | sets index to 4-byte boundary
|
| |
| int32_t | FindName (const AAX_CString &Name) |
| | used by public Find methods
|
| |