1 // Copyright (C) 2007-2012 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.
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 // File : SALOMEDS_SimanStudy_i.hxx
24 // Author : Mikhail PONIKAROV
27 #ifndef __SALOMEDS_SIMANSTUDY_I_H__
28 #define __SALOMEDS_SIMANSTUDY_I_H__
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SALOMEDS)
35 #include "SALOMEDS_Study_i.hxx"
37 class SimanIO_Configuration;
38 class SALOME_NamingService;
40 class Standard_EXPORT SALOMEDS_SimanStudy_i: public POA_SALOMEDS::SimanStudy
44 SALOME_NamingService* _name_service;
45 //SALOMEDSImpl_SimanStudy* _impl;
46 SALOMEDSImpl_Study* _study;
48 std::string _studyId; // SIMAN ID
49 std::string _scenarioId; // SIMAN ID
50 std::string _userId; // SIMAN ID
52 SimanIO_Configuration* _checkedOut; // pointer to information about checked out data std::map<int, std::map<std::string, int> > _filesId; // map from document id to component identifiers to SIMAN file ID
53 std::map<int, std::map<std::string, int> > _filesId; // map from document id to component identifiers to SIMAN file ID
57 //! constructor create global Siman stduy (is called in StudyManager only)
58 SALOMEDS_SimanStudy_i(/*SALOMEDSImpl_SimanStudy*,*/ CORBA::ORB_ptr);
60 //! standard destructor
61 virtual ~SALOMEDS_SimanStudy_i();
63 /*! \brief Get data from SIMAN and put it to the given study
65 This method is called for just created study to make it referenced
66 by this Siman study. Also it fills this study by the checked out
67 data from SIMAN server.
68 Warning: StudyID, ScenarioID and User Id must be set before calling of this method!
70 \param theTarget referenced study for checking out
72 virtual void CheckOut(SALOMEDS::Study_ptr theTarget);
74 /*! \brief Get data from all modules and calls the corresponding SimanIO methods to store it.
76 It works only with already checked out study
78 virtual void CheckIn(const char* themoduleName);
80 /*! \brief Returns the %Study with checked out data
82 If study is null, there is no such study in this application instance, or Salome was
83 launched without siman option.
85 virtual SALOMEDS::Study_ptr getReferencedStudy();
87 /*! \brief The ID of the study in SIMAN server
89 Returns the Id of SIMAN study, used for CheckOut before.
91 virtual char* StudyId();
93 /*! \brief The ID of the study in SIMAN server
95 Defines the Id of SIMAN study, used for CheckOut after.
97 virtual void StudyId(const char* theId);
99 /*! \brief The ID of the scenario in SIMAN server
101 Returns the Id of SIMAN scenario, used for CheckOut before.
103 virtual char* ScenarioId();
105 /*! \brief The ID of the scenario in SIMAN server
107 Defines the Id of SIMAN scenario, used for CheckOut after.
109 virtual void ScenarioId(const char* theId);
111 /*! \brief The ID of the user in SIMAN server
113 Returns the Id of SIMAN user, used for CheckOut before.
115 virtual char* UserId();
117 /*! \brief The ID of the user in SIMAN server
119 Defines the Id of SIMAN user, used for CheckOut after.
121 virtual void UserId(const char* theId);
123 //virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
125 static SALOMEDS_SimanStudy_i* GetSimanServant(CORBA::ORB_ptr orb);