NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Attributes | List of all members
CBioTreeFeatureDictionary Class Reference

Search Toolkit Book for CBioTreeFeatureDictionary

Feature dictionary. More...

#include <algo/phy_tree/bio_tree.hpp>

+ Collaboration diagram for CBioTreeFeatureDictionary:

Public Types

typedef map< TBioTreeFeatureId, stringTFeatureDict
 Feature dictionary (feature id -> feature name map) More...
 
typedef map< string, TBioTreeFeatureIdTFeatureNameIdx
 Feature reverse index (feature name -> id) More...
 

Public Member Functions

 CBioTreeFeatureDictionary ()
 
 CBioTreeFeatureDictionary (const CBioTreeFeatureDictionary &btr)
 
CBioTreeFeatureDictionaryoperator= (const CBioTreeFeatureDictionary &btr)
 
bool HasFeature (const string &feature_name) const
 Check if feature is listed in the dictionary. More...
 
bool HasFeature (TBioTreeFeatureId id) const
 Check if feature is listed in the dictionary. More...
 
TBioTreeFeatureId Register (const string &feature_name)
 Register new feature, return its id. More...
 
void Register (TBioTreeFeatureId id, const string &feature_name)
 Register new feature. More...
 
void Unregister (TBioTreeFeatureId id)
 
TBioTreeFeatureId GetId (const string &feature_name) const
 If feature is already registered returns its id by name. More...
 
string GetName (TBioTreeFeatureId id) const
 Return the featue name given the id, or "" if not found. More...
 
void Clear ()
 Clear the dictionary. More...
 
const TFeatureDictGetFeatureDict () const
 Get reference on the internal map. More...
 

Protected Attributes

TFeatureDict m_Dict
 id -> feature name map More...
 
TFeatureNameIdx m_Name2Id
 id -> feature name map More...
 
unsigned int m_IdCounter
 Feature id counter. More...
 

Detailed Description

Feature dictionary.

Used for mapping between feature ids and feature names.

Definition at line 175 of file bio_tree.hpp.


The documentation for this class was generated from the following files:
Modified on Wed Feb 21 09:57:34 2024 by modify_doxy.py rev. 669887