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: 2009-03-03 15:10:35 $
00007   Version:   $Revision: 1.5 $
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 <itkTreeNode.h>
00024 
00025 namespace itk
00026 {
00027 
00028 
00029 template <class TValueType>
00030 class TreeContainerBase : public Object
00031 {
00032  
00033 public:
00034 
00035   typedef Object                    Superclass;
00036   typedef TreeContainerBase         Self;
00037   typedef SmartPointer<Self>        Pointer;
00038   typedef SmartPointer<const Self>  ConstPointer;
00039 
00040   typedef TValueType ValueType;
00041 
00043   itkTypeMacro(TreeContainerBase, Object);
00044 
00047   virtual bool SetRoot( const TValueType element ) = 0;
00048 
00050   virtual bool SetRoot( TreeNode<TValueType>* node) = 0;
00051 
00053   virtual bool Contains( const TValueType element ) = 0;
00054 
00056   virtual int Count() const = 0;
00057 
00059   virtual bool IsLeaf( const TValueType element ) = 0;
00060 
00062   virtual bool IsRoot( const TValueType element ) = 0;
00063 
00065   virtual bool Clear() = 0;
00066 
00068   virtual const TreeNode<TValueType>* GetRoot() const = 0;
00069 
00071   void SetSubtree(bool val) {m_SubTree = val;}
00072 
00073 protected:
00074 
00075   TreeContainerBase() {}; 
00076   virtual ~TreeContainerBase() {}; 
00077   bool  m_SubTree;
00078 
00079 };
00080 
00081 } // namespace itk
00082 
00083 #endif
00084 

Generated at Thu May 28 11:48:59 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000