-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// Author: Guillaume Boulant (EDF/R&D)
#include "SALOME_StudyEditor.hxx"
/** Canonic constructor. The object can't be used without a setStudy() */
SALOME_StudyEditor::SALOME_StudyEditor() {
-}
-
-void SALOME_StudyEditor::setStudy(SALOMEDS::Study_ptr study) {
- _study = study;
- _sbuilder = _study->NewBuilder();
-}
-
-void SALOME_StudyEditor::setStudyById(int studyId) {
- this->setStudy(KERNEL::getStudyManager()->GetStudyByID(studyId));
-}
-
-int SALOME_StudyEditor::getStudyId() {
- if ( _study->_is_nil() ) return UNDEFINED;
- return _study->StudyId();
-}
-
-SALOME_StudyEditor::SALOME_StudyEditor(int studyId) {
- this->setStudyById(studyId);
-}
-SALOME_StudyEditor::SALOME_StudyEditor(SALOMEDS::Study_ptr study) {
- this->setStudy(study);
+ _sbuilder = KERNEL::getStudyServant()->NewBuilder();
}
SALOMEDS::SObject_ptr SALOME_StudyEditor::newObject(SALOMEDS::SObject_ptr parent) {
}
SALOMEDS::SObject_ptr SALOME_StudyEditor::findObject(const char * entry) {
- SALOMEDS::SObject_var sobject = _study->FindObjectID(entry);
+ SALOMEDS::SObject_var sobject = KERNEL::getStudyServant()->FindObjectID(entry);
return sobject._retn();
}
}
SALOMEDS::SComponent_ptr SALOME_StudyEditor::findRoot(const char * moduleName) {
- return _study->FindComponent(moduleName);
+ return KERNEL::getStudyServant()->FindComponent(moduleName);
}
void SALOME_StudyEditor::setName(SALOMEDS::SObject_var sobject, const char * value) {
//
// MEM: AttributeParameter
-// Note that the AttributeParameter is a multitype dictionnary whose
+// Note that the AttributeParameter is a multitype dictionary whose
// keys are the names specified when setting the value
//