NCBI C++ ToolKit
Cit_jour_.hpp
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  */
27 
28 /// @file Cit_jour_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/biblio/biblio.asn">biblio.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/biblio/biblio.def">biblio.def</a>
36 ///
37 /// ATTENTION:
38 /// Don't edit or commit this file into CVS as this file will
39 /// be overridden (by DATATOOL) without warning!
40 
41 #ifndef OBJECTS_BIBLIO_CIT_JOUR_BASE_HPP
42 #define OBJECTS_BIBLIO_CIT_JOUR_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
56 class CImprint;
57 class CTitle;
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_Biblio
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 /// Journal citation
70 ///
71 /// CCit_jour_Base --
72 ///
73 
75 {
77 public:
78  // constructor
79  CCit_jour_Base(void);
80  // destructor
81  virtual ~CCit_jour_Base(void);
82 
83  // type info
85 
86  // types
87  typedef CTitle TTitle;
88  typedef CImprint TImp;
89 
90  // member index
91  enum class E_memberIndex {
92  e__allMandatory = 0,
93  e_title,
94  e_imp
95  };
97 
98  // getters
99  // setters
100 
101  /// title of journal
102  /// Check if a value has been assigned to Title data member.
103  ///
104  /// Data member Title is mandatory;
105  /// its type is defined as 'typedef CTitle TTitle'
106  /// @return
107  /// - true, if a value has been assigned.
108  /// - false, otherwise.
109  bool IsSetTitle(void) const;
110 
111  /// Check if it is safe to call GetTitle method.
112  ///
113  /// @return
114  /// - true, if the data member is getatable.
115  /// - false, otherwise.
116  bool CanGetTitle(void) const;
117 
118  /// Reset Title data member.
119  void ResetTitle(void);
120 
121  /// Get the Title member data.
122  ///
123  /// @return
124  /// Reference to the member data.
125  const TTitle& GetTitle(void) const;
126 
127  /// Assign a value to Title data member.
128  ///
129  /// @param value
130  /// Reference to value.
131  void SetTitle(TTitle& value);
132 
133  /// Assign a value to Title data member.
134  ///
135  /// @return
136  /// Reference to the data value.
137  TTitle& SetTitle(void);
138 
139  /// Check if a value has been assigned to Imp data member.
140  ///
141  /// Data member Imp is mandatory;
142  /// its type is defined as 'typedef CImprint TImp'
143  /// @return
144  /// - true, if a value has been assigned.
145  /// - false, otherwise.
146  bool IsSetImp(void) const;
147 
148  /// Check if it is safe to call GetImp method.
149  ///
150  /// @return
151  /// - true, if the data member is getatable.
152  /// - false, otherwise.
153  bool CanGetImp(void) const;
154 
155  /// Reset Imp data member.
156  void ResetImp(void);
157 
158  /// Get the Imp member data.
159  ///
160  /// @return
161  /// Reference to the member data.
162  const TImp& GetImp(void) const;
163 
164  /// Assign a value to Imp data member.
165  ///
166  /// @param value
167  /// Reference to value.
168  void SetImp(TImp& value);
169 
170  /// Assign a value to Imp data member.
171  ///
172  /// @return
173  /// Reference to the data value.
174  TImp& SetImp(void);
175 
176  /// Reset the whole object
177  virtual void Reset(void);
178 
179 
180 private:
181  // Prohibit copy constructor and assignment operator
184 
185  // data
186  Uint4 m_set_State[1];
189 };
190 
191 /* @} */
192 
193 
194 
195 
196 
197 ///////////////////////////////////////////////////////////
198 ///////////////////// inline methods //////////////////////
199 ///////////////////////////////////////////////////////////
200 inline
202 {
203  return m_Title.NotEmpty();
204 }
205 
206 inline
208 {
209  return true;
210 }
211 
212 inline
214 {
215  if ( !m_Title ) {
216  const_cast<CCit_jour_Base*>(this)->ResetTitle();
217  }
218  return (*m_Title);
219 }
220 
221 inline
223 {
224  if ( !m_Title ) {
225  ResetTitle();
226  }
227  return (*m_Title);
228 }
229 
230 inline
231 bool CCit_jour_Base::IsSetImp(void) const
232 {
233  return m_Imp.NotEmpty();
234 }
235 
236 inline
238 {
239  return true;
240 }
241 
242 inline
244 {
245  if ( !m_Imp ) {
246  const_cast<CCit_jour_Base*>(this)->ResetImp();
247  }
248  return (*m_Imp);
249 }
250 
251 inline
253 {
254  if ( !m_Imp ) {
255  ResetImp();
256  }
257  return (*m_Imp);
258 }
259 
260 ///////////////////////////////////////////////////////////
261 ////////////////// end of inline methods //////////////////
262 ///////////////////////////////////////////////////////////
263 
264 
265 
266 
267 
268 END_objects_SCOPE // namespace ncbi::objects::
269 
271 
272 
273 #endif // OBJECTS_BIBLIO_CIT_JOUR_BASE_HPP
Journal citation.
Definition: Cit_jour_.hpp:75
CImprint –.
Definition: Imprint.hpp:66
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
Definition: Title.hpp:51
char value[7]
Definition: config.c:431
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
Definition: seqtitle.cpp:106
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_BIBLIO_EXPORT
Definition: ncbi_export.h:312
TImp & SetImp(void)
Assign a value to Imp data member.
Definition: Cit_jour_.hpp:252
void ResetTitle(void)
Reset Title data member.
Definition: Cit_jour_.cpp:52
void ResetImp(void)
Reset Imp data member.
Definition: Cit_jour_.cpp:66
bool IsSetTitle(void) const
title of journal Check if a value has been assigned to Title data member.
Definition: Cit_jour_.hpp:201
CCit_jour_Base & operator=(const CCit_jour_Base &)
CRef< TTitle > m_Title
Definition: Cit_jour_.hpp:187
bool IsSetImp(void) const
Check if a value has been assigned to Imp data member.
Definition: Cit_jour_.hpp:231
CSerialObject Tparent
Definition: Cit_jour_.hpp:76
CImprint TImp
Definition: Cit_jour_.hpp:88
TTitle & SetTitle(void)
Assign a value to Title data member.
Definition: Cit_jour_.hpp:222
bool CanGetTitle(void) const
Check if it is safe to call GetTitle method.
Definition: Cit_jour_.hpp:207
CCit_jour_Base(const CCit_jour_Base &)
DECLARE_INTERNAL_TYPE_INFO()
CRef< TImp > m_Imp
Definition: Cit_jour_.hpp:188
const TImp & GetImp(void) const
Get the Imp member data.
Definition: Cit_jour_.hpp:243
bool CanGetImp(void) const
Check if it is safe to call GetImp method.
Definition: Cit_jour_.hpp:237
const TTitle & GetTitle(void) const
Get the Title member data.
Definition: Cit_jour_.hpp:213
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Definition: Cit_jour_.hpp:96
static void SetTitle(CRef< CSeq_entry > entry, string title)
Modified on Fri Feb 23 11:45:39 2024 by modify_doxy.py rev. 669887