Salome HOME
9df0d2d5a34ac5d8d523602e656824524e4f5a4a
[samples/atomsolv.git] / src / ATOMSOLV / ATOMSOLV.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _ATOMSOLV_HXX_
21 #define _ATOMSOLV_HXX_
22
23 #include <SALOMEconfig.h>
24 #include CORBA_SERVER_HEADER(ATOMSOLV)
25 #include CORBA_SERVER_HEADER(ATOMGEN)
26 #include "SALOME_Component_i.hxx"
27
28 #include <map>
29
30 class ATOMSOLV:
31   public POA_ATOMSOLV_ORB::ATOMSOLV_Gen,
32   public Engines_Component_i 
33 {
34
35 public:
36   ATOMSOLV(CORBA::ORB_ptr orb,
37            PortableServer::POA_ptr poa,
38            PortableServer::ObjectId * contId, 
39            const char *instanceName, 
40            const char *interfaceName);
41   virtual ~ATOMSOLV();
42
43   CORBA::Boolean setData( CORBA::Long studyID, const ATOMSOLV_ORB::TMoleculeList& theData );
44   CORBA::Boolean getData( CORBA::Long studyID, ATOMSOLV_ORB::TMoleculeList_out outData );
45   CORBA::Boolean processData( CORBA::Long studyID );
46   virtual char*  getVersion();
47
48 private:
49   std::map<long, ATOMSOLV_ORB::TMoleculeList*> myData;
50 };
51
52 extern "C"
53 PortableServer::ObjectId * ATOMSOLVEngine_factory(CORBA::ORB_ptr orb,
54                                                   PortableServer::POA_ptr poa,
55                                                   PortableServer::ObjectId * contId,
56                                                   const char *instanceName,
57                                                   const char *interfaceName);
58
59 #endif