Public Member Functions | |
Result | addStructureStart (Structure structure, long startPos, int iteration, String name, bool addSizeToEnclosing) |
Add start of a structure to the results. More... | |
Result | addStructureStartAtPosition (Structure structure, long startPos, int iteration, String name) |
Add start of a structure to the results. More... | |
Result | addStructureEnd (long endPos) |
Add end of a structure to the results. More... | |
Result | addElement (Element element, long length, int iteration, Value value) |
Add a structure element to the results. Length is specified in bytes. More... | |
Result | addElementBits (Element element, long length, int iteration, Value value) |
Add a structure element to the results. Length is specified in bits. More... | |
cut (Result result) | |
Cut results. More... | |
Result | getLastResult () |
Get last result. More... | |
Result | getPrevResult (Result result) |
Get previous result. More... | |
Result | getResultByName (String name) |
Get result by name. More... | |
The Results class.
A results object contains the results of the structure mapping process
Add a structure element to the results. Length is specified in bytes.
The returned result can be used to remove all results from this on using the cut method.
[in] | element | The structure element that was mapped |
[in] | length | Length of the element in bytes |
[in] | iteration | How often was this structure element mapped consecutively? (Array of structures) |
[in] | value | The value resulting of the element being mapped to the file |
Add a structure element to the results. Length is specified in bits.
The returned result can be used to remove all results from this on using the cut method.
[in] | element | The structure element that was mapped |
[in] | length | Length of the element in bits |
[in] | iteration | How often was this structure element mapped consecutively? (Array of structures) |
[in] | value | The value resulting of the element being mapped to the file |
Result addStructureEnd | ( | long | endPos | ) |
Add end of a structure to the results.
The returned result can be used to remove all results from this on using the cut method.
[in] | endPos | Where in the file did the structure end? Padding bytes are calculated automatically |
Result addStructureStart | ( | Structure | structure, |
long | startPos, | ||
int | iteration, | ||
String | name, | ||
bool | addSizeToEnclosing | ||
) |
Add start of a structure to the results.
The returned result can be used to remove all results from this on using the cut method. This method is used usually when the structure is enclosed in another structure.
[in] | structure | The structure that was mapped |
[in] | startPos | Where in the file was the structure mapped? |
[in] | iteration | How often was this structure mapped consecutively? (Array of structures) |
[in] | name | Name to show for the result |
[in] | addSizeToEnclosing | Add size to the enclosing structure result? Set this to true if the structure is actually contained in the enclosing structure in the result tree. |
Result addStructureStartAtPosition | ( | Structure | structure, |
long | startPos, | ||
int | iteration, | ||
String | name | ||
) |
Add start of a structure to the results.
The returned result can be used to remove all results from this on using the cut method. This method is used usually when the structure is referenced from another position and not enclosed in another structure.
[in] | structure | The structure that was mapped |
[in] | startPos | Where in the file was the structure mapped? |
[in] | iteration | How often was this structure mapped consecutively? (Array of structures) |
[in] | name | Name to show for the result |
cut | ( | Result | result | ) |
Cut results.
You usually do this when you parsed in a wrong way and need to reparse from a certain position. So save a reference to the result where you may want to restart.
[in] | result | First result |
Result getLastResult | ( | ) |
Get last result.
This is the result that was added most recently.
Get previous result.
Pass here the successor of the result you want.
[in] | result | The result you want the predecessor for |
Get result by name.
The search starts at the end.
[in] | name | Name of the result you're looking for |