NCBI C++ ToolKit
GC_Sequence_.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  * 'genome_collection.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
51 
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // generated classes
56 
58 {
59  SET_ENUM_INTERNAL_NAME("GC-Sequence", "patch-type");
60  SET_ENUM_MODULE("NCBI-GenomeCollection");
61  ADD_ENUM_VALUE("novel", ePatch_type_novel);
62  ADD_ENUM_VALUE("fix", ePatch_type_fix);
63  ADD_ENUM_VALUE("other", ePatch_type_other);
64 }
66 
68 {
69  if ( !m_Seq_id ) {
70  m_Seq_id.Reset(new TSeq_id());
71  return;
72  }
73  (*m_Seq_id).Reset();
74 }
75 
77 {
78  m_Seq_id.Reset(&value);
79 }
80 
82 {
83  m_Seq_id_synonyms.clear();
84  m_set_State[0] &= ~0xc;
85 }
86 
88 {
89  m_Descr.Reset();
90 }
91 
93 {
94  m_Descr.Reset(&value);
95 }
96 
98 {
99  if ( !m_Descr )
100  m_Descr.Reset(new TDescr());
101  return (*m_Descr);
102 }
103 
105 {
106  m_Annot.clear();
107  m_set_State[0] &= ~0xc0;
108 }
109 
111 {
112  m_Sequences.clear();
113  m_set_State[0] &= ~0x300;
114 }
115 
117 {
118  m_Structure.Reset();
119 }
120 
122 {
123  m_Structure.Reset(&value);
124 }
125 
127 {
128  if ( !m_Structure )
129  m_Structure.Reset(new TStructure());
130  return (*m_Structure);
131 }
132 
134 {
135  m_Stats.Reset();
136 }
137 
139 {
140  m_Stats.Reset(&value);
141 }
142 
144 {
145  if ( !m_Stats )
146  m_Stats.Reset(new TStats());
147  return (*m_Stats);
148 }
149 
151 {
152  m_Roles.clear();
153  m_set_State[0] &= ~0x30000;
154 }
155 
157 {
158  ResetSeq_id();
160  ResetDescr();
161  ResetAnnot();
162  ResetSequences();
163  ResetStructure();
164  ResetStats();
165  ResetPatch_type();
166  ResetRoles();
167 }
168 
170 {
171  SET_CLASS_MODULE("NCBI-GenomeCollection");
172  ADD_NAMED_REF_MEMBER("seq-id", m_Seq_id, CSeq_id);
173  ADD_NAMED_MEMBER("seq-id-synonyms", m_Seq_id_synonyms, STL_list_set, (STL_CRef, (CLASS, (CGC_TypedSeqId))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
174  ADD_NAMED_REF_MEMBER("descr", m_Descr, CSeq_descr)->SetOptional();
175  ADD_NAMED_MEMBER("annot", m_Annot, STL_list_set, (STL_CRef, (CLASS, (CSeq_annot))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
176  ADD_NAMED_MEMBER("sequences", m_Sequences, STL_list_set, (STL_CRef, (CLASS, (CGC_TaggedSequences))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
177  ADD_NAMED_REF_MEMBER("structure", m_Structure, CDelta_ext)->SetOptional();
178  ADD_NAMED_REF_MEMBER("stats", m_Stats, CGC_SequenceStats)->SetOptional();
179  ADD_NAMED_ENUM_MEMBER("patch-type", m_Patch_type, EPatch_type)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
180  ADD_NAMED_MEMBER("roles", m_Roles, STL_list_set, (ENUM, (int, EGC_SequenceRole)))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
181  info->RandomOrder();
182  info->CodeVersion(22301);
183  info->DataSpec(ncbi::EDataSpec::eASN);
184 }
186 
187 // constructor
189  : m_Patch_type((EPatch_type)(0))
190 {
191  memset(m_set_State,0,sizeof(m_set_State));
192  if ( !IsAllocatedInPool() ) {
193  ResetSeq_id();
194  }
195 }
196 
197 // destructor
199 {
200 }
201 
202 
203 
204 END_objects_SCOPE // namespace ncbi::objects::
205 
207 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
BEGIN_NAMED_ENUM_IN_INFO("", CGC_Sequence_Base::, EPatch_type, true)
BEGIN_NAMED_BASE_CLASS_INFO("GC-Sequence", CGC_Sequence)
User-defined methods of the data storage class.
User-defined methods of the data storage class.
END_ENUM_INFO
Definition: aln_errors.cpp:58
CGC_SequenceStats –.
GC-Sequence: Used for scaffolds, scaffold-sets and components in Gencoll terminology.
CGC_TaggedSequences –.
CGC_TypedSeqId –.
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
char value[7]
Definition: config.c:431
#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_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
void ResetSequences(void)
Reset Sequences data member.
void ResetStats(void)
Reset Stats data member.
EGC_SequenceRole
sequence-role: what role(s) does this sequence have in the assembly a sequence may have more than one...
virtual void Reset(void)
Reset the whole object.
void ResetStructure(void)
Reset Structure data member.
CRef< TDescr > m_Descr
list< CRef< CSeq_annot > > m_Annot
TDescr & SetDescr(void)
Assign a value to Descr data member.
CGC_SequenceStats TStats
void ResetRoles(void)
Reset Roles data member.
TSeq_id & SetSeq_id(void)
Assign a value to Seq_id data member.
CRef< TSeq_id > m_Seq_id
list< int > m_Roles
TStructure & SetStructure(void)
Assign a value to Structure data member.
CRef< TStructure > m_Structure
void ResetAnnot(void)
Reset Annot data member.
CDelta_ext TStructure
void ResetSeq_id(void)
Reset Seq_id data member.
list< CRef< CGC_TaggedSequences > > m_Sequences
void ResetSeq_id_synonyms(void)
Reset Seq_id_synonyms data member.
void ResetPatch_type(void)
Reset Patch_type data member.
virtual ~CGC_Sequence_Base(void)
CRef< TStats > m_Stats
list< CRef< CGC_TypedSeqId > > m_Seq_id_synonyms
void ResetDescr(void)
Reset Descr data member.
TStats & SetStats(void)
Assign a value to Stats data member.
static MDB_envinfo info
Definition: mdb_load.c:37
Modified on Thu Dec 07 10:10:21 2023 by modify_doxy.py rev. 669887