+constexpr char MSG[]="Bloc::propagePlayGround : Not implemented yet for this type of node !";
+class MyVisitorPropagate : public Visitor
+ {
+ public:
+ MyVisitorPropagate(ComposedNode *root):Visitor(root) { }
+ void visitBloc(Bloc *node) { node->ComposedNode::accept(this); }
+ void visitElementaryNode(ElementaryNode *node) { }
+ void visitForEachLoop(ForEachLoop *node) { node->ComposedNode::accept(this); }
+ void visitForEachLoopDyn(ForEachLoopDyn *node) { node->ComposedNode::accept(this); }
+ void visitOptimizerLoop(OptimizerLoop *node) { throw YACS::Exception(MSG); }
+ void visitDynParaLoop(DynParaLoop *node) { throw YACS::Exception(MSG); }
+ void visitForLoop(ForLoop *node) { throw YACS::Exception(MSG); }
+ template<class NodeClass>
+ void visitNodeWithContainer(NodeClass *node)
+ {
+ Container *cont(node->getContainer());
+ HomogeneousPoolContainer *cont2(dynamic_cast<HomogeneousPoolContainer *>(cont));
+ if(!cont2)
+ return ;
+ _cont2.insert(cont2);
+ }
+ void visitInlineNode(InlineNode *node) { this->visitNodeWithContainer<InlineNode>(node); }
+ void visitInlineFuncNode(InlineFuncNode *node) { visitInlineNode(node); }
+ void visitLoop(Loop *node) { throw YACS::Exception(MSG); }
+ void visitProc(Proc *node) { node->ComposedNode::accept(this); }
+ void visitServiceNode(ServiceNode *node) { this->visitNodeWithContainer<ServiceNode>(node); }
+ void visitServerNode(ServerNode *node) { visitInlineNode(node); }
+ void visitServiceInlineNode(ServiceInlineNode *node) { throw YACS::Exception(MSG); }
+ void visitSwitch(Switch *node) { throw YACS::Exception(MSG); }
+ void visitWhileLoop(WhileLoop *node) { throw YACS::Exception(MSG); }
+ void visitPresetNode(DataNode *node) { throw YACS::Exception(MSG); }
+ void visitOutNode(DataNode *node) { throw YACS::Exception(MSG); }
+ void visitStudyInNode(DataNode *node) { throw YACS::Exception(MSG); }
+ void visitStudyOutNode(DataNode *node) { throw YACS::Exception(MSG); }
+ public:
+ std::set< HomogeneousPoolContainer * > _cont2;
+};
+