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

Go to the SVN repository for this file.

1 /* $Id$
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  * File Description:
27  * This code was generated by application DATATOOL
28  * using the following specifications:
29  * 'seqfeat.asn'.
30  *
31  * ATTENTION:
32  * Don't edit or commit this file into CVS as this file will
33  * be overridden (by DATATOOL) without warning!
34  * ===========================================================================
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 #include <serial/serialimpl.hpp>
40 
41 // generated includes
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
50 
51 // generated classes
52 
54 {
55  SET_ENUM_INTERNAL_NAME("BioSource", "genome");
56  SET_ENUM_MODULE("NCBI-BioSource");
57  ADD_ENUM_VALUE("unknown", eGenome_unknown);
58  ADD_ENUM_VALUE("genomic", eGenome_genomic);
59  ADD_ENUM_VALUE("chloroplast", eGenome_chloroplast);
60  ADD_ENUM_VALUE("chromoplast", eGenome_chromoplast);
61  ADD_ENUM_VALUE("kinetoplast", eGenome_kinetoplast);
62  ADD_ENUM_VALUE("mitochondrion", eGenome_mitochondrion);
63  ADD_ENUM_VALUE("plastid", eGenome_plastid);
64  ADD_ENUM_VALUE("macronuclear", eGenome_macronuclear);
65  ADD_ENUM_VALUE("extrachrom", eGenome_extrachrom);
66  ADD_ENUM_VALUE("plasmid", eGenome_plasmid);
67  ADD_ENUM_VALUE("transposon", eGenome_transposon);
68  ADD_ENUM_VALUE("insertion-seq", eGenome_insertion_seq);
69  ADD_ENUM_VALUE("cyanelle", eGenome_cyanelle);
70  ADD_ENUM_VALUE("proviral", eGenome_proviral);
71  ADD_ENUM_VALUE("virion", eGenome_virion);
72  ADD_ENUM_VALUE("nucleomorph", eGenome_nucleomorph);
73  ADD_ENUM_VALUE("apicoplast", eGenome_apicoplast);
74  ADD_ENUM_VALUE("leucoplast", eGenome_leucoplast);
75  ADD_ENUM_VALUE("proplastid", eGenome_proplastid);
76  ADD_ENUM_VALUE("endogenous-virus", eGenome_endogenous_virus);
77  ADD_ENUM_VALUE("hydrogenosome", eGenome_hydrogenosome);
78  ADD_ENUM_VALUE("chromosome", eGenome_chromosome);
79  ADD_ENUM_VALUE("chromatophore", eGenome_chromatophore);
80  ADD_ENUM_VALUE("plasmid-in-mitochondrion", eGenome_plasmid_in_mitochondrion);
81  ADD_ENUM_VALUE("plasmid-in-plastid", eGenome_plasmid_in_plastid);
82 }
84 
86 {
87  SET_ENUM_INTERNAL_NAME("BioSource", "origin");
88  SET_ENUM_MODULE("NCBI-BioSource");
89  ADD_ENUM_VALUE("unknown", eOrigin_unknown);
90  ADD_ENUM_VALUE("natural", eOrigin_natural);
91  ADD_ENUM_VALUE("natmut", eOrigin_natmut);
92  ADD_ENUM_VALUE("mut", eOrigin_mut);
93  ADD_ENUM_VALUE("artificial", eOrigin_artificial);
94  ADD_ENUM_VALUE("synthetic", eOrigin_synthetic);
95  ADD_ENUM_VALUE("other", eOrigin_other);
96 }
98 
100 {
101  if ( !m_Org ) {
102  m_Org.Reset(new TOrg());
103  return;
104  }
105  (*m_Org).Reset();
106 }
107 
109 {
110  m_Org.Reset(&value);
111 }
112 
114 {
115  m_Subtype.clear();
116  m_set_State[0] &= ~0xc0;
117 }
118 
120 {
121  m_Pcr_primers.Reset();
122 }
123 
125 {
126  m_Pcr_primers.Reset(&value);
127 }
128 
130 {
131  if ( !m_Pcr_primers )
132  m_Pcr_primers.Reset(new TPcr_primers());
133  return (*m_Pcr_primers);
134 }
135 
137 {
138  ResetGenome();
139  ResetOrigin();
140  ResetOrg();
141  ResetSubtype();
142  ResetIs_focus();
144 }
145 
147 {
148  SET_CLASS_MODULE("NCBI-BioSource");
149  ADD_NAMED_ENUM_MEMBER("genome", m_Genome, EGenome)->SetDefault(new TGenome(eGenome_unknown))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
150  ADD_NAMED_ENUM_MEMBER("origin", m_Origin, EOrigin)->SetDefault(new TOrigin(eOrigin_unknown))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
151  ADD_NAMED_REF_MEMBER("org", m_Org, COrg_ref);
152  ADD_NAMED_MEMBER("subtype", m_Subtype, STL_list, (STL_CRef, (CLASS, (CSubSource))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
153  ADD_NAMED_NULL_MEMBER("is-focus", null, ())->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
154  ADD_NAMED_REF_MEMBER("pcr-primers", m_Pcr_primers, CPCRReactionSet)->SetOptional();
155  info->RandomOrder();
156  info->CodeVersion(22400);
157  info->DataSpec(ncbi::EDataSpec::eASN);
158 }
160 
161 // constructor
163  : m_Genome(eGenome_unknown), m_Origin(eOrigin_unknown)
164 {
165  memset(m_set_State,0,sizeof(m_set_State));
166  if ( !IsAllocatedInPool() ) {
167  ResetOrg();
168  }
169 }
170 
171 // destructor
173 {
174 }
175 
176 
177 
178 END_objects_SCOPE // namespace ncbi::objects::
179 
181 
BEGIN_NAMED_BASE_CLASS_INFO("BioSource", CBioSource)
Definition: BioSource_.cpp:146
BEGIN_NAMED_ENUM_IN_INFO("", CBioSource_Base::, EGenome, true)
Definition: BioSource_.cpp:53
User-defined methods of the data storage class.
END_ENUM_INFO
Definition: aln_errors.cpp:58
********************************************************************
Definition: BioSource_.hpp:85
CPCRReactionSet –.
#define MEMBER_PTR(MemberName)
Definition: serialimpl.hpp:284
#define SET_ENUM_INTERNAL_NAME(OwnerName, MemberName)
Definition: serialimpl.hpp:559
#define ADD_NAMED_MEMBER(MemberAlias, MemberName, TypeMacro, TypeMacroArgs)
Definition: serialimpl.hpp:342
#define ADD_NAMED_NULL_MEMBER(MemberAlias, TypeMacro, TypeMacroArgs)
Definition: serialimpl.hpp:339
#define ADD_NAMED_REF_MEMBER(MemberAlias, MemberName, ClassName)
Definition: serialimpl.hpp:357
#define SET_ENUM_MODULE(ModuleName)
Definition: serialimpl.hpp:553
#define END_CLASS_INFO
Definition: serialimpl.hpp:456
#define SET_CLASS_MODULE(ModuleName)
Definition: serialimpl.hpp:444
#define ADD_NAMED_ENUM_MEMBER(MemberAlias, MemberName, EnumName)
Definition: serialimpl.hpp:351
#define ADD_ENUM_VALUE(EnumValueName, EnumValueValue)
Definition: serialimpl.hpp:562
bool IsAllocatedInPool(void) const THROWS_NONE
Check if object is allocated in memory pool (not system heap)
Definition: ncbiobj.hpp:461
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
virtual ~CBioSource_Base(void)
Definition: BioSource_.cpp:172
Uint4 m_set_State[1]
Definition: BioSource_.hpp:379
void ResetGenome(void)
Reset Genome data member.
Definition: BioSource_.hpp:409
void ResetOrigin(void)
Reset Origin data member.
Definition: BioSource_.hpp:459
CRef< TOrg > m_Org
Definition: BioSource_.hpp:382
CPCRReactionSet TPcr_primers
Definition: BioSource_.hpp:146
virtual void Reset(void)
Reset the whole object.
Definition: BioSource_.cpp:136
void ResetIs_focus(void)
Reset Is_focus data member.
Definition: BioSource_.hpp:564
TPcr_primers & SetPcr_primers(void)
Assign a value to Pcr_primers data member.
Definition: BioSource_.cpp:129
TOrg & SetOrg(void)
Assign a value to Org data member.
Definition: BioSource_.hpp:518
list< CRef< CSubSource > > m_Subtype
Definition: BioSource_.hpp:383
CRef< TPcr_primers > m_Pcr_primers
Definition: BioSource_.hpp:384
void ResetOrg(void)
Reset Org data member.
Definition: BioSource_.cpp:99
void ResetPcr_primers(void)
Reset Pcr_primers data member.
Definition: BioSource_.cpp:119
void ResetSubtype(void)
Reset Subtype data member.
Definition: BioSource_.cpp:113
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon May 13 04:33:51 2024 by modify_doxy.py rev. 669887