NCBI C++ ToolKit
MedlineJournalInfo_.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 MedlineJournalInfo_.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/objtools/eutils/efetch/efetch.xsd">efetch.xsd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/efetch/efetch.def">efetch.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 eutils__OBJTOOLS_EUTILS_EFETCH_MEDLINEJOURNALINFO_BASE_HPP
42 #define eutils__OBJTOOLS_EUTILS_EFETCH_MEDLINEJOURNALINFO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 #ifndef BEGIN_eutils_SCOPE
47 # define BEGIN_eutils_SCOPE BEGIN_SCOPE(eutils)
48 # define END_eutils_SCOPE END_SCOPE(eutils)
49 #endif
50 BEGIN_eutils_SCOPE // namespace eutils::
51 
52 
53 // forward declarations
54 class CCountry;
55 class CISSNLinking;
56 class CMedlineTA;
57 class CNlmUniqueID;
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_efetch
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CMedlineJournalInfo_Base --
71 ///
72 
73 class CMedlineJournalInfo_Base : public NCBI_NS_NCBI::CSerialObject
74 {
75  typedef NCBI_NS_NCBI::CSerialObject Tparent;
76 public:
77  // constructor
79  // destructor
80  virtual ~CMedlineJournalInfo_Base(void);
81 
82  // type info
84 
85  // types
86  typedef CCountry TCountry;
90 
91  // member index
92  enum class E_memberIndex {
93  e__allMandatory = 0,
94  e_Country,
98  };
99  typedef Tparent::CMemberIndex<E_memberIndex, 5> TmemberIndex;
100 
101  // getters
102  // setters
103 
104  /// Check if a value has been assigned to Country data member.
105  ///
106  /// Data member Country is optional;
107  /// its type is defined as 'typedef CCountry TCountry'
108  /// @return
109  /// - true, if a value has been assigned.
110  /// - false, otherwise.
111  bool IsSetCountry(void) const;
112 
113  /// Check if it is safe to call GetCountry method.
114  ///
115  /// @return
116  /// - true, if the data member is getatable.
117  /// - false, otherwise.
118  bool CanGetCountry(void) const;
119 
120  /// Reset Country data member.
121  void ResetCountry(void);
122 
123  /// Get the Country member data.
124  ///
125  /// @return
126  /// Reference to the member data.
127  const TCountry& GetCountry(void) const;
128 
129  /// Assign a value to Country data member.
130  ///
131  /// @param value
132  /// Reference to value.
133  void SetCountry(TCountry& value);
134 
135  /// Assign a value to Country data member.
136  ///
137  /// @return
138  /// Reference to the data value.
139  TCountry& SetCountry(void);
140 
141  /// Check if a value has been assigned to MedlineTA data member.
142  ///
143  /// Data member MedlineTA is mandatory;
144  /// its type is defined as 'typedef CMedlineTA TMedlineTA'
145  /// @return
146  /// - true, if a value has been assigned.
147  /// - false, otherwise.
148  bool IsSetMedlineTA(void) const;
149 
150  /// Check if it is safe to call GetMedlineTA method.
151  ///
152  /// @return
153  /// - true, if the data member is getatable.
154  /// - false, otherwise.
155  bool CanGetMedlineTA(void) const;
156 
157  /// Reset MedlineTA data member.
158  void ResetMedlineTA(void);
159 
160  /// Get the MedlineTA member data.
161  ///
162  /// @return
163  /// Reference to the member data.
164  const TMedlineTA& GetMedlineTA(void) const;
165 
166  /// Assign a value to MedlineTA data member.
167  ///
168  /// @param value
169  /// Reference to value.
171 
172  /// Assign a value to MedlineTA data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TMedlineTA& SetMedlineTA(void);
177 
178  /// Check if a value has been assigned to NlmUniqueID data member.
179  ///
180  /// Data member NlmUniqueID is optional;
181  /// its type is defined as 'typedef CNlmUniqueID TNlmUniqueID'
182  /// @return
183  /// - true, if a value has been assigned.
184  /// - false, otherwise.
185  bool IsSetNlmUniqueID(void) const;
186 
187  /// Check if it is safe to call GetNlmUniqueID method.
188  ///
189  /// @return
190  /// - true, if the data member is getatable.
191  /// - false, otherwise.
192  bool CanGetNlmUniqueID(void) const;
193 
194  /// Reset NlmUniqueID data member.
195  void ResetNlmUniqueID(void);
196 
197  /// Get the NlmUniqueID member data.
198  ///
199  /// @return
200  /// Reference to the member data.
201  const TNlmUniqueID& GetNlmUniqueID(void) const;
202 
203  /// Assign a value to NlmUniqueID data member.
204  ///
205  /// @param value
206  /// Reference to value.
208 
209  /// Assign a value to NlmUniqueID data member.
210  ///
211  /// @return
212  /// Reference to the data value.
214 
215  /// Check if a value has been assigned to ISSNLinking data member.
216  ///
217  /// Data member ISSNLinking is optional;
218  /// its type is defined as 'typedef CISSNLinking TISSNLinking'
219  /// @return
220  /// - true, if a value has been assigned.
221  /// - false, otherwise.
222  bool IsSetISSNLinking(void) const;
223 
224  /// Check if it is safe to call GetISSNLinking method.
225  ///
226  /// @return
227  /// - true, if the data member is getatable.
228  /// - false, otherwise.
229  bool CanGetISSNLinking(void) const;
230 
231  /// Reset ISSNLinking data member.
232  void ResetISSNLinking(void);
233 
234  /// Get the ISSNLinking member data.
235  ///
236  /// @return
237  /// Reference to the member data.
238  const TISSNLinking& GetISSNLinking(void) const;
239 
240  /// Assign a value to ISSNLinking data member.
241  ///
242  /// @param value
243  /// Reference to value.
245 
246  /// Assign a value to ISSNLinking data member.
247  ///
248  /// @return
249  /// Reference to the data value.
251 
252  /// Reset the whole object
253  virtual void Reset(void);
254 
255 
256 private:
257  // Prohibit copy constructor and assignment operator
260 
261  // data
263  NCBI_NS_NCBI::CRef< TCountry > m_Country;
264  NCBI_NS_NCBI::CRef< TMedlineTA > m_MedlineTA;
265  NCBI_NS_NCBI::CRef< TNlmUniqueID > m_NlmUniqueID;
266  NCBI_NS_NCBI::CRef< TISSNLinking > m_ISSNLinking;
267 };
268 
269 /* @} */
270 
271 
272 
273 
274 
275 ///////////////////////////////////////////////////////////
276 ///////////////////// inline methods //////////////////////
277 ///////////////////////////////////////////////////////////
278 inline
280 {
281  return m_Country.NotEmpty();
282 }
283 
284 inline
286 {
287  return IsSetCountry();
288 }
289 
290 inline
292 {
293  if (!CanGetCountry()) {
294  ThrowUnassigned(0);
295  }
296  return (*m_Country);
297 }
298 
299 inline
301 {
302  return m_MedlineTA.NotEmpty();
303 }
304 
305 inline
307 {
308  return true;
309 }
310 
311 inline
313 {
314  if ( !m_MedlineTA ) {
315  const_cast<CMedlineJournalInfo_Base*>(this)->ResetMedlineTA();
316  }
317  return (*m_MedlineTA);
318 }
319 
320 inline
322 {
323  if ( !m_MedlineTA ) {
324  ResetMedlineTA();
325  }
326  return (*m_MedlineTA);
327 }
328 
329 inline
331 {
332  return m_NlmUniqueID.NotEmpty();
333 }
334 
335 inline
337 {
338  return IsSetNlmUniqueID();
339 }
340 
341 inline
343 {
344  if (!CanGetNlmUniqueID()) {
345  ThrowUnassigned(2);
346  }
347  return (*m_NlmUniqueID);
348 }
349 
350 inline
352 {
353  return m_ISSNLinking.NotEmpty();
354 }
355 
356 inline
358 {
359  return IsSetISSNLinking();
360 }
361 
362 inline
364 {
365  if (!CanGetISSNLinking()) {
366  ThrowUnassigned(3);
367  }
368  return (*m_ISSNLinking);
369 }
370 
371 ///////////////////////////////////////////////////////////
372 ////////////////// end of inline methods //////////////////
373 ///////////////////////////////////////////////////////////
374 
375 
376 
377 
378 
379 END_eutils_SCOPE // namespace eutils::
380 
381 
382 #endif // eutils__OBJTOOLS_EUTILS_EFETCH_MEDLINEJOURNALINFO_BASE_HPP
#define BEGIN_eutils_SCOPE
#define END_eutils_SCOPE
CCountry –.
Definition: Country.hpp:64
CISSNLinking –.
Definition: ISSNLinking.hpp:64
CMedlineJournalInfo_Base –.
CMedlineTA –.
Definition: MedlineTA.hpp:64
CNlmUniqueID –.
Definition: NlmUniqueID.hpp:64
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
void ResetNlmUniqueID(void)
Reset NlmUniqueID data member.
bool CanGetNlmUniqueID(void) const
Check if it is safe to call GetNlmUniqueID method.
bool CanGetMedlineTA(void) const
Check if it is safe to call GetMedlineTA method.
TMedlineTA & SetMedlineTA(void)
Assign a value to MedlineTA data member.
CMedlineJournalInfo_Base(const CMedlineJournalInfo_Base &)
TNlmUniqueID & SetNlmUniqueID(void)
Assign a value to NlmUniqueID data member.
NCBI_NS_NCBI::CRef< TMedlineTA > m_MedlineTA
bool CanGetCountry(void) const
Check if it is safe to call GetCountry method.
virtual void Reset(void)
Reset the whole object.
const TCountry & GetCountry(void) const
Get the Country member data.
void ResetISSNLinking(void)
Reset ISSNLinking data member.
bool IsSetISSNLinking(void) const
Check if a value has been assigned to ISSNLinking data member.
void ResetCountry(void)
Reset Country data member.
const TISSNLinking & GetISSNLinking(void) const
Get the ISSNLinking member data.
void ResetMedlineTA(void)
Reset MedlineTA data member.
TCountry & SetCountry(void)
Assign a value to Country data member.
bool IsSetNlmUniqueID(void) const
Check if a value has been assigned to NlmUniqueID data member.
NCBI_NS_NCBI::CSerialObject Tparent
const TNlmUniqueID & GetNlmUniqueID(void) const
Get the NlmUniqueID member data.
const TMedlineTA & GetMedlineTA(void) const
Get the MedlineTA member data.
bool IsSetMedlineTA(void) const
Check if a value has been assigned to MedlineTA data member.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
NCBI_NS_NCBI::CRef< TCountry > m_Country
bool CanGetISSNLinking(void) const
Check if it is safe to call GetISSNLinking method.
NCBI_NS_NCBI::CRef< TNlmUniqueID > m_NlmUniqueID
bool IsSetCountry(void) const
Check if a value has been assigned to Country data member.
TISSNLinking & SetISSNLinking(void)
Assign a value to ISSNLinking data member.
CMedlineJournalInfo_Base & operator=(const CMedlineJournalInfo_Base &)
NCBI_NS_NCBI::CRef< TISSNLinking > m_ISSNLinking
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:53 2024 by modify_doxy.py rev. 669887