NCBI C++ ToolKit
Pubdesc_.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  * 'seq.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
42 #include <objects/seq/Pubdesc.hpp>
46 
47 BEGIN_objects_SCOPE // namespace ncbi::objects::
48 
49 
50 // generated classes
51 
53 {
54  SET_ENUM_INTERNAL_NAME("Pubdesc", "reftype");
55  SET_ENUM_MODULE("NCBI-Sequence");
56  ADD_ENUM_VALUE("seq", eReftype_seq);
57  ADD_ENUM_VALUE("sites", eReftype_sites);
58  ADD_ENUM_VALUE("feats", eReftype_feats);
59  ADD_ENUM_VALUE("no-target", eReftype_no_target);
60 }
62 
64 {
65  if ( !m_Pub ) {
66  m_Pub.Reset(new TPub());
67  return;
68  }
69  (*m_Pub).Reset();
70 }
71 
73 {
74  m_Pub.Reset(&value);
75 }
76 
78 {
79  m_Name.erase();
80  m_set_State[0] &= ~0xc;
81 }
82 
84 {
85  m_Fig.erase();
86  m_set_State[0] &= ~0x30;
87 }
88 
90 {
91  m_Num.Reset();
92 }
93 
95 {
96  m_Num.Reset(&value);
97 }
98 
100 {
101  if ( !m_Num )
102  m_Num.Reset(new TNum());
103  return (*m_Num);
104 }
105 
107 {
108  m_Maploc.erase();
109  m_set_State[0] &= ~0x3000;
110 }
111 
113 {
114  m_Seq_raw.erase();
115  m_set_State[0] &= ~0xc000;
116 }
117 
119 {
120  m_Comment.erase();
121  m_set_State[0] &= ~0xc0000;
122 }
123 
125 {
126  ResetPub();
127  ResetName();
128  ResetFig();
129  ResetNum();
130  ResetNumexc();
131  ResetPoly_a();
132  ResetMaploc();
133  ResetSeq_raw();
135  ResetComment();
136  ResetReftype();
137 }
138 
140 {
141  SET_CLASS_MODULE("NCBI-Sequence");
142  ADD_NAMED_REF_MEMBER("pub", m_Pub, CPub_equiv);
143  ADD_NAMED_STD_MEMBER("name", m_Name)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
144  ADD_NAMED_STD_MEMBER("fig", m_Fig)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
145  ADD_NAMED_REF_MEMBER("num", m_Num, CNumbering)->SetOptional();
146  ADD_NAMED_STD_MEMBER("numexc", m_Numexc)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
147  ADD_NAMED_STD_MEMBER("poly-a", m_Poly_a)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
148  ADD_NAMED_STD_MEMBER("maploc", m_Maploc)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
149  ADD_NAMED_MEMBER("seq-raw", m_Seq_raw, StringStore, ())->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
150  ADD_NAMED_STD_MEMBER("align-group", m_Align_group)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
151  ADD_NAMED_STD_MEMBER("comment", m_Comment)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
152  ADD_NAMED_ENUM_MEMBER("reftype", m_Reftype, EReftype)->SetDefault(new TReftype(eReftype_seq))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
153  info->RandomOrder();
154  info->CodeVersion(22400);
155  info->DataSpec(ncbi::EDataSpec::eASN);
156 }
158 
159 // constructor
161  : m_Numexc(0), m_Poly_a(0), m_Align_group(0), m_Reftype(eReftype_seq)
162 {
163  memset(m_set_State,0,sizeof(m_set_State));
164  if ( !IsAllocatedInPool() ) {
165  ResetPub();
166  }
167 }
168 
169 // destructor
171 {
172 }
173 
174 
175 
176 END_objects_SCOPE // namespace ncbi::objects::
177 
179 
User-defined methods of the data storage class.
BEGIN_NAMED_ENUM_IN_INFO("", CPubdesc_Base::, EReftype, true)
Definition: Pubdesc_.cpp:52
BEGIN_NAMED_BASE_CLASS_INFO("Pubdesc", CPubdesc)
Definition: Pubdesc_.cpp:139
END_ENUM_INFO
Definition: aln_errors.cpp:58
CNumbering –.
Definition: Numbering.hpp:66
how sequence presented in pub
Definition: Pubdesc_.hpp:79
@Pubdesc.hpp User-defined methods of the data storage class.
Definition: Pubdesc.hpp:54
#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 ADD_NAMED_STD_MEMBER(MemberAlias, MemberName)
Definition: serialimpl.hpp:345
#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
CPub_equiv TPub
Definition: Pubdesc_.hpp:102
string m_Fig
Definition: Pubdesc_.hpp:572
TNum & SetNum(void)
Assign a value to Num data member.
Definition: Pubdesc_.cpp:99
void ResetPoly_a(void)
Reset Poly_a data member.
Definition: Pubdesc_.hpp:797
CNumbering TNum
Definition: Pubdesc_.hpp:105
TPub & SetPub(void)
Assign a value to Pub data member.
Definition: Pubdesc_.hpp:614
void ResetComment(void)
Reset Comment data member.
Definition: Pubdesc_.cpp:118
void ResetMaploc(void)
Reset Maploc data member.
Definition: Pubdesc_.cpp:106
string m_Name
Definition: Pubdesc_.hpp:571
void ResetNumexc(void)
Reset Numexc data member.
Definition: Pubdesc_.hpp:750
void ResetPub(void)
Reset Pub data member.
Definition: Pubdesc_.cpp:63
void ResetAlign_group(void)
Reset Align_group data member.
Definition: Pubdesc_.hpp:938
Uint4 m_set_State[1]
Definition: Pubdesc_.hpp:569
CRef< TNum > m_Num
Definition: Pubdesc_.hpp:573
void ResetName(void)
Reset Name data member.
Definition: Pubdesc_.cpp:77
string m_Maploc
Definition: Pubdesc_.hpp:576
string m_Seq_raw
Definition: Pubdesc_.hpp:577
virtual void Reset(void)
Reset the whole object.
Definition: Pubdesc_.cpp:124
CRef< TPub > m_Pub
Definition: Pubdesc_.hpp:570
string m_Comment
Definition: Pubdesc_.hpp:579
virtual ~CPubdesc_Base(void)
Definition: Pubdesc_.cpp:170
CPubdesc_Base(void)
Definition: Pubdesc_.cpp:160
void ResetFig(void)
Reset Fig data member.
Definition: Pubdesc_.cpp:83
void ResetSeq_raw(void)
Reset Seq_raw data member.
Definition: Pubdesc_.cpp:112
void ResetNum(void)
Reset Num data member.
Definition: Pubdesc_.cpp:89
void ResetReftype(void)
Reset Reftype data member.
Definition: Pubdesc_.hpp:1032
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon Apr 22 04:01:30 2024 by modify_doxy.py rev. 669887