Version: 8.3.0
guiObservers.hxx
Go to the documentation of this file.
1 // Copyright (C) 2006-2016 CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef _GUIOBSERVERS_HXX_
21 #define _GUIOBSERVERS_HXX_
22 
23 #include <set>
24 #include <string>
25 #include <map>
26 #include <vector>
27 #include <list>
28 #include "HMIExport.hxx"
29 #include "Dispatcher.hxx"
30 #include "commandsProc.hxx"
31 
32 namespace YACS
33 {
34  namespace ENGINE
35  {
36  class Node;
37  class ComposedNode;
38  class Bloc;
39  class Proc;
40  class ForLoop;
41  class DynParaLoop;
42  class ForEachLoop;
43  class WhileLoop;
44  class Switch;
45  class OptimizerLoop;
46  class ElementaryNode;
47  class InlineNode;
48  class ServiceNode;
49  class PythonNode;
50  class PyFuncNode;
51  class CORBANode;
52  class CppNode;
53  class SalomeNode;
54  class SalomePythonNode;
55  class XmlNode;
56  class SplitterNode;
57  class DataNode;
58  class PresetNode;
59  class OutNode;
60  class StudyInNode;
61  class StudyOutNode;
62  class DataPort;
63  class InputPort;
64  class OutputPort;
65  class InPort;
66  class OutPort;
67  class InputDataStreamPort;
68  class OutputDataStreamPort;
69  class Catalog;
70  class ComponentInstance;
71  class Container;
72  class HomogeneousPoolContainer;
73  class TypeCode;
74  class OutGate;
75  class InGate;
76  }
77 
78  namespace HMI
79  {
80 
81  typedef enum
82  {
83  ADD,
85  CUT,
92  UP,
110  } GuiEvent;
111 
112  class ProcInvoc;
113  class GuiObserver;
114 
115  class SubjectReference;
117  {
118  public:
119  friend class CommandReparentNode;
120  Subject(Subject *parent=0);
121  virtual ~Subject();
122  virtual void attach(GuiObserver *obs);
123  virtual void detach(GuiObserver *obs);
124  virtual void select(bool isSelected);
125  virtual void update(GuiEvent event, int type, Subject* son);
126  virtual std::string getName();
127  virtual bool setName(std::string name);
128  virtual bool setProperties(std::map<std::string, std::string> properties);
129  virtual std::map<std::string, std::string> getProperties();
130  virtual std::vector<std::string> knownProperties();
131  virtual Subject* getParent();
132  virtual void setParent(Subject* son);
133  virtual bool destroy(Subject *son);
134  virtual void loadChildren();
135  virtual void loadLinks();
136  virtual void addSubjectReference(Subject *ref);
137  virtual void clean(Command *command=0);
138  void localclean(Command *command=0);
139  void registerUndoDestroy();
140  void askRegisterUndoDestroy() {_askRegisterUndo=true; };
141  bool isDestructible() { return _destructible; };
142  static void erase(Subject* sub, Command *command=0, bool post=false);
143  virtual TypeOfElem getType(){return UNKNOWN;}
144  virtual void setProgress( std::string newProgress );
145  virtual std::string getProgress() { return _progress; };
146  protected:
147  std::set<GuiObserver *> _setObs;
151  std::string _progress;
152  };
153 
155  {
156  public:
157  GuiObserver();
158  virtual ~GuiObserver();
159  virtual void select(bool isSelected);
160  virtual void update(GuiEvent event, int type, Subject* son);
161  virtual void incrementSubjects(Subject *subject);
162  virtual void decrementSubjects(Subject *subject);
163  int getNbSubjects();
164  bool isDestructible() { return _destructible; };
165  static std::string eventName(GuiEvent event);
166  static void setEventMap();
167  protected:
168  std::set<Subject*> _subjectSet;
170  static std::map<int, std::string> _eventNameMap;
171  };
172 
174  {
175  public:
177  virtual ~SubjectObserver();
178  virtual void select(bool isSelected);
179  virtual void update(GuiEvent event, int type, Subject* son);
180  protected:
182  };
183 
184  class SubjectReference: public Subject
185  {
186  public:
187  SubjectReference(Subject* ref, Subject *parent);
188  virtual ~SubjectReference();
189  virtual std::string getName();
190  virtual Subject* getReference() const;
191  virtual void reparent(Subject *parent);
192  virtual void clean(Command *command=0);
193  void localclean(Command *command=0);
194  virtual TypeOfElem getType(){return REFERENCE;}
195  protected:
198  };
199 
200  class SubjectLink;
201  class SubjectControlLink;
203  {
204  public:
206  virtual ~SubjectDataPort();
207  virtual std::string getName();
208  virtual bool setName(std::string name);
209  virtual YACS::ENGINE::DataPort* getPort();
210  static bool tryCreateLink(SubjectDataPort *subOutport, SubjectDataPort *subInport,bool control=true);
211  virtual void clean(Command *command=0);
212  void localclean(Command *command=0);
213  void addSubjectLink(SubjectLink* subject) { _listSubjectLink.push_back(subject); };
214  void removeSubjectLink(SubjectLink* subject) { _listSubjectLink.remove(subject); };
215  std::list<SubjectLink*> getListOfSubjectLink() { return _listSubjectLink; };
216  virtual bool setValue(std::string value);
217  void setExecValue(std::string value);
218  std::string getExecValue();
219  void registerUndoDestroy();
220  protected:
222  std::list<SubjectLink*> _listSubjectLink;
223  std::string _execValue;
224  };
225 
227  {
228  public:
230  virtual ~SubjectInputPort();
231  virtual void clean(Command *command=0);
232  void localclean(Command *command=0);
233  virtual bool setValue(std::string value);
234  virtual TypeOfElem getType(){return INPUTPORT;}
235  protected:
237  };
238 
240  {
241  public:
243  virtual ~SubjectOutputPort();
244  virtual void clean(Command *command=0);
245  void localclean(Command *command=0);
246  virtual bool setValue(std::string value);
247  virtual TypeOfElem getType(){return OUTPUTPORT;}
248  protected:
250  };
251 
253  {
254  public:
256  virtual ~SubjectInputDataStreamPort();
257  virtual bool setProperties(std::map<std::string, std::string> properties);
258  virtual std::map<std::string, std::string> getProperties();
259  virtual std::vector<std::string> knownProperties();
260  virtual void clean(Command *command=0);
261  void localclean(Command *command=0);
263  void registerUndoDestroy();
264  protected:
266  };
267 
269  {
270  public:
273  virtual bool setProperties(std::map<std::string, std::string> properties);
274  virtual std::map<std::string, std::string> getProperties();
275  virtual void clean(Command *command=0);
276  void localclean(Command *command=0);
278  void registerUndoDestroy();
279  protected:
281  };
282 
283 
285  {
286  public:
291  SubjectNode(YACS::ENGINE::Node *node, Subject *parent);
292  virtual ~SubjectNode();
293  virtual bool setProperties(std::map<std::string, std::string> properties);
294  virtual std::map<std::string, std::string> getProperties();
295  virtual bool reparent(Subject* parent);
296  virtual bool copy(Subject* parent);
297  virtual std::string getName();
298  virtual bool setName(std::string name);
299  virtual YACS::ENGINE::Node* getNode();
300  virtual void clean(Command *command=0);
301  void registerUndoDestroy();
302  SubjectControlLink* addSubjectControlLink(SubjectControlLink *sub) { _listSubjectControlLink.push_back(sub); return sub; };
303  void removeSubjectControlLink(SubjectControlLink* sub) { _listSubjectControlLink.remove(sub); };
304  std::list<SubjectLink*> getSubjectLinks() const { return _listSubjectLink; };
305  std::list<SubjectControlLink*> getSubjectControlLinks() const { return _listSubjectControlLink; };
306  std::list<SubjectInputPort*> getSubjectInputPorts() const { return _listSubjectInputPort; };
307  std::list<SubjectOutputPort*> getSubjectOutputPorts() const { return _listSubjectOutputPort; };
308  std::list<SubjectInputDataStreamPort*> getSubjectInputDataStreamPorts() const { return _listSubjectIDSPort; };
309  std::list<SubjectOutputDataStreamPort*> getSubjectOutputDataStreamPorts() const { return _listSubjectODSPort; };
310  void localclean(Command *command=0);
311  virtual void update(GuiEvent event, int type, Subject* son);
312  virtual void recursiveUpdate(GuiEvent event, int type, Subject* son);
313  virtual void removeExternalLinks();
314  virtual void removeExternalControlLinks();
315  virtual void saveLinks();
316  virtual void restoreLinks();
317  virtual bool putInComposedNode(std::string name,std::string type, bool toSaveRestoreLinks=true);
318  virtual int isValid();
319  void setExecState(int execState);
320  static bool tryCreateLink(SubjectNode *subOutNode, SubjectNode *subInNode);
321 
322  protected:
323  virtual SubjectInputPort* addSubjectInputPort(YACS::ENGINE::InputPort *port,
324  std::string name = "");
325  virtual SubjectOutputPort* addSubjectOutputPort(YACS::ENGINE::OutputPort *port,
326  std::string name = "");
327  virtual SubjectInputDataStreamPort* addSubjectIDSPort(YACS::ENGINE::InputDataStreamPort *port,
328  std::string name = "");
329  virtual SubjectOutputDataStreamPort* addSubjectODSPort(YACS::ENGINE::OutputDataStreamPort *port,
330  std::string name = "");
331  virtual void notifyObserver(YACS::ENGINE::Node* object,const std::string& event);
332 
334  std::list<SubjectInputPort*> _listSubjectInputPort;
335  std::list<SubjectOutputPort*> _listSubjectOutputPort;
336  std::list<SubjectInputDataStreamPort*> _listSubjectIDSPort;
337  std::list<SubjectOutputDataStreamPort*> _listSubjectODSPort;
338  std::list<SubjectLink*> _listSubjectLink;
339  std::list<SubjectControlLink*> _listSubjectControlLink;
341  std::list<YACS::ENGINE::OutGate *> loutgate;
342  std::list<YACS::ENGINE::InGate *> singate;
343  std::vector< std::pair<YACS::ENGINE::OutPort *, YACS::ENGINE::InPort *> > dataLinks;
344  std::vector< std::pair<YACS::ENGINE::OutPort *, YACS::ENGINE::InPort *> > dataflowLinks;
345  };
346 
348  {
349  public:
351  virtual ~SubjectComposedNode();
352  virtual SubjectNode* addNode(YACS::ENGINE::Catalog *catalog,
353  std::string compo,
354  std::string type,
355  std::string name,
356  bool newCompoInst);
357  virtual SubjectNode* getChild(YACS::ENGINE::Node* node=0) const { return 0; }
358  virtual void loadChildren();
359  virtual void loadLinks();
360  virtual void completeChildrenSubjectList(SubjectNode *son);
362  std::string name = "",
363  YACS::ENGINE::Catalog *catalog = 0,
364  std::string compo = "",
365  std::string type ="");
367  SubjectDataPort *spo,
368  SubjectNode *sni,
369  SubjectDataPort *spi);
371  SubjectNode *sni);
372  virtual void removeLink(SubjectLink* link);
373  virtual void removeControlLink(SubjectControlLink* link);
374  virtual void removeExternalControlLinks();
375  virtual void houseKeepingAfterCutPaste(bool isCut, SubjectNode *son);
376  virtual bool hasValue();
377  virtual std::string getValue();
378  virtual void clean(Command *command=0);
379  void localclean(Command *command=0);
381  protected:
382  virtual SubjectNode *createNode(YACS::ENGINE::Catalog *catalog,
383  std::string compo,
384  std::string type,
385  std::string name,
386  bool newCompoInst,
387  int swCase=0);
389  };
390 
392  {
393  public:
394  SubjectBloc(YACS::ENGINE::Bloc *bloc, Subject *parent);
395  virtual ~SubjectBloc();
396  virtual SubjectNode* addNode(YACS::ENGINE::Catalog *catalog,
397  std::string compo,
398  std::string type,
399  std::string name,
400  bool newCompoInst);
401  virtual void removeNode(SubjectNode* child);
402  virtual void completeChildrenSubjectList(SubjectNode *son);
403  virtual SubjectNode* getChild(YACS::ENGINE::Node* node=0) const;
404  virtual void recursiveUpdate(GuiEvent event, int type, Subject* son);
405  virtual void houseKeepingAfterCutPaste(bool isCut, SubjectNode *son);
406  virtual void clean(Command *command=0);
407  void localclean(Command *command=0);
408  virtual TypeOfElem getType(){return BLOC;}
409  protected:
411  std::set<SubjectNode*> _children;
412  };
413 
414  class SubjectComponent;
416  {
417  public:
418  static SubjectContainerBase *New(YACS::ENGINE::Container* container, Subject *parent);
420  virtual ~SubjectContainerBase();
421  virtual std::string getName();
422  virtual std::string getLabelForHuman() const = 0;
423  virtual bool setName(std::string name);
424  virtual YACS::ENGINE::Container *getContainer() const { return _container; }
425  virtual std::map<std::string, std::string> getProperties();
426  virtual bool setProperties(std::map<std::string, std::string> properties);
427  virtual SubjectReference* attachComponent(SubjectComponent* component);
428  virtual void detachComponent(SubjectComponent* component);
429  virtual void moveComponent(SubjectReference* reference);
430  virtual void removeSubComponentFromSet(SubjectComponent *component);
431  virtual void notifyComponentsChange(GuiEvent event, int type, Subject* son);
432  virtual void clean(Command *command=0);
433  void localclean(Command *command=0);
434  bool isUsed() { return !_subComponentSet.empty(); }
436  protected:
438  std::set<SubjectComponent*> _subComponentSet;
439  std::map<SubjectComponent*,SubjectReference*> _subReferenceMap;
440  };
441 
443  {
444  public:
445  SubjectContainer(YACS::ENGINE::Container *container, Subject *parent);
446  void registerUndoDestroy();
447  std::string getLabelForHuman() const { return std::string("Salome Container"); }
448  };
449 
451  {
452  public:
454  void registerUndoDestroy();
455  YACS::ENGINE::Container *getContainer() const;
456  std::string getLabelForHuman() const { return std::string("Salome Homogeneous Pool Container"); }
457  };
458 
459  class SubjectServiceNode;
461  {
462  public:
463  friend class SubjectNode;
465  virtual ~SubjectComponent();
466  virtual std::string getName();
467  virtual void setContainer();
468  virtual bool associateToContainer(SubjectContainerBase *subcont);
469  virtual SubjectReference* attachService(SubjectServiceNode* service);
470  virtual void detachService(SubjectServiceNode* service);
471  virtual void moveService(SubjectReference* reference);
472  virtual void removeSubServiceFromSet(SubjectServiceNode *service);
473  virtual bool setProperties(std::map<std::string, std::string> properties);
474  virtual std::map<std::string, std::string> getProperties();
475  virtual void notifyServicesChange(GuiEvent event, int type, Subject* son);
476  virtual std::pair<std::string, int> getKey();
477  virtual void clean(Command *command=0);
478  bool hasServices() { return !_subServiceSet.empty(); };
479  void localclean(Command *command=0);
480  YACS::ENGINE::ComponentInstance* getComponent() const;
481  virtual TypeOfElem getType(){return COMPONENT;}
483  protected:
484  int _id;
486  std::set<SubjectServiceNode*> _subServiceSet;
487  std::map<SubjectServiceNode*,SubjectReference*> _subReferenceMap;
488  };
489 
490  class SubjectDataType: public Subject
491  {
492  public:
493  SubjectDataType(YACS::ENGINE::TypeCode *typeCode, Subject *parent, std::string alias);
494  virtual ~SubjectDataType();
495  virtual std::string getName();
496  virtual std::string getAlias();
498  virtual void clean(Command *command=0);
499  void localclean(Command *command=0);
500  virtual TypeOfElem getType(){return DATATYPE;}
501  protected:
503  std::string _alias;
504  };
505 
506  class SubjectProc: public SubjectBloc
507  {
508  public:
509  SubjectProc(YACS::ENGINE::Proc *proc, Subject *parent);
510  virtual ~SubjectProc();
511  void loadProc();
512  void loadComponents();
513  void loadContainers();
514  void loadTypes();
515  virtual SubjectComponent* addComponent(std::string compoName, std::string containerName="");
516  virtual SubjectContainerBase* addContainer(std::string name, std::string ref="");
517  virtual SubjectContainerBase* addHPContainer(std::string name, std::string ref="");
518  virtual bool addDataType(YACS::ENGINE::Catalog* catalog, std::string typeName);
522  SubjectDataType* addSubjectDataType(YACS::ENGINE::TypeCode *type, std::string alias);
523  void removeSubjectDataType(std::string typeName);
525  virtual void clean(Command *command=0);
526  void localclean(Command *command=0);
527  void addPostErase(Subject* sub) {_postEraseList.push_back(sub); };
528  void cleanPostErase();
529  virtual TypeOfElem getType(){return SALOMEPROC;}
530  protected:
532  std::vector<Subject*> _postEraseList;
533  };
534 
536  {
537  public:
538  SubjectForLoop(YACS::ENGINE::ForLoop *forLoop, Subject *parent);
539  virtual ~SubjectForLoop();
540  virtual SubjectNode* addNode(YACS::ENGINE::Catalog *catalog,
541  std::string compo,
542  std::string type,
543  std::string name,
544  bool newCompoInst);
545  virtual void recursiveUpdate(GuiEvent event, int type, Subject* son);
546  virtual void completeChildrenSubjectList(SubjectNode *son);
547  virtual SubjectNode* getChild(YACS::ENGINE::Node* node=0) const { return _body; }
548  virtual bool setNbSteps(std::string nbSteps);
549  virtual bool hasValue();
550  virtual std::string getValue();
551  virtual void houseKeepingAfterCutPaste(bool isCut, SubjectNode *son);
552  virtual void clean(Command *command=0);
553  void localclean(Command *command=0);
554  virtual TypeOfElem getType(){return FORLOOP;}
555  protected:
558  };
559 
561  {
562  public:
563  SubjectWhileLoop(YACS::ENGINE::WhileLoop *whileLoop, Subject *parent);
564  virtual ~SubjectWhileLoop();
565  virtual SubjectNode* addNode(YACS::ENGINE::Catalog *catalog,
566  std::string compo,
567  std::string type,
568  std::string name,
569  bool newCompoInst);
570  virtual void recursiveUpdate(GuiEvent event, int type, Subject* son);
571  virtual void completeChildrenSubjectList(SubjectNode *son);
572  virtual SubjectNode* getChild(YACS::ENGINE::Node* node=0) const { return _body; }
573  virtual bool setCondition(std::string condition);
574  virtual bool hasValue();
575  virtual std::string getValue();
576  virtual void houseKeepingAfterCutPaste(bool isCut, SubjectNode *son);
577  virtual void clean(Command *command=0);
578  void localclean(Command *command=0);
579  virtual TypeOfElem getType(){return WHILELOOP;}
580  protected:
583  };
584 
586  {
587  public:
588  SubjectSwitch(YACS::ENGINE::Switch *aSwitch, Subject *parent);
589  virtual ~SubjectSwitch();
590  virtual SubjectNode* addNode(YACS::ENGINE::Catalog *catalog,
591  std::string compo,
592  std::string type,
593  std::string name,
594  bool newCompoInst,
595  int swCase,
596  bool replace = false);
597  virtual void recursiveUpdate(GuiEvent event, int type, Subject* son);
598  virtual void removeNode(SubjectNode* son);
599  std::map<int, SubjectNode*> getBodyMap();
600  virtual void completeChildrenSubjectList(SubjectNode *son);
601  virtual SubjectNode* getChild(YACS::ENGINE::Node* node=0) const;
602  virtual bool setSelect(std::string select);
603  virtual bool setCase(std::string caseId, SubjectNode* snode);
604  virtual bool hasValue();
605  virtual std::string getValue();
606  virtual void houseKeepingAfterCutPaste(bool isCut, SubjectNode *son);
607  virtual void clean(Command *command=0);
608  void localclean(Command *command=0);
609  virtual TypeOfElem getType(){return SWITCH;}
610  protected:
612  std::map<int, SubjectNode*> _bodyMap;
613  };
614 
616  {
617  public:
618  SubjectDynParaLoop(YACS::ENGINE::DynParaLoop * dynParaLoop, Subject * parent);
619  virtual ~SubjectDynParaLoop();
620  virtual SubjectNode * addNode(YACS::ENGINE::Catalog * catalog,
621  std::string compo,
622  std::string type,
623  std::string name,
624  bool newCompoInst);
625  virtual void recursiveUpdate(GuiEvent event, int type, Subject * son);
626  virtual void completeChildrenSubjectList(SubjectNode * son);
627  virtual void removeNode(SubjectNode * child);
628  virtual SubjectNode * getChild(YACS::ENGINE::Node * node = NULL) const;
629  virtual bool setNbBranches(std::string nbBranches);
630  virtual bool hasValue();
631  virtual std::string getValue();
632  virtual void houseKeepingAfterCutPaste(bool isCut, SubjectNode * son);
633  virtual void clean(Command * command = NULL);
634  void localclean(Command * command = NULL);
635  protected:
640  };
641 
643  {
644  public:
646  virtual ~SubjectForEachLoop();
647  virtual void completeChildrenSubjectList(SubjectNode *son);
648  virtual void removeNode(SubjectNode * child);
649  virtual void clean(Command *command=0);
650  void localclean(Command *command=0);
651  virtual TypeOfElem getType(){return FOREACHLOOP;}
652  protected:
655  };
656 
658  {
659  public:
661  virtual ~SubjectOptimizerLoop();
662  virtual void clean(Command *command=0);
663  void localclean(Command *command=0);
664  virtual TypeOfElem getType(){return OPTIMIZERLOOP;}
665  virtual bool setAlgorithm(const std::string& alglib,const std::string& symbol);
666  protected:
668  };
669 
671  {
672  public:
674  virtual ~SubjectElementaryNode();
675  virtual void recursiveUpdate(GuiEvent event, int type, Subject* son);
676  virtual SubjectDataPort* addInputPort(YACS::ENGINE::Catalog *catalog, std::string type, std::string name);
677  virtual SubjectDataPort* addOutputPort(YACS::ENGINE::Catalog *catalog, std::string type, std::string name);
678  virtual SubjectDataPort* addIDSPort(YACS::ENGINE::Catalog *catalog, std::string type, std::string name);
679  virtual SubjectDataPort* addODSPort(YACS::ENGINE::Catalog *catalog, std::string type, std::string name);
680  virtual bool OrderDataPorts(SubjectDataPort* portToMove, int isUp);
681  virtual void removePort(SubjectDataPort* port);
682  virtual void loadChildren();
683  virtual void clean(Command *command=0);
684  void localclean(Command *command=0);
685  virtual void saveLinks();
686  virtual void restoreLinks();
687  protected:
689  };
690 
692  {
693  public:
694  SubjectInlineNode(YACS::ENGINE::InlineNode *inlineNode, Subject *parent);
695  virtual ~SubjectInlineNode();
696  virtual bool setScript(std::string script);
697  virtual std::string getScript();
698  virtual void clean(Command *command=0);
699  void localclean(Command *command=0);
700  virtual bool setContainer(SubjectContainerBase *scont);
701  virtual bool setExecutionMode(const std::string& mode);
702  protected:
704  };
705 
707  {
708  public:
709  SubjectPythonNode(YACS::ENGINE::PythonNode *pythonNode, Subject *parent);
710  virtual ~SubjectPythonNode();
711  virtual void clean(Command *command=0);
712  void localclean(Command *command=0);
713  virtual TypeOfElem getType(){return PYTHONNODE;}
714  protected:
716  };
717 
719  {
720  public:
721  SubjectPyFuncNode(YACS::ENGINE::PyFuncNode *pyFuncNode, Subject *parent);
722  virtual ~SubjectPyFuncNode();
723  virtual bool setFunctionName(std::string funcName);
724  virtual void clean(Command *command=0);
725  void localclean(Command *command=0);
726  virtual TypeOfElem getType(){return PYFUNCNODE;}
727  protected:
729  };
730 
732  {
735  public:
737  virtual ~SubjectServiceNode();
738  virtual void setComponentFromCatalog(YACS::ENGINE::Catalog *catalog,
739  std::string compo,
740  std::string service);
741  virtual void setComponent();
742  virtual bool associateToComponent(SubjectComponent *subcomp);
743  virtual void removeSubRefComponent() { _subRefComponent = 0; };
745  virtual void addSubjectReference(Subject *ref);
747  virtual void clean(Command *command=0);
748  void localclean(Command *command=0);
749  protected:
753  };
754 
756  {
757  public:
758  SubjectCORBANode(YACS::ENGINE::CORBANode *corbaNode, Subject *parent);
759  virtual ~SubjectCORBANode();
760  virtual void clean(Command *command=0);
761  void localclean(Command *command=0);
762  virtual TypeOfElem getType(){return CORBANODE;}
763  protected:
765  };
766 
768  {
769  public:
770  SubjectCppNode(YACS::ENGINE::CppNode *cppNode, Subject *parent);
771  virtual ~SubjectCppNode();
772  virtual void clean(Command *command=0);
773  void localclean(Command *command=0);
774  virtual TypeOfElem getType(){return CPPNODE;}
775  protected:
777  };
778 
780  {
781  public:
782  SubjectSalomeNode(YACS::ENGINE::SalomeNode *salomeNode, Subject *parent);
783  virtual ~SubjectSalomeNode();
784  virtual void clean(Command *command=0);
785  void localclean(Command *command=0);
786  virtual TypeOfElem getType(){return SALOMENODE;}
787  protected:
789  };
790 
792  {
793  public:
795  Subject *parent);
796  virtual ~SubjectSalomePythonNode();
797  virtual void clean(Command *command=0);
798  void localclean(Command *command=0);
800  protected:
802  };
803 
805  {
806  public:
807  SubjectXmlNode(YACS::ENGINE::XmlNode *xmlNode, Subject *parent);
808  virtual ~SubjectXmlNode();
809  virtual void clean(Command *command=0);
810  void localclean(Command *command=0);
811  virtual TypeOfElem getType(){return XMLNODE;}
812  protected:
814  };
815 
817  {
818  public:
820  virtual ~SubjectSplitterNode();
821  virtual std::string getName();
822  virtual void clean(Command *command=0);
823  void localclean(Command *command=0);
824  virtual TypeOfElem getType(){return SPLITTERNODE;}
825  protected:
827  };
828 
830  {
831  public:
832  SubjectDataNode(YACS::ENGINE::DataNode *dataNode, Subject *parent);
833  virtual ~SubjectDataNode();
834  virtual void clean(Command *command=0);
835  void localclean(Command *command=0);
836  protected:
838  };
839 
841  {
842  public:
843  SubjectPresetNode(YACS::ENGINE::PresetNode *presetNode, Subject *parent);
844  virtual ~SubjectPresetNode();
845  virtual void clean(Command *command=0);
846  void localclean(Command *command=0);
847  virtual TypeOfElem getType(){return PRESETNODE;}
848  protected:
850  };
851 
853  {
854  public:
855  SubjectOutNode(YACS::ENGINE::OutNode *outNode, Subject *parent);
856  virtual ~SubjectOutNode();
857  virtual void clean(Command *command=0);
858  void localclean(Command *command=0);
859  virtual TypeOfElem getType(){return OUTNODE;}
860  protected:
862  };
863 
865  {
866  public:
868  virtual ~SubjectStudyInNode();
869  virtual void clean(Command *command=0);
870  void localclean(Command *command=0);
871  virtual TypeOfElem getType(){return STUDYINNODE;}
872  protected:
874  };
875 
877  {
878  public:
880  virtual ~SubjectStudyOutNode();
881  virtual void clean(Command *command=0);
882  void localclean(Command *command=0);
883  virtual TypeOfElem getType(){return STUDYOUTNODE;}
884  protected:
886  };
887 
888  class SubjectLink: public Subject
889  {
890  public:
891  SubjectLink(SubjectNode* subOutNode,
892  SubjectDataPort* outPort,
893  SubjectNode* subInNode,
894  SubjectDataPort* inPort,
895  Subject *parent);
896  virtual ~SubjectLink();
897  virtual std::string getName();
898  virtual void clean(Command *command=0);
899  void localclean(Command *command=0);
904  virtual bool setProperties(std::map<std::string, std::string> properties);
905  virtual std::map<std::string, std::string> getProperties();
906  virtual std::vector<std::string> knownProperties();
907  virtual TypeOfElem getType(){return DATALINK;}
908  void registerUndoDestroy();
909  protected:
914  std::string _name;
918  };
919 
921  {
922  public:
923  SubjectControlLink(SubjectNode* subOutNode,
924  SubjectNode* subInNode,
925  Subject *parent);
926  virtual ~SubjectControlLink();
927  virtual std::string getName();
928  virtual void clean(Command *command=0);
929  void localclean(Command *command=0);
932  virtual TypeOfElem getType(){return CONTROLLINK;}
933  void registerUndoDestroy();
934  protected:
937  std::string _name;
939  };
940 
941  }
942 }
943 #endif