18 #ifndef itkTreeContainer_h 19 #define itkTreeContainer_h 37 template<
typename TValue >
67 virtual bool SetRoot(
const TValue element) ITK_OVERRIDE;
70 bool SetRoot(IteratorType & pos);
76 bool Contains(
const TValue element) ITK_OVERRIDE;
79 int Count() const ITK_OVERRIDE;
82 bool IsLeaf(const TValue element) ITK_OVERRIDE;
85 bool IsRoot(const TValue element) ITK_OVERRIDE;
88 bool Clear() ITK_OVERRIDE;
94 bool Swap(IteratorType & v, IteratorType & w);
100 bool Add(
const TValue child,
const TValue parent);
103 const TreeNodeType *
GetNode(TValue val)
const;
118 #ifndef ITK_MANUAL_INSTANTIATION 119 #include "itkTreeContainer.hxx" bool IsRoot(const TValue element) override
Represents a node in a tree.
TreeIteratorBase< Self > IteratorType
TreeContainer< TValue > Self
bool Add(const TValue child, const TValue parent)
TreeNode< ValueType > TreeNodeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
int Count() const override
PreOrderTreeIterator< Self > PreOrderIteratorType
ObjectType * GetPointer() const
bool IsLeaf(const TValue element) override
bool Swap(IteratorType &v, IteratorType &w)
virtual bool SetRoot(const TValue element) override
SmartPointer< const Self > ConstPointer
TreeContainerBase< TValue > Superclass
bool Contains(const TValue element) override
const TreeNodeType * GetNode(TValue val) const
This class provides the base implementation for tree iterators.
A base class for tree containers.
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
const TreeNodeType * GetRoot() const override
TreeNodeType::Pointer m_Root
SmartPointer< Self > Pointer
int m_DefaultChildrenCount