NCBI C++ ToolKit
RNA_gen.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: RNA_gen.cpp 91366 2020-10-19 16:39:55Z kans $
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  * Author: .......
27  *
28  * File Description:
29  * .......
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using the following specifications:
34  * 'seqfeat.asn'.
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 #include <util/static_set.hpp>
40 
41 // generated includes
43 
44 // generated classes
45 
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
50 // destructor
52 {
53 }
54 
55 
56 static const char* const kAcceptedClasses[] = {
57  "antisense_RNA",
58  "autocatalytically_spliced_intron",
59  "circRNA",
60  "guide_RNA",
61  "hammerhead_ribozyme",
62  "lncRNA",
63  "miRNA",
64  "other",
65  "piRNA",
66  "pre_miRNA",
67  "rasiRNA",
68  "ribozyme",
69  "RNase_MRP_RNA",
70  "RNase_P_RNA",
71  "scaRNA",
72  "scRNA",
73  "sgRNA",
74  "siRNA",
75  "snoRNA",
76  "snRNA",
77  "SRP_RNA",
78  "telomerase_RNA",
79  "vault_RNA",
80  "Y_RNA",
81 };
84  sc_AcceptedClasses, kAcceptedClasses);
85 
87 {
88  vector<string> choices;
89 
90  TAcceptedClasses::const_iterator it = sc_AcceptedClasses.begin();
91  while (it != sc_AcceptedClasses.end()) {
92  choices.push_back(*it);
93  ++it;
94  }
95  return choices;
96 }
97 
98 
99 bool CRNA_gen::IsLegalClass(const string& val)
100 {
102  sc_AcceptedClasses.find(val.c_str());
103  return (it != sc_AcceptedClasses.end());
104 }
105 
107 {
109  sc_AcceptedClasses.find(val.c_str());
110 
111  string original = val;
112  if (it != sc_AcceptedClasses.end()) {
113  val = *it;
114  }
115 
116  return original != val;
117 }
118 
120 {
121  if (IsSetClass()) {
122  return IsLegalClass(GetClass());
123  }
124  return false;
125 }
126 
127 END_objects_SCOPE // namespace ncbi::objects::
128 
130 
131 /* Original file checksum: lines: 57, chars: 1718, CRC32: 737cf1b8 */
CStaticArraySet< const char *, PNocase_CStr > TAcceptedClasses
Definition: RNA_gen.cpp:82
DEFINE_STATIC_ARRAY_MAP(TAcceptedClasses, sc_AcceptedClasses, kAcceptedClasses)
static const char *const kAcceptedClasses[]
Definition: RNA_gen.cpp:56
User-defined methods of the data storage class.
static bool FixncRNAClassValue(string &val)
Definition: RNA_gen.cpp:106
~CRNA_gen(void)
Definition: RNA_gen.cpp:51
static vector< string > GetncRNAClassList()
Definition: RNA_gen.cpp:86
bool IsLegalClass() const
Definition: RNA_gen.cpp:119
TBase::const_iterator const_iterator
Definition: static_set.hpp:828
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
bool IsSetClass(void) const
for ncRNAs, the class of non-coding RNA: examples: antisense_RNA, guide_RNA, snRNA Check if a value h...
Definition: RNA_gen_.hpp:247
const TClass & GetClass(void) const
Get the Class member data.
Definition: RNA_gen_.hpp:259
Modified on Wed Sep 04 14:59:42 2024 by modify_doxy.py rev. 669887