12 #ifndef __KOME_CORE_TREE_NODE_H__
13 #define __KOME_CORE_TREE_NODE_H__
17 #include <boost/function.hpp>
18 #include <boost/bind.hpp>
109 for(
unsigned int i = 0; i <
m_children.size(); i++ ){
154 for(
unsigned int i = 0; i <
m_children.size(); i++ ) {
193 #endif // __KOME_CORE_TREE_NODE_H__
TreeNode(T &elm)
constructor
tree structure data management class
TreeNode(TreeNode< T > *parent)
constructor
TreeNode * getParentNode()
gets parent node
TreeNode * addChild(T &elm)
create child node
void sortChildren(boost::function< bool(TreeNode< T > &, TreeNode< T > &) > lessFun)
sort child nodes
virtual ~TreeNode()
destructor
void setElement(T &elm)
sets the element that the node has
void clearChildren()
remove all child nodes
unsigned int getNumberOfChildren()
gets the number of child nodes
TreeNode(TreeNode< T > *parent, T &elm)
constructor
TreeNode * getChild(int index)
get child node
T & getElement()
gets the element that the node has
std::vector< TreeNode< T > * > m_children
TreeNode * addChild()
create child node