boxcomplexity.cpp File Reference

Implement complexity computation for box diagrams. More...

#include <ostream>
#include "xtended.hh"
#include "boxcomplexity.h"
Include dependency graph for boxcomplexity.cpp:

Go to the source code of this file.

Defines

#define BC   boxComplexity
 internal shortcut to simplify computeBoxComplexity code

Functions

int boxComplexity (Tree box)
 Return the complexity propety of a box expression tree.

Variables

Tree BCOMPLEXITY = tree ("BCOMPLEXITY")
 property Key used to store box complexity

Detailed Description

Implement complexity computation for box diagrams.

Definition in file boxcomplexity.cpp.


Function Documentation

int boxComplexity ( Tree  box  ) 

Return the complexity propety of a box expression tree.

Return the complexity propety of a box expression tree. If no complexity property exist, it is created an computeBoxComplexity is called do to the job.

Parameters:
box an evaluated box expression tree
Returns:
the complexity of box
See also:
computeBoxComplexity

Definition at line 56 of file boxcomplexity.cpp.

Referenced by drawSchema().

00057 {
00058     Tree prop = box->getProperty(BCOMPLEXITY);
00059     
00060     if (prop) {
00061         return tree2int(prop);
00062         
00063     } else {
00064         int v = computeBoxComplexity(box);
00065         box->setProperty(BCOMPLEXITY,tree(v));
00066         return v;
00067     }
00068 }

Here is the caller graph for this function:


Generated on 1 Feb 2010 for FAUST compiler by  doxygen 1.6.1