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

Go to the SVN repository for this file.

1 #ifndef GUI_OBJUTILS___MACRO_FN_SEQ_CONSTR__HPP
2 #define GUI_OBJUTILS___MACRO_FN_SEQ_CONSTR__HPP
3 /* $Id: macro_fn_seq_constr.hpp 46800 2021-10-18 18:02:34Z 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: Macro functions implementing sequence constraints
31  *
32  */
33 
34 /// @file macro_fn_seq_constr.hpp
35 
38 /** @addtogroup GUI_MACRO_SCRIPTS_UTIL
39  *
40  * @{
41  */
42 
44 BEGIN_SCOPE(macro)
45 
47 {
48 public:
50  : IEditMacroFunction(func_scope) {}
51 
53  virtual void TheFunction();
55 protected:
56  virtual bool x_ValidArguments() const;
57  objects::EFeature_strandedness_constraint x_GetStrandednessFromName(const string& strand_name);
58  bool x_Match(const objects::CBioseq_Handle& bsh, objects::EFeature_strandedness_constraint strandedness);
59 };
60 
62 {
63 public:
65  : IEditMacroFunction(func_scope) {}
66 
68  virtual void TheFunction();
69 
70  /// returns the number of features of type feat_type present on the bioseq
71  static int s_GetFeatTypeCount(const objects::CBioseq_Handle& bsh, const string& feat_type);
73 protected:
74  virtual bool x_ValidArguments() const;
75 };
76 
77 END_SCOPE(macro)
79 
80 /* @} */
81 
82 #endif // GUI_OBJUTILS___MACRO_FN_SEQ_CONSTR__HPP
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.
CMacroFunction_NumberOfFeatures(EScopeEnum func_scope)
CMacroFunction_FeatStrandednessConstraint(EScopeEnum func_scope)
static CTempString GetFuncName()
virtual bool x_ValidArguments() const =0
Tests the number and the type of function arguments.
#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
EFeature_strandedness_constraint
Access to EFeature_strandedness_constraint's attributes (values, names) as defined in spec.
Modified on Wed Sep 04 15:04:00 2024 by modify_doxy.py rev. 669887