Salome HOME
PR: merge from BR_DATACONV_PR tag "mergeto_trunk_25oct06"
[modules/yacs.git] / src / engine / Port.hxx
1 #ifndef __PORT_HXX__
2 #define __PORT_HXX__
3
4 #include "TypeCode.hxx"
5 #include <string>
6
7
8 /**
9  * Not instanciable class that factorizes all basic data and behaviours relative 
10  * to the in and out interfaces of all nodes.
11  * End-user should neither instanciate a sub-class of 'Port' 
12  * nore call other methods than accessor.
13  */
14
15 namespace YACS
16 {
17   namespace ENGINE
18   {
19     class Node;
20
21     class Port
22     {
23     public:
24       virtual ~Port();
25
26       Node *getNode() const { return _node; }
27       std::string getImpl() const {return _impl; }
28
29       virtual std::string getNameOfTypeOfCurrentInstance() const;
30       //      virtual TypeCode * type();
31
32       static const char NAME[];
33
34     protected:
35       Port(Node *node);
36
37       Node        *_node;
38       std::string  _impl;
39       TypeCode    *_type;
40       int          id_;
41       static int   total_;
42     };
43   }
44 }
45
46 #endif