]> SALOME platform Git repositories - modules/yacs.git/blob - src/runtime/CalStreamPort.hxx
Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / runtime / CalStreamPort.hxx
1 #ifndef __CALSTREAMPORT_HXX__
2 #define __CALSTREAMPORT_HXX__
3
4 #include "yacsconfig.h"
5 #ifdef DSC_PORTS
6 #include "DSC_Engines.hh"
7 #endif
8
9 #include "InputDataStreamPort.hxx"
10 #include "OutputDataStreamPort.hxx"
11
12 namespace YACS
13 {
14   namespace ENGINE
15   {
16     /*! \brief Class for Input Calcium DataStream Ports
17      *
18      * \ingroup Ports
19      *
20      */
21     class InputCalStreamPort : public InputDataStreamPort
22     {
23       public:
24         static const char NAME[];
25         InputCalStreamPort(const std::string& name, Node *node, TypeCode* type);
26         InputCalStreamPort(const InputCalStreamPort& other, Node *newHelder);
27         virtual ~InputCalStreamPort();
28         void setDepend(const std::string& depend);
29         std::string getDepend(){return _depend;};
30         void setLevel(const std::string& schema);
31         void setSchema(const std::string& schema);
32         std::string getSchema(){return _schema;};
33         int getLevel(){return _level;};
34         void setProperty(const std::string& name, const std::string& value);
35         std::string getNameOfTypeOfCurrentInstance() const;
36         InputCalStreamPort * clone(Node *newHelder) const;
37 #ifdef DSC_PORTS
38         virtual void initPortProperties();
39 #endif
40       protected:
41         std::string _depend;
42         std::string _schema;
43         int _level;
44         double _delta;
45     };
46
47     /*! \brief Class for Output Calcium DataStream Ports
48      *
49      * \ingroup Ports
50      *
51      */
52     class OutputCalStreamPort : public OutputDataStreamPort
53     {
54       public:
55         static const char NAME[];
56         OutputCalStreamPort(const std::string& name, Node *node, TypeCode* type);
57         OutputCalStreamPort(const OutputCalStreamPort& other, Node *newHelder);
58         virtual ~OutputCalStreamPort();
59         void setDepend(const std::string& depend);
60         void setLevel(const std::string& schema);
61         std::string getDepend(){return _depend;};
62         int getLevel(){return _level;};
63         void setSchema(const std::string& schema);
64         std::string getSchema(){return _schema;};
65         void setProperty(const std::string& name, const std::string& value);
66         virtual bool addInPort(InPort *inPort) throw(Exception);
67         std::string getNameOfTypeOfCurrentInstance() const;
68         OutputCalStreamPort * clone(Node *newHelder) const;
69       protected:
70         std::string _depend;
71         std::string _schema;
72         int _level;
73         double _delta;
74     };
75   }
76 }
77
78 #endif