FSM Library - C++ version
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Tree Class Reference
Inheritance diagram for Tree:
Inheritance graph
[legend]

Public Member Functions

 Tree (const std::shared_ptr< TreeNode > root, const std::shared_ptr< FsmPresentationLayer > presentationLayer)
 
std::vector< std::shared_ptr< TreeNode > > getLeaves ()
 
std::shared_ptr< TreeNodegetRoot () const
 
IOListContainer getIOLists ()
 
void remove (const std::shared_ptr< Tree > otherTree)
 
void toDot (std::ostream &out)
 
IOListContainer getTestCases ()
 
void add (const IOListContainer &tcl)
 
void addToRoot (const IOListContainer &tcl)
 
void unionTree (const std::shared_ptr< Tree > otherTree)
 
void addAfter (const InputTrace &tr, const IOListContainer &cnt)
 

Protected Member Functions

void calcLeaves ()
 
void remove (const std::shared_ptr< TreeNode > thisNode, const std::shared_ptr< TreeNode > otherNode)
 
void printChildren (std::ostream &out, const std::shared_ptr< TreeNode > top, const std::shared_ptr< int > idNode) const
 

Protected Attributes

std::shared_ptr< TreeNoderoot
 
std::vector< std::shared_ptr< TreeNode > > leaves
 
const std::shared_ptr< FsmPresentationLayerpresentationLayer
 

Constructor & Destructor Documentation

Tree::Tree ( const std::shared_ptr< TreeNode root,
const std::shared_ptr< FsmPresentationLayer presentationLayer 
)

Create a new tree, with a root and a presenation layer

Parameters
rootroot of the tree
presentationLayerThe presentation layer to use

Member Function Documentation

void Tree::add ( const IOListContainer tcl)

Append a list of input traces to EVERY node of the input tree. Do not create redundant input sequences that are already contained (possibly as a prefix) in the existing tree.

Here is the call graph for this function:

void Tree::addToRoot ( const IOListContainer tcl)

Insert a list of input traces at the root of the input tree. Do not create redundant input sequences that are already contained (possibly as a prefix) in the existing tree.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tree::calcLeaves ( )
protected

Calculate the leaves of the all tree, calling calcLeaves on the root of the tree

Here is the caller graph for this function:

std::vector< std::shared_ptr< TreeNode > > Tree::getLeaves ( )

Calculate the leaves, then give the leaves back

Returns
The leaves of this tree

Here is the call graph for this function:

std::shared_ptr< TreeNode > Tree::getRoot ( ) const

Getter for the root of this tree

Returns
The root of this tree

Here is the caller graph for this function:

IOListContainer Tree::getTestCases ( )

Get the test cases of this tree

Returns
the test cases
void Tree::printChildren ( std::ostream &  out,
const std::shared_ptr< TreeNode top,
const std::shared_ptr< int >  idNode 
) const
protected

Print every childran of this tree to a dot format into a standard output stream

Parameters
outThe standard output stream to use
topThe root of the tree
idNodeThe id of this node, used to differenciate node in dot format

Here is the caller graph for this function:

void Tree::remove ( const std::shared_ptr< Tree otherTree)

Special remove operation.

Parameters
otherTreeFor all edges in otherTree that correspond to an edge in this tree, the corresponding source node and target node in this tree are marked as deleted.

Here is the call graph for this function:

void Tree::toDot ( std::ostream &  out)

Output this tree to a dot format, into a standard output stream

Parameters
outThe standard output stream to use

Here is the call graph for this function:

void Tree::unionTree ( const std::shared_ptr< Tree otherTree)

Construct the union of this Tree and otherTree by adding every maximal input trace of otherTree to this inputTree.

Here is the call graph for this function:

Member Data Documentation

std::vector<std::shared_ptr<TreeNode> > Tree::leaves
protected

The list of the leaves of this tree (empty, unless you call calcleaves)

const std::shared_ptr<FsmPresentationLayer> Tree::presentationLayer
protected

The presentation layer used by this tree

std::shared_ptr<TreeNode> Tree::root
protected

The root of this tree


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