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. More...
|
|
void | AddDouble (const char *name, double value) |
| CALL: See AddFloat() More...
|
|
void | AddInt32 (const char *name, int32_t value) |
| CALL: See AddFloat() More...
|
|
void | AddInt16 (const char *name, int16_t value) |
| CALL: See AddFloat() More...
|
|
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. More...
|
|
bool | FindDouble (const char *name, double *value) |
| CALL: See FindFloat() More...
|
|
bool | FindInt32 (const char *name, int32_t *value) |
| CALL: See FindFloat() More...
|
|
bool | FindInt16 (const char *name, int16_t *value) |
| CALL: See FindFloat() More...
|
|
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. More...
|
|
int32_t | GetChunkDataSize () |
| CALL: Returns size of current chunk. More...
|
|
int32_t | GetChunkVersion () |
| CALL: Lists fVersion in chunk header for convenience. More...
|
|
bool | IsEmpty () |
| CALL: Returns true if no data is in the chunk. More...
|
|
void | Clear () |
| Resets chunk. More...
|
|