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

Go to the SVN repository for this file.

1 #ifndef GUI_OBJUTILS___MACRO_FN_LOC_CONSTR__HPP
2 #define GUI_OBJUTILS___MACRO_FN_LOC_CONSTR__HPP
3 /* $Id: macro_fn_loc_constr.hpp 46732 2021-09-17 18:35:37Z 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: Andrea Asztalos
29  *
30  * File Description:
31  * Macro constraint functions related to locations
32  *
33  */
34 
35 /// @file macro_fn_loc_constr.hpp
36 
40 
41 /** @addtogroup GUI_MACRO_SCRIPTS_UTIL
42  *
43  * @{
44  */
45 
47 BEGIN_SCOPE(macro)
48 
49 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_LocationStrand)
50 
51 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_LocationStrandSymbol)
52 
53 enum class ELocEndType { eStart, eStop };
54 
56 {
57 public:
59  : IEditMacroFunction(func_scope), m_TestCase(testcase) {}
60 
61  virtual void TheFunction();
62  static const char* sm_PartialStart;
63  static const char* sm_PartialStop;
64 protected:
65  virtual bool x_ValidArguments() const;
67 };
68 
70 {
71 public:
73  : IEditMacroFunction(func_scope), m_TestCase(testcase) {}
74 
75  virtual void TheFunction();
76  static const char* sm_Start;
77  static const char* sm_Stop;
78 protected:
79  virtual bool x_ValidArguments() const;
81 };
82 
84 {
85 public:
87  : IEditMacroFunction(func_scope) {}
88 
89  virtual void TheFunction();
91 protected:
92  virtual bool x_ValidArguments() const;
93  bool x_Match(const objects::CSeq_loc& loc, const objects::CLocation_constraint& loc_cons);
94 };
95 
97 {
98 public:
101  : IEditMacroFunction(func_scope), m_Seqtype(seq_type) {}
102 
103  virtual void TheFunction();
104  static objects::CSeq_loc* s_GetLocation(const string& field_name, CIRef<IMacroBioDataIter> iter);
105  static const char* sm_SeqNa;
106  static const char* sm_SeqAa;
107 
108 protected:
109  virtual bool x_ValidArguments() const;
111 };
112 
114 {
115 public:
117  : IEditMacroFunction(func_scope), m_TestCase(testcase) {}
118 
119  virtual void TheFunction();
120  static const char* sm_FromStart;
121  static const char* sm_FromStop;
122 protected:
123  virtual bool x_ValidArguments() const;
125 
126 };
127 
128 END_SCOPE(macro)
130 
131 /* @} */
132 
133 #endif // GUI_OBJUTILS___MACRO_FN_LOC_CONSTR__HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
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.
virtual void TheFunction()=0
Function implementation.
static const char * sm_Stop
DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_SetPubAuthorMI)
static const char * sm_SeqNa
class CMacroFunction_LocationSeqType IS_SEQ_AA(["location"]) - returns true if the sequence identifie...
static const char * sm_PartialStart
class CMacroFunction_LocPartialTest - tests whether the location is 5'/3' partial ISPARTIALSTART() - ...
static const char * sm_FromStart
class CMacroFunction_LocationDistConstraint DISTFROMSTART() [>][=][<] distance DISTFROMSTOP()
static CTempString GetFuncName()
CMacroFunction_LocationType(EScopeEnum func_scope)
CMacroFunction_LocationDistConstraint(EScopeEnum func_scope, ELocEndType testcase)
CMacroFunction_LocPartialTest(EScopeEnum func_scope, ELocEndType testcase)
objects::ESeqtype_constraint m_Seqtype
CMacroFunction_LocEnd(EScopeEnum func_scope, ELocEndType testcase)
CMacroFunction_LocationSeqType(EScopeEnum func_scope, const objects::ESeqtype_constraint &seq_type=objects::eSeqtype_constraint_any)
virtual bool x_ValidArguments() const =0
Tests the number and the type of function arguments.
static const char * sm_Start
class CMacroFunction_LocEnd Start() and Stop() - return the positional extremes of a location
#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
ESeqtype_constraint
Access to ESeqtype_constraint's attributes (values, names) as defined in spec.
@ eSeqtype_constraint_any
Modified on Sun Mar 03 03:11:51 2024 by modify_doxy.py rev. 669887