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

Go to the SVN repository for this file.

1 #ifndef GUI_OBJUTILS___MACRO_FN_WHERE__HPP
2 #define GUI_OBJUTILS___MACRO_FN_WHERE__HPP
3 /* $Id: macro_fn_where.hpp 45397 2020-07-21 20:53:19Z asztalos $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Anatoly Osipov, Andrea Asztalos
29  *
30  * File Description: Macro functions used in the WHERE clause
31  *
32  */
33 
34 /// @file macro_fn_where.hpp
35 
37 
38 /** @addtogroup GUI_MACRO_SCRIPTS_UTIL
39  *
40  * @{
41  */
42 
44 BEGIN_SCOPE(macro)
45 
46 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_ChoiceType)
47 
48 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_Features_For_Object)
49 
50 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_RelatedFeatures)
51 
52 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_CDSTranslation)
53 
54 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_SeqID)
55 
56 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_Accession)
57 
58 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_InconsistentTaxa)
59 
60 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_StringLength)
61 
62 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_StructCommField)
63 
64 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_StructCommDatabase)
65 
66 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_StructCommFieldname)
67 
68 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_GetDBLink)
69 
70 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_InTable)
71 
72 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_Contained)
73 
74 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_GetDBXref)
75 
76 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_IllegalDbXref)
77 
78 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_StructVoucherPart)
79 
80 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_GeneType)
81 
82 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_Label)
83 
84 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_VariationType)
85 
86 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_RefAllele)
87 
88 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_AltAlleles)
89 
90 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_Consequence)
91 
92 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_SnpID)
93 
94 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_VcfSevenCol)
95 
97 {
98 public:
100  : IEditMacroFunction(func_scope) {}
101 
102  virtual void TheFunction();
104 protected:
105  virtual bool x_ValidArguments() const;
106  void x_IsSimpleTypePresent(const string& field_name);
107  void x_IsContainerElementPresent(const string& container, const string& field_name);
108 };
109 
111 {
112 public:
113  CMacroFunction_GetSeqdesc(EScopeEnum func_scope, objects::CSeqdesc::E_Choice type)
114  : IEditMacroFunction(func_scope), m_SeqdescType(type) {}
115 
116  virtual void TheFunction();
117  static const char* sm_BsrcForMolinfo;
118  static const char* sm_MolinfoForBsrc;
119  static const char* sm_BsrcForSeq;
120  static const char* sm_BsrcForFeat;
121  static const char* sm_MolinfoForFeat;
122  static const char* sm_BsrcForSeqdesc;
123 
124 protected:
125  virtual bool x_ValidArguments() const;
126  objects::CSeqdesc::E_Choice m_SeqdescType;
127 };
128 
129 
131 {
132 public:
134  : IEditMacroFunction(func_scope) {}
135 
136  virtual void TheFunction();
137  static const char* sm_SeqForDescr;
138  static const char* sm_SeqForFeat;
139 
140 protected:
141  virtual bool x_ValidArguments() const;
142 };
143 
145 {
146 public:
147  CMacroFunction_FirstOrLastItem(EScopeEnum func_scope, bool first_item)
148  : IEditMacroFunction(func_scope), m_First(first_item) {}
149 
150  virtual void TheFunction();
151  static const char* sm_First;
152  static const char* sm_Last;
153 
154 protected:
155  virtual bool x_ValidArguments() const;
156  bool m_First;
157 };
158 
159 
160 END_SCOPE(macro)
162 
163 /* @} */
164 
165 #endif // GUI_OBJUTILS___MACRO_FN_WHERE__HPP
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
Base class for any user function that performs editing operations on ASN.1 data.
static const char * sm_BsrcForSeq
virtual void TheFunction()=0
Function implementation.
DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_SetPubAuthorMI)
static CTempString GetFuncName()
static const char * sm_BsrcForSeqdesc
static const char * sm_SeqForFeat
objects::CSeqdesc::E_Choice m_SeqdescType
static const char * sm_SeqForDescr
class CMacroFunction_Sequence_For_Seqdesc SEQUENCE_FOR_SEQDESC(field_name) SEQUENCE_FOR_SEQFEAT(field...
static const char * sm_MolinfoForFeat
static const char * sm_First
CMacroFunction_FirstItem FIRSTOF(objects) - returns the first item from the list of objects LASTOF(ob...
static const char * sm_BsrcForFeat
CMacroFunction_IsPresent(EScopeEnum func_scope)
static const char * sm_BsrcForMolinfo
class CMacroFunction_GetSeqdesc BIOSOURCE_FOR_MOLINFO(field_name) or BIOSOURCE_FOR_MOLINFO(container,...
CMacroFunction_GetSequence(EScopeEnum func_scope)
CMacroFunction_FirstOrLastItem(EScopeEnum func_scope, bool first_item)
virtual bool x_ValidArguments() const =0
Tests the number and the type of function arguments.
CMacroFunction_GetSeqdesc(EScopeEnum func_scope, objects::CSeqdesc::E_Choice type)
static const char * sm_MolinfoForBsrc
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_GUIOBJUTILS_EXPORT
Definition: gui_export.h:512
Definition: type.c:6
Modified on Fri Feb 23 11:48:37 2024 by modify_doxy.py rev. 669887