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

Go to the SVN repository for this file.

1 /* $Id: Gb_qual.hpp 82939 2018-07-17 17:55:27Z bollin $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  */
27 
28 /// @Gb_qual.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'seqfeat.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: Gb_qual_.hpp
37 
38 
39 #ifndef OBJECTS_SEQFEAT_GB_QUAL_HPP
40 #define OBJECTS_SEQFEAT_GB_QUAL_HPP
41 
42 
43 // generated includes
45 
46 // generated classes
47 
48 // other includes
49 #include <corelib/ncbistd.hpp>
50 #include <corelib/ncbistr.hpp>
51 #include <serial/iterator.hpp>
52 #include <util/static_map.hpp>
53 
54 
56 
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 /////////////////////////////////////////////////////////////////////////////
61 {
63 public:
64  // constructors
65  CGb_qual(void);
66  CGb_qual(const TQual& qual, const TVal& val);
67 
68  // destructor
69  ~CGb_qual(void);
70 
71  int Compare(const CGb_qual& gbqual) const;
72 
73  static void ParseExperiment(const string& orig, string& category, string& experiment, string& doi);
74  static string BuildExperiment(const string& category, const string& experiment, const string& doi);
75 
76  static bool CleanupRptUnitSeq(string& val);
77  static bool CleanupReplace(string& val);
78  static bool CleanupRptUnitRange(string& val);
79 
80  // for rpt_type qualifiers
82  static const TLegalRepeatTypeSet &GetSetOfLegalRepeatTypes(void);
83  static bool IsValidRptTypeValue(const string& val);
84  static bool FixRptTypeValue(string& val);
85 
86  // for pseudogene qualifiers
88  static const TLegalPseudogeneSet &GetSetOfLegalPseudogenes(void);
89  static bool IsValidPseudogeneValue(const string& val);
90  static bool FixPseudogeneValue(string& val);
91 
92  // for misc_recomb qualifiers
94  static const TLegalRecombinationClassSet &GetSetOfLegalRecombinationClassValues(void);
95  static bool FixRecombinationClassValue(string& val);
96 
97  static bool IsLegalMobileElementValue(const string& val);
98  static void GetMobileElementValueElements(const string& val, string& element_type, string& element_name);
99  static bool FixMobileElementValue(string& val);
100 
101  static bool IsIllegalQualName(const string& val);
102 
103  // for inference qualifiers
104  static void ParseInferenceString(string val, string &category, string &type_str, bool &is_same_species, string &database,
105  string &accession, string &program, string &version, string &acc_list);
106 
107  static string CleanupAndRepairInference( const string &orig_inference );
108 
109  static bool IsLegalInferenceDatabase(const string& db);
110 
111 
112 private:
113  // Prohibit copy constructor and assignment operator
116 
117  static bool x_CleanupRptAndReplaceSeq(string& val);
118 
119 };
120 
121 /////////////////// CGb_qual inline methods
122 
123 // constructor
124 inline
126 {
127 }
128 
129 inline
130 CGb_qual::CGb_qual(const TQual& qual, const TVal& val)
131 {
132  SetQual(qual);
133  SetVal(val);
134 }
135 
136 
137 inline
138 int CGb_qual::Compare(const CGb_qual& gbqual) const
139 {
140  if (GetQual() != gbqual.GetQual()) {
141  return (GetQual() < gbqual.GetQual() ? -1 : 1);
142  }
143  if (GetVal() != gbqual.GetVal()) {
144  return (GetVal() < gbqual.GetVal() ? -1 : 1);
145  }
146  return 0;
147 }
148 
149 
150 /////////////////// end of CGb_qual inline methods
151 
152 /////////// inference prefix list
154 {
155 public:
156  // constructors
157  CInferencePrefixList(void);
158 
159  // destructor
160  ~CInferencePrefixList(void);
161 
162  static void GetPrefixAndRemainder (const string& inference, string& prefix, string& remainder);
163 
164 private:
165 };
166 
167 
168 
169 END_objects_SCOPE // namespace ncbi::objects::
170 
172 
173 #endif // OBJECTS_SEQFEAT_GB_QUAL_HPP
174 /* Original file checksum: lines: 94, chars: 2540, CRC32: e99dce88 */
Data storage class.
CGb_qual_Base –.
Definition: Gb_qual_.hpp:73
@Gb_qual.hpp User-defined methods of the data storage class.
Definition: Gb_qual.hpp:61
int Compare(const CGb_qual &gbqual) const
Definition: Gb_qual.hpp:138
CStaticArraySet< const char *, PNocase_CStr > TLegalRecombinationClassSet
Definition: Gb_qual.hpp:93
CGb_qual & operator=(const CGb_qual &value)
CStaticArraySet< const char *, PNocase_CStr > TLegalPseudogeneSet
Definition: Gb_qual.hpp:87
CGb_qual_Base Tparent
Definition: Gb_qual.hpp:62
CGb_qual(const CGb_qual &value)
CStaticArraySet< const char *, PNocase_CStr > TLegalRepeatTypeSet
Definition: Gb_qual.hpp:81
CGb_qual(void)
Definition: Gb_qual.hpp:125
Include a standard set of the NCBI C++ Toolkit most basic headers.
The NCBI C++ standard methods for dealing with std::string.
sequence::ECompare Compare(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope)
Returns the sequence::ECompare containment relationship between CSeq_locs.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_SEQFEAT_EXPORT
Definition: ncbi_export.h:768
TQual & SetQual(void)
Assign a value to Qual data member.
Definition: Gb_qual_.hpp:235
const TVal & GetVal(void) const
Get the Val member data.
Definition: Gb_qual_.hpp:259
TVal & SetVal(void)
Assign a value to Val data member.
Definition: Gb_qual_.hpp:282
string TVal
Definition: Gb_qual_.hpp:86
string TQual
Definition: Gb_qual_.hpp:85
const TQual & GetQual(void) const
Get the Qual member data.
Definition: Gb_qual_.hpp:212
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database
static int version
Definition: mdb_load.c:29
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
static const char * prefix[]
Definition: pcregrep.c:405
Modified on Wed May 29 18:35:28 2024 by modify_doxy.py rev. 669887