NCBI C++ ToolKit
|
Search Toolkit Book for CFeatList
CConfigurableItems - a static list of items that can be configured. More...
#include <objects/seqfeat/SeqFeatData.hpp>
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< string > | 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"}. 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< CFeatListItem > | TFeatTypeContainer |
typedef map< int, CFeatListItem > | TSubtypeMap |
> 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 |
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.
Definition at line 695 of file SeqFeatData.hpp.
|
private |
Definition at line 652 of file SeqFeatData.hpp.
|
private |
> all valid types and subtypes.
Definition at line 706 of file SeqFeatData.hpp.
CFeatList::CFeatList | ( | ) |
Definition at line 4104 of file SeqFeatData.cpp.
References x_Init().
CFeatList::~CFeatList | ( | ) |
Definition at line 4110 of file SeqFeatData.cpp.
|
inline |
Definition at line 720 of file SeqFeatData.hpp.
Referenced by GetItemByDescription(), and GetItemByKey().
|
inline |
Definition at line 727 of file SeqFeatData.hpp.
Referenced by GetItemByDescription(), and GetItemByKey().
Get the displayable description of this type of feature.
Definition at line 4183 of file SeqFeatData.cpp.
References CFeatListItem::GetDescription(), GetItem(), and kEmptyStr.
Referenced by GetDescriptions(), CHistogramGlyph::GetHTMLActiveAreas(), CHistogramGlyph::GetTooltip(), CFeatureTrack::SetFeatSubtype(), and CFeatureTrack::x_AddHistogram().
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.
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().
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().
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().
bool CFeatList::GetItemByKey | ( | const string & | key, |
CFeatListItem & | config_item | ||
) | const |
Definition at line 4170 of file SeqFeatData.cpp.
References begin(), end(), and ncbi::grid::netcache::search::fields::key.
Referenced by CFeatureTrackFactory::CreateTracks(), and CFeatureTrackFactory::GetSettings().
bool CFeatList::GetItemBySubtype | ( | int | subtype, |
CFeatListItem & | config_item | ||
) | const |
Definition at line 4135 of file SeqFeatData.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), and m_FeatTypeMap.
Referenced by GetStoragekey(), GetStoragekeys(), CGuiObjectInfoSeq_feat::GetSubtype(), CAlignmentTrack::OnChangeProjectedFeats(), CSeqTextPaneConfig::SetCaseFeature(), and CAlignedFeatureGraph::x_GetTooltip().
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.
Get the key used to store this type of feature.
Definition at line 4193 of file SeqFeatData.cpp.
References GetItem(), CFeatListItem::GetStoragekey(), and kEmptyStr.
Referenced by CFeatureTrackFactory::CloneTrack(), CTrackConfigManager::CreateTrackConfig(), CGeneModelFactory::CreateTracks(), CDataTrackUtils::FeatSubtypes2TrackSubtypes(), CSettingsSet::GetFeatWriteKey(), CGeneModelFactory::GetMatchedAnnots(), CAllOtherFeaturesTrackFactory::GetSettings(), GetStoragekeys(), CHistogramGlyph::IsClickable(), CHistogramGlyph::RunSettingsDialog(), and s_GetFeatSubtypeStr().
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().
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().
|
inline |
Definition at line 713 of file SeqFeatData.hpp.
Definition at line 4114 of file SeqFeatData.cpp.
References set< Key, Compare >::end(), set< Key, Compare >::find(), and m_FeatTypes.
|
private |
initialize our container of feature types and descriptions.
Definition at line 4231 of file SeqFeatData.cpp.
References _VERIFY, CSeqFeatData_Base::e_not_set, CSeqFeatData::eSubtype_any, CFeatListItem::GetSubtype(), CFeatListItem::GetType(), CSeqFeatData::GetTypeFromSubtype(), i, set< Key, Compare >::insert(), ITERATE, kImportTable, kImportTableEnd, m_FeatTypeMap, m_FeatTypes, and sc_ConfigItemInit.
Referenced by CFeatList().
|
private |
Definition at line 707 of file SeqFeatData.hpp.
Referenced by GetItemBySubtype(), and x_Init().
|
private |
Definition at line 704 of file SeqFeatData.hpp.
Referenced by GetDescriptions(), GetItem(), TypeValid(), and x_Init().