Public Member Functions | |
Grammar | getGrammar () |
Get grammar. More... | |
setAlignment (int alignment) | |
Set alignment. More... | |
int | getAlignment () |
Get alignment. More... | |
String | getDescription () |
Get structure description. More... | |
setDescription (String description) | |
Set structure description. More... | |
String | getName () |
Get name. More... | |
setName (String name) | |
Set name. More... | |
setDisabled (BOOL disabled) | |
Disable/Enable structure for parsing. More... | |
setLength (String length, LENGTH_UNIT lengthUnit) | |
Set length of structure. More... | |
setRepeatMin (String repeatMin) | |
Set minimum repeat count of structure. More... | |
setRepeatMax (String repeatMax) | |
Set maximum repeat count of structure. More... | |
int | getElementCount () |
Get element count. More... | |
Element | getElementByIndex (int index) |
Get element by index. More... | |
Element | getElementByName (String name) |
Get element by name. More... | |
setDefaultEncoding (String defaultEncoding) | |
Set default encoding. More... | |
String | getDefaultEncoding () |
Get default encoding. More... | |
setElementOrder (ORDER_TYPE order) | |
Set element order. More... | |
int | appendElement (Element *element) |
Append element. More... | |
void | insertElementAtIndex (Element *element, int index) |
Insert element at certain index. More... | |
void | deleteElementAtIndex (int index) |
Delete element at index. More... | |
The Structure class.
A structure object represents a structure in a grammar.
int appendElement | ( | Element * | element | ) |
Append element.
[in] | element | The element to be appended |
void deleteElementAtIndex | ( | int | index | ) |
Delete element at index.
[in] | index | The index where to delete |
int getAlignment | ( | ) |
Get alignment.
The structure is placed at a multiple of the alignment value.
String getDefaultEncoding | ( | ) |
Get default encoding.
The default encoding will be used for all strings that don't specify the encoding explicitely.
String getDescription | ( | ) |
Get structure description.
Element getElementByIndex | ( | int | index | ) |
Get element by index.
Get element by name.
int getElementCount | ( | ) |
Get element count.
Grammar getGrammar | ( | ) |
Get grammar.
Returns the grammar this structure is registered in.
String getName | ( | ) |
Get name.
Get name of structure.
Get name of structure.
void insertElementAtIndex | ( | Element * | element, |
int | index | ||
) |
Insert element at certain index.
[in] | element | The element to be inserted |
[in] | index | The index where to insert |
setAlignment | ( | int | alignment | ) |
Set alignment.
The structure is placed at a multiple of the alignment value.
[in] | alignment | The alignment value |
setDefaultEncoding | ( | String | defaultEncoding | ) |
Set default encoding.
The default encoding will be used for all strings that don't specify the encoding explicitely.
[in] | defaultEncoding | The default encoding |
setDescription | ( | String | description | ) |
Set structure description.
Set description.
[in] | description | The description of the structure |
The description is just for documentation purposes.
[in] | description | The default encoding |
setDisabled | ( | BOOL | disabled | ) |
Disable/Enable structure for parsing.
[in] | disabled | Disable/enable the structure |
setElementOrder | ( | ORDER_TYPE | order | ) |
Set element order.
Variable order selects one matching element. Fixed order maps all elements consecutively.
[in] | order | The element order in the structure |
setLength | ( | String | length, |
LENGTH_UNIT | lengthUnit | ||
) |
Set length of structure.
[in] | length | The new length of the structure |
[in] | lengthUnit | The new length unit of the structure |
setName | ( | String | name | ) |
Set name.
Set name of structure.
[in] | name | The new name of the structure |
setRepeatMax | ( | String | repeatMax | ) |
Set maximum repeat count of structure.
[in] | repeatMax | The new max repeat count of the structure |
setRepeatMin | ( | String | repeatMin | ) |
Set minimum repeat count of structure.
[in] | repeatMin | The new min repeat count of the structure |