NCBI C++ ToolKit
feature_panel_ds.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___FEATURE_PANEL_DS__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___FEATURE_PANEL_DS__HPP
3 
4 /* $Id: feature_panel_ds.hpp 38370 2017-04-28 20:28:19Z katargir $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Liangshou Wu
30  *
31  * File Description:
32  *
33  */
34 
39 
41 
42 class CRenderingContext;
43 class CTrackContainer;
44 
45 
46 ///////////////////////////////////////////////////////////////////////////////
47 /// CFeaturePanelDS
48 ///
50  public CSGGenBankDS
51 {
52 public:
54 
55  CFeaturePanelDS(objects::CScope& scope, const objects::CSeq_id& id);
56  ~CFeaturePanelDS();
57 
58  bool IsMetaDataJob(TJobID id) const;
59  void DeleteMetaDataJob();
60  void ClearMetaDataJobId();
61 
62  void CreateTrack(const string& desc, const ILayoutTrackFactory* factory,
64  const ILayoutTrackFactory::SExtraParams& extra_param);
65 
66  /// retrieve a list of annotations with their meta data.
67  void GetAnnotMetaData(const string& desc);
68 
69  void SetDSContext(ISGDataSourceContext* ds_context);
70  void SetRenderingContext(CRenderingContext* r_cntx);
71  void SetAssembly(const string& assembly);
72  void SetTMSContext(const string& tms_context);
73  virtual bool AllJobsFinished() const;
74 
75 private:
76  /// @name Forbidden methods
77  /// @{
80  /// @}
81 
82 private:
85 
86  string m_Assembly;
87  string m_TMSContext = "GBench_2-0";
88 
89  /// job id for annot meta-data job id.
91 };
92 
93 ///////////////////////////////////////////////////////////////////////////////
94 /// CFeaturePanelDSType
95 ///
97  public CObject,
98  public ISGDataSourceType,
99  public IExtension
100 {
101 public:
102  /// create an instance of the layout track type using default settings.
103  virtual ISGDataSource* CreateDS(SConstScopedObject& object) const;
104 
105  /// @name IExtension interface implementation
106  /// @{
107  virtual string GetExtensionIdentifier() const;
108  virtual string GetExtensionLabel() const;
109  /// @}
110 
111  /// check if the data source can be shared.
112  virtual bool IsSharable() const;
113 };
114 
115 
116 ///////////////////////////////////////////////////////////////////////////////
117 /// CTrackInitJobResult
118 ///
120 {
121 public:
123 
127  string m_Desc;
128 };
129 
130 ///////////////////////////////////////////////////////////////////////////////
131 /// CAnnotMetaDataJobResult
132 ///
134 {
135 public:
137 
139 
140  TAnnotMetaDataList m_Annots;
141 };
142 
143 ///////////////////////////////////////////////////////////////////////////////
144 /// CFeaturePanelDS inline methods
145 ///
146 inline
148 {
149  return m_MetaDataJob != -1 && m_MetaDataJob == id;
150 }
151 
152 inline
154 {
155  m_DSContext.Reset(ds_context);
156 }
157 
158 inline
160 {
161  m_RenderingCntx = r_cntx;
162 }
163 
164 
166 
167 #endif // GUI_WIDGETS_SEQ_GRAPHIC___FEATURE_PANEL_DS__HPP
CAnnotMetaDataJobResult.
CRenderingContext * m_RenderingCntx
virtual bool IsSharable() const =0
check if the data source can be shared.
ILayoutTrackFactory::TAnnotMetaDataList TAnnotMetaDataList
ILayoutTrackFactory.
TAnnotMetaDataList m_Annots
extra parameter for initializing a track.
File Description:
CTrackContainer * m_ParentTrack
File Description:
TJobID m_MetaDataJob
job id for annot meta-data job id.
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
ILayoutTrackFactory::TTrackMap m_Tracks
virtual bool AllJobsFinished() const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
ISGDataSourceFactory.
CAppJobDispatcher::TJobID TJobID
virtual string GetExtensionIdentifier() const =0
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
CFeaturePanelDS.
Definition: map.hpp:337
CTrackContainer - a track container in the form of layout track.
CRef< CTempTrackProxy > m_TrackParams
CFeaturePanelDSType.
CObject –.
Definition: ncbiobj.hpp:180
CSGGenBankDS & operator=(const CSGGenBankDS &)
virtual string GetExtensionLabel() const =0
returns a displayable label for this extension ( please capitalize the key words - "My Extension" ) ...
void SetRenderingContext(CRenderingContext *r_cntx)
virtual ISGDataSource * CreateDS(SConstScopedObject &object) const =0
create an instance of the layout track type using default settings.
CTrackInitJobResult.
IExtension IExtension interface represents an abstract pluggable component.
Definition: extension.hpp:56
void SetDSContext(ISGDataSourceContext *ds_context)
ILayoutTrackFactory::TAnnotMetaDataList TAnnotMetaDataList
bool IsMetaDataJob(TJobID id) const
CFeaturePanelDS inline methods.
ISGDSManager is seqgraphic data source manage that serves as an data source context.
static std::unique_ptr< CParams > params
Definition: wgs_params.cpp:491
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
Definition: gui_export.h:534
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:768
CIRef< ISGDataSourceContext > m_DSContext
Modified on Tue Jan 16 15:39:26 2018 by modify_doxy.py rev. 546573