Back to index

salome-kernel  6.5.0
SALOMEDS_StudyBuilder.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  File   : SALOMEDS_StudyBuilder.hxx
00024 //  Author : Sergey RUIN
00025 //  Module : SALOME
00026 //
00027 #ifndef __SALOMEDS_STUDYBUILDER_H__
00028 #define __SALOMEDS_STUDYBUILDER_H__
00029 
00030 #include "SALOMEDS_Defines.hxx"
00031 
00032 #include "SALOMEDSClient.hxx"
00033 #include "SALOMEDSImpl_StudyBuilder.hxx"
00034 
00035 // IDL headers
00036 #include <SALOMEconfig.h>
00037 #include CORBA_SERVER_HEADER(SALOMEDS)
00038 
00039 class SALOMEDS_EXPORT SALOMEDS_StudyBuilder: public SALOMEDSClient_StudyBuilder
00040 {
00041 private:
00042   bool _isLocal;
00043   SALOMEDSImpl_StudyBuilder*        _local_impl;
00044   SALOMEDS::StudyBuilder_var        _corba_impl;
00045   CORBA::ORB_var                    _orb;
00046 
00047 public:
00048 
00049   SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder);
00050   SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder);
00051   ~SALOMEDS_StudyBuilder();
00052 
00053   virtual _PTR(SComponent) NewComponent(const std::string& ComponentDataType);
00054   virtual void DefineComponentInstance (const _PTR(SComponent)&, const std::string& ComponentIOR);
00055   virtual void RemoveComponent(const _PTR(SComponent)& theSCO);
00056   virtual _PTR(SObject) NewObject(const _PTR(SObject)& theFatherObject);
00057   virtual _PTR(SObject) NewObjectToTag(const _PTR(SObject)& theFatherObject, int theTag);
00058   virtual void AddDirectory(const std::string& thePath);
00059   virtual void LoadWith(const _PTR(SComponent)& theSCO, const std::string& theIOR);
00060   virtual void Load(const _PTR(SObject)& theSCO);
00061   virtual void RemoveObject(const _PTR(SObject)& theSO);
00062   virtual void RemoveObjectWithChildren(const _PTR(SObject)& theSO);
00063   virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO, 
00064                                                        const std::string& aTypeOfAttribute);
00065   virtual bool FindAttribute(const _PTR(SObject)& theSO, 
00066                              _PTR(GenericAttribute)& theAttribute, 
00067                              const std::string& aTypeOfAttribute);
00068   virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute);
00069   virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject);
00070   virtual void RemoveReference(const _PTR(SObject)& me);
00071   virtual void SetGUID(const _PTR(SObject)& theSO, const std::string& theGUID);
00072   virtual bool IsGUID(const _PTR(SObject)& theSO, const std::string& theGUID);
00073   virtual void NewCommand();
00074   virtual void CommitCommand();
00075   virtual bool HasOpenCommand();
00076   virtual void AbortCommand();
00077   virtual void Undo();
00078   virtual void Redo();
00079   virtual bool GetAvailableUndos();
00080   virtual bool GetAvailableRedos();
00081   virtual int UndoLimit();
00082   virtual void UndoLimit(int theLimit);
00083   virtual void SetName(const _PTR(SObject)& theSO, const std::string& theValue);
00084   virtual void SetComment(const _PTR(SObject)& theSO, const std::string& theValue);
00085   virtual void SetIOR(const _PTR(SObject)& theSO, const std::string& theValue);
00086 
00087   SALOMEDS::StudyBuilder_ptr GetBuilder();
00088 
00089 private:
00090   void CheckLocked();
00091   void init_orb();
00092 };
00093 #endif