X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FATOMSOLV%2FATOMSOLV.hxx;h=89845b693b625bce6210c5d664c6e468b4224290;hb=547f34e17f207cc0801e5322205d7d4980e4f02a;hp=bb0a5d4d9add8c5f027eabff464b583d0c5556a0;hpb=23b5a7c9c89b39b6b31f6bb74750f3e0fc4942b8;p=samples%2Fatomsolv.git diff --git a/src/ATOMSOLV/ATOMSOLV.hxx b/src/ATOMSOLV/ATOMSOLV.hxx index bb0a5d4..89845b6 100644 --- a/src/ATOMSOLV/ATOMSOLV.hxx +++ b/src/ATOMSOLV/ATOMSOLV.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,28 +27,62 @@ #include -class ATOMSOLV: +#if defined WIN32 +# if defined ATOMSOLV_EXPORTS || defined ATOMSOLVEngine_EXPORTS +# define ATOMSOLV_EXPORT __declspec( dllexport ) +# else +# define ATOMSOLV_EXPORT __declspec( dllimport ) +# endif +#else +# define ATOMSOLV_EXPORT +#endif + + +class ATOMSOLV_EXPORT ATOMSOLV_Abstract: public POA_ATOMSOLV_ORB::ATOMSOLV_Gen, public Engines_Component_i { public: - ATOMSOLV(CORBA::ORB_ptr orb, + ATOMSOLV_Abstract(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); - virtual ~ATOMSOLV(); + const char *interfaceName, + bool withRegistry = true); + virtual ~ATOMSOLV_Abstract(); - CORBA::Boolean setData( CORBA::Long studyID, const ATOMSOLV_ORB::TMoleculeList& theData ); - CORBA::Boolean getData( CORBA::Long studyID, ATOMSOLV_ORB::TMoleculeList_out outData ); - CORBA::Boolean processData( CORBA::Long studyID ); + CORBA::Boolean setData( const ATOMSOLV_ORB::TMoleculeList& theData ); + CORBA::Boolean getData( ATOMSOLV_ORB::TMoleculeList_out outData ); + CORBA::Boolean processData(); + virtual char* getVersion(); private: - std::map myData; + ATOMSOLV_ORB::TMoleculeList* myData; +}; + +class ATOMSOLV_EXPORT ATOMSOLV_Session : public ATOMSOLV_Abstract +{ +public: + ATOMSOLV_Session( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId* contId, + const char* instanceName, + const char* interfaceName):ATOMSOLV_Abstract(orb,poa,contId,instanceName,interfaceName,true) { } +}; + +class ATOMSOLV_EXPORT ATOMSOLV_No_Session : public ATOMSOLV_Abstract +{ +public: + ATOMSOLV_No_Session( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId* contId, + const char* instanceName, + const char* interfaceName):ATOMSOLV_Abstract(orb,poa,contId,instanceName,interfaceName,false) { } }; extern "C" + ATOMSOLV_EXPORT PortableServer::ObjectId * ATOMSOLVEngine_factory(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId,