1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SuperVisionTest DataStreamComponent : example of component
24 // File : DataStreamComponent_Impl.hxx
25 // Author : Jean Rahuel
26 // Module : SuperVisionTest
29 #ifndef _DATASTREAMINTERFACE_IMPL_HXX_
30 #define _DATASTREAMINTERFACE_IMPL_HXX_
33 # if defined DATASTREAMFACTORYENGINE_EXPORTS || defined DataStreamFactoryEngine_EXPORTS
34 # define DATASTREAMFACTORYENGINE_EXPORT __declspec( dllexport )
36 # define DATASTREAMFACTORYENGINE_EXPORT __declspec( dllimport )
39 # define DATASTREAMFACTORYENGINE_EXPORT
42 #include <SALOMEconfig.h>
43 #include CORBA_SERVER_HEADER(DataStreamComponent)
44 #include CORBA_SERVER_HEADER(SALOME_Component)
45 #include "SALOME_Component_i.hxx"
47 class DATASTREAMFACTORYENGINE_EXPORT DataStreamFactory_Impl : public POA_DataStreamComponent::DataStreamFactory ,
48 public Engines_Component_i {
50 DataStreamFactory_Impl() ;
51 DataStreamFactory_Impl( CORBA::ORB_ptr orb,
52 PortableServer::POA_ptr poa,
53 PortableServer::ObjectId * contId,
54 const char *instanceName,
55 const char *interfaceName, bool withRegistry);
57 virtual ~DataStreamFactory_Impl();
59 virtual char* getVersion();
61 virtual void Setxy( CORBA::Long x , CORBA::Long y ) ;
63 virtual void Getxy( CORBA::Long & x , CORBA::Long & y ) ;
65 virtual void Add( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
66 virtual void Sub( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
67 virtual void Mul( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
68 virtual void Div( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
70 virtual DataStreamComponent::DataStream_ptr NewDataStream() ;
79 class DATASTREAMFACTORYENGINE_EXPORT DataStreamFactory_Impl_SSL : public DataStreamFactory_Impl
82 DataStreamFactory_Impl_SSL( CORBA::ORB_ptr orb,
83 PortableServer::POA_ptr poa,
84 PortableServer::ObjectId * contId,
85 const char *instanceName,
86 const char *interfaceName):DataStreamFactory_Impl(orb,poa,contId,instanceName,interfaceName,false) { }
89 class DATASTREAMFACTORYENGINE_EXPORT DataStreamFactory_Impl_No_SSL : public DataStreamFactory_Impl
92 DataStreamFactory_Impl_No_SSL( CORBA::ORB_ptr orb,
93 PortableServer::POA_ptr poa,
94 PortableServer::ObjectId * contId,
95 const char *instanceName,
96 const char *interfaceName):DataStreamFactory_Impl(orb,poa,contId,instanceName,interfaceName,true) { }
100 DATASTREAMFACTORYENGINE_EXPORT
101 PortableServer::ObjectId * DataStreamFactoryEngine_factory
102 ( CORBA::ORB_ptr orb ,
103 PortableServer::POA_ptr poa ,
104 PortableServer::ObjectId * contId ,
105 const char *instanceName ,
106 const char *interfaceName ) ;
109 class DATASTREAMFACTORYENGINE_EXPORT DataStream_Impl : public POA_DataStreamComponent::DataStream ,
110 public Engines_Component_i {
113 DataStream_Impl( CORBA::ORB_ptr orb ,
114 PortableServer::POA_ptr poa ,
115 PortableServer::ObjectId * contId ,
116 const char *instanceName ,
117 const char *interfaceName ,
118 const char * graphName ,
119 const char * nodeName, bool withRegistry );
121 virtual ~DataStream_Impl();
123 virtual char* getVersion();
125 virtual void StreamSetxy( CORBA::Long x , CORBA::Long y ) ;
127 virtual void StreamGetxy( CORBA::Long & x , CORBA::Long & y ) ;
129 virtual void StreamAdd( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
130 virtual void StreamSub( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
131 virtual void StreamMul( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
132 virtual void StreamDiv( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
141 class DATASTREAMFACTORYENGINE_EXPORT DataStream_Impl_SSL : public DataStream_Impl {
143 DataStream_Impl_SSL( CORBA::ORB_ptr orb ,
144 PortableServer::POA_ptr poa ,
145 PortableServer::ObjectId * contId ,
146 const char *instanceName ,
147 const char *interfaceName ,
148 const char * graphName ,
149 const char * nodeName):DataStream_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,false) { }
152 class DATASTREAMFACTORYENGINE_EXPORT DataStream_Impl_No_SSL : public DataStream_Impl {
154 DataStream_Impl_No_SSL( CORBA::ORB_ptr orb ,
155 PortableServer::POA_ptr poa ,
156 PortableServer::ObjectId * contId ,
157 const char *instanceName ,
158 const char *interfaceName ,
159 const char * graphName ,
160 const char * nodeName):DataStream_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,true) { }