The Element class.
More...
|
Element | Element (ELEMENT_TYPE type, String name, BOOL setDefaults) |
| Constructor. Create object of type Element.
|
|
String | getName () |
| Get name. Get name of element.
|
|
| setName (String name) |
| Set name. Set name of element.
|
|
String | getDescription () |
| Get description. Get description of element.
|
|
| setDescription (String name) |
| Set description. Set description of element.
|
|
String | getEnclosingStructure () |
| Get enclosing structure. Get the enclosing structure of the element.
|
|
String | getLength () |
| Get length. Get length of element. For binary or string elements a length of zero means to fill the enclosing structure. Be aware that lengths can be fractions of bytes so call additionally getLengthUnit()
|
|
LENGTH_UNIT | getLengthUnit () |
| Get length unit. Get length unit of element in bits. Valid values are.
|
|
| setLength (String length, LENGTH_UNIT lengthUnit) |
| Set length. Set length of element. For binary or string elements a length of zero means to fill the enclosing structure. The length can contain variables and expressions. For number and binary elements you can specify a length unit .
|
|
ELEMENT_TYPE | getType () |
| Get type. Get type of element. This can be one of.
|
|
BOOL | mustMatch () |
| Get "must match" flag. Get if this element has to match while parsing a file. For this check the min/max values are checked and if one of the fixed values matches (if at least one is defined)
|
|
| setMustMatch (BOOL mustMatch) |
| Set "must match" flag. Set if this element has to match while parsing a file. For this check the min/max values are checked and if one of the fixed values matches (if at least one is defined)
|
|
Value | getMinValue () |
| Get minimum value. Get minimum value of element. This is only valid for numbers. This value will be checked if the "must match" flag is set.
|
|
Element | getParent () |
| Get parent. Get parent of element. There is only a parent element if the enclosing structure is inherited from another structure.
|
|
The Element class.
An element object represents one item in a structure.
- Author
- Andreas Pehnack
Constructor. Create object of type Element.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Parameters
-
[in] | type | The type of the element |
[in] | name | The name of the element |
[in] | setDefaults | Set defaults for element? |
- Returns
- The new element
Get description. Get description of element.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The description of the element
- See Also
- setDescription
String getEnclosingStructure |
( |
| ) |
|
Get enclosing structure. Get the enclosing structure of the element.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The structure the element is part of
Get length. Get length of element. For binary or string elements a length of zero means to fill the enclosing structure. Be aware that lengths can be fractions of bytes so call additionally getLengthUnit()
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The length of the element in bytes.
- See Also
- getLengthUnit
LENGTH_UNIT getLengthUnit |
( |
| ) |
|
Get length unit. Get length unit of element in bits. Valid values are.
- LENGTH_UNIT_BYTES
- LENGTH_UNIT_BITS
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The length of the element in bits.
- See Also
- getLength
Get minimum value. Get minimum value of element. This is only valid for numbers. This value will be checked if the "must match" flag is set.
Get maximum value. Get maximum value of element. This is only valid for numbers. This value will be checked if the "must match" flag is set.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The minimum value of the element.
- See Also
- getMaxValue
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The maximum value of the element.
- See Also
- getMinValue
Get name. Get name of element.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The name of the element
- See Also
- setName
Get parent. Get parent of element. There is only a parent element if the enclosing structure is inherited from another structure.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The parent of the element.
Get type. Get type of element. This can be one of.
- ELEMENT_BINARY
- ELEMENT_GRAMMAR_REF
- ELEMENT_NUMBER
- ELEMENT_STRING
- ELEMENT_OFFSET
- ELEMENT_SCRIPT
- ELEMENT_STRUCTURE
- ELEMENT_STRUCTURE_REF
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- The type of the element.
Get "must match" flag. Get if this element has to match while parsing a file. For this check the min/max values are checked and if one of the fixed values matches (if at least one is defined)
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Returns
- Does the element have to match while parsing?
- See Also
- setMustMatch
Set description. Set description of element.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Parameters
-
[in] | name | The new description of the element |
- See Also
- getDescription
setLength |
( |
String |
length, |
|
|
LENGTH_UNIT |
lengthUnit |
|
) |
| |
Set length. Set length of element. For binary or string elements a length of zero means to fill the enclosing structure. The length can contain variables and expressions. For number and binary elements you can specify a length unit .
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Parameters
-
[in] | length | The new length of the element |
[in] | lengthUnit | The new length unit (bits/bytes) of the element |
- See Also
- getLengthUnit
setMustMatch |
( |
BOOL |
mustMatch | ) |
|
Set "must match" flag. Set if this element has to match while parsing a file. For this check the min/max values are checked and if one of the fixed values matches (if at least one is defined)
- Author
- Andreas Pehnack
- Date
- 2012-05-15
- See Also
- mustMatch
Set name. Set name of element.
- Author
- Andreas Pehnack
- Date
- 2012-05-11
- Parameters
-
[in] | name | The new name of the element |
- See Also
- getName
The documentation for this class was generated from the following file:
- Generated/synalysis_wrap_lua.c