| AAX SDK 2.6.1 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
List of all members | Classes | Public Member Functions
AAX_CChunkDataParser Class Reference

`#include <AAX_CChunkDataParser.h>`

Collaboration diagram for AAX_CChunkDataParser:
[legend]

## Description

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.

## Classes
struct | DataValue

## Public Member Functions
| 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.

## Internal Methods
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

## Constructor & Destructor Documentation

## ◆ AAX_CChunkDataParser()

AAX_CChunkDataParser::AAX_CChunkDataParser | ( |  | ) |

## ◆ ~AAX_CChunkDataParser()

virtual AAX_CChunkDataParser::~AAX_CChunkDataParser | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ AddFloat()

void AAX_CChunkDataParser::AddFloat | ( | const char * | name,
|  | float | value
| ) |  |

CALL: Adds some data of type float with name and value to the current chunk.

See also
  AddDouble(), AddInt32(), and AddInt16() are the same but with different data types.

## ◆ AddDouble()

void AAX_CChunkDataParser::AddDouble | ( | const char * | name,
|  | double | value
| ) |  |

CALL: See AddFloat()

## ◆ AddInt32()

void AAX_CChunkDataParser::AddInt32 | ( | const char * | name,
|  | int32_t | value
| ) |  |

CALL: See AddFloat()

## ◆ AddInt16()

void AAX_CChunkDataParser::AddInt16 | ( | const char * | name,
|  | int16_t | value
| ) |  |

CALL: See AddFloat()

## ◆ AddString()

void AAX_CChunkDataParser::AddString | ( | const char * | name,
|  | AAX_CString | value
| ) |  |

## ◆ FindFloat()

bool AAX_CChunkDataParser::FindFloat | ( | const char * | name,
|  | float * | value
| ) |  |

CALL: Finds some data of type float with name and value in the current chunk.

See also
  FindDouble(), FindInt32(), and FindInt16() are the same but with different data types.

## ◆ FindDouble()

bool AAX_CChunkDataParser::FindDouble | ( | const char * | name,
|  | double * | value
| ) |  |

CALL: See FindFloat()

## ◆ FindInt32()

bool AAX_CChunkDataParser::FindInt32 | ( | const char * | name,
|  | int32_t * | value
| ) |  |

CALL: See FindFloat()

## ◆ FindInt16()

bool AAX_CChunkDataParser::FindInt16 | ( | const char * | name,
|  | int16_t * | value
| ) |  |

CALL: See FindFloat()

## ◆ FindString()

bool AAX_CChunkDataParser::FindString | ( | const char * | name,
|  | AAX_CString * | value
| ) |  |

## ◆ ReplaceDouble()

bool AAX_CChunkDataParser::ReplaceDouble | ( | const char * | name,
|  | double | value
| ) |  |

## ◆ GetChunkData()

int32_t AAX_CChunkDataParser::GetChunkData | ( | AAX_SPlugInChunk * | chunk | ) |

CALL: Fills passed in chunk with data from current chunk; returns 0 if successful.

## ◆ GetChunkDataSize()

int32_t AAX_CChunkDataParser::GetChunkDataSize | ( |  | ) |

CALL: Returns size of current chunk.

## ◆ GetChunkVersion()

int32_t AAX_CChunkDataParser::GetChunkVersion | ( |  | ) |
| inline

CALL: Lists fVersion in chunk header for convenience.

References mChunkVersion.

## ◆ IsEmpty()

bool AAX_CChunkDataParser::IsEmpty | ( |  | ) |

CALL: Returns true if no data is in the chunk.

## ◆ Clear()

void AAX_CChunkDataParser::Clear | ( |  | ) |

Resets chunk.

## ◆ LoadChunk()

void AAX_CChunkDataParser::LoadChunk | ( | const AAX_SPlugInChunk * | chunk | ) |

Sets current chunk to data in chunk parameter.

## ◆ WordAlign() [1/2]

void AAX_CChunkDataParser::WordAlign | ( | uint32_t & | index | ) |
| protected

sets index to 4-byte boundary

## ◆ WordAlign() [2/2]

void AAX_CChunkDataParser::WordAlign | ( | int32_t & | index | ) |
| protected

sets index to 4-byte boundary

## ◆ FindName()

int32_t AAX_CChunkDataParser::FindName | ( | const AAX_CString & | Name | ) |
| protected

used by public Find methods

## Member Data Documentation

## ◆ mLastFoundIndex

int32_t AAX_CChunkDataParser::mLastFoundIndex
| protected

The last index found in the chunk.

Since control values in chunks should tend to stay in order and in sync with the way they're checked with controls within the plug-in, we'll keep track of the value index to speed up searching.

## ◆ mChunkData

char* AAX_CChunkDataParser::mChunkData
| protected

## ◆ mChunkVersion

int32_t AAX_CChunkDataParser::mChunkVersion
| protected

Equal to fVersion from the chunk header. Equal to -1 if no chunk is loaded.

Referenced by GetChunkVersion().

## ◆ mDataValues

std::vector<DataValue> AAX_CChunkDataParser::mDataValues

The documentation for this class was generated from the following file:

- AAX_CChunkDataParser.h