NCBI C++ ToolKit
PubmedData_.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 PubmedData_.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_PUBMEDDATA_BASE_HPP
42 #define eutils__OBJTOOLS_EUTILS_EFETCH_PUBMEDDATA_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 
50 #ifndef BEGIN_eutils_SCOPE
51 # define BEGIN_eutils_SCOPE BEGIN_SCOPE(eutils)
52 # define END_eutils_SCOPE END_SCOPE(eutils)
53 #endif
54 BEGIN_eutils_SCOPE // namespace eutils::
55 
56 
57 // forward declarations
58 class CArticleIdList;
59 class CHistory;
60 class CObjectList;
61 class CPublicationStatus;
62 class CReferenceList;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_efetch
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 ///
75 /// CPubmedData_Base --
76 ///
77 
78 class CPubmedData_Base : public NCBI_NS_NCBI::CSerialObject
79 {
80  typedef NCBI_NS_NCBI::CSerialObject Tparent;
81 public:
82  // constructor
83  CPubmedData_Base(void);
84  // destructor
85  virtual ~CPubmedData_Base(void);
86 
87  // type info
89 
90  // types
91  typedef CHistory THistory;
95  typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CReferenceList > > TReferenceList;
96 
97  // member index
98  enum class E_memberIndex {
99  e__allMandatory = 0,
100  e_History,
103  e_ObjectList,
105  };
106  typedef Tparent::CMemberIndex<E_memberIndex, 6> TmemberIndex;
107 
108  // getters
109  // setters
110 
111  /// Check if a value has been assigned to History data member.
112  ///
113  /// Data member History is optional;
114  /// its type is defined as 'typedef CHistory THistory'
115  /// @return
116  /// - true, if a value has been assigned.
117  /// - false, otherwise.
118  bool IsSetHistory(void) const;
119 
120  /// Check if it is safe to call GetHistory method.
121  ///
122  /// @return
123  /// - true, if the data member is getatable.
124  /// - false, otherwise.
125  bool CanGetHistory(void) const;
126 
127  /// Reset History data member.
128  void ResetHistory(void);
129 
130  /// Get the History member data.
131  ///
132  /// @return
133  /// Reference to the member data.
134  const THistory& GetHistory(void) const;
135 
136  /// Assign a value to History data member.
137  ///
138  /// @param value
139  /// Reference to value.
140  void SetHistory(THistory& value);
141 
142  /// Assign a value to History data member.
143  ///
144  /// @return
145  /// Reference to the data value.
146  THistory& SetHistory(void);
147 
148  /// Check if a value has been assigned to PublicationStatus data member.
149  ///
150  /// Data member PublicationStatus is mandatory;
151  /// its type is defined as 'typedef CPublicationStatus TPublicationStatus'
152  /// @return
153  /// - true, if a value has been assigned.
154  /// - false, otherwise.
155  bool IsSetPublicationStatus(void) const;
156 
157  /// Check if it is safe to call GetPublicationStatus method.
158  ///
159  /// @return
160  /// - true, if the data member is getatable.
161  /// - false, otherwise.
162  bool CanGetPublicationStatus(void) const;
163 
164  /// Reset PublicationStatus data member.
165  void ResetPublicationStatus(void);
166 
167  /// Get the PublicationStatus member data.
168  ///
169  /// @return
170  /// Reference to the member data.
171  const TPublicationStatus& GetPublicationStatus(void) const;
172 
173  /// Assign a value to PublicationStatus data member.
174  ///
175  /// @param value
176  /// Reference to value.
178 
179  /// Assign a value to PublicationStatus data member.
180  ///
181  /// @return
182  /// Reference to the data value.
184 
185  /// Check if a value has been assigned to ArticleIdList data member.
186  ///
187  /// Data member ArticleIdList is mandatory;
188  /// its type is defined as 'typedef CArticleIdList TArticleIdList'
189  /// @return
190  /// - true, if a value has been assigned.
191  /// - false, otherwise.
192  bool IsSetArticleIdList(void) const;
193 
194  /// Check if it is safe to call GetArticleIdList method.
195  ///
196  /// @return
197  /// - true, if the data member is getatable.
198  /// - false, otherwise.
199  bool CanGetArticleIdList(void) const;
200 
201  /// Reset ArticleIdList data member.
202  void ResetArticleIdList(void);
203 
204  /// Get the ArticleIdList member data.
205  ///
206  /// @return
207  /// Reference to the member data.
208  const TArticleIdList& GetArticleIdList(void) const;
209 
210  /// Assign a value to ArticleIdList data member.
211  ///
212  /// @param value
213  /// Reference to value.
215 
216  /// Assign a value to ArticleIdList data member.
217  ///
218  /// @return
219  /// Reference to the data value.
221 
222  /// Check if a value has been assigned to ObjectList data member.
223  ///
224  /// Data member ObjectList is optional;
225  /// its type is defined as 'typedef CObjectList TObjectList'
226  /// @return
227  /// - true, if a value has been assigned.
228  /// - false, otherwise.
229  bool IsSetObjectList(void) const;
230 
231  /// Check if it is safe to call GetObjectList method.
232  ///
233  /// @return
234  /// - true, if the data member is getatable.
235  /// - false, otherwise.
236  bool CanGetObjectList(void) const;
237 
238  /// Reset ObjectList data member.
239  void ResetObjectList(void);
240 
241  /// Get the ObjectList member data.
242  ///
243  /// @return
244  /// Reference to the member data.
245  const TObjectList& GetObjectList(void) const;
246 
247  /// Assign a value to ObjectList data member.
248  ///
249  /// @param value
250  /// Reference to value.
252 
253  /// Assign a value to ObjectList data member.
254  ///
255  /// @return
256  /// Reference to the data value.
257  TObjectList& SetObjectList(void);
258 
259  /// Check if a value has been assigned to ReferenceList data member.
260  ///
261  /// Data member ReferenceList is optional;
262  /// its type is defined as 'typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CReferenceList > > TReferenceList'
263  /// @return
264  /// - true, if a value has been assigned.
265  /// - false, otherwise.
266  bool IsSetReferenceList(void) const;
267 
268  /// Check if it is safe to call GetReferenceList method.
269  ///
270  /// @return
271  /// - true, if the data member is getatable.
272  /// - false, otherwise.
273  bool CanGetReferenceList(void) const;
274 
275  /// Reset ReferenceList data member.
276  void ResetReferenceList(void);
277 
278  /// Get the ReferenceList member data.
279  ///
280  /// @return
281  /// Reference to the member data.
282  const TReferenceList& GetReferenceList(void) const;
283 
284  /// Assign a value to ReferenceList data member.
285  ///
286  /// @return
287  /// Reference to the data value.
289 
290  /// Reset the whole object
291  virtual void Reset(void);
292 
293 
294 private:
295  // Prohibit copy constructor and assignment operator
298 
299  // data
301  NCBI_NS_NCBI::CRef< THistory > m_History;
302  NCBI_NS_NCBI::CRef< TPublicationStatus > m_PublicationStatus;
303  NCBI_NS_NCBI::CRef< TArticleIdList > m_ArticleIdList;
304  NCBI_NS_NCBI::CRef< TObjectList > m_ObjectList;
305  NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CReferenceList > > m_ReferenceList;
306 };
307 
308 /* @} */
309 
310 
311 
312 
313 
314 ///////////////////////////////////////////////////////////
315 ///////////////////// inline methods //////////////////////
316 ///////////////////////////////////////////////////////////
317 inline
319 {
320  return m_History.NotEmpty();
321 }
322 
323 inline
325 {
326  return IsSetHistory();
327 }
328 
329 inline
331 {
332  if (!CanGetHistory()) {
333  ThrowUnassigned(0);
334  }
335  return (*m_History);
336 }
337 
338 inline
340 {
341  return m_PublicationStatus.NotEmpty();
342 }
343 
344 inline
346 {
347  return true;
348 }
349 
350 inline
352 {
353  if ( !m_PublicationStatus ) {
354  const_cast<CPubmedData_Base*>(this)->ResetPublicationStatus();
355  }
356  return (*m_PublicationStatus);
357 }
358 
359 inline
361 {
362  if ( !m_PublicationStatus ) {
364  }
365  return (*m_PublicationStatus);
366 }
367 
368 inline
370 {
371  return m_ArticleIdList.NotEmpty();
372 }
373 
374 inline
376 {
377  return true;
378 }
379 
380 inline
382 {
383  if ( !m_ArticleIdList ) {
384  const_cast<CPubmedData_Base*>(this)->ResetArticleIdList();
385  }
386  return (*m_ArticleIdList);
387 }
388 
389 inline
391 {
392  if ( !m_ArticleIdList ) {
394  }
395  return (*m_ArticleIdList);
396 }
397 
398 inline
400 {
401  return m_ObjectList.NotEmpty();
402 }
403 
404 inline
406 {
407  return IsSetObjectList();
408 }
409 
410 inline
412 {
413  if (!CanGetObjectList()) {
414  ThrowUnassigned(3);
415  }
416  return (*m_ObjectList);
417 }
418 
419 inline
421 {
422  return ((m_set_State[0] & 0x300) != 0);
423 }
424 
425 inline
427 {
428  return true;
429 }
430 
431 inline
433 {
434  return m_ReferenceList;
435 }
436 
437 inline
439 {
440  m_set_State[0] |= 0x100;
441  return m_ReferenceList;
442 }
443 
444 ///////////////////////////////////////////////////////////
445 ////////////////// end of inline methods //////////////////
446 ///////////////////////////////////////////////////////////
447 
448 
449 
450 
451 
452 END_eutils_SCOPE // namespace eutils::
453 
454 
455 #endif // eutils__OBJTOOLS_EUTILS_EFETCH_PUBMEDDATA_BASE_HPP
#define BEGIN_eutils_SCOPE
Definition: PubmedData_.hpp:51
#define END_eutils_SCOPE
Definition: PubmedData_.hpp:52
CArticleIdList –.
CHistory –.
Definition: History.hpp:64
CObjectList Data structure representing a list of CObjects with associated Scopes and other optional ...
Definition: object_list.hpp:63
CPublicationStatus –.
CPubmedData_Base –.
Definition: PubmedData_.hpp:79
CReferenceList –.
char value[7]
Definition: config.c:431
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
NCBI_NS_NCBI::CRef< TPublicationStatus > m_PublicationStatus
bool CanGetHistory(void) const
Check if it is safe to call GetHistory method.
void ResetArticleIdList(void)
Reset ArticleIdList data member.
Definition: PubmedData_.cpp:84
NCBI_NS_NCBI::CSerialObject Tparent
Definition: PubmedData_.hpp:80
bool IsSetObjectList(void) const
Check if a value has been assigned to ObjectList data member.
bool CanGetPublicationStatus(void) const
Check if it is safe to call GetPublicationStatus method.
bool IsSetArticleIdList(void) const
Check if a value has been assigned to ArticleIdList data member.
CPubmedData_Base(const CPubmedData_Base &)
bool IsSetPublicationStatus(void) const
Check if a value has been assigned to PublicationStatus data member.
CObjectList TObjectList
Definition: PubmedData_.hpp:94
TArticleIdList & SetArticleIdList(void)
Assign a value to ArticleIdList data member.
bool CanGetArticleIdList(void) const
Check if it is safe to call GetArticleIdList method.
TObjectList & SetObjectList(void)
Assign a value to ObjectList data member.
virtual void Reset(void)
Reset the whole object.
void ResetObjectList(void)
Reset ObjectList data member.
Definition: PubmedData_.cpp:98
const THistory & GetHistory(void) const
Get the History member data.
TPublicationStatus & SetPublicationStatus(void)
Assign a value to PublicationStatus data member.
virtual ~CPubmedData_Base(void)
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CReferenceList > > m_ReferenceList
void ResetPublicationStatus(void)
Reset PublicationStatus data member.
Definition: PubmedData_.cpp:70
const TReferenceList & GetReferenceList(void) const
Get the ReferenceList member data.
Uint4 m_set_State[1]
NCBI_NS_NCBI::CRef< TArticleIdList > m_ArticleIdList
void ResetHistory(void)
Reset History data member.
Definition: PubmedData_.cpp:53
bool IsSetReferenceList(void) const
Check if a value has been assigned to ReferenceList data member.
const TPublicationStatus & GetPublicationStatus(void) const
Get the PublicationStatus member data.
CPubmedData_Base & operator=(const CPubmedData_Base &)
NCBI_NS_NCBI::CRef< TObjectList > m_ObjectList
void ResetReferenceList(void)
Reset ReferenceList data member.
bool CanGetReferenceList(void) const
Check if it is safe to call GetReferenceList method.
CArticleIdList TArticleIdList
Definition: PubmedData_.hpp:93
TReferenceList & SetReferenceList(void)
Assign a value to ReferenceList data member.
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CReferenceList > > TReferenceList
Definition: PubmedData_.hpp:95
const TArticleIdList & GetArticleIdList(void) const
Get the ArticleIdList member data.
THistory & SetHistory(void)
Assign a value to History data member.
Definition: PubmedData_.cpp:63
bool IsSetHistory(void) const
Check if a value has been assigned to History data member.
const TObjectList & GetObjectList(void) const
Get the ObjectList member data.
NCBI_NS_NCBI::CRef< THistory > m_History
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
CPublicationStatus TPublicationStatus
Definition: PubmedData_.hpp:92
bool CanGetObjectList(void) const
Check if it is safe to call GetObjectList method.
Modified on Thu Feb 29 12:17:57 2024 by modify_doxy.py rev. 669887