Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkTreeContainerBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTreeContainerBase.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/11/01 16:31:24 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkTreeContainerBase_h
00018 #define __itkTreeContainerBase_h
00019 
00020 #include "itkMacro.h"
00021 #include <itkObject.h>
00022 #include <iostream>
00023 #include <itkObjectFactory.h>
00024 #include <itkTreeNode.h>
00025 
00026 namespace itk
00027 {
00028 
00029 
00030 template <class TValueType>
00031 class TreeContainerBase : public Object
00032 {
00033  
00034 public:
00035 
00036   typedef Object Superclass;
00037   typedef TreeContainerBase Self;
00038   typedef SmartPointer<Self>  Pointer;
00039   typedef SmartPointer<const Self>  ConstPointer;
00040 
00041   typedef TValueType ValueType;
00042 
00044   itkTypeMacro(TreeContainerBase, Object);
00045 
00048   virtual bool SetRoot( TValueType element ) = 0;
00049 
00051   virtual bool SetRoot( TreeNode<TValueType>* node) = 0;
00052 
00054   virtual bool Contains( const TValueType element ) = 0;
00055 
00057   virtual int Count() const = 0;
00058 
00060   virtual bool IsLeaf( const TValueType element ) = 0;
00061 
00063   virtual bool IsRoot( const TValueType element ) = 0;
00064 
00066   virtual bool Clear() = 0;
00067 
00069   virtual const TreeNode<TValueType>* GetRoot() const = 0;
00070 
00072   void SetSubtree(bool val) {m_SubTree = val;}
00073 
00074 protected:
00075 
00076   TreeContainerBase() {}; 
00077   virtual ~TreeContainerBase() {}; 
00078   bool  m_SubTree;
00079 
00080 };
00081 
00082 
00083 
00084 } // namespace itk
00085 
00086 #endif
00087 
00088 

Generated at Mon Mar 12 03:13:50 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000