1 // Copyright (C) 2007-2023 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
27 # if defined HELLOENGINE_EXPORTS || defined HELLOEngine_EXPORTS
28 # define HELLOENGINE_EXPORT __declspec( dllexport )
30 # define HELLOENGINE_EXPORT __declspec( dllimport )
33 # define HELLOENGINE_EXPORT
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(HELLO_Gen)
39 #include <SALOME_Component_i.hxx>
41 class HELLOENGINE_EXPORT HELLO_Abstract :
42 public POA_HELLO_ORB::HELLO_Gen,
43 public Engines_Component_i
46 HELLO_Abstract( CORBA::ORB_ptr orb,
47 PortableServer::POA_ptr poa,
48 PortableServer::ObjectId* contId,
49 const char* instanceName,
50 const char* interfaceName ,
51 bool withRegistry = true);
52 virtual ~HELLO_Abstract();
54 HELLO_ORB::status hello ( const char* name );
55 HELLO_ORB::status goodbye( const char* name );
56 void copyOrMove( const HELLO_ORB::object_list& what,
57 SALOMEDS::SObject_ptr where,
58 CORBA::Long row, CORBA::Boolean isCopy );
59 virtual char* getVersion();
61 virtual SALOMEDS::Study_var getStudyServant() = 0;
64 class HELLOENGINE_EXPORT HELLO_Session : public HELLO_Abstract
67 HELLO_Session( CORBA::ORB_ptr orb,
68 PortableServer::POA_ptr poa,
69 PortableServer::ObjectId* contId,
70 const char* instanceName,
71 const char* interfaceName):HELLO_Abstract(orb,poa,contId,instanceName,interfaceName,true) { }
72 SALOMEDS::Study_var getStudyServant() override;
75 class HELLOENGINE_EXPORT HELLO_No_Session : public HELLO_Abstract
78 HELLO_No_Session( CORBA::ORB_ptr orb,
79 PortableServer::POA_ptr poa,
80 PortableServer::ObjectId* contId,
81 const char* instanceName,
82 const char* interfaceName):HELLO_Abstract(orb,poa,contId,instanceName,interfaceName,false) { }
83 SALOMEDS::Study_var getStudyServant() override;
88 PortableServer::ObjectId* HELLOEngine_factory( CORBA::ORB_ptr orb,
89 PortableServer::POA_ptr poa,
90 PortableServer::ObjectId* contId,
91 const char* instanceName,
92 const char* interfaceName );