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

Search Toolkit Book for CFeatList

CConfigurableItems - a static list of items that can be configured. More...

#include <objects/seqfeat/SeqFeatData.hpp>

+ Collaboration diagram for CFeatList:

Public Types

typedef TFeatTypeContainer::const_iterator const_iterator
 

Public Member Functions

 CFeatList ()
 
 ~CFeatList ()
 
bool TypeValid (int type, int subtype) const
 
bool GetItem (int type, int subtype, CFeatListItem &config_item) const
 can get all static information for one type/subtype. More...
 
bool GetItemBySubtype (int subtype, CFeatListItem &config_item) const
 
bool GetItemByDescription (const string &desc, CFeatListItem &config_item) const
 
bool GetItemByKey (const string &key, CFeatListItem &config_item) const
 
string GetDescription (int type, int subtype) const
 Get the displayable description of this type of feature. More...
 
bool GetTypeSubType (const string &desc, int &type, int &subtype) const
 Get the feature's type and subtype from its description. More...
 
string GetStoragekey (int type, int subtype) const
 Get the key used to store this type of feature. More...
 
string GetStoragekey (int subtype) const
 Get the key used to store this type of feature by only subtype. More...
 
vector< stringGetStoragekeys (int subtype) const
 Get hierarchy of keys above this subtype, starting with "Master" example, eSubtype_gene, will return {"Master", "Gene"} but eSubtype_allele will return {"Master", "Import", "allele"}. More...
 
void GetDescriptions (vector< string > &descs, bool hierarchical=false) const
 return a list of all the feature descriptions for a menu or other control. More...
 
size_t size () const
 
const_iterator begin () const
 
const_iterator end () const
 

Private Types

typedef set< CFeatListItemTFeatTypeContainer
 
typedef map< int, CFeatListItemTSubtypeMap
 > all valid types and subtypes. More...
 

Private Member Functions

void x_Init (void)
 initialize our container of feature types and descriptions. More...
 

Private Attributes

TFeatTypeContainer m_FeatTypes
 
TSubtypeMap m_FeatTypeMap
 

Detailed Description

CConfigurableItems - a static list of items that can be configured.

One can iterate through all items. Iterators dereference to CFeatListItem. One can also get an item by type and subtype.

Definition at line 649 of file SeqFeatData.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 695 of file SeqFeatData.hpp.

◆ TFeatTypeContainer

Definition at line 652 of file SeqFeatData.hpp.

◆ TSubtypeMap

> all valid types and subtypes.

Definition at line 706 of file SeqFeatData.hpp.

Constructor & Destructor Documentation

◆ CFeatList()

CFeatList::CFeatList ( )

Definition at line 4104 of file SeqFeatData.cpp.

References x_Init().

◆ ~CFeatList()

CFeatList::~CFeatList ( )

Definition at line 4110 of file SeqFeatData.cpp.

Member Function Documentation

◆ begin()

CFeatList::const_iterator CFeatList::begin ( void  ) const
inline

Definition at line 720 of file SeqFeatData.hpp.

Referenced by GetItemByDescription(), and GetItemByKey().

◆ end()

CFeatList::const_iterator CFeatList::end ( void  ) const
inline

Definition at line 727 of file SeqFeatData.hpp.

Referenced by GetItemByDescription(), and GetItemByKey().

◆ GetDescription()

string CFeatList::GetDescription ( int  type,
int  subtype 
) const

◆ GetDescriptions()

void CFeatList::GetDescriptions ( vector< string > &  descs,
bool  hierarchical = false 
) const

return a list of all the feature descriptions for a menu or other control.

if hierarchical is true use in an Fl_Menu_ descendant to make hierarchical menus.

Parameters
hierarchical> output, list of description strings.> make descriptions hierachical, separated by '/'.

Definition at line 4261 of file SeqFeatData.cpp.

References CSeqFeatData_Base::e_not_set, CSeqFeatData::eSubtype_any, GetDescription(), ITERATE, and m_FeatTypes.

Referenced by CFieldChoicePanel::AutoMatchFeat().

◆ GetItem()

bool CFeatList::GetItem ( int  type,
int  subtype,
CFeatListItem config_item 
) const

can get all static information for one type/subtype.

Definition at line 4124 of file SeqFeatData.cpp.

References set< Key, Compare >::end(), set< Key, Compare >::find(), and m_FeatTypes.

Referenced by GetDescription(), GetStoragekey(), and GetStoragekeys().

◆ GetItemByDescription()

bool CFeatList::GetItemByDescription ( const string desc,
CFeatListItem config_item 
) const

Definition at line 4146 of file SeqFeatData.cpp.

References begin(), end(), and NStr::EqualNocase().

Referenced by GetTypeSubType().

◆ GetItemByKey()

bool CFeatList::GetItemByKey ( const string key,
CFeatListItem config_item 
) const

◆ GetItemBySubtype()

bool CFeatList::GetItemBySubtype ( int  subtype,
CFeatListItem config_item 
) const

◆ GetStoragekey() [1/2]

string CFeatList::GetStoragekey ( int  subtype) const

Get the key used to store this type of feature by only subtype.

Definition at line 4203 of file SeqFeatData.cpp.

References GetItemBySubtype(), CFeatListItem::GetStoragekey(), and kEmptyStr.

◆ GetStoragekey() [2/2]

string CFeatList::GetStoragekey ( int  type,
int  subtype 
) const

◆ GetStoragekeys()

vector< string > CFeatList::GetStoragekeys ( int  subtype) const

Get hierarchy of keys above this subtype, starting with "Master" example, eSubtype_gene, will return {"Master", "Gene"} but eSubtype_allele will return {"Master", "Import", "allele"}.

Definition at line 4213 of file SeqFeatData.cpp.

References CSeqFeatData_Base::e_not_set, CSeqFeatData::eSubtype_any, GetItem(), GetItemBySubtype(), CFeatListItem::GetStoragekey(), GetStoragekey(), and CFeatListItem::GetType().

Referenced by CSeqGraphicConfig::GetFeatParams(), CSettingsSet::GetFeatReadKey(), CHistParamsManager::GetHistParams(), and CHistParamsManager::HasSettings().

◆ GetTypeSubType()

bool CFeatList::GetTypeSubType ( const string desc,
int type,
int subtype 
) const

Get the feature's type and subtype from its description.

return true on success, false if type and subtype are not valid.

Definition at line 4159 of file SeqFeatData.cpp.

References GetItemByDescription(), CFeatListItem::GetSubtype(), and CFeatListItem::GetType().

Referenced by CSeqTextPaneConfig::GetCaseFeature(), and CSeqTextPaneConfig::GetCaseFeatureSubtype().

◆ size()

size_t CFeatList::size ( void  ) const
inline

Definition at line 713 of file SeqFeatData.hpp.

◆ TypeValid()

bool CFeatList::TypeValid ( int  type,
int  subtype 
) const

◆ x_Init()

void CFeatList::x_Init ( void  )
private

Member Data Documentation

◆ m_FeatTypeMap

TSubtypeMap CFeatList::m_FeatTypeMap
private

Definition at line 707 of file SeqFeatData.hpp.

Referenced by GetItemBySubtype(), and x_Init().

◆ m_FeatTypes

TFeatTypeContainer CFeatList::m_FeatTypes
private

Definition at line 704 of file SeqFeatData.hpp.

Referenced by GetDescriptions(), GetItem(), TypeValid(), and x_Init().


The documentation for this class was generated from the following files:
Modified on Sun Apr 21 03:44:21 2024 by modify_doxy.py rev. 669887