NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
ILayoutTrackFactory Class Referenceabstract

Search Toolkit Book for ILayoutTrackFactory

ILayoutTrackFactory. More...

#include <gui/widgets/seq_graphic/layout_track.hpp>

+ Inheritance diagram for ILayoutTrackFactory:

Classes

struct  SExtraParams
 extra parameter for initializing a track. More...
 

Public Types

typedef map< string, CRef< CLayoutTrack > > TTrackMap
 the tracks holding a list of annotation name and track pair. More...
 
typedef map< string, stringTAnnotNameTitleMap
 List of annotations with the corresponding titles. More...
 
typedef map< string, CRef< CAnnotMetaData > > TAnnotMetaDataList
 

Public Member Functions

virtual TTrackMap CreateTracks (SConstScopedObject &object, ISGDataSourceContext *ds_context, CRenderingContext *r_cntx, const SExtraParams &params=SExtraParams(), const TAnnotMetaDataList &src_annots=TAnnotMetaDataList()) const =0
 create layout tracks based on input object and extra parameters. More...
 
virtual void GetMatchedAnnots (const TAnnotMetaDataList &, const ILayoutTrackFactory::SExtraParams &, TAnnotNameTitleMap &) const
 
virtual void CloneTrack (const CLayoutTrack *, CTempTrackProxy *) const
 duplicate any track setting from a given track instance to a proxy. More...
 
virtual ~ILayoutTrackFactory ()
 
virtual bool UnderstandLevel () const =0
 Have any concept of level. More...
 
virtual bool SupportsExportToAsn1 () const
 
virtual bool NeedBackgroundInit () const =0
 Background track initialization. More...
 
virtual const CTrackTypeInfoGetThisTypeInfo () const =0
 

Static Public Member Functions

static void GetMatchedAnnots (const TAnnotMetaDataList &src_annots, const vector< string > &target_annots, const string &annot_type, const string &track_type, TAnnotNameTitleMap &out_annots)
 Help function to find matched annotations. More...
 
static string MergeAnnotAndFilter (const string &annot, const string &filter)
 create a new name based on annotation name and fitler string. More...
 
static string ExtractAnnotName (const string &source)
 extract anntation name from a source string. More...
 
static string ExtractFilterName (const string &source)
 extract filter name from a source string. More...
 

Detailed Description

ILayoutTrackFactory.

Definition at line 83 of file layout_track.hpp.

Member Typedef Documentation

◆ TAnnotMetaDataList

Definition at line 95 of file layout_track.hpp.

◆ TAnnotNameTitleMap

List of annotations with the corresponding titles.

Definition at line 93 of file layout_track.hpp.

◆ TTrackMap

the tracks holding a list of annotation name and track pair.

for those tracks that don't have annotation concept or no need to separate annotations, the key can be just the same as the track's name.

Definition at line 90 of file layout_track.hpp.

Constructor & Destructor Documentation

◆ ~ILayoutTrackFactory()

virtual ILayoutTrackFactory::~ILayoutTrackFactory ( )
inlinevirtual

Definition at line 260 of file layout_track.hpp.

Member Function Documentation

◆ CloneTrack()

virtual void ILayoutTrackFactory::CloneTrack ( const CLayoutTrack ,
CTempTrackProxy  
) const
inlinevirtual

duplicate any track setting from a given track instance to a proxy.

by default, it does nothing.

Reimplemented in CFeatureTrackFactory.

Definition at line 257 of file layout_track.hpp.

Referenced by CTrackContainer::CloneTrack().

◆ CreateTracks()

virtual TTrackMap ILayoutTrackFactory::CreateTracks ( SConstScopedObject object,
ISGDataSourceContext ds_context,
CRenderingContext r_cntx,
const SExtraParams params = SExtraParams(),
const TAnnotMetaDataList src_annots = TAnnotMetaDataList() 
) const
pure virtual

◆ ExtractAnnotName()

string ILayoutTrackFactory::ExtractAnnotName ( const string source)
static

extract anntation name from a source string.

Definition at line 992 of file layout_track_impl.cpp.

References kFilterSeparator, and rapidjson::source.

Referenced by CTrackContainer::AddTracks().

◆ ExtractFilterName()

string ILayoutTrackFactory::ExtractFilterName ( const string source)
static

extract filter name from a source string.

Definition at line 1002 of file layout_track_impl.cpp.

References kEmptyStr, kFilterSeparator, and rapidjson::source.

Referenced by CTrackContainer::AddTracks().

◆ GetMatchedAnnots() [1/2]

virtual void ILayoutTrackFactory::GetMatchedAnnots ( const TAnnotMetaDataList ,
const ILayoutTrackFactory::SExtraParams ,
TAnnotNameTitleMap  
) const
inlinevirtual

◆ GetMatchedAnnots() [2/2]

void ILayoutTrackFactory::GetMatchedAnnots ( const TAnnotMetaDataList src_annots,
const vector< string > &  target_annots,
const string annot_type,
const string track_type,
TAnnotNameTitleMap out_annots 
)
static

Help function to find matched annotations.

Parameters
src_annotsis a list of known existing annotations served as source annotations. Annotation type and track type may or may not be set. It works together with target_annots.
target_annotsis the original wanted annotation. The final output annotation will be found within the intersection set between src_annots and target_annots
annot_typetargeted annotation type. If empty, it is ignored.
track_typetargeted track type. If empty, it is ignored.
out_annotsoutput annotation list. The current implementation only consider named annotations. It may be extended to include any other annotations.

Definition at line 920 of file layout_track_impl.cpp.

References map_checker< Container >::end(), NStr::EqualNocase(), map_checker< Container >::find(), map_checker< Container >::insert(), set< Key, Compare >::insert(), CSeqUtils::IsNAA(), ITERATE, and NStr::ToLower().

Referenced by CGeneModelFactory::CreateTracks(), CBinsTrackFactory::GetMatchedAnnots(), CHapmapTrackFactory::GetMatchedAnnots(), CLDBlockTrackFactory::GetMatchedAnnots(), CSnpTrackFactory::GetMatchedAnnots(), CAggregateFeatureTrackFactory::GetMatchedAnnots(), CVarTrackFactory::GetMatchedAnnots(), CEpigenomicsTrackFactory::GetMatchedAnnots(), CFeatureTrackFactory::GetMatchedAnnots(), CGraphTrackFactory::GetMatchedAnnots(), CSequenceTrackFactory::GetMatchedAnnots(), CAlignmentTrackFactory::GetMatchedAnnots(), CGeneModelFactory::GetMatchedAnnots(), and CTrackContainer::x_ReinitNATrack().

◆ GetThisTypeInfo()

virtual const CTrackTypeInfo& ILayoutTrackFactory::GetThisTypeInfo ( ) const
pure virtual

◆ MergeAnnotAndFilter()

string ILayoutTrackFactory::MergeAnnotAndFilter ( const string annot,
const string filter 
)
static

create a new name based on annotation name and fitler string.

Definition at line 981 of file layout_track_impl.cpp.

References kFilterSeparator.

Referenced by CTrackContainer::AddTracks(), CTrackContainer::SyncSettings(), CTrackContainer::x_ConvertToContainer(), and CGeneModelFactory::x_CreateTracksWithFilters().

◆ NeedBackgroundInit()

virtual bool ILayoutTrackFactory::NeedBackgroundInit ( ) const
pure virtual

◆ SupportsExportToAsn1()

virtual bool ILayoutTrackFactory::SupportsExportToAsn1 ( ) const
inlinevirtual

Reimplemented in CGeneModelFactory, CFeatureTrackFactory, and CSnpTrackFactory.

Definition at line 272 of file layout_track.hpp.

◆ UnderstandLevel()

virtual bool ILayoutTrackFactory::UnderstandLevel ( ) const
pure virtual

The documentation for this class was generated from the following files:
Modified on Fri Jan 05 07:26:08 2024 by modify_doxy.py rev. 669887