]> SALOME platform Git repositories - modules/yacs.git/blob - src/engine/Port.hxx
Salome HOME
merge from branch DEV tag mergeto_trunk_04apr08
[modules/yacs.git] / src / engine / Port.hxx
1 #ifndef __PORT_HXX__
2 #define __PORT_HXX__
3
4 #include <string>
5
6 namespace YACS
7 {
8   namespace ENGINE
9   {
10     class Node;
11
12 /*! \brief Base class for all ports
13  *
14  * Not instanciable class that factorizes all basic data and behaviours relative 
15  * to the in and out interfaces of all nodes.
16  * End-user should neither instanciate a sub-class of 'Port' 
17  * nor call other methods than accessor.
18  *
19  * \ingroup Ports
20  */
21     class Port
22     {
23     public:
24       virtual ~Port();
25       Node *getNode() const { return _node; }
26       virtual std::string getNameOfTypeOfCurrentInstance() const;
27       int getNumId() const { return _id; }
28       virtual std::string typeName() {return "YACS__ENGINE__Port";}
29       void modified();
30     protected:
31       Port(Node *node);
32       Port(const Port& other, Node *newHelder);
33     protected:
34       Node        *_node;
35       int          _id;
36       static int   _total;
37       static const char NAME[];
38     };
39   }
40 }
41
42 #endif