|
NCBI Home IEB Home C++ Toolkit docs C Toolkit source browser C Toolkit source browser (2) |
NCBI C++ Toolkit Cross ReferenceC++/src/objects/medline/Medline_entry_.cpp |
source navigation diff markup identifier search freetext search file search |
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 * 'medline.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/medline/Medline_entry.hpp>
43 #include <objects/biblio/Cit_art.hpp>
44 #include <objects/general/Date.hpp>
45 #include <objects/medline/Medline_field.hpp>
46 #include <objects/medline/Medline_mesh.hpp>
47 #include <objects/medline/Medline_rn.hpp>
48 #include <objects/medline/Medline_si.hpp>
49 BEGIN_NCBI_SCOPE
50
51 BEGIN_objects_SCOPE // namespace ncbi::objects::
52
53
54 // generated classes
55
56 BEGIN_NAMED_ENUM_IN_INFO("", CMedline_entry_Base::, EStatus, true)
57 {
58 ADD_ENUM_VALUE("publisher", eStatus_publisher);
59 ADD_ENUM_VALUE("premedline", eStatus_premedline);
60 ADD_ENUM_VALUE("medline", eStatus_medline);
61 }
62 END_ENUM_INFO
63
64 void CMedline_entry_Base::ResetEm(void)
65 {
66 if ( !m_Em ) {
67 m_Em.Reset(new TEm());
68 return;
69 }
70 (*m_Em).Reset();
71 }
72
73 void CMedline_entry_Base::SetEm(CMedline_entry_Base::TEm& value)
74 {
75 m_Em.Reset(&value);
76 }
77
78 void CMedline_entry_Base::ResetCit(void)
79 {
80 if ( !m_Cit ) {
81 m_Cit.Reset(new TCit());
82 return;
83 }
84 (*m_Cit).Reset();
85 }
86
87 void CMedline_entry_Base::SetCit(CMedline_entry_Base::TCit& value)
88 {
89 m_Cit.Reset(&value);
90 }
91
92 void CMedline_entry_Base::ResetAbstract(void)
93 {
94 m_Abstract.erase();
95 m_set_State[0] &= ~0xc0;
96 }
97
98 void CMedline_entry_Base::ResetMesh(void)
99 {
100 m_Mesh.clear();
101 m_set_State[0] &= ~0x300;
102 }
103
104 void CMedline_entry_Base::ResetSubstance(void)
105 {
106 m_Substance.clear();
107 m_set_State[0] &= ~0xc00;
108 }
109
110 void CMedline_entry_Base::ResetXref(void)
111 {
112 m_Xref.clear();
113 m_set_State[0] &= ~0x3000;
114 }
115
116 void CMedline_entry_Base::ResetIdnum(void)
117 {
118 m_Idnum.clear();
119 m_set_State[0] &= ~0xc000;
120 }
121
122 void CMedline_entry_Base::ResetGene(void)
123 {
124 m_Gene.clear();
125 m_set_State[0] &= ~0x30000;
126 }
127
128 void CMedline_entry_Base::ResetPub_type(void)
129 {
130 m_Pub_type.clear();
131 m_set_State[0] &= ~0x300000;
132 }
133
134 void CMedline_entry_Base::ResetMlfield(void)
135 {
136 m_Mlfield.clear();
137 m_set_State[0] &= ~0xc00000;
138 }
139
140 void CMedline_entry_Base::Reset(void)
141 {
142 ResetUid();
143 ResetEm();
144 ResetCit();
145 ResetAbstract();
146 ResetMesh();
147 ResetSubstance();
148 ResetXref();
149 ResetIdnum();
150 ResetGene();
151 ResetPmid();
152 ResetPub_type();
153 ResetMlfield();
154 ResetStatus();
155 }
156
157 BEGIN_NAMED_BASE_CLASS_INFO("Medline-entry", CMedline_entry)
158 {
159 SET_CLASS_MODULE("NCBI-Medline");
160 ADD_NAMED_STD_MEMBER("uid", m_Uid)->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
161 ADD_NAMED_REF_MEMBER("em", m_Em, CDate);
162 ADD_NAMED_REF_MEMBER("cit", m_Cit, CCit_art);
163 ADD_NAMED_STD_MEMBER("abstract", m_Abstract)->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
164 ADD_NAMED_MEMBER("mesh", m_Mesh, STL_list_set, (STL_CRef, (CLASS, (CMedline_mesh))))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
165 ADD_NAMED_MEMBER("substance", m_Substance, STL_list_set, (STL_CRef, (CLASS, (CMedline_rn))))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
166 ADD_NAMED_MEMBER("xref", m_Xref, STL_list_set, (STL_CRef, (CLASS, (CMedline_si))))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
167 ADD_NAMED_MEMBER("idnum", m_Idnum, STL_list_set, (STD, (string)))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
168 ADD_NAMED_MEMBER("gene", m_Gene, STL_list_set, (STD, (string)))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
169 ADD_NAMED_MEMBER("pmid", m_Pmid, CLASS, (CPubMedId))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
170 ADD_NAMED_MEMBER("pub-type", m_Pub_type, STL_list_set, (STD, (string)))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
171 ADD_NAMED_MEMBER("mlfield", m_Mlfield, STL_list_set, (STL_CRef, (CLASS, (CMedline_field))))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
172 ADD_NAMED_ENUM_MEMBER("status", m_Status, EStatus)->SetDefault(new TStatus(eStatus_medline))->SetSetFlag(MEMBER_PTR(m_set_State[0]));
173 info->RandomOrder();
174 }
175 END_CLASS_INFO
176
177 // constructor
178 CMedline_entry_Base::CMedline_entry_Base(void)
179 : m_Uid(0), m_Pmid(CPubMedId(0)), m_Status(eStatus_medline)
180 {
181 memset(m_set_State,0,sizeof(m_set_State));
182 if ( !IsAllocatedInPool() ) {
183 ResetEm();
184 ResetCit();
185 }
186 }
187
188 // destructor
189 CMedline_entry_Base::~CMedline_entry_Base(void)
190 {
191 }
192
193
194
195 END_objects_SCOPE // namespace ncbi::objects::
196
197 END_NCBI_SCOPE
198
199 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |