Synalyze It!  1.1
 All Classes Functions Pages
Public Member Functions | List of all members
StringElement Class Reference

The StringElement class. More...

Inheritance diagram for StringElement:
Element

Public Member Functions

String getEncoding ()
 Get encoding. Get encoding of string element.
 
 setEncoding (String encoding)
 Set encoding. Set string encoding of element.
 
int getBytesPerChar ()
 Get bytes per character. Get the number of bytes a character needs. This information is derived from the selected string encoding.
 
STRING_LENGTH_TYPE getLengthType ()
 Get string length type. Get length type of string element. Valid types are:
 
- Public Member Functions inherited from Element
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.
 

Detailed Description

The StringElement class.

A string element object represents one binary item in a structure.

Author
Andreas Pehnack

Member Function Documentation

int getBytesPerChar ( )

Get bytes per character. Get the number of bytes a character needs. This information is derived from the selected string encoding.

Author
Andreas Pehnack
Date
2012-05-11
Returns
The number of bytes per character
See Also
getEncoding
String getEncoding ( )

Get encoding. Get encoding of string element.

Author
Andreas Pehnack
Date
2012-05-11
Returns
The encoding of the string element
See Also
setEncoding
STRING_LENGTH_TYPE getLengthType ( )

Get string length type. Get length type of string element. Valid types are:

  • STRING_LENGTH_FIXED
  • STRING_LENGTH_ZERO_TERMINATED
  • STRING_LENGTH_PASCAL
  • STRING_LENGTH_DELIMITER_TERMINATED
Author
Andreas Pehnack
Date
2012-05-15
Returns
The length type of the string element
setEncoding ( String  encoding)

Set encoding. Set string encoding of element.

Author
Andreas Pehnack
Date
2012-05-15
Parameters
[in]encodingThe new string encoding of the element
See Also
getEncoding

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