NCBI C++ ToolKit
PublicationType_.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 PublicationType_.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_PUBLICATIONTYPE_BASE_HPP
42 #define eutils__OBJTOOLS_EUTILS_EFETCH_PUBLICATIONTYPE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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 // generated classes
58 
59 
60 /** @addtogroup dataspec_efetch
61  *
62  * @{
63  */
64 
65 /////////////////////////////////////////////////////////////////////////////
66 ///
67 /// CPublicationType_Base --
68 ///
69 
70 class CPublicationType_Base : public NCBI_NS_NCBI::CSerialObject
71 {
72  typedef NCBI_NS_NCBI::CSerialObject Tparent;
73 public:
74  // constructor
76  // destructor
77  virtual ~CPublicationType_Base(void);
78 
79  // type info
81 
82  /////////////////////////////////////////////////////////////////////////////
83  ///
84  /// C_Attlist --
85  ///
86 
87  class C_Attlist : public NCBI_NS_NCBI::CSerialObject
88  {
89  typedef NCBI_NS_NCBI::CSerialObject Tparent;
90  public:
91  // constructor
92  C_Attlist(void);
93  // destructor
94  ~C_Attlist(void);
95 
96  // type info
98 
99  // types
101 
102  // member index
103  enum class E_memberIndex {
104  e__allMandatory = 0,
105  e_UI
106  };
107  typedef Tparent::CMemberIndex<E_memberIndex, 2> TmemberIndex;
108 
109  // getters
110  // setters
111 
112  /// Check if a value has been assigned to UI data member.
113  ///
114  /// Data member UI is mandatory;
115  /// its type is defined as 'typedef NCBI_NS_STD::string TUI'
116  /// @return
117  /// - true, if a value has been assigned.
118  /// - false, otherwise.
119  bool IsSetUI(void) const;
120 
121  /// Check if it is safe to call GetUI method.
122  ///
123  /// @return
124  /// - true, if the data member is getatable.
125  /// - false, otherwise.
126  bool CanGetUI(void) const;
127 
128  /// Reset UI data member.
129  void ResetUI(void);
130 
131  /// Get the UI member data.
132  ///
133  /// @return
134  /// Reference to the member data.
135  const TUI& GetUI(void) const;
136 
137  /// Assign a value to UI data member.
138  ///
139  /// @param value
140  /// Value to assign
141  void SetUI(const TUI& value);
142  void SetUI(TUI&& value);
143 
144  /// Assign a value to UI data member.
145  ///
146  /// @return
147  /// Reference to the data value.
148  TUI& SetUI(void);
149 
150  /// Reset the whole object
151  void Reset(void);
152 
153 
154  private:
155  // Prohibit copy constructor and assignment operator
158 
159  // data
162  };
163  // types
166 
167  // member index
168  enum class E_memberIndex {
169  e__allMandatory = 0,
170  e_Attlist,
172  };
173  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
174 
175  // getters
176  // setters
177 
178  /// Check if a value has been assigned to Attlist data member.
179  ///
180  /// Data member Attlist is mandatory;
181  /// its type is defined as 'typedef C_Attlist TAttlist'
182  /// @return
183  /// - true, if a value has been assigned.
184  /// - false, otherwise.
185  bool IsSetAttlist(void) const;
186 
187  /// Check if it is safe to call GetAttlist method.
188  ///
189  /// @return
190  /// - true, if the data member is getatable.
191  /// - false, otherwise.
192  bool CanGetAttlist(void) const;
193 
194  /// Reset Attlist data member.
195  void ResetAttlist(void);
196 
197  /// Get the Attlist member data.
198  ///
199  /// @return
200  /// Reference to the member data.
201  const TAttlist& GetAttlist(void) const;
202 
203  /// Assign a value to Attlist data member.
204  ///
205  /// @param value
206  /// Reference to value.
207  void SetAttlist(TAttlist& value);
208 
209  /// Assign a value to Attlist data member.
210  ///
211  /// @return
212  /// Reference to the data value.
213  TAttlist& SetAttlist(void);
214 
215  /// Check if a value has been assigned to PublicationType data member.
216  ///
217  /// Data member PublicationType is mandatory;
218  /// its type is defined as 'typedef NCBI_NS_STD::string TPublicationType'
219  /// @return
220  /// - true, if a value has been assigned.
221  /// - false, otherwise.
222  bool IsSetPublicationType(void) const;
223 
224  /// Check if it is safe to call GetPublicationType method.
225  ///
226  /// @return
227  /// - true, if the data member is getatable.
228  /// - false, otherwise.
229  bool CanGetPublicationType(void) const;
230 
231  /// Reset PublicationType data member.
232  void ResetPublicationType(void);
233 
234  /// Get the PublicationType member data.
235  ///
236  /// @return
237  /// Reference to the member data.
238  const TPublicationType& GetPublicationType(void) const;
239 
240  /// Assign a value to PublicationType data member.
241  ///
242  /// @param value
243  /// Value to assign
246 
247  /// Assign a value to PublicationType data member.
248  ///
249  /// @return
250  /// Reference to the data value.
252 
253  /// Reset the whole object
254  virtual void Reset(void);
255 
256 
257 private:
258  // Prohibit copy constructor and assignment operator
261 
262  // data
264  NCBI_NS_NCBI::CRef< TAttlist > m_Attlist;
266 };
267 
268 /* @} */
269 
270 
271 
272 
273 
274 ///////////////////////////////////////////////////////////
275 ///////////////////// inline methods //////////////////////
276 ///////////////////////////////////////////////////////////
277 inline
279 {
280  return ((m_set_State[0] & 0x3) != 0);
281 }
282 
283 inline
285 {
286  return IsSetUI();
287 }
288 
289 inline
291 {
292  if (!CanGetUI()) {
293  ThrowUnassigned(0);
294  }
295  return m_UI;
296 }
297 
298 inline
300 {
301  m_UI = value;
302  m_set_State[0] |= 0x3;
303 }
304 
305 inline
307 {
308  m_UI = std::forward<CPublicationType_Base::C_Attlist::TUI>(value);
309  m_set_State[0] |= 0x3;
310 }
311 
312 inline
314 {
315 #ifdef _DEBUG
316  if (!IsSetUI()) {
317  m_UI = UnassignedString();
318  }
319 #endif
320  m_set_State[0] |= 0x1;
321  return m_UI;
322 }
323 
324 inline
326 {
327  return m_Attlist.NotEmpty();
328 }
329 
330 inline
332 {
333  return true;
334 }
335 
336 inline
338 {
339  if ( !m_Attlist ) {
340  const_cast<CPublicationType_Base*>(this)->ResetAttlist();
341  }
342  return (*m_Attlist);
343 }
344 
345 inline
347 {
348  if ( !m_Attlist ) {
349  ResetAttlist();
350  }
351  return (*m_Attlist);
352 }
353 
354 inline
356 {
357  return ((m_set_State[0] & 0xc) != 0);
358 }
359 
360 inline
362 {
363  return IsSetPublicationType();
364 }
365 
366 inline
368 {
369  if (!CanGetPublicationType()) {
370  ThrowUnassigned(1);
371  }
372  return m_PublicationType;
373 }
374 
375 inline
377 {
379  m_set_State[0] |= 0xc;
380 }
381 
382 inline
384 {
385  m_PublicationType = std::forward<CPublicationType_Base::TPublicationType>(value);
386  m_set_State[0] |= 0xc;
387 }
388 
389 inline
391 {
392 #ifdef _DEBUG
393  if (!IsSetPublicationType()) {
394  m_PublicationType = UnassignedString();
395  }
396 #endif
397  m_set_State[0] |= 0x4;
398  return m_PublicationType;
399 }
400 
401 ///////////////////////////////////////////////////////////
402 ////////////////// end of inline methods //////////////////
403 ///////////////////////////////////////////////////////////
404 
405 
406 
407 
408 
409 END_eutils_SCOPE // namespace eutils::
410 
411 
412 #endif // eutils__OBJTOOLS_EUTILS_EFETCH_PUBLICATIONTYPE_BASE_HPP
#define BEGIN_eutils_SCOPE
#define END_eutils_SCOPE
CPublicationType_Base –.
char value[7]
Definition: config.c:431
string
Definition: cgiapp.hpp:687
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
const TPublicationType & GetPublicationType(void) const
Get the PublicationType member data.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
virtual ~CPublicationType_Base(void)
NCBI_NS_NCBI::CSerialObject Tparent
bool IsSetUI(void) const
Check if a value has been assigned to UI data member.
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
void ResetPublicationType(void)
Reset PublicationType data member.
NCBI_NS_NCBI::CSerialObject Tparent
void Reset(void)
Reset the whole object.
NCBI_NS_STD::string m_PublicationType
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
void ResetAttlist(void)
Reset Attlist data member.
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
NCBI_NS_STD::string TPublicationType
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
bool CanGetUI(void) const
Check if it is safe to call GetUI method.
virtual void Reset(void)
Reset the whole object.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
CPublicationType_Base(const CPublicationType_Base &)
C_Attlist & operator=(const C_Attlist &)
TUI & SetUI(void)
Assign a value to UI data member.
const TUI & GetUI(void) const
Get the UI member data.
TPublicationType & SetPublicationType(void)
Assign a value to PublicationType data member.
bool IsSetPublicationType(void) const
Check if a value has been assigned to PublicationType data member.
CPublicationType_Base & operator=(const CPublicationType_Base &)
void ResetUI(void)
Reset UI data member.
bool CanGetPublicationType(void) const
Check if it is safe to call GetPublicationType method.
Modified on Mon Mar 04 05:12:44 2024 by modify_doxy.py rev. 669887