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 42615 2019-03-26 18:58:57Z 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,
63  CTrackContainer* parent, CTempTrackProxy* params,
64  const ILayoutTrackFactory::SExtraParams& extra_param);
65 
66  /// retrieve a list of annotations with their meta data.
67  void GetAnnotMetaData(const string& desc);
68  void GetAssemblies(const string& seqAcc);
69 
70  void SetDSContext(ISGDataSourceContext* ds_context);
71  void SetRenderingContext(CRenderingContext* r_cntx);
72  void SetAssembly(const string& assembly);
73  const string& GetAssembly() const { return m_Assembly; }
74  void SetTMSContext(const string& tms_context);
75  void SetUseEUtils(bool use);
76  virtual bool AllJobsFinished() const;
77 
78 private:
79  /// @name Forbidden methods
80  /// @{
83  /// @}
84 
85 private:
88 
89  string m_Assembly;
90  string m_TMSContext;
92 
93  /// job id for annot meta-data job id.
95 };
96 
97 ///////////////////////////////////////////////////////////////////////////////
98 /// CFeaturePanelDSType
99 ///
101  public CObject,
102  public ISGDataSourceType,
103  public IExtension
104 {
105 public:
106  /// create an instance of the layout track type using default settings.
107  virtual ISGDataSource* CreateDS(SConstScopedObject& object) const;
108 
109  /// @name IExtension interface implementation
110  /// @{
111  virtual string GetExtensionIdentifier() const;
112  virtual string GetExtensionLabel() const;
113  /// @}
114 
115  /// check if the data source can be shared.
116  virtual bool IsSharable() const;
117 };
118 
119 
120 ///////////////////////////////////////////////////////////////////////////////
121 /// CTrackInitJobResult
122 ///
124 {
125 public:
127 
131  string m_Desc;
132 };
133 
134 ///////////////////////////////////////////////////////////////////////////////
135 /// CAnnotMetaDataJobResult
136 ///
138 {
139 public:
141 
143 
145 };
146 
147 ///////////////////////////////////////////////////////////////////////////////
148 /// CAnnotMetaDataJobResult
149 ///
151 {
152 public:
154 
155  list<CRef<objects::CGC_Assembly> > m_Assemblies;
156 };
157 
158 
159 ///////////////////////////////////////////////////////////////////////////////
160 /// CFeaturePanelDS inline methods
161 ///
162 inline
164 {
165  return m_MetaDataJob != -1 && m_MetaDataJob == id;
166 }
167 
168 inline
170 {
171  m_DSContext.Reset(ds_context);
172 }
173 
174 inline
176 {
177  m_RenderingCntx = r_cntx;
178 }
179 
180 
182 
183 #endif // GUI_WIDGETS_SEQ_GRAPHIC___FEATURE_PANEL_DS__HPP
CAnnotMetaDataJobResult.
TAnnotMetaDataList m_Annots
ILayoutTrackFactory::TAnnotMetaDataList TAnnotMetaDataList
CFeaturePanelDSType.
CFeaturePanelDS.
CIRef< ISGDataSourceContext > m_DSContext
CRenderingContext * m_RenderingCntx
CFeaturePanelDS(objects::CScope &scope, const objects::CSeq_id &id)
TJobID m_MetaDataJob
job id for annot meta-data job id.
void SetDSContext(ISGDataSourceContext *ds_context)
ILayoutTrackFactory::TAnnotMetaDataList TAnnotMetaDataList
bool IsMetaDataJob(TJobID id) const
CFeaturePanelDS inline methods.
CFeaturePanelDS & operator=(const CFeaturePanelDS &)
CFeaturePanelDS(const CFeaturePanelDS &)
void SetRenderingContext(CRenderingContext *r_cntx)
const string & GetAssembly() const
CAnnotMetaDataJobResult.
list< CRef< objects::CGC_Assembly > > m_Assemblies
CObject –.
Definition: ncbiobj.hpp:180
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
CAppJobDispatcher::TJobID TJobID
virtual bool AllJobsFinished() const
File Description:
CTrackContainer - a track container in the form of layout track.
CTrackInitJobResult.
CTrackContainer * m_ParentTrack
ILayoutTrackFactory::TTrackMap m_Tracks
CRef< CTempTrackProxy > m_TrackParams
IExtension IExtension interface represents an abstract pluggable component.
Definition: extension.hpp:57
ILayoutTrackFactory.
ISGDSManager is seqgraphic data source manage that serves as an data source context.
ISGDataSourceFactory.
File Description:
Definition: map.hpp:338
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
Definition: gui_export.h:536
extra parameter for initializing a track.
Modified on Thu May 02 14:34:15 2024 by modify_doxy.py rev. 669887