Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkTree_Tree.hxx

Go to the documentation of this file.
00001 
00002 //   exotkTree_Tree.hxx
00004 //    Copyright (C) 2001  Stephane Routelous
00005 //
00006 //    This file is part of exoTK.
00007 //
00008 //    exoTK is free software; you can redistribute it and/or modify
00009 //    it under the terms of the GNU General Public License as published by
00010 //    the Free Software Foundation; either version 2 of the License, or
00011 //    (at your option) any later version.
00012 //
00013 //    exoTK is distributed in the hope that it will be useful,
00014 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //    GNU General Public License for more details.
00017 //
00018 //    You should have received a copy of the GNU General Public License
00019 //    along with exoTK; if not, write to the Free Software
00020 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00028 #ifndef _exotkTree_Tree_HeaderFile
00029 #define _exotkTree_Tree_HeaderFile
00030 #pragma warning( disable : 4786)  
00031 
00032 #if _MSC_VER > 1000
00033 #pragma once
00034 #endif // _MSC_VER > 1000
00035 
00036 #ifndef  _MMgt_TShared_HeaderFile
00037 #include <MMgt_TShared.hxx>
00038 #endif
00039 #ifndef  _Handle_exotkTree_Tree_HeaderFile
00040 #include <Handle_exotkTree_Tree.hxx>
00041 #endif
00042 #ifndef  _Handle_exotkTree_TreeNode_HeaderFile
00043 #include <Handle_exotkTree_TreeNode.hxx>
00044 #endif
00045 #ifndef _Standard_DefineHandle_HeaderFile
00046 #include <Standard_DefineHandle.hxx>
00047 #endif
00048 class TCollection_AsciiString;
00049 class exotkTree_TreeUpdator;
00050 
00051 #ifndef _LIST_
00052 #include <list>
00053 #endif
00054 
00060 class exotkTree_Tree : public MMgt_TShared  
00061 {
00062 public:
00063 
00071     inline void* operator new(size_t,void* anAddress) 
00072       {
00073         return anAddress;
00074       }
00075 
00082     inline void* operator new(size_t size) 
00083       { 
00084         return Standard::Allocate(size); 
00085       }
00086 
00093     inline void  operator delete(void *anAddress) 
00094       { 
00095         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00096       }
00097 
00102         Standard_EXPORT exotkTree_Tree();
00103 
00108         Standard_EXPORT virtual ~exotkTree_Tree();
00109 
00110 
00116         Standard_EXPORT virtual void SetRoot(const Handle_exotkTree_TreeNode& aRoot);
00117 
00124         Standard_EXPORT virtual Handle_exotkTree_TreeNode Root();
00125 
00126 
00132         Standard_EXPORT virtual void SetData(const Handle_Standard_Transient& aData);
00133 
00140         Standard_EXPORT virtual Handle_Standard_Transient Data();
00141 
00147         Standard_EXPORT virtual Standard_Boolean HasData();
00148 
00149 
00155         Standard_EXPORT virtual TCollection_AsciiString Dump();
00156 
00157 
00158 
00165         Standard_EXPORT virtual Standard_Boolean RemoveUpdator(exotkTree_TreeUpdator* anUpdatorToRemove);
00166 
00173         Standard_EXPORT virtual Standard_Boolean AddUpdator(exotkTree_TreeUpdator* anUpdatorToAdd);
00174 
00175 
00183         Standard_EXPORT virtual Standard_Boolean Expand(const Handle_exotkTree_TreeNode& aNodeToExpand,const Standard_Boolean Recursive);
00184 
00191         Standard_EXPORT virtual Standard_Boolean Collapse(const Handle_exotkTree_TreeNode& aNodeToCollapse);
00192 
00200         Standard_EXPORT virtual Standard_Boolean ToggleExpansion(const Handle_exotkTree_TreeNode& aNodeToToggle,const Standard_Boolean Recursive);
00201 
00208         Standard_EXPORT virtual Standard_Boolean SetVisible(const Handle_exotkTree_TreeNode& aNode);
00209 
00216         Standard_EXPORT virtual Standard_Boolean UpdateNode(const Handle_exotkTree_TreeNode& aNodeToUpdate);
00217 
00218 
00226         Standard_EXPORT virtual void NotifyInsertItem(const Handle_exotkTree_TreeNode& aParentNode,const Handle_exotkTree_TreeNode& anInsertedNode,const Handle_exotkTree_TreeNode& aPositionNode);
00227 
00233         Standard_EXPORT friend Handle_Standard_Type& exotkTree_Tree_Type_();
00234 
00240         Standard_EXPORT const Handle_Standard_Type& DynamicType() const;
00241 
00248         Standard_EXPORT Standard_Boolean IsKind(const Handle_Standard_Type&) const;
00249 
00250 protected:
00251 
00258         Standard_EXPORT virtual Standard_Boolean UpdatorExists(exotkTree_TreeUpdator* anUpdatorToCheck);
00259 
00267         Standard_EXPORT virtual TCollection_AsciiString DumpRec(const Handle_exotkTree_TreeNode& aNode,const Standard_Integer level = 0);
00268 
00270         Handle_exotkTree_TreeNode myRoot;
00272         Handle_Standard_Transient myData;
00273 
00275         std::list<exotkTree_TreeUpdator*> myUpdators;
00276 };
00277 
00278 #endif 

Generated on Wed Jan 23 12:16:44 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001