Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / engine / Proc.hxx
1 #ifndef _PROC_HXX_
2 #define _PROC_HXX_
3
4 #include "Bloc.hxx"
5 #include <string>
6 #include <iostream>
7 #include <list>
8
9 namespace YACS
10 {
11   namespace ENGINE
12   {
13     class TypeCode;
14     class TypeCodeObjref;
15     class InlineNode;
16     class ServiceNode;
17     class Container;
18
19     class Proc: public Bloc
20     {
21     public:
22       Proc(const std::string& name);
23       virtual ~Proc();
24       virtual TypeCode *createType(const std::string& name, const std::string& kind);
25       virtual TypeCode *createInterfaceTc(const std::string& id, const std::string& name, 
26                                          std::list<TypeCodeObjref *> ltc);
27       virtual TypeCode *createSequenceTc (const std::string& id, const std::string& name, 
28                                          TypeCode *content);
29       virtual TypeCode *createStructTc (const std::string& id, const std::string& name);
30       virtual TypeCode* getTypeCode(const std::string& name);
31       virtual void setTypeCode(const std::string& name,TypeCode *t);
32       virtual void accept(Visitor *visitor);
33
34       YACS::StatesForNode getNodeState(int numId);
35       std::string getXMLState(int numId);
36       std::list<int> getNumIds();
37       std::list<std::string> getIds();
38
39       virtual void writeDot(std::ostream &os);
40       void setName(const std::string& name); // Used by GUI to display graph name
41       friend std::ostream & operator<< ( std::ostream &os, const Proc& p);
42       std::map<std::string, Node*> nodeMap;
43       std::map<std::string, ServiceNode*> serviceMap;
44       std::map<std::string, InlineNode*> inlineMap;
45       std::map<std::string, TypeCode*> typeMap;
46       std::map<std::string, Container*> containerMap;
47       std::vector<std::string> names;
48     };
49   }
50 }
51
52 #endif