N
Nobody
I am trying to write a BTree class, just wondering if I missed any useful
methods. This is my class definition so far (excuse the MFC portions, its a
project requirement):
template <class TYPE, class ARG_TYPE = const TYPE&>
class CBTree : public CObject
{
// Constructors
public:
CBTree();
// Operations
public:
// InsertNode
// DeleteNode
// GetRootNode
// GetLeftNode
// GetRightNode
// GetParentNode
// void RemoveAll();
// BOOL IsEmpty() const;
// Implementation
public:
virtual ~CBTree();
};
Would GetNodeCount() be useful in a BTree class? How about a copy
constructor?
I'm thinking it might be cool to have some kind of wrapper functions for
navigating the tree pre-order, in-order and post-order rather then just node
accessor functions?
Thanks.
methods. This is my class definition so far (excuse the MFC portions, its a
project requirement):
template <class TYPE, class ARG_TYPE = const TYPE&>
class CBTree : public CObject
{
// Constructors
public:
CBTree();
// Operations
public:
// InsertNode
// DeleteNode
// GetRootNode
// GetLeftNode
// GetRightNode
// GetParentNode
// void RemoveAll();
// BOOL IsEmpty() const;
// Implementation
public:
virtual ~CBTree();
};
Would GetNodeCount() be useful in a BTree class? How about a copy
constructor?
I'm thinking it might be cool to have some kind of wrapper functions for
navigating the tree pre-order, in-order and post-order rather then just node
accessor functions?
Thanks.