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

Go to the SVN repository for this file.

1 #ifndef GUI_SERVICES___VCF_SEARCH_TOOL_HPP
2 #define GUI_SERVICES___VCF_SEARCH_TOOL_HPP
3 
4 /* $Id: vcf_search_tool.hpp 45881 2021-01-05 03:10:02Z rudnev $
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: Andrey Yazhuk
30  *
31  * File Description:
32  *
33  */
34 
37 
38 
39 class wxTextCtrl;
40 class wxComboBox;
41 class wxChoice;
42 
44 
45 
46 /** @addtogroup GUI_PKG_SEQUENCE
47  *
48  * @{
49  */
50 
51 ///////////////////////////////////////////////////////////////////////////////
52 /// CVcfSearchTool
54 {
55 public:
57 
58  /// @name IUITool implementation
59  /// @{
60  virtual IUITool* Clone() const;
61  virtual string GetName() const;
62  virtual string GetDescription() const;
63  /// @}
64 
65  /// @name IDMSearchTool implementation
66  /// @{
69  /// @}
70 
71  /// @name IExtension implementation
72  /// @{
73  virtual string GetExtensionIdentifier() const;
74  virtual string GetExtensionLabel() const;
75  /// @}
76 
77 protected:
78  /// implementing CSearchToolBase pure virtual function
80 };
81 
82 
83 ///////////////////////////////////////////////////////////////////////////////
84 /// CVcfSearchQuery
86  public CObject,
87  public IDMSearchQuery
88 {
89 public:
90  CVcfSearchQuery(vector<ISeqLocSearchContext*> VcfContexts, const string& ids);
91  const vector<ISeqLocSearchContext*>& GetVcfContexts() const { return m_VcfContexts; }
92 
93  string GetIds() const { return m_Ids; }
94 
95  virtual string ToString() const { return GetIds(); }
96 
97 protected:
98  vector<ISeqLocSearchContext*> m_VcfContexts;
99  string m_Ids;
100 };
101 
102 
103 ///////////////////////////////////////////////////////////////////////////////
104 /// CVcfSearchForm
105 class CComboBox;
106 
108 {
109 public:
111 
112  /// @name IDMSearchForm implementation
113  /// @{
114  virtual void Create();
115  virtual void Init();
116  virtual void Update();
117  /// @}
118 
120  virtual wxSizer * GetWidget(wxWindow * parent);
121  virtual void UpdateContexts();
122 protected:
123  /// @name CSearchFormBase overridables
124  /// @{
125  //virtual string x_GetRunningText();
126  virtual void x_CreateWidgets();
127 
128 // virtual void x_UpdateData(EDDXDirection dir);
129 
130  virtual IDMSearchTool* x_GetTool();
131  /// @}
132 
133 
134 protected:
135  virtual void x_LoadSettings(const CRegistryReadView& /*view*/) {}
136  virtual void x_SaveSettings(CRegistryWriteView /*view*/) const {}
137 
139  wxChoice* m_DbCombo;
140 };
141 
142 
143 ///////////////////////////////////////////////////////////////////////////////
144 /// CVcfSearchJob
145 ///
147 {
148 public:
150 
151 protected:
152 
153  /// @name CSearchJobBase overridables
154  /// @{
155  virtual bool x_ValidateParams();
156  virtual EJobState x_DoSearch();
157  virtual void x_SetupColumns(CObjectList& obj_list);
158  /// @}
159 
160 protected:
162 };
163 
164 
165 /* @} */
166 
168 
169 #endif // GUI_SERVICES___VCF_SEARCH_TOOL_HPP
CObjectList Data structure representing a list of CObjects with associated Scopes and other optional ...
Definition: object_list.hpp:63
CObject –.
Definition: ncbiobj.hpp:180
CRef –.
Definition: ncbiobj.hpp:618
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
CSearchFormBase.
CSearchJobBase.
CSearchToolBase.
CVcfSearchJob.
CVcfSearchQuery.
CVcfSearchTool.
IDMSearchQuery - abstract data mining query.
IDMSearchTool interface representing a single search tool in Data Mining Service.
IDataMiningContext IDataMiningContext represents an abstract context for a Search.
IUITool represents an abstract algorithm that is bound to a UI component.
Definition: ui_tool.hpp:59
virtual CIRef< IDMSearchQuery > ConstructQuery()
virtual void Create()
virtual void x_LoadSettings(const CRegistryReadView &)
wxChoice * m_DbCombo
string GetIds() const
CVcfSearchForm(CVcfSearchTool &tool)
CVcfSearchForm.
virtual void Update()
CRef< CVcfSearchQuery > m_Query
virtual void x_CreateWidgets()
virtual void Init()
virtual void x_SetupColumns(CObjectList &obj_list)
add custom columns if needed
virtual CRef< CSearchJobBase > x_CreateJob(IDMSearchQuery &query)
implementing CSearchToolBase pure virtual function
CRef< CVcfSearchTool > m_Tool
virtual wxSizer * GetWidget(wxWindow *parent)
return a widget associated with the form; the form controls the lifetime of the widget (do not delete...
virtual string GetDescription() const
returns a detailed description of the method that is used in UI
virtual void x_SaveSettings(CRegistryWriteView) const
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual IDMSearchTool * x_GetTool()
CVcfSearchJob(CVcfSearchQuery &query)
CVcfSearchJob.
virtual string GetName() const
returns unique name of the method that is used in UI to identify it
CVcfSearchQuery(vector< ISeqLocSearchContext * > VcfContexts, const string &ids)
CVcfSearchQuery.
virtual CIRef< IDMSearchForm > CreateSearchForm()
factory method for creating a form representing the tool
vector< ISeqLocSearchContext * > m_VcfContexts
virtual EJobState x_DoSearch()
performs searching, assuming that params are correct; Implement in derived classes
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual bool IsCompatible(IDataMiningContext *context)
retuns true if the tool is compatible with the provided Search Context
const vector< ISeqLocSearchContext * > & GetVcfContexts() const
virtual string ToString() const
Prepare a string representation of a query (for logging and debugging)
virtual bool x_ValidateParams()
returns true if Job params are correct, implement in derived classes
virtual IUITool * Clone() const
CVcfSearchTool()
IDMSearchTool.
virtual void UpdateContexts()
updates m_ContextCombo
EJobState
Job states (describe FSM)
Definition: app_job.hpp:86
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static string query
static CS_CONTEXT * context
Definition: will_convert.c:21
Modified on Wed Apr 24 14:14:21 2024 by modify_doxy.py rev. 669887