|
NCBI Home IEB Home C++ Toolkit docs C Toolkit source browser C Toolkit source browser (2) |
NCBI C++ Toolkit Cross ReferenceC++/src/objects/entrezgene/Gene_track_.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 * 'entrezgene.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/entrezgene/Gene_track.hpp>
43 #include <objects/general/Date.hpp>
44 #include <objects/general/Dbtag.hpp>
45 BEGIN_NCBI_SCOPE
46
47 BEGIN_objects_SCOPE // namespace ncbi::objects::
48
49
50 // generated classes
51
52 BEGIN_NAMED_ENUM_IN_INFO("", CGene_track_Base::, EStatus, true)
53 {
54 ADD_ENUM_VALUE("live", eStatus_live);
55 ADD_ENUM_VALUE("secondary", eStatus_secondary);
56 ADD_ENUM_VALUE("discontinued", eStatus_discontinued);
57 ADD_ENUM_VALUE("newentry", eStatus_newentry);
58 }
59 END_ENUM_INFO
60
61 void CGene_track_Base::ResetCurrent_id(void)
62 {
63 m_Current_id.clear();
64 m_set_State[0] &= ~0x30;
65 }
66
67 void CGene_track_Base::ResetCreate_date(void)
68 {
69 if ( !m_Create_date ) {
70 m_Create_date.Reset(new TCreate_date());
71 return;
72 }
73 (*m_Create_date).Reset();
74 }
75
76 void CGene_track_Base::SetCreate_date(CGene_track_Base::TCreate_date& value)
77 {
78 m_Create_date.Reset(&value);
79 }
80
81 void CGene_track_Base::ResetUpdate_date(void)
82 {
83 if ( !m_Update_date ) {
84 m_Update_date.Reset(new TUpdate_date());
85 return;
86 }
87 (*m_Update_date).Reset();
88 }
89
90 void CGene_track_Base::SetUpdate_date(CGene_track_Base::TUpdate_date& value)
91 {
92 m_Update_date.Reset(&value);
93 }
94
95 void CGene_track_Base::ResetDiscontinue_date(void)
96 {
97 m_Discontinue_date.Reset();
98 }
99
100 void CGene_track_Base::SetDiscontinue_date(CGene_track_Base::TDiscontinue_date& value)
101 {
102 m_Discontinue_date.Reset(&value);
103 }
104
105 CGene_track_Base::TDiscontinue_date& CGene_track_Base::SetDiscontinue_date(void)
106 {
107 if ( !m_Discontinue_date )
108 m_Discontinue_date.Reset(new ncbi::objects::CDate());
109 return (*m_Discontinue_date);
110 }
111
112 void CGene_track_Base::Reset(void)
113 {
114 ResetGeneid();
115 ResetStatus();
116 ResetCurrent_id();
117 ResetCreate_date();
118 ResetUpdate_date();
119 ResetDiscontinue_date();
120 }
121
122 BEGIN_NAMED_BASE_CLASS_INFO("Gene-track", CGene_track)
123 {
124 SET_CLASS_MODULE("NCBI-Entrezgene");
125 ADD_NAMED_STD_MEMBER("geneid", m_Geneid)->SetSetFlag(MEMBER_PTR(m_set_State[0]));
126 ADD_NAMED_ENUM_MEMBER("status", m_Status, EStatus)->SetDefault(new TStatus(eStatus_live))->SetSetFlag(MEMBER_PTR(m_set_State[0]));
127 ADD_NAMED_MEMBER("current-id", m_Current_id, STL_list, (STL_CRef, (CLASS, (CDbtag))))->SetOptional()->SetSetFlag(MEMBER_PTR(m_set_State[0]));
128 ADD_NAMED_REF_MEMBER("create-date", m_Create_date, CDate);
129 ADD_NAMED_REF_MEMBER("update-date", m_Update_date, CDate);
130 ADD_NAMED_REF_MEMBER("discontinue-date", m_Discontinue_date, CDate)->SetOptional();
131 info->RandomOrder();
132 }
133 END_CLASS_INFO
134
135 // constructor
136 CGene_track_Base::CGene_track_Base(void)
137 : m_Geneid(0), m_Status(eStatus_live)
138 {
139 memset(m_set_State,0,sizeof(m_set_State));
140 if ( !IsAllocatedInPool() ) {
141 ResetCreate_date();
142 ResetUpdate_date();
143 }
144 }
145
146 // destructor
147 CGene_track_Base::~CGene_track_Base(void)
148 {
149 }
150
151
152
153 END_objects_SCOPE // namespace ncbi::objects::
154
155 END_NCBI_SCOPE
156
157 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |