11 class FunctionalBlock;
12 class AbstractInterface;
13 #include "Exception.h"
26 inline GroupBlock* getTopGroup() { return topGroup; }
27 inline QList<GroupBlock*> getAllGroups() { return groups; }
29 // methods for group blocks
30 GroupBlock* createChildGroupBlock(GroupBlock* parent);
31 void removeGroupBlock(GroupBlock *group);
32 GroupBlock* getGroupBlockByName(QString name);
34 // methods for functional blocks
35 FunctionalBlock* createFunctionalBlock(GroupBlock *group, ReferenceBlock *ref);
36 FunctionalBlock* duplicateFunctionalBlock(FunctionalBlock *block);
37 bool removeFunctionalBlock(FunctionalBlock* block);
38 FunctionalBlock* getFunctionalBlockByName(QString name, GroupBlock* parent = NULL); //! if parent = NULL, search in the whole graph
40 // methods for source blocks
41 FunctionalBlock* createSourceBlock(ReferenceBlock *ref);
42 FunctionalBlock* duplicateSourceBlock(FunctionalBlock *block);
43 FunctionalBlock* getSourceBlockByName(QString name);
44 bool removeSourceBlock(FunctionalBlock* block);
47 QList<AbstractInterface *> getOutsideInterfaces();
49 * \brief createPatterns
50 * createPatterns() crosses the graph and for each functional block, it computes
51 * the consumptionPattern, the productionPattern, the production counter and delta
52 * using the parameters fo the block.
54 void createPatterns() throw(Exception);
55 void resetPatternComputed();
56 void computeOutputPatterns(int nbExec) throw(Exception);
61 QList<GroupBlock *> groups; //! usefull to avoid recursive methods to find a particular group.
62 QList<FunctionalBlock*> sources; //! source for the top group