Salome HOME
add method NameChanged to update title name
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_UseCaseBuilder.hxx
index a0a0d938b454c4c97e299a2bdf0846527a5e0efc..bf6cc093d175befc67a8cf8ce548a2f962e879d2 100644 (file)
@@ -1,67 +1,89 @@
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
 //  File   : SALOMEDSImpl_UseCaseBuilder.hxx
 //  Author : Sergey RUIN
 //  Module : SALOME
-
+//
 #ifndef __SALOMEDSIMPL_USECaseBuilder_H__
 #define __SALOMEDSIMPL_USECaseBuilder_H__
 
-//Handle definition
-#include <Handle_MMgt_TShared.hxx>
-#include <Standard_DefineHandle.hxx>
-DEFINE_STANDARD_HANDLE( SALOMEDSImpl_UseCaseBuilder, MMgt_TShared )
+#include "SALOMEDSImpl_Defines.hxx"
 
-// Cascade headers
-#include <SALOMEDSImpl_AttributeTreeNode.hxx>
-#include <TDocStd_Document.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <Standard_GUID.hxx>
+#include <string>
 
+#include "DF_Document.hxx"
+#include "DF_Label.hxx"
+#include "SALOMEDSImpl_AttributeTreeNode.hxx"
 #include "SALOMEDSImpl_UseCaseIterator.hxx"
 
-class SALOMEDSImpl_UseCaseBuilder : public MMgt_TShared
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_UseCaseBuilder
 {
 private:
 
-  Handle(SALOMEDSImpl_AttributeTreeNode)     _root;
-  Handle(TDocStd_Document)                   _doc;
+  SALOMEDSImpl_AttributeTreeNode*     _root;
+  DF_Document*                        _doc;
 
 public:
 
   //! standard constructor  
-  Standard_EXPORT SALOMEDSImpl_UseCaseBuilder(const Handle(TDocStd_Document)& theDocument);
-  
+  SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocument);
+
   //! standard destructor
-  Standard_EXPORT ~SALOMEDSImpl_UseCaseBuilder();
-  
-  Standard_EXPORT virtual bool Append(const Handle(SALOMEDSImpl_SObject)& theObject);
+  ~SALOMEDSImpl_UseCaseBuilder();
 
-  Standard_EXPORT virtual bool Remove(const Handle(SALOMEDSImpl_SObject)& theObject);
+  virtual bool Append(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual bool AppendTo(const Handle(SALOMEDSImpl_SObject)& theFather, const Handle(SALOMEDSImpl_SObject)& theObject);
+  virtual bool Remove(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual bool InsertBefore(const Handle(SALOMEDSImpl_SObject)& theFirst, const Handle(SALOMEDSImpl_SObject)& theNext);
+  virtual bool AppendTo(const SALOMEDSImpl_SObject& theFather, const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual bool  SetCurrentObject(const Handle(SALOMEDSImpl_SObject)& theObject);
-  
-  Standard_EXPORT virtual bool SetRootCurrent();
+  virtual bool InsertBefore(const SALOMEDSImpl_SObject& theFirst, const SALOMEDSImpl_SObject& theNext);
 
-  Standard_EXPORT virtual bool  HasChildren(const Handle(SALOMEDSImpl_SObject)& theObject);
+  virtual bool  SetCurrentObject(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual bool  IsUseCase(const Handle(SALOMEDSImpl_SObject)& theObject);
+  virtual bool SetRootCurrent();
 
-  Standard_EXPORT virtual bool SetName(const TCollection_AsciiString& theName);
+  virtual bool  HasChildren(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual Handle(SALOMEDSImpl_SObject) GetCurrentObject();
+  virtual bool SortChildren(const SALOMEDSImpl_SObject& theObject, bool theAscendingOrder);
 
-  Standard_EXPORT virtual TCollection_AsciiString GetName();
+  virtual SALOMEDSImpl_SObject GetFather(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual Handle(SALOMEDSImpl_SObject) AddUseCase(const TCollection_AsciiString& theName);
+  virtual bool  IsUseCase(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT virtual Handle(SALOMEDSImpl_UseCaseIterator) GetUseCaseIterator(const Handle(SALOMEDSImpl_SObject)& anObject);
+  virtual bool  IsUseCaseNode(const SALOMEDSImpl_SObject& theObject);
 
-  Standard_EXPORT Handle(SALOMEDSImpl_SObject) GetSObject(const TCollection_AsciiString& theEntry);    
+  virtual bool SetName(const std::string& theName);
+
+  virtual SALOMEDSImpl_SObject GetCurrentObject();
+
+  virtual std::string GetName();
+
+  virtual SALOMEDSImpl_SObject AddUseCase(const std::string& theName);
+
+  virtual SALOMEDSImpl_UseCaseIterator GetUseCaseIterator(const SALOMEDSImpl_SObject& anObject);
+
+  SALOMEDSImpl_SObject GetSObject(const std::string& theEntry);    
 
-public:
-  DEFINE_STANDARD_RTTI( SALOMEDSImpl_UseCaseBuilder )
 };
 #endif