NCBI C++ ToolKit
Cit_sub_.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  * 'biblio.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
45 #include <objects/general/Date.hpp>
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
50 
51 // generated classes
52 
54 {
55  SET_ENUM_INTERNAL_NAME("Cit-sub", "medium");
56  SET_ENUM_MODULE("NCBI-Biblio");
57  ADD_ENUM_VALUE("paper", eMedium_paper);
58  ADD_ENUM_VALUE("tape", eMedium_tape);
59  ADD_ENUM_VALUE("floppy", eMedium_floppy);
60  ADD_ENUM_VALUE("email", eMedium_email);
61  ADD_ENUM_VALUE("other", eMedium_other);
62 }
64 
66 {
67  if ( !m_Authors ) {
68  m_Authors.Reset(new TAuthors());
69  return;
70  }
71  (*m_Authors).Reset();
72 }
73 
75 {
76  m_Authors.Reset(&value);
77 }
78 
80 {
81  m_Imp.Reset();
82 }
83 
85 {
86  m_Imp.Reset(&value);
87 }
88 
90 {
91  if ( !m_Imp )
92  m_Imp.Reset(new TImp());
93  return (*m_Imp);
94 }
95 
97 {
98  m_Date.Reset();
99 }
100 
102 {
103  m_Date.Reset(&value);
104 }
105 
107 {
108  if ( !m_Date )
109  m_Date.Reset(new TDate());
110  return (*m_Date);
111 }
112 
114 {
115  m_Descr.erase();
116  m_set_State[0] &= ~0x300;
117 }
118 
120 {
121  ResetAuthors();
122  ResetImp();
123  ResetMedium();
124  ResetDate();
125  ResetDescr();
126 }
127 
129 {
130  SET_CLASS_MODULE("NCBI-Biblio");
131  ADD_NAMED_REF_MEMBER("authors", m_Authors, CAuth_list);
132  ADD_NAMED_REF_MEMBER("imp", m_Imp, CImprint)->SetOptional();
133  ADD_NAMED_ENUM_MEMBER("medium", m_Medium, EMedium)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
134  ADD_NAMED_REF_MEMBER("date", m_Date, CDate)->SetOptional();
135  ADD_NAMED_STD_MEMBER("descr", m_Descr)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
136  info->RandomOrder();
137  info->CodeVersion(22400);
138  info->DataSpec(ncbi::EDataSpec::eASN);
139 }
141 
142 // constructor
144  : m_Medium((EMedium)(0))
145 {
146  memset(m_set_State,0,sizeof(m_set_State));
147  if ( !IsAllocatedInPool() ) {
148  ResetAuthors();
149  }
150 }
151 
152 // destructor
154 {
155 }
156 
157 
158 
159 END_objects_SCOPE // namespace ncbi::objects::
160 
162 
BEGIN_NAMED_BASE_CLASS_INFO("Cit-sub", CCit_sub)
Definition: Cit_sub_.cpp:128
BEGIN_NAMED_ENUM_IN_INFO("", CCit_sub_Base::, EMedium, false)
Definition: Cit_sub_.cpp:53
User-defined methods of the data storage class.
END_ENUM_INFO
Definition: aln_errors.cpp:58
@Auth_list.hpp User-defined methods of the data storage class.
Definition: Auth_list.hpp:57
NOTE: this is just to cite a direct data submission, see NCBI-Submit for the form of a sequence submi...
Definition: Cit_sub_.hpp:83
Definition: Date.hpp:53
CImprint –.
Definition: Imprint.hpp:66
#define MEMBER_PTR(MemberName)
Definition: serialimpl.hpp:284
#define SET_ENUM_INTERNAL_NAME(OwnerName, MemberName)
Definition: serialimpl.hpp:559
#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
void ResetImp(void)
Reset Imp data member.
Definition: Cit_sub_.cpp:79
void ResetAuthors(void)
Reset Authors data member.
Definition: Cit_sub_.cpp:65
void ResetDescr(void)
Reset Descr data member.
Definition: Cit_sub_.cpp:113
TAuthors & SetAuthors(void)
Assign a value to Authors data member.
Definition: Cit_sub_.hpp:366
CImprint TImp
Definition: Cit_sub_.hpp:108
string m_Descr
Definition: Cit_sub_.hpp:332
void ResetMedium(void)
Reset Medium data member.
Definition: Cit_sub_.hpp:408
TDate & SetDate(void)
Assign a value to Date data member.
Definition: Cit_sub_.cpp:106
void ResetDate(void)
Reset Date data member.
Definition: Cit_sub_.cpp:96
virtual void Reset(void)
Reset the whole object.
Definition: Cit_sub_.cpp:119
virtual ~CCit_sub_Base(void)
Definition: Cit_sub_.cpp:153
CAuth_list TAuthors
Definition: Cit_sub_.hpp:107
TImp & SetImp(void)
Assign a value to Imp data member.
Definition: Cit_sub_.cpp:89
CRef< TDate > m_Date
Definition: Cit_sub_.hpp:331
EMedium
medium of submission
Definition: Cit_sub_.hpp:95
CCit_sub_Base(void)
Definition: Cit_sub_.cpp:143
CRef< TAuthors > m_Authors
Definition: Cit_sub_.hpp:328
CRef< TImp > m_Imp
Definition: Cit_sub_.hpp:329
Uint4 m_set_State[1]
Definition: Cit_sub_.hpp:327
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed Jul 17 13:20:37 2024 by modify_doxy.py rev. 669887