Salome HOME
Copyright update 2021
[samples/component.git] / src / TypesCheck / TypesCheck_Impl.hxx
1 // Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SuperVisionTest SyrComponent : example of component performing some mathinatical operations
24 //  File   : SyrComponent_Impl.hxx
25 //  Author : Jean Rahuel
26 //  Module : SuperVisionTest
27 //  $Header:
28 //
29 #ifndef _TYPESCHECK_IMPL_HXX_
30 #define _TYPESCHECK_IMPL_HXX_
31
32 #ifdef WIN32
33 # if defined TYPESCHECKENGINE_EXPORTS || defined TypesCheckEngine_EXPORTS
34 #  define TYPESCHECKENGINE_EXPORT __declspec( dllexport )
35 # else
36 #  define TYPESCHECKENGINE_EXPORT __declspec( dllimport )
37 # endif
38 #else
39 # define TYPESCHECKENGINE_EXPORT
40 #endif
41
42 #include <SALOMEconfig.h>
43 #include CORBA_SERVER_HEADER(AddComponent)
44 #include CORBA_SERVER_HEADER(TypesCheck)
45 #include CORBA_SERVER_HEADER(SALOME_Component)
46 #include "SALOME_Component_i.hxx"
47
48 #include "AddComponent_Impl.hxx"
49
50 class TYPESCHECKENGINE_EXPORT TypesCheck_Impl : public POA_SuperVisionTest::TypesCheck ,
51                                                 public Engines_Component_i {
52   public:
53     TypesCheck_Impl() ;
54     TypesCheck_Impl( CORBA::ORB_ptr orb ,
55                      PortableServer::POA_ptr poa ,
56                      PortableServer::ObjectId * contId , 
57                      const char *instanceName ,
58                      const char *interfaceName ,
59                      const bool kactivate = true ) ;
60
61     virtual ~TypesCheck_Impl();
62
63     virtual char* getVersion();
64
65     virtual void StringCheck( const char * InString , _CORBA_String_out OutString ) ;
66
67     virtual void BoolCheck( CORBA::Boolean InBool , CORBA::Boolean & OutBool ) ;
68
69     virtual void CharCheck( unsigned char InChar , unsigned char & OutChar ) ;
70
71     virtual void ShortCheck( short InShort , short & OutShort ) ;
72
73     virtual void IntCheck( int InInt , int & OutInt ) ;
74
75     virtual void LongCheck( CORBA::Long InLong , CORBA::Long & OutLong ) ;
76
77     virtual void FloatCheck( float InFloat , float & OutFloat ) ;
78
79     virtual void DoubleCheck( double InDouble , double & OutDouble ) ;
80
81     virtual void ObjRefCheck( SuperVisionTest::Adder_ptr InObjRef , SuperVisionTest::Adder_out OutObjRef ) ;
82
83     virtual void MiscTypes( const char * InString , CORBA::Boolean InBool , unsigned char InChar , short InShort , CORBA::Long InLong , float InFloat , double InDouble , SuperVisionTest::Adder_ptr InObjRef , _CORBA_String_out OutString , CORBA::Boolean & OutBool , unsigned char & OutChar , short & OutShort , CORBA::Long & OutLong , float & OutFloat , double & OutDouble , SuperVisionTest::Adder_out OutObjRef ) ;
84
85   private:
86
87
88 };
89
90 extern "C"
91   TYPESCHECKENGINE_EXPORT
92   PortableServer::ObjectId * TypesCheckEngine_factory ( CORBA::ORB_ptr orb ,
93                                                         PortableServer::POA_ptr poa , 
94                                                         PortableServer::ObjectId * contId ,
95                                                         const char *instanceName ,
96                                                         const char *interfaceName ) ;
97
98 #endif