BNFNode :: get - Locate BNF tree node
The function locates a BNF tree node at position or with a symbol name. The located tree node will be returned. When the current BNF tree node is not valid or when the requested tree node could not be located, the function throws an exception. In order to avoid exceptions, one may call tryGet() , instead.
Implementation overview
- Get BNF tree node at position
BNFNode :: get ( iPosition ) - Locate BNF tree node recursively
BNFNode :: get ( sSymbol, bRecursive ) - Locate BNF tree node
BNFNode :: get ( sSymbol )
Implementation details
-
Get BNF tree node at position
odaba::BNFNode BNFNode  :: get ( int32 iPosition )
The function returns the BNF tree node on next lower level at position passed in iPosition . The value in iPosition must be less then the number returned from count() and greater or equal to 0.
- iPosition
- Position in collection
The position of an element in a collection is beginning with 0 for the first element.
to list
- iPosition
- Position in collection
-
Locate BNF tree node recursively
odaba::BNFNode BNFNode  :: get ( odaba::String &sSymbol, bool bRecursive )
The function tries to locate a subordinated BNF tree node with the symbol name passed in sSymbol . When bRecursive is false, the function only looks at next lower level. Otherwise, the function also looks at lower subordinated levels until the symbol is located. When no such tree node exists, the function throws an exception.
- sSymbol
- BNF symbol name
The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.
- bRecursive
- Process recursive
The function is called recursively for subordinated elements.
to list
- sSymbol
- BNF symbol name
-
Locate BNF tree node
odaba::BNFNode BNFNode  :: get ( odaba::String &sSymbol )
The function tries to locate a subordinated BNF tree node with the symbol name passed in sSymbol . When no such symbol exists, the function throws an exception.
- sSymbol
- BNF symbol name
The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.
to list
- sSymbol
- BNF symbol name