NCBI C++ ToolKit
EPostResult_.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 EPostResult_.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/epost/epost.dtd">epost.dtd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/epost/epost.def">epost.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 epost__OBJTOOLS_EUTILS_EPOST_EPOSTRESULT_BASE_HPP
42 #define epost__OBJTOOLS_EUTILS_EPOST_EPOSTRESULT_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
49 
50 #ifndef BEGIN_epost_SCOPE
51 # define BEGIN_epost_SCOPE BEGIN_SCOPE(epost)
52 # define END_epost_SCOPE END_SCOPE(epost)
53 #endif
54 BEGIN_epost_SCOPE // namespace epost::
55 
56 
57 // forward declarations
58 class CInvalidIdList;
59 
60 
61 // generated classes
62 
63 
64 /** @addtogroup dataspec_epost
65  *
66  * @{
67  */
68 
69 /////////////////////////////////////////////////////////////////////////////
70 ///
71 /// CEPostResult_Base --
72 ///
73 
74 class NCBI_EUTILS_EXPORT CEPostResult_Base : public NCBI_NS_NCBI::CSerialObject
75 {
76  typedef NCBI_NS_NCBI::CSerialObject Tparent;
77 public:
78  // constructor
79  CEPostResult_Base(void);
80  // destructor
81  virtual ~CEPostResult_Base(void);
82 
83  // type info
85 
86  /////////////////////////////////////////////////////////////////////////////
87  ///
88  /// C_History --
89  ///
90 
91  class NCBI_EUTILS_EXPORT C_History : public NCBI_NS_NCBI::CSerialObject
92  {
93  typedef NCBI_NS_NCBI::CSerialObject Tparent;
94  public:
95  // constructor
96  C_History(void);
97  // destructor
98  ~C_History(void);
99 
100  // type info
102 
103  // types
106 
107  // member index
108  enum class E_memberIndex {
109  e__allMandatory = 0,
110  e_QueryKey,
111  e_WebEnv
112  };
113  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
114 
115  // getters
116  // setters
117 
118  /// \d+
119  /// Check if a value has been assigned to QueryKey data member.
120  ///
121  /// Data member QueryKey is mandatory;
122  /// its type is defined as 'typedef NCBI_NS_STD::string TQueryKey'
123  /// @return
124  /// - true, if a value has been assigned.
125  /// - false, otherwise.
126  bool IsSetQueryKey(void) const;
127 
128  /// Check if it is safe to call GetQueryKey method.
129  ///
130  /// @return
131  /// - true, if the data member is getatable.
132  /// - false, otherwise.
133  bool CanGetQueryKey(void) const;
134 
135  /// Reset QueryKey data member.
136  void ResetQueryKey(void);
137 
138  /// Get the QueryKey member data.
139  ///
140  /// @return
141  /// Reference to the member data.
142  const TQueryKey& GetQueryKey(void) const;
143 
144  /// Assign a value to QueryKey data member.
145  ///
146  /// @param value
147  /// Value to assign
148  void SetQueryKey(const TQueryKey& value);
149  void SetQueryKey(TQueryKey&& value);
150 
151  /// Assign a value to QueryKey data member.
152  ///
153  /// @return
154  /// Reference to the data value.
155  TQueryKey& SetQueryKey(void);
156 
157  /// \S+
158  /// Check if a value has been assigned to WebEnv data member.
159  ///
160  /// Data member WebEnv is mandatory;
161  /// its type is defined as 'typedef NCBI_NS_STD::string TWebEnv'
162  /// @return
163  /// - true, if a value has been assigned.
164  /// - false, otherwise.
165  bool IsSetWebEnv(void) const;
166 
167  /// Check if it is safe to call GetWebEnv method.
168  ///
169  /// @return
170  /// - true, if the data member is getatable.
171  /// - false, otherwise.
172  bool CanGetWebEnv(void) const;
173 
174  /// Reset WebEnv data member.
175  void ResetWebEnv(void);
176 
177  /// Get the WebEnv member data.
178  ///
179  /// @return
180  /// Reference to the member data.
181  const TWebEnv& GetWebEnv(void) const;
182 
183  /// Assign a value to WebEnv data member.
184  ///
185  /// @param value
186  /// Value to assign
187  void SetWebEnv(const TWebEnv& value);
188  void SetWebEnv(TWebEnv&& value);
189 
190  /// Assign a value to WebEnv data member.
191  ///
192  /// @return
193  /// Reference to the data value.
194  TWebEnv& SetWebEnv(void);
195 
196  /// Reset the whole object
197  void Reset(void);
198 
199 
200  private:
201  // Prohibit copy constructor and assignment operator
204 
205  // data
206  Uint4 m_set_State[1];
209  };
210  // types
214 
215  // member index
216  enum class E_memberIndex {
217  e__allMandatory = 0,
218  e_InvalidIdList,
219  e_QW,
220  e_ERROR
221  };
222  typedef Tparent::CMemberIndex<E_memberIndex, 4> TmemberIndex;
223 
224  // getters
225  // setters
226 
227  /// Check if a value has been assigned to InvalidIdList data member.
228  ///
229  /// Data member InvalidIdList is optional;
230  /// its type is defined as 'typedef CInvalidIdList TInvalidIdList'
231  /// @return
232  /// - true, if a value has been assigned.
233  /// - false, otherwise.
234  bool IsSetInvalidIdList(void) const;
235 
236  /// Check if it is safe to call GetInvalidIdList method.
237  ///
238  /// @return
239  /// - true, if the data member is getatable.
240  /// - false, otherwise.
241  bool CanGetInvalidIdList(void) const;
242 
243  /// Reset InvalidIdList data member.
244  void ResetInvalidIdList(void);
245 
246  /// Get the InvalidIdList member data.
247  ///
248  /// @return
249  /// Reference to the member data.
250  const TInvalidIdList& GetInvalidIdList(void) const;
251 
252  /// Assign a value to InvalidIdList data member.
253  ///
254  /// @param value
255  /// Reference to value.
256  void SetInvalidIdList(TInvalidIdList& value);
257 
258  /// Assign a value to InvalidIdList data member.
259  ///
260  /// @return
261  /// Reference to the data value.
262  TInvalidIdList& SetInvalidIdList(void);
263 
264  /// Check if a value has been assigned to History data member.
265  ///
266  /// Data member History is optional;
267  /// its type is defined as 'typedef C_History THistory'
268  /// @return
269  /// - true, if a value has been assigned.
270  /// - false, otherwise.
271  bool IsSetHistory(void) const;
272 
273  /// Check if it is safe to call GetHistory method.
274  ///
275  /// @return
276  /// - true, if the data member is getatable.
277  /// - false, otherwise.
278  bool CanGetHistory(void) const;
279 
280  /// Reset History data member.
281  void ResetHistory(void);
282 
283  /// Get the History member data.
284  ///
285  /// @return
286  /// Reference to the member data.
287  const THistory& GetHistory(void) const;
288 
289  /// Assign a value to History data member.
290  ///
291  /// @param value
292  /// Reference to value.
293  void SetHistory(THistory& value);
294 
295  /// Assign a value to History data member.
296  ///
297  /// @return
298  /// Reference to the data value.
299  THistory& SetHistory(void);
300 
301  /// .+
302  /// Check if a value has been assigned to ERROR data member.
303  ///
304  /// Data member ERROR is optional;
305  /// its type is defined as 'typedef NCBI_NS_STD::string TERROR'
306  /// @return
307  /// - true, if a value has been assigned.
308  /// - false, otherwise.
309  bool IsSetERROR(void) const;
310 
311  /// Check if it is safe to call GetERROR method.
312  ///
313  /// @return
314  /// - true, if the data member is getatable.
315  /// - false, otherwise.
316  bool CanGetERROR(void) const;
317 
318  /// Reset ERROR data member.
319  void ResetERROR(void);
320 
321  /// Get the ERROR member data.
322  ///
323  /// @return
324  /// Reference to the member data.
325  const TERROR& GetERROR(void) const;
326 
327  /// Assign a value to ERROR data member.
328  ///
329  /// @param value
330  /// Value to assign
331  void SetERROR(const TERROR& value);
332  void SetERROR(TERROR&& value);
333 
334  /// Assign a value to ERROR data member.
335  ///
336  /// @return
337  /// Reference to the data value.
338  TERROR& SetERROR(void);
339 
340  /// Reset the whole object
341  virtual void Reset(void);
342 
343 
344 private:
345  // Prohibit copy constructor and assignment operator
348 
349  // data
350  Uint4 m_set_State[1];
351  NCBI_NS_NCBI::CRef< TInvalidIdList > m_InvalidIdList;
352  NCBI_NS_NCBI::CRef< THistory > m_History;
354 };
355 
356 /* @} */
357 
358 
359 
360 
361 
362 ///////////////////////////////////////////////////////////
363 ///////////////////// inline methods //////////////////////
364 ///////////////////////////////////////////////////////////
365 inline
367 {
368  return ((m_set_State[0] & 0x3) != 0);
369 }
370 
371 inline
373 {
374  return IsSetQueryKey();
375 }
376 
377 inline
379 {
380  if (!CanGetQueryKey()) {
381  ThrowUnassigned(0);
382  }
383  return m_QueryKey;
384 }
385 
386 inline
388 {
389  m_QueryKey = value;
390  m_set_State[0] |= 0x3;
391 }
392 
393 inline
395 {
396  m_QueryKey = std::forward<CEPostResult_Base::C_History::TQueryKey>(value);
397  m_set_State[0] |= 0x3;
398 }
399 
400 inline
402 {
403 #ifdef _DEBUG
404  if (!IsSetQueryKey()) {
405  m_QueryKey = UnassignedString();
406  }
407 #endif
408  m_set_State[0] |= 0x1;
409  return m_QueryKey;
410 }
411 
412 inline
414 {
415  return ((m_set_State[0] & 0xc) != 0);
416 }
417 
418 inline
420 {
421  return IsSetWebEnv();
422 }
423 
424 inline
426 {
427  if (!CanGetWebEnv()) {
428  ThrowUnassigned(1);
429  }
430  return m_WebEnv;
431 }
432 
433 inline
435 {
436  m_WebEnv = value;
437  m_set_State[0] |= 0xc;
438 }
439 
440 inline
442 {
443  m_WebEnv = std::forward<CEPostResult_Base::C_History::TWebEnv>(value);
444  m_set_State[0] |= 0xc;
445 }
446 
447 inline
449 {
450 #ifdef _DEBUG
451  if (!IsSetWebEnv()) {
452  m_WebEnv = UnassignedString();
453  }
454 #endif
455  m_set_State[0] |= 0x4;
456  return m_WebEnv;
457 }
458 
459 inline
461 {
462  return m_InvalidIdList.NotEmpty();
463 }
464 
465 inline
467 {
468  return IsSetInvalidIdList();
469 }
470 
471 inline
473 {
474  if (!CanGetInvalidIdList()) {
475  ThrowUnassigned(0);
476  }
477  return (*m_InvalidIdList);
478 }
479 
480 inline
482 {
483  return m_History.NotEmpty();
484 }
485 
486 inline
488 {
489  return IsSetHistory();
490 }
491 
492 inline
494 {
495  if (!CanGetHistory()) {
496  ThrowUnassigned(1);
497  }
498  return (*m_History);
499 }
500 
501 inline
503 {
504  return ((m_set_State[0] & 0x30) != 0);
505 }
506 
507 inline
509 {
510  return IsSetERROR();
511 }
512 
513 inline
515 {
516  if (!CanGetERROR()) {
517  ThrowUnassigned(2);
518  }
519  return m_ERROR;
520 }
521 
522 inline
524 {
525  m_ERROR = value;
526  m_set_State[0] |= 0x30;
527 }
528 
529 inline
531 {
532  m_ERROR = std::forward<CEPostResult_Base::TERROR>(value);
533  m_set_State[0] |= 0x30;
534 }
535 
536 inline
538 {
539 #ifdef _DEBUG
540  if (!IsSetERROR()) {
541  m_ERROR = UnassignedString();
542  }
543 #endif
544  m_set_State[0] |= 0x10;
545  return m_ERROR;
546 }
547 
548 ///////////////////////////////////////////////////////////
549 ////////////////// end of inline methods //////////////////
550 ///////////////////////////////////////////////////////////
551 
552 
553 
554 
555 
556 END_epost_SCOPE // namespace epost::
557 
558 
559 #endif // epost__OBJTOOLS_EUTILS_EPOST_EPOSTRESULT_BASE_HPP
#define BEGIN_epost_SCOPE
#define END_epost_SCOPE
CEPostResult_Base –.
CInvalidIdList –.
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
#define NCBI_EUTILS_EXPORT
Definition: ncbi_export.h:1460
C_History & operator=(const C_History &)
bool CanGetERROR(void) const
Check if it is safe to call GetERROR method.
NCBI_NS_NCBI::CRef< THistory > m_History
NCBI_NS_STD::string m_ERROR
bool CanGetHistory(void) const
Check if it is safe to call GetHistory method.
bool IsSetHistory(void) const
Check if a value has been assigned to History data member.
NCBI_NS_NCBI::CSerialObject Tparent
const TWebEnv & GetWebEnv(void) const
Get the WebEnv member data.
const TQueryKey & GetQueryKey(void) const
Get the QueryKey member data.
NCBI_NS_STD::string m_QueryKey
NCBI_NS_STD::string TERROR
bool IsSetQueryKey(void) const
\d+ Check if a value has been assigned to QueryKey data member.
NCBI_NS_NCBI::CSerialObject Tparent
NCBI_NS_STD::string TWebEnv
CEPostResult_Base(const CEPostResult_Base &)
NCBI_NS_STD::string m_WebEnv
C_History(const C_History &)
bool CanGetInvalidIdList(void) const
Check if it is safe to call GetInvalidIdList method.
TERROR & SetERROR(void)
Assign a value to ERROR data member.
const THistory & GetHistory(void) const
Get the History member data.
TWebEnv & SetWebEnv(void)
Assign a value to WebEnv data member.
bool CanGetQueryKey(void) const
Check if it is safe to call GetQueryKey method.
CEPostResult_Base & operator=(const CEPostResult_Base &)
CInvalidIdList TInvalidIdList
bool IsSetERROR(void) const
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
const TInvalidIdList & GetInvalidIdList(void) const
Get the InvalidIdList member data.
bool IsSetWebEnv(void) const
\S+ Check if a value has been assigned to WebEnv data member.
NCBI_NS_STD::string TQueryKey
bool IsSetInvalidIdList(void) const
Check if a value has been assigned to InvalidIdList data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
NCBI_NS_NCBI::CRef< TInvalidIdList > m_InvalidIdList
TQueryKey & SetQueryKey(void)
Assign a value to QueryKey data member.
bool CanGetWebEnv(void) const
Check if it is safe to call GetWebEnv method.
const TERROR & GetERROR(void) const
Get the ERROR member data.
Modified on Fri Jan 05 07:24:00 2024 by modify_doxy.py rev. 669887