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 47518 2023-06-28 19:07:51Z 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 DECLARE_FUNC_CLASS_WITH_FNCNAME(CMacroFunction_LocationLength)
54 
55 enum class ELocEndType { eStart, eStop };
56 
58 {
59 public:
61  : IEditMacroFunction(func_scope), m_TestCase(testcase) {}
62 
63  virtual void TheFunction();
64  static const char* sm_PartialStart;
65  static const char* sm_PartialStop;
66 protected:
67  virtual bool x_ValidArguments() const;
69 };
70 
72 {
73 public:
75  : IEditMacroFunction(func_scope), m_TestCase(testcase) {}
76 
77  virtual void TheFunction();
78  static const char* sm_Start;
79  static const char* sm_Stop;
80 protected:
81  virtual bool x_ValidArguments() const;
83 };
84 
86 {
87 public:
89  : IEditMacroFunction(func_scope) {}
90 
91  virtual void TheFunction();
93 protected:
94  virtual bool x_ValidArguments() const;
95  bool x_Match(const objects::CSeq_loc& loc, const objects::CLocation_constraint& loc_cons);
96 };
97 
99 {
100 public:
103  : IEditMacroFunction(func_scope), m_Seqtype(seq_type) {}
104 
105  virtual void TheFunction();
106  static objects::CSeq_loc* s_GetLocation(const string& field_name, CIRef<IMacroBioDataIter> iter);
107  static const char* sm_SeqNa;
108  static const char* sm_SeqAa;
109 
110 protected:
111  virtual bool x_ValidArguments() const;
113 };
114 
116 {
117 public:
119  : IEditMacroFunction(func_scope), m_TestCase(testcase) {}
120 
121  virtual void TheFunction();
122  static const char* sm_FromStart;
123  static const char* sm_FromStop;
124 protected:
125  virtual bool x_ValidArguments() const;
127 };
128 
129 
130 
131 END_SCOPE(macro)
133 
134 /* @} */
135 
136 #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 Fri Sep 20 14:57:26 2024 by modify_doxy.py rev. 669887