Salome HOME
Copyrights update
[modules/kernel.git] / src / SALOMEDSClient / SALOMEDSClient_StudyBuilder.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/
19 //
20 //  File   : SALOMEDSClient_StudyBuilder.hxx
21 //  Author : Sergey RUIN
22 //  Module : SALOME
23
24 #ifndef __SALOMEDSClient_STUDYBUILDER_H__
25 #define __SALOMEDSClient_STUDYBUILDER_H__
26
27 #include "SALOMEDSClient_definitions.hxx"
28 #include "SALOMEDSClient_SObject.hxx"
29 #include "SALOMEDSClient_SComponent.hxx"
30 #include "SALOMEDSClient_GenericAttribute.hxx"
31 #include <string> 
32
33 class SALOMEDSClient_StudyBuilder
34 {
35 public:
36   virtual ~SALOMEDSClient_StudyBuilder() {}
37
38   virtual _PTR(SComponent) NewComponent(const std::string& ComponentDataType) = 0;
39   virtual void DefineComponentInstance (const _PTR(SComponent)&, const std::string& ComponentIOR) = 0;
40   virtual void RemoveComponent(const _PTR(SComponent)& theSCO) = 0;
41   virtual _PTR(SObject) NewObject(const _PTR(SObject)& theFatherObject) = 0;
42   virtual _PTR(SObject) NewObjectToTag(const _PTR(SObject)& theFatherObject, int theTag) = 0;
43   virtual void AddDirectory(const std::string& thePath) = 0;
44   virtual void LoadWith(const _PTR(SComponent)& theSCO, const std::string& theIOR) = 0;
45   virtual void Load(const _PTR(SObject)& theSCO) = 0;
46   virtual void RemoveObject(const _PTR(SObject)& theSO) = 0;
47   virtual void RemoveObjectWithChildren(const _PTR(SObject)& theSO) = 0;
48   virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute) = 0;
49   virtual bool FindAttribute(const _PTR(SObject)& theSO, 
50                              _PTR(GenericAttribute)& theAttribute, 
51                              const std::string& aTypeOfAttribute) = 0;
52   virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute) = 0;
53   virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject) = 0;
54   virtual void RemoveReference(const _PTR(SObject)& me) = 0;
55   virtual void SetGUID(const _PTR(SObject)& theSO, const std::string& theGUID) = 0;
56   virtual bool IsGUID(const _PTR(SObject)& theSO, const std::string& theGUID) = 0;
57   virtual void NewCommand() = 0;
58   virtual void CommitCommand()= 0;
59   virtual bool HasOpenCommand() = 0;
60   virtual void AbortCommand() = 0;
61   virtual void Undo() = 0;
62   virtual void Redo() = 0;
63   virtual bool GetAvailableUndos() = 0;
64   virtual bool GetAvailableRedos() = 0;
65   virtual int UndoLimit() = 0;
66   virtual void UndoLimit(int theLimit) = 0;
67   virtual void SetName(const _PTR(SObject)& theSO, const std::string& theValue) = 0;
68   virtual void SetComment(const _PTR(SObject)& theSO, const std::string& theValue) = 0;
69   virtual void SetIOR(const _PTR(SObject)& theSO, const std::string& theValue) = 0;
70 };
71
72 #endif