Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / yacsloader / factory.hxx
1 #ifndef _FACTORY_HXX_
2 #define _FACTORY_HXX_
3
4 #include <string>
5 #include <vector>
6 #include <map>
7
8 struct mytype{
9     std::string _name;
10     std::string _kind;
11 };
12
13 struct mycontrol{
14     void fromnode(const std::string& fromnode) { _fromnode = fromnode; }
15     void tonode(const std::string& tonode) { _tonode = tonode; }
16     std::string fromnode()const { return _fromnode ; }
17     std::string tonode()const { return _tonode ; }
18     std::map<std::string,std::string> _props;
19     void clear()
20     {
21       _props.clear();
22     }
23     void setProperty(const std::string& name, const std::string& value)
24     {
25       _props[name]=value;
26     }
27 private:
28     std::string _fromnode;
29     std::string _tonode;
30 };
31
32 struct mylink:mycontrol{
33     void fromport(const std::string& fromport) { _fromport = fromport; }
34     void toport(const std::string& toport) { _toport = toport; }
35     std::string fromport()const { return _fromport ; }
36     std::string toport()const { return _toport ; }
37     bool withControl() const { return _withControl ;}
38
39     bool _withControl;
40 private:
41     std::string _fromport;
42     std::string _toport;
43 public:
44     void clear()
45     {
46       _props.clear();
47       _withControl=true;
48     }
49 };
50
51 struct mystream:mylink{
52 };
53
54 struct myparam{
55     std::string _tonode;
56     std::string _toport;
57     std::string _value;
58 };
59
60 struct myinport{
61     std::string _name;
62     std::string _type;
63     std::map<std::string,std::string> _props;
64     void clear()
65     {
66       _props.clear();
67     }
68     void setProperty(const std::string& name, const std::string& value)
69     {
70       _props[name]=value;
71     }
72 };
73
74 struct myoutport:myinport{};
75
76 struct myprop{
77     std::string _name;
78     std::string _value;
79 };
80
81 typedef std::vector<myprop> myprops;
82
83 struct myfunc{
84     std::string _name;
85     std::string _code;
86 };
87
88 struct machine
89 {
90     std::string _name;
91 };
92 typedef std::vector<machine> machines;
93
94 struct mycontainer
95 {
96   std::string _name;
97   machines _machs;
98   std::map<std::string,std::string> _props;
99 };
100
101 struct loadon
102 {
103     std::string _container;
104 };
105
106 #endif