1 // Copyright (C) 2007-2024 CEA, EDF, 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, or (at your option) any later version.
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 : SALOMEDSClient_StudyBuilder.hxx
24 // Author : Sergey RUIN
27 #ifndef __SALOMEDSClient_STUDYBUILDER_H__
28 #define __SALOMEDSClient_STUDYBUILDER_H__
30 #include "SALOMEDSClient_definitions.hxx"
31 #include "SALOMEDSClient_SObject.hxx"
32 #include "SALOMEDSClient_SComponent.hxx"
33 #include "SALOMEDSClient_GenericAttribute.hxx"
36 class SALOMEDSClient_StudyBuilder
39 virtual ~SALOMEDSClient_StudyBuilder() {}
41 virtual _PTR(SComponent) NewComponent(const std::string& ComponentDataType) = 0;
42 virtual void DefineComponentInstance (const _PTR(SComponent)&, const std::string& ComponentIOR) = 0;
43 virtual void RemoveComponent(const _PTR(SComponent)& theSCO) = 0;
44 virtual _PTR(SObject) NewObject(const _PTR(SObject)& theFatherObject) = 0;
45 virtual _PTR(SObject) NewObjectToTag(const _PTR(SObject)& theFatherObject, int theTag) = 0;
46 virtual void LoadWith(const _PTR(SComponent)& theSCO, const std::string& theIOR) = 0;
47 virtual void Load(const _PTR(SObject)& theSCO) = 0;
48 virtual void RemoveObject(const _PTR(SObject)& theSO) = 0;
49 virtual void RemoveObjectWithChildren(const _PTR(SObject)& theSO) = 0;
50 virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute) = 0;
51 virtual bool FindAttribute(const _PTR(SObject)& theSO,
52 _PTR(GenericAttribute)& theAttribute,
53 const std::string& aTypeOfAttribute) = 0;
54 virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute) = 0;
55 virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject) = 0;
56 virtual void RemoveReference(const _PTR(SObject)& me) = 0;
57 virtual void SetGUID(const _PTR(SObject)& theSO, const std::string& theGUID) = 0;
58 virtual bool IsGUID(const _PTR(SObject)& theSO, const std::string& theGUID) = 0;
59 virtual void NewCommand() = 0;
60 virtual void CommitCommand()= 0;
61 virtual bool HasOpenCommand() = 0;
62 virtual void AbortCommand() = 0;
63 virtual void Undo() = 0;
64 virtual void Redo() = 0;
65 virtual bool GetAvailableUndos() = 0;
66 virtual bool GetAvailableRedos() = 0;
67 virtual int UndoLimit() = 0;
68 virtual void UndoLimit(int theLimit) = 0;
69 virtual void SetName(const _PTR(SObject)& theSO, const std::string& theValue) = 0;
70 virtual void SetComment(const _PTR(SObject)& theSO, const std::string& theValue) = 0;
71 virtual void SetIOR(const _PTR(SObject)& theSO, const std::string& theValue) = 0;