#include "boxes.hh"
Go to the source code of this file.
Functions | |
int | boxComplexity (Tree box) |
Return the complexity propety of a box expression tree. |
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.
box | an evaluated box expression tree |
Definition at line 56 of file boxcomplexity.cpp.
References computeBoxComplexity(), CTree::getProperty(), CTree::setProperty(), tree(), and tree2int().
Referenced by drawSchema(), and generateDiagramSchema().
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 }