1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author: Guillaume Boulant (EDF/R&D)
21 #ifndef __STUDY_EDITOR_HXX__
22 #define __STUDY_EDITOR_HXX__
24 #include "KernelHelpers.hxx"
26 #include <SALOMEconfig.h>
27 #include CORBA_CLIENT_HEADER(SALOMEDS)
28 #include CORBA_SERVER_HEADER(SALOME_Component)
32 class KERNELHELPERS_EXPORT SALOME_StudyEditor {
35 SALOME_StudyEditor(int studyId);
36 SALOME_StudyEditor(SALOMEDS::Study_ptr study);
38 typedef std::vector<SALOMEDS::SObject_ptr> SObjectList;
40 SALOMEDS::SComponent_ptr newRoot(const char * moduleName);
41 SALOMEDS::SComponent_ptr findRoot(const char * moduleName);
42 bool bindEngine(SALOMEDS::SComponent_var studyRoot,Engines::EngineComponent_var engine);
44 SALOMEDS::SObject_ptr newObject(SALOMEDS::SObject_ptr parent);
45 SALOMEDS::SObject_ptr findObject(const char * entry);
46 void setName(SALOMEDS::SObject_var sobject, const char * value);
47 const char * getName(SALOMEDS::SObject_var sobject);
49 void setIcon(SALOMEDS::SObject_var sobject, const char * resourcename);
51 void setParameterInt(SALOMEDS::SObject_var sobject, const char * name, int value);
52 int getParameterInt(SALOMEDS::SObject_var sobject, const char * name);
53 void setParameterBool(SALOMEDS::SObject_var sobject, const char * name, bool value);
54 bool getParameterBool(SALOMEDS::SObject_var sobject, const char * name);
56 static const int UNDEFINED = -1;
60 void setStudy(SALOMEDS::Study_ptr study);
61 void setStudyById(int studyId);
64 SALOMEDS::Study_var _study;
67 SALOMEDS::StudyBuilder_var _sbuilder;
70 #endif // __STUDY_EDITOR_HXX__