]> SALOME platform Git repositories - modules/yacs.git/blob - src/runtime/CppPorts.hxx
Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / runtime / CppPorts.hxx
1
2 #ifndef _CPPPORTS_HXX_
3 #define _CPPPORTS_HXX_
4
5 #include "Any.hxx"
6
7 #include "InputPort.hxx"
8 #include "OutputPort.hxx"
9
10 namespace YACS
11 {
12   namespace ENGINE
13   {
14
15 /*! \brief Class for C++ Ports
16  *
17  * \ingroup Ports
18  *
19  * \see CppNode
20  */
21     class InputCppPort : public InputPort
22     {
23     public:
24       InputCppPort(const std::string& name, Node * node, TypeCode * type);
25       InputCppPort(const InputCppPort& other, Node *newHelder);
26       ~InputCppPort();
27       bool edIsManuallyInitialized() const;
28       void edRemoveManInit();
29       virtual void put(const void *data) throw(ConversionException);
30       void put(YACS::ENGINE::Any *data) throw(ConversionException);
31       InputPort *clone(Node *newHelder) const;
32       virtual YACS::ENGINE::Any * getCppObj() const;
33       void *get() const throw(Exception);
34       virtual bool isEmpty();
35       virtual void exSaveInit();
36       virtual void exRestoreInit();
37       virtual std::string dump();
38     protected:
39       YACS::ENGINE::Any* _data;
40       YACS::ENGINE::Any* _initData;
41     };
42
43     class OutputCppPort : public OutputPort
44     {
45     public:
46       OutputCppPort(const std::string& name, Node * node, TypeCode * type);
47       OutputCppPort(const OutputCppPort& other, Node *newHelder);
48       ~OutputCppPort();
49       virtual void put(const void *data) throw(ConversionException);
50       void put(YACS::ENGINE::Any *data) throw(ConversionException);
51       OutputPort *clone(Node *newHelder) const;
52       virtual YACS::ENGINE::Any * get() const;
53       virtual std::string dump();
54     protected:
55       YACS::ENGINE::Any* _data;
56     };
57
58
59
60   }
61 }
62
63 #endif