1 #ifndef __GROUPBLOCK_H__
2 #define __GROUPBLOCK_H__
8 #include "AbstractBlock.h"
10 #include "Exception.h"
17 class GroupBlock : public AbstractBlock {
20 GroupBlock(GroupBlock* _parent) throw(Exception);
21 virtual ~GroupBlock();
24 inline QList<AbstractBlock*> getBlocks() { return blocks; }
26 void setParent(AbstractBlock *_parent);
30 bool isTopGroupBlock();
31 inline bool isTop() { return topGroup; }
34 inline void addBlock(AbstractBlock* block) { blocks.append(block); }
35 void removeBlock(AbstractBlock* block);
36 AbstractBlock* getFunctionalBlockByName(QString name);
38 void removeAllBlocks();
39 void parametersValidation(QList<AbstractBlock *> *checkedBlocks, QList<AbstractBlock*>* blocksToConfigure);
40 void addGenericParameter(QString name, QString type, QString value);
41 void removeGenericParameter(QString name);
45 bool computeOutputPattern(int nbExec = -1);
50 * \brief initInputPattern
51 * Since input GroupInterface are just tunnels to input interfaces of inner blocks, they must
52 * have an output pattern that can be provided to inner interfaces. That outpu pattern is just
53 * found by taking the output pattern of the connectedFrom interface.
55 void initInputPattern();
59 QList<AbstractBlock*> blocks; // contains instances of FunctionalBlock or GroupBlock that are children of this group
63 #endif // __GROUPBLOCK_H__