1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef YACSGui_Node_HeaderFile
22 #define YACSGui_Node_HeaderFile
24 #include <YACSGui_Graph.h>
27 #include <guiObservers.hxx>
29 class SUIT_ResourceMgr;
31 /*! Interface of a driver that creates specific graphic items for some type of
32 * graph nodes. It also updates any parameters of existing graphic items
33 * before they are redrawn by the viewer.
34 * Drivers for each kind of node should be derived from YACSGui_Node,
35 * with their own implementation of update() method (it should become
36 * a pure virtual function in the final version).
41 YACSGui_Node(YACSGui_Graph*);
42 virtual ~YACSGui_Node();
44 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
47 YACSGui_Graph* graph() const { return myGraph; }
48 SUIT_ResourceMgr* resMgr() const;
51 YACSGui_Graph* myGraph;
54 /*! Interface of a driver that creates specific graphic items for Service
55 * graph nodes. It also updates any parameters of existing graphic items
56 * before they are redrawn by the viewer.
58 class YACSGui_ServiceNode : public YACSGui_Node
61 YACSGui_ServiceNode(YACSGui_Graph*);
62 virtual ~YACSGui_ServiceNode();
64 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
68 /*! Interface of a driver that creates specific graphic items for Inline
69 * graph nodes. It also updates any parameters of existing graphic items
70 * before they are redrawn by the viewer.
72 class YACSGui_InlineNode : public YACSGui_Node
75 YACSGui_InlineNode(YACSGui_Graph*);
76 virtual ~YACSGui_InlineNode();
78 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
82 /*! Interface of a driver that creates specific graphic items for If
83 * graph nodes. It also updates any parameters of existing graphic items
84 * before they are redrawn by the viewer.
86 class YACSGui_IfNode : public YACSGui_Node
89 YACSGui_IfNode(YACSGui_Graph*);
90 virtual ~YACSGui_IfNode();
92 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
96 /*! Interface of a driver that creates specific graphic items for Switch
97 * graph nodes. It also updates any parameters of existing graphic items
98 * before they are redrawn by the viewer.
100 class YACSGui_SwitchNode : public YACSGui_Node
103 YACSGui_SwitchNode(YACSGui_Graph*);
104 virtual ~YACSGui_SwitchNode();
106 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
110 /*! Interface of a driver that creates specific graphic items for ForLoop and WhileLoop
111 * graph nodes. It also updates any parameters of existing graphic items
112 * before they are redrawn by the viewer.
114 class YACSGui_LoopNode : public YACSGui_Node
117 YACSGui_LoopNode(YACSGui_Graph*);
118 virtual ~YACSGui_LoopNode();
120 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
124 /*! Interface of a driver that creates specific graphic items for ForEachLoop
125 * graph nodes. It also updates any parameters of existing graphic items
126 * before they are redrawn by the viewer.
128 class YACSGui_ForEachLoopNode : public YACSGui_Node
131 YACSGui_ForEachLoopNode(YACSGui_Graph*);
132 virtual ~YACSGui_ForEachLoopNode();
134 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
138 /*! Interface of a driver that creates specific graphic items for Bloc
139 * graph nodes. It also updates any parameters of existing graphic items
140 * before they are redrawn by the viewer.
142 class YACSGui_BlocNode : public YACSGui_Node
145 YACSGui_BlocNode(YACSGui_Graph*);
146 virtual ~YACSGui_BlocNode();
148 virtual void update(YACS::ENGINE::Node*, YACS::HMI::SubjectComposedNode*, YACSPrs_ElementaryNode*&);
150 int level(YACS::ENGINE::Node* theEngine);