dl
类 | Public 成员函数 | 所有成员列表
dl::NTree< T > 模板类 参考

#include <dl_tree.h>

类

struct  Node
 

Public 成员函数

 NTree ()
 
Node * Add (const T &v, const T &parent)
 添加,parent为nullptr时,为添加根节点 更多...
 
Node * Get (T v)
 查找,失败返回nullptr 更多...
 
template<typename F >
void ForEach (F func)
 遍历,保证父节点先遍历 更多...
 
auto begin ()
 标准库迭代方法不保证父节点先遍历 更多...
 
auto end ()
 
 ~NTree ()
 

详细描述

template<typename T>
class dl::NTree< T >

在文件 dl_tree.h 第 24 行定义.

构造及析构函数说明

◆ NTree()

template<typename T >
dl::NTree< T >::NTree ( )
inline

在文件 dl_tree.h 第 47 行定义.

◆ ~NTree()

template<typename T >
dl::NTree< T >::~NTree ( )
inline

在文件 dl_tree.h 第 123 行定义.

成员函数说明

◆ Add()

template<typename T >
Node * dl::NTree< T >::Add ( const T &  v,
const T &  parent 
)
inline

添加,parent为nullptr时,为添加根节点

返回值
返回节点,失败返回空指针

在文件 dl_tree.h 第 54 行定义.

◆ begin()

template<typename T >
auto dl::NTree< T >::begin ( )
inline

标准库迭代方法不保证父节点先遍历

在文件 dl_tree.h 第 120 行定义.

◆ end()

template<typename T >
auto dl::NTree< T >::end ( )
inline

在文件 dl_tree.h 第 121 行定义.

◆ ForEach()

template<typename T >
template<typename F >
void dl::NTree< T >::ForEach ( F  func)
inline

遍历,保证父节点先遍历

在文件 dl_tree.h 第 95 行定义.

◆ Get()

template<typename T >
Node * dl::NTree< T >::Get ( T  v)
inline

查找,失败返回nullptr

在文件 dl_tree.h 第 82 行定义.


该类的文档由以下文件生成: