NCBI C++ ToolKit
QualifierName_.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 QualifierName_.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_QUALIFIERNAME_BASE_HPP
42 #define eutils__OBJTOOLS_EUTILS_EFETCH_QUALIFIERNAME_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 /// CQualifierName_Base --
68 ///
69 
70 class CQualifierName_Base : public NCBI_NS_NCBI::CSerialObject
71 {
72  typedef NCBI_NS_NCBI::CSerialObject Tparent;
73 public:
74  // constructor
75  CQualifierName_Base(void);
76  // destructor
77  virtual ~CQualifierName_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 
102  };
103 
104  /// Access to EAttlist_MajorTopicYN's attributes (values, names) as defined in spec
105  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EAttlist_MajorTopicYN)(void);
106 
107  // types
110 
111  // member index
112  enum class E_memberIndex {
113  e__allMandatory = 0,
115  e_UI
116  };
117  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
118 
119  // getters
120  // setters
121 
122  /// Check if a value has been assigned to MajorTopicYN data member.
123  ///
124  /// Data member MajorTopicYN is optional with default eAttlist_MajorTopicYN_N;
125  /// its type is defined as 'typedef EAttlist_MajorTopicYN TMajorTopicYN'
126  /// @return
127  /// - true, if a value has been assigned.
128  /// - false, otherwise.
129  bool IsSetMajorTopicYN(void) const;
130 
131  /// Check if it is safe to call GetMajorTopicYN method.
132  ///
133  /// @return
134  /// - true, if the data member is getatable.
135  /// - false, otherwise.
136  bool CanGetMajorTopicYN(void) const;
137 
138  /// Reset MajorTopicYN data member.
139  void ResetMajorTopicYN(void);
140 
141  /// Assign default value to MajorTopicYN data member.
142  void SetDefaultMajorTopicYN(void);
143 
144  /// Get the MajorTopicYN member data.
145  ///
146  /// @return
147  /// Copy of the member data.
148  TMajorTopicYN GetMajorTopicYN(void) const;
149 
150  /// Assign a value to MajorTopicYN data member.
151  ///
152  /// @param value
153  /// Value to assign
155 
156  /// Assign a value to MajorTopicYN data member.
157  ///
158  /// @return
159  /// Reference to the data value.
161 
162  /// Check if a value has been assigned to UI data member.
163  ///
164  /// Data member UI is mandatory;
165  /// its type is defined as 'typedef NCBI_NS_STD::string TUI'
166  /// @return
167  /// - true, if a value has been assigned.
168  /// - false, otherwise.
169  bool IsSetUI(void) const;
170 
171  /// Check if it is safe to call GetUI method.
172  ///
173  /// @return
174  /// - true, if the data member is getatable.
175  /// - false, otherwise.
176  bool CanGetUI(void) const;
177 
178  /// Reset UI data member.
179  void ResetUI(void);
180 
181  /// Get the UI member data.
182  ///
183  /// @return
184  /// Reference to the member data.
185  const TUI& GetUI(void) const;
186 
187  /// Assign a value to UI data member.
188  ///
189  /// @param value
190  /// Value to assign
191  void SetUI(const TUI& value);
192  void SetUI(TUI&& value);
193 
194  /// Assign a value to UI data member.
195  ///
196  /// @return
197  /// Reference to the data value.
198  TUI& SetUI(void);
199 
200  /// Reset the whole object
201  void Reset(void);
202 
203 
204  private:
205  // Prohibit copy constructor and assignment operator
208 
209  // data
213  };
214  // types
217 
218  // member index
219  enum class E_memberIndex {
220  e__allMandatory = 0,
221  e_Attlist,
223  };
224  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
225 
226  // getters
227  // setters
228 
229  /// Check if a value has been assigned to Attlist data member.
230  ///
231  /// Data member Attlist is mandatory;
232  /// its type is defined as 'typedef C_Attlist TAttlist'
233  /// @return
234  /// - true, if a value has been assigned.
235  /// - false, otherwise.
236  bool IsSetAttlist(void) const;
237 
238  /// Check if it is safe to call GetAttlist method.
239  ///
240  /// @return
241  /// - true, if the data member is getatable.
242  /// - false, otherwise.
243  bool CanGetAttlist(void) const;
244 
245  /// Reset Attlist data member.
246  void ResetAttlist(void);
247 
248  /// Get the Attlist member data.
249  ///
250  /// @return
251  /// Reference to the member data.
252  const TAttlist& GetAttlist(void) const;
253 
254  /// Assign a value to Attlist data member.
255  ///
256  /// @param value
257  /// Reference to value.
258  void SetAttlist(TAttlist& value);
259 
260  /// Assign a value to Attlist data member.
261  ///
262  /// @return
263  /// Reference to the data value.
264  TAttlist& SetAttlist(void);
265 
266  /// Check if a value has been assigned to QualifierName data member.
267  ///
268  /// Data member QualifierName is mandatory;
269  /// its type is defined as 'typedef NCBI_NS_STD::string TQualifierName'
270  /// @return
271  /// - true, if a value has been assigned.
272  /// - false, otherwise.
273  bool IsSetQualifierName(void) const;
274 
275  /// Check if it is safe to call GetQualifierName method.
276  ///
277  /// @return
278  /// - true, if the data member is getatable.
279  /// - false, otherwise.
280  bool CanGetQualifierName(void) const;
281 
282  /// Reset QualifierName data member.
283  void ResetQualifierName(void);
284 
285  /// Get the QualifierName member data.
286  ///
287  /// @return
288  /// Reference to the member data.
289  const TQualifierName& GetQualifierName(void) const;
290 
291  /// Assign a value to QualifierName data member.
292  ///
293  /// @param value
294  /// Value to assign
297 
298  /// Assign a value to QualifierName data member.
299  ///
300  /// @return
301  /// Reference to the data value.
303 
304  /// Reset the whole object
305  virtual void Reset(void);
306 
307 
308 private:
309  // Prohibit copy constructor and assignment operator
312 
313  // data
315  NCBI_NS_NCBI::CRef< TAttlist > m_Attlist;
317 };
318 
319 /* @} */
320 
321 
322 
323 
324 
325 ///////////////////////////////////////////////////////////
326 ///////////////////// inline methods //////////////////////
327 ///////////////////////////////////////////////////////////
328 inline
330 {
331  return ((m_set_State[0] & 0x3) != 0);
332 }
333 
334 inline
336 {
337  return true;
338 }
339 
340 inline
342 {
343  m_MajorTopicYN = eAttlist_MajorTopicYN_N;
344  m_set_State[0] &= ~0x3;
345 }
346 
347 inline
349 {
350  ResetMajorTopicYN();
351  m_set_State[0] |= 0x1;
352 }
353 
354 inline
356 {
357  return m_MajorTopicYN;
358 }
359 
360 inline
362 {
363  m_MajorTopicYN = value;
364  m_set_State[0] |= 0x3;
365 }
366 
367 inline
369 {
370 #ifdef _DEBUG
371  if (!IsSetMajorTopicYN()) {
372  memset(&m_MajorTopicYN,UnassignedByte(),sizeof(m_MajorTopicYN));
373  }
374 #endif
375  m_set_State[0] |= 0x1;
376  return m_MajorTopicYN;
377 }
378 
379 inline
381 {
382  return ((m_set_State[0] & 0xc) != 0);
383 }
384 
385 inline
387 {
388  return IsSetUI();
389 }
390 
391 inline
393 {
394  if (!CanGetUI()) {
395  ThrowUnassigned(1);
396  }
397  return m_UI;
398 }
399 
400 inline
402 {
403  m_UI = value;
404  m_set_State[0] |= 0xc;
405 }
406 
407 inline
409 {
410  m_UI = std::forward<CQualifierName_Base::C_Attlist::TUI>(value);
411  m_set_State[0] |= 0xc;
412 }
413 
414 inline
416 {
417 #ifdef _DEBUG
418  if (!IsSetUI()) {
419  m_UI = UnassignedString();
420  }
421 #endif
422  m_set_State[0] |= 0x4;
423  return m_UI;
424 }
425 
426 inline
428 {
429  return m_Attlist.NotEmpty();
430 }
431 
432 inline
434 {
435  return true;
436 }
437 
438 inline
440 {
441  if ( !m_Attlist ) {
442  const_cast<CQualifierName_Base*>(this)->ResetAttlist();
443  }
444  return (*m_Attlist);
445 }
446 
447 inline
449 {
450  if ( !m_Attlist ) {
451  ResetAttlist();
452  }
453  return (*m_Attlist);
454 }
455 
456 inline
458 {
459  return ((m_set_State[0] & 0xc) != 0);
460 }
461 
462 inline
464 {
465  return IsSetQualifierName();
466 }
467 
468 inline
470 {
471  if (!CanGetQualifierName()) {
472  ThrowUnassigned(1);
473  }
474  return m_QualifierName;
475 }
476 
477 inline
479 {
481  m_set_State[0] |= 0xc;
482 }
483 
484 inline
486 {
487  m_QualifierName = std::forward<CQualifierName_Base::TQualifierName>(value);
488  m_set_State[0] |= 0xc;
489 }
490 
491 inline
493 {
494 #ifdef _DEBUG
495  if (!IsSetQualifierName()) {
496  m_QualifierName = UnassignedString();
497  }
498 #endif
499  m_set_State[0] |= 0x4;
500  return m_QualifierName;
501 }
502 
503 ///////////////////////////////////////////////////////////
504 ////////////////// end of inline methods //////////////////
505 ///////////////////////////////////////////////////////////
506 
507 
508 
509 
510 
511 END_eutils_SCOPE // namespace eutils::
512 
513 
514 #endif // eutils__OBJTOOLS_EUTILS_EFETCH_QUALIFIERNAME_BASE_HPP
#define BEGIN_eutils_SCOPE
#define END_eutils_SCOPE
CQualifierName_Base –.
string
Definition: cgiapp.hpp:687
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
CQualifierName_Base & operator=(const CQualifierName_Base &)
EAttlist_MajorTopicYN m_MajorTopicYN
CQualifierName_Base(const CQualifierName_Base &)
const TUI & GetUI(void) const
Get the UI member data.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
bool CanGetMajorTopicYN(void) const
Check if it is safe to call GetMajorTopicYN method.
virtual ~CQualifierName_Base(void)
virtual void Reset(void)
Reset the whole object.
bool CanGetQualifierName(void) const
Check if it is safe to call GetQualifierName method.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TMajorTopicYN GetMajorTopicYN(void) const
Get the MajorTopicYN member data.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
NCBI_NS_NCBI::CSerialObject Tparent
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
void ResetMajorTopicYN(void)
Reset MajorTopicYN data member.
TMajorTopicYN & SetMajorTopicYN(void)
Assign a value to MajorTopicYN data member.
void ResetUI(void)
Reset UI data member.
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
void ResetQualifierName(void)
Reset QualifierName data member.
TUI & SetUI(void)
Assign a value to UI data member.
EAttlist_MajorTopicYN TMajorTopicYN
void ResetAttlist(void)
Reset Attlist data member.
bool IsSetUI(void) const
Check if a value has been assigned to UI data member.
NCBI_NS_NCBI::CSerialObject Tparent
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
C_Attlist(const C_Attlist &)
bool IsSetQualifierName(void) const
Check if a value has been assigned to QualifierName data member.
bool IsSetMajorTopicYN(void) const
Check if a value has been assigned to MajorTopicYN data member.
C_Attlist & operator=(const C_Attlist &)
const TQualifierName & GetQualifierName(void) const
Get the QualifierName member data.
NCBI_NS_STD::string TQualifierName
void Reset(void)
Reset the whole object.
void SetDefaultMajorTopicYN(void)
Assign default value to MajorTopicYN data member.
NCBI_NS_STD::string m_QualifierName
bool CanGetUI(void) const
Check if it is safe to call GetUI method.
TQualifierName & SetQualifierName(void)
Assign a value to QualifierName data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sun Jun 16 04:34:40 2024 by modify_doxy.py rev. 669887