NCBI C++ ToolKit
|
Search Toolkit Book for CBioTree
Basic tree structure for biological applications. More...
#include <algo/phy_tree/bio_tree.hpp>
Classes | |
struct | CAssignTreeFunc |
Functor to reset tree pointer in all nodes. More... | |
class | CBioNode |
class | CFindUidFunc |
Find node by UID functor. More... | |
Public Types | |
typedef CBioTree< TBioNode > | TBioTree |
typedef CBioNode | TBioTreeNode |
Biotree node (forms the tree hierarchy) More... | |
typedef TBioNode | TBioNodeType |
Public Member Functions | |
CBioTree () | |
virtual | ~CBioTree () |
CBioTree (const CBioTree< TBioNode > &btr) | |
CBioTree< TBioNode > & | operator= (const CBioTree< TBioNode > &btr) |
const TBioTreeNode * | FindNode (TBioTreeNodeId node_id) const |
Finds node by id. More... | |
void | AddFeature (TBioTreeNode *node, TBioTreeFeatureId feature_id, const string &feature_value) |
Add feature to the tree node Function controls that the feature is registered in the feature dictionary of this tree. More... | |
void | AddFeature (TBioTreeNode *node, const string &feature_name, const string &feature_value) |
Add feature to the tree node Function controls that the feature is registered in the feature dictionary of this tree. More... | |
virtual TBioTreeNodeId | GetNodeId () |
Get new unique node id. More... | |
virtual TBioTreeNodeId | GetNodeId (const TBioTreeNode &) |
Get new unique node id (for cases when node id depends on the node's content. More... | |
void | SetNodeId (TBioTreeNode *node) |
Assign new unique node id to the node. More... | |
void | SetTreeNode (TBioTreeNode *node) |
Assign new top level tree node. More... | |
const TBioTreeNode * | GetTreeNode () const |
TBioTreeNode * | GetTreeNodeNonConst () |
void | DetachTreeNode () |
TBioTreeNode * | AddNode (const TBioNodeType &node_value, TBioTreeNodeId parent_id) |
Add node to the tree (node location is defined by the parent id. More... | |
TBioTreeNode * | AddNode (const TBioNodeType &node_value, TBioTreeNode *parent_node) |
Add a node to the tree when you have already looked up the parent node (faster) More... | |
void | SetParentTree (CBioNode &node) |
Recursively set this tree as parent tree for the node. More... | |
void | SetParentTree (CBioNode &node, CBioTree *tr) |
Recursively set parent tree for the node. More... | |
void | Clear () |
Clear the bio tree. More... | |
CBioTreeFeatureDictionary & | GetFeatureDict () |
Return feature dictionary. More... | |
const CBioTreeFeatureDictionary & | GetFeatureDict () const |
Return feature dictionary. More... | |
Protected Attributes | |
CBioTreeFeatureDictionary | m_FeatureDict |
TBioTreeNodeId | m_NodeIdCounter |
unique_ptr< TBioTreeNode > | m_TreeNode |
Top level node. More... | |
Basic tree structure for biological applications.
Definition at line 231 of file bio_tree.hpp.