1 // Copyright (C) 2007-2022 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, 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 SyrComponent : example of component performing some mathinatical operations
24 // File : SyrComponent_Impl.hxx
25 // Author : Jean Rahuel, CEA
26 // Module : SuperVisionTest
29 #ifndef _SYRCOMPONENT_IMPL_HXX_
30 #define _SYRCOMPONENT_IMPL_HXX_
33 # if defined SYRCOMPONENTENGINE_EXPORTS || defined SyrComponentEngine_EXPORTS
34 # define SYRCOMPONENTENGINE_EXPORT __declspec( dllexport )
36 # define SYRCOMPONENTENGINE_EXPORT __declspec( dllimport )
39 # define SYRCOMPONENTENGINE_EXPORT
42 //#include <iostream.h>
43 #include <SALOMEconfig.h>
44 #include CORBA_SERVER_HEADER(SyrComponent)
45 #include CORBA_SERVER_HEADER(SALOME_Component)
46 #include "SALOME_Component_i.hxx"
48 class SYRCOMPONENTENGINE_EXPORT SyrComponent_Impl : public POA_SuperVisionTest::SyrComponent,
49 public Engines_Component_i {
52 SyrComponent_Impl( CORBA::ORB_ptr orb ,
53 PortableServer::POA_ptr poa ,
54 PortableServer::ObjectId * contId ,
55 const char *instanceName ,
56 const char *interfaceName ,
57 const bool kactivate, bool withRegistry ) ;
59 virtual ~SyrComponent_Impl();
61 virtual char* getVersion();
63 virtual CORBA::Long C_ISEVEN( CORBA::Long anInteger ) ;
65 virtual CORBA::Long C_ISONE( CORBA::Long anOddInteger ) ;
67 virtual CORBA::Long C_M3( CORBA::Long anOddInteger ) ;
69 virtual CORBA::Long C_M3P1( CORBA::Long anOddInteger ) ;
71 virtual CORBA::Long C_DIV2( CORBA::Long anEvenInteger ) ;
73 virtual CORBA::Long C_INCR( CORBA::Long aCount ) ;
75 virtual void CPP_SETLONG( CORBA::Long aLong ) ;
77 virtual CORBA::Long CPP_ADDTOLONG( CORBA::Long anIncr ) ;
79 virtual CORBA::Long C_MIN( CORBA::Long aMinVal , CORBA::Long anInteger ) ;
81 virtual CORBA::Long C_MAX( CORBA::Long aMaxVal , CORBA::Long anInteger ) ;
83 virtual SuperVisionTest::ListOfSyr_ptr C_LISTOFSYR() ;
85 virtual SuperVisionTest::ListOfSyr_ptr C_AVERAGE(
86 SuperVisionTest::ListOfSyr_ptr aListOfSyr ,
87 CORBA::Long anInteger ,
89 CORBA::Double & anAverage ) ;
91 virtual SuperVisionTest::Syr_ptr Init( CORBA::Long anOddInteger ) ;
98 class SYRCOMPONENTENGINE_EXPORT SyrComponent_Impl_No_SSL : public SyrComponent_Impl
101 SyrComponent_Impl_No_SSL() { }
102 SyrComponent_Impl_No_SSL( CORBA::ORB_ptr orb ,
103 PortableServer::POA_ptr poa ,
104 PortableServer::ObjectId * contId ,
105 const char *instanceName , const char *interfaceName , const bool kactivate = true ):SyrComponent_Impl(orb,poa,contId,instanceName,interfaceName,kactivate,true) { }
108 class SYRCOMPONENTENGINE_EXPORT SyrComponent_Impl_SSL : public SyrComponent_Impl
111 SyrComponent_Impl_SSL() { }
112 SyrComponent_Impl_SSL( CORBA::ORB_ptr orb ,
113 PortableServer::POA_ptr poa ,
114 PortableServer::ObjectId * contId ,
115 const char *instanceName , const char *interfaceName , const bool kactivate = true ):SyrComponent_Impl(orb,poa,contId,instanceName,interfaceName,kactivate,false) { }
118 class SYRCOMPONENTENGINE_EXPORT ListOfSyr_Impl : public POA_SuperVisionTest::ListOfSyr ,
119 public Engines_Component_i {
121 ListOfSyr_Impl( CORBA::ORB_ptr orb ,
122 PortableServer::POA_ptr poa ,
123 PortableServer::ObjectId * contId ,
124 const char *instanceName ,
125 const char *interfaceName ,
126 const char * graphName ,
127 const char * nodeName, bool withRegistry ) ;
130 virtual ~ListOfSyr_Impl();
132 virtual char* getVersion();
134 virtual SuperVisionTest::SeqOfSyr * GetSeqOfSyr() ;
136 virtual void SetSeqOfSyr( const SuperVisionTest::SeqOfSyr & ) ;
139 SuperVisionTest::SeqOfSyr _SeqOfSyr ;
143 class SYRCOMPONENTENGINE_EXPORT ListOfSyr_Impl_SSL : public ListOfSyr_Impl
146 ListOfSyr_Impl_SSL( CORBA::ORB_ptr orb ,
147 PortableServer::POA_ptr poa ,
148 PortableServer::ObjectId * contId ,
149 const char *instanceName ,
150 const char *interfaceName ,
151 const char * graphName ,
152 const char * nodeName):ListOfSyr_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,false) { }
155 class SYRCOMPONENTENGINE_EXPORT ListOfSyr_Impl_No_SSL : public ListOfSyr_Impl
158 ListOfSyr_Impl_No_SSL( CORBA::ORB_ptr orb ,
159 PortableServer::POA_ptr poa ,
160 PortableServer::ObjectId * contId ,
161 const char *instanceName ,
162 const char *interfaceName ,
163 const char * graphName ,
164 const char * nodeName):ListOfSyr_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,true) { }
168 SYRCOMPONENTENGINE_EXPORT
169 PortableServer::ObjectId * SyrComponentEngine_factory
170 ( CORBA::ORB_ptr orb ,
171 PortableServer::POA_ptr poa ,
172 PortableServer::ObjectId * contId ,
173 const char *instanceName ,
174 const char *interfaceName ) ;
176 class SYRCOMPONENTENGINE_EXPORT Syr_Impl : public POA_SuperVisionTest::SyrComponent ,
177 public SyrComponent_Impl {
180 Syr_Impl( CORBA::ORB_ptr orb ,
181 PortableServer::POA_ptr poa ,
182 PortableServer::ObjectId * contId ,
183 const char *instanceName ,
184 const char *interfaceName ,
185 const char * graphName ,
186 const char * nodeName ,
187 const CORBA::Long anOddInteger, bool withRegistry);
191 virtual CORBA::Long Initial() ;
193 virtual CORBA::Long Current() ;
195 virtual CORBA::Long IsEven() ;
197 virtual CORBA::Long IsOne() ;
199 virtual CORBA::Long Count() ;
201 virtual void M3p1() ;
203 virtual void Div2() ;
205 virtual void Incr() ;
209 long _InitialInteger ;
210 long _CurrentInteger ;
215 class SYRCOMPONENTENGINE_EXPORT Syr_Impl_SSL : public Syr_Impl
218 Syr_Impl_SSL(CORBA::ORB_ptr orb ,
219 PortableServer::POA_ptr poa ,
220 PortableServer::ObjectId * contId ,
221 const char *instanceName ,
222 const char *interfaceName ,
223 const char * graphName ,
224 const char * nodeName ,
225 const CORBA::Long anOddInteger) : Syr_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,anOddInteger,false) { }
228 class SYRCOMPONENTENGINE_EXPORT Syr_Impl_No_SSL : public Syr_Impl
231 Syr_Impl_No_SSL(CORBA::ORB_ptr orb ,
232 PortableServer::POA_ptr poa ,
233 PortableServer::ObjectId * contId ,
234 const char *instanceName ,
235 const char *interfaceName ,
236 const char * graphName ,
237 const char * nodeName ,
238 const CORBA::Long anOddInteger) : Syr_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,anOddInteger,true) { }