Salome HOME
Improve build procedure
[tools/simanio.git] / src / SimanIO_Link.hxx
1 // Copyright (C) 2013  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 SIMANIO_LINK_H
21 #define SIMANIO_LINK_H
22
23 #include "SimanIO_Configuration.hxx"
24
25 /**
26  * \brief Class for creation of connection with SIMAN database.
27  */
28
29 class SimanIO_Link {
30   std::string myStudy;    ///< identifier of the study in the SIMAN
31   std::string myScenario; ///< identifier of the scenario in the SIMAN
32   std::string myUser;     ///< identifier of the user in the SIMAN
33 public:
34   /**
35    * Initializes the connection to the data base with certain connection properties.
36    * \param theStudyID defines the selected study id in SIMAN
37    * \param theScenarioID defines the secnario id in SIMAN
38    * \param theUserID identifies the current SIMAN user id
39    */
40   SimanIO_Link(const char* theStudyID, const char* theScenarioID, const char* theUserID);
41
42   /**
43    * Checks the connection status.
44    * \returns true if data base is currently connected.
45    */
46   bool IsConnected();
47
48   /**
49    * Retrieves scenario "conf" file from the SIMAN.
50    * \returns CFG file interface, connected to the received file to get data from it.
51    */
52   SimanIO_Configuration RetrieveConf();
53
54   /**
55    * Stores configuration information to the SIMAN.
56    * \param theConf interface for configuration data storage; data in this interface will be stored in SIMAN
57    */
58   void StoreConf(/*const*/ SimanIO_Configuration& theConf);
59 };
60
61 #endif