Back to index

salome-kernel  6.5.0
SALOMEDS_StudyBuilder_i.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_i.hxx
00024 //  Author : Sergey RUIN
00025 //  Module : SALOME
00026 //
00027 #ifndef __SALOMEDS_STUDYBUILDER_I_H__
00028 #define __SALOMEDS_STUDYBUILDER_I_H__
00029 
00030 // std C++ headers
00031 #include <iostream>
00032 
00033 // IDL headers
00034 #include <SALOMEconfig.h>
00035 #include CORBA_SERVER_HEADER(SALOMEDS)
00036 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00037 
00038 #include "SALOMEDSImpl_StudyBuilder.hxx"
00039 
00040 class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder
00041 {
00042 private:
00043   CORBA::ORB_var                    _orb;
00044   SALOMEDSImpl_StudyBuilder*        _impl;  
00045 public:
00046     
00047   SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder*, CORBA::ORB_ptr);
00048 
00049   ~SALOMEDS_StudyBuilder_i();
00050 
00052 
00056   virtual SALOMEDS::SComponent_ptr NewComponent(const char* ComponentDataType);
00057 
00059 
00063   virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR);
00064   
00066 
00071   virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent);
00072 
00074 
00080   virtual SALOMEDS::SObject_ptr NewObject(SALOMEDS::SObject_ptr theFatherObject);
00082 
00089   virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
00090 
00094   virtual void AddDirectory(const char* thePath);
00095 
00096   virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine)
00097     throw(SALOME::SALOME_Exception);
00098   virtual void Load(SALOMEDS::SObject_ptr sco);
00099 
00100   virtual void RemoveObject(SALOMEDS::SObject_ptr anObject);
00101   virtual void RemoveObjectWithChildren(SALOMEDS::SObject_ptr anObject);
00102 
00103   virtual SALOMEDS::GenericAttribute_ptr FindOrCreateAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
00104   virtual CORBA::Boolean FindAttribute(SALOMEDS::SObject_ptr anObject, SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
00105   virtual void RemoveAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
00106 
00107   virtual void Addreference(SALOMEDS::SObject_ptr me, SALOMEDS::SObject_ptr thereferencedObject);
00108 
00109   virtual void RemoveReference(SALOMEDS::SObject_ptr me);
00110 
00111   virtual void SetGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
00112   virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
00113 
00114   virtual void NewCommand();
00115   virtual void CommitCommand() throw(SALOMEDS::StudyBuilder::LockProtection);
00116   virtual CORBA::Boolean HasOpenCommand();
00117   virtual void AbortCommand();
00118   virtual void Undo() throw(SALOMEDS::StudyBuilder::LockProtection);
00119   virtual void Redo() throw(SALOMEDS::StudyBuilder::LockProtection);
00120   CORBA::Boolean GetAvailableUndos();
00121   CORBA::Boolean GetAvailableRedos();
00122   CORBA::Boolean IsSaved();
00123   CORBA::Boolean IsModified();
00124   virtual CORBA::Long UndoLimit();
00125   virtual void UndoLimit(CORBA::Long);
00126 
00127   void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection);
00128 
00129   virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
00130   virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
00131   virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
00132 
00133   SALOMEDSImpl_StudyBuilder* GetImpl() { return _impl; }
00134 
00135 };
00136 #endif