1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, 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.
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);
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() ;
80 DATASTREAMFACTORYENGINE_EXPORT
81 PortableServer::ObjectId * DataStreamFactoryEngine_factory
82 ( CORBA::ORB_ptr orb ,
83 PortableServer::POA_ptr poa ,
84 PortableServer::ObjectId * contId ,
85 const char *instanceName ,
86 const char *interfaceName ) ;
89 class DATASTREAMFACTORYENGINE_EXPORT DataStream_Impl : public POA_DataStreamComponent::DataStream ,
90 public Engines_Component_i {
93 DataStream_Impl( CORBA::ORB_ptr orb ,
94 PortableServer::POA_ptr poa ,
95 PortableServer::ObjectId * contId ,
96 const char *instanceName ,
97 const char *interfaceName ,
98 const char * graphName ,
99 const char * nodeName );
101 virtual ~DataStream_Impl();
103 virtual char* getVersion();
105 virtual void StreamSetxy( CORBA::Long x , CORBA::Long y ) ;
107 virtual void StreamGetxy( CORBA::Long & x , CORBA::Long & y ) ;
109 virtual void StreamAdd( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
110 virtual void StreamSub( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
111 virtual void StreamMul( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;
112 virtual void StreamDiv( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) ;