|
transformer
|
#include <Transformer.hpp>
Public Member Functions | |
| TransformationTree () | |
| default constructor More... | |
| std::pair< int, int > | getElementsCount () const |
| void | addTransformation (TransformationElement *element) |
| bool | getTransformationChain (std::string from, std::string to, std::vector< TransformationElement *> &result) |
| std::vector< TransformationElement * > & | getAvailableElements () |
| ~TransformationTree () | |
| void | clear () |
| void | dumpTree () const |
A class that can be used to get a transformation chain from a set of TransformationElements
|
inline |
default constructor
| transformer::TransformationTree::~TransformationTree | ( | ) |
Destructor, deletes all TransformationElements saved in availableElements
| void transformer::TransformationTree::addTransformation | ( | TransformationElement * | element | ) |
Adds a TransformationElement to the set of available elements.
Note, internal the TransformationTree will also add an inverse transformation.
| void transformer::TransformationTree::clear | ( | ) |
Deletes all available TransformationElements
| void transformer::TransformationTree::dumpTree | ( | ) | const |
Dumps information about this tree on LOG_DEBUG_S
|
inline |
Returns a vector of all currently registered transformation elements.
| std::pair< int, int > transformer::TransformationTree::getElementsCount | ( | ) | const |
Returns the number of registered elements in the tree, as a (static elements, dynamic elements) pair
| bool transformer::TransformationTree::getTransformationChain | ( | std::string | from, |
| std::string | to, | ||
| std::vector< TransformationElement *> & | result | ||
| ) |
This function tries to generate a transformationChain from 'from' to 'to'.
To generate the transformationChain this function will spann a tree of transformations originating from 'from'. The function will then perform a breadth-first search until it either finds a chain, the tree can't be expanded further, or the search depth is deeper than maxSeekDepth.
In case a chain was found the function returns true and the chain is stored in result.
1.8.13