NCBI C++ ToolKit
|
Search Toolkit Book for CBioTreeFeatureDictionary
Feature dictionary. More...
#include <algo/phy_tree/bio_tree.hpp>
Public Types | |
typedef map< TBioTreeFeatureId, string > | TFeatureDict |
Feature dictionary (feature id -> feature name map) More... | |
typedef map< string, TBioTreeFeatureId > | TFeatureNameIdx |
Feature reverse index (feature name -> id) More... | |
Public Member Functions | |
CBioTreeFeatureDictionary () | |
CBioTreeFeatureDictionary (const CBioTreeFeatureDictionary &btr) | |
CBioTreeFeatureDictionary & | operator= (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 TFeatureDict & | GetFeatureDict () 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... | |
Feature dictionary.
Used for mapping between feature ids and feature names.
Definition at line 175 of file bio_tree.hpp.