NCBI C++ ToolKit
GBenchVersionInfo_.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 GBenchVersionInfo_.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/gui/objects/gui_objects.asn">gui_objects.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/gui/objects/gui_objects.def">gui_objects.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 GUI_OBJECTS_GBENCHVERSIONINFO_BASE_HPP
42 #define GUI_OBJECTS_GBENCHVERSIONINFO_BASE_HPP
43 
44 // extra headers
45 #include <gui/gui_export.h>
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
49 
50 // generated includes
51 #include <string>
52 
54 
55 #ifndef BEGIN_objects_SCOPE
56 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
57 # define END_objects_SCOPE END_SCOPE(objects)
58 #endif
59 BEGIN_objects_SCOPE // namespace ncbi::objects::
60 
61 
62 // forward declarations
63 class CDate;
64 
65 
66 // generated classes
67 
68 
69 /** @addtogroup dataspec_NCBI_GBenchService
70  *
71  * @{
72  */
73 
74 /////////////////////////////////////////////////////////////////////////////
75 ///
76 /// CGBenchVersionInfo_Base --
77 ///
78 
80 {
82 public:
83  // constructor
85  // destructor
86  virtual ~CGBenchVersionInfo_Base(void);
87 
88  // type info
90 
91  // types
92  typedef int TVer_major;
93  typedef int TVer_minor;
94  typedef int TVer_patch;
95  typedef int TOs_ver;
96  typedef string TOs_ver_string;
97  typedef CDate TBuild_date;
98 
99  // member index
100  enum class E_memberIndex {
101  e__allMandatory = 0,
102  e_ver_major,
103  e_ver_minor,
104  e_ver_patch,
105  e_os_ver,
106  e_os_ver_string,
107  e_build_date
108  };
110 
111  // getters
112  // setters
113 
114  /// Check if a value has been assigned to Ver_major data member.
115  ///
116  /// Data member Ver_major is mandatory;
117  /// its type is defined as 'typedef int TVer_major'
118  /// @return
119  /// - true, if a value has been assigned.
120  /// - false, otherwise.
121  bool IsSetVer_major(void) const;
122 
123  /// Check if it is safe to call GetVer_major method.
124  ///
125  /// @return
126  /// - true, if the data member is getatable.
127  /// - false, otherwise.
128  bool CanGetVer_major(void) const;
129 
130  /// Reset Ver_major data member.
131  void ResetVer_major(void);
132 
133  /// Get the Ver_major member data.
134  ///
135  /// @return
136  /// Copy of the member data.
137  TVer_major GetVer_major(void) const;
138 
139  /// Assign a value to Ver_major data member.
140  ///
141  /// @param value
142  /// Value to assign
143  void SetVer_major(TVer_major value);
144 
145  /// Assign a value to Ver_major data member.
146  ///
147  /// @return
148  /// Reference to the data value.
149  TVer_major& SetVer_major(void);
150 
151  /// Check if a value has been assigned to Ver_minor data member.
152  ///
153  /// Data member Ver_minor is mandatory;
154  /// its type is defined as 'typedef int TVer_minor'
155  /// @return
156  /// - true, if a value has been assigned.
157  /// - false, otherwise.
158  bool IsSetVer_minor(void) const;
159 
160  /// Check if it is safe to call GetVer_minor method.
161  ///
162  /// @return
163  /// - true, if the data member is getatable.
164  /// - false, otherwise.
165  bool CanGetVer_minor(void) const;
166 
167  /// Reset Ver_minor data member.
168  void ResetVer_minor(void);
169 
170  /// Get the Ver_minor member data.
171  ///
172  /// @return
173  /// Copy of the member data.
174  TVer_minor GetVer_minor(void) const;
175 
176  /// Assign a value to Ver_minor data member.
177  ///
178  /// @param value
179  /// Value to assign
180  void SetVer_minor(TVer_minor value);
181 
182  /// Assign a value to Ver_minor data member.
183  ///
184  /// @return
185  /// Reference to the data value.
186  TVer_minor& SetVer_minor(void);
187 
188  /// Check if a value has been assigned to Ver_patch data member.
189  ///
190  /// Data member Ver_patch is mandatory;
191  /// its type is defined as 'typedef int TVer_patch'
192  /// @return
193  /// - true, if a value has been assigned.
194  /// - false, otherwise.
195  bool IsSetVer_patch(void) const;
196 
197  /// Check if it is safe to call GetVer_patch method.
198  ///
199  /// @return
200  /// - true, if the data member is getatable.
201  /// - false, otherwise.
202  bool CanGetVer_patch(void) const;
203 
204  /// Reset Ver_patch data member.
205  void ResetVer_patch(void);
206 
207  /// Get the Ver_patch member data.
208  ///
209  /// @return
210  /// Copy of the member data.
211  TVer_patch GetVer_patch(void) const;
212 
213  /// Assign a value to Ver_patch data member.
214  ///
215  /// @param value
216  /// Value to assign
217  void SetVer_patch(TVer_patch value);
218 
219  /// Assign a value to Ver_patch data member.
220  ///
221  /// @return
222  /// Reference to the data value.
223  TVer_patch& SetVer_patch(void);
224 
225  /// Check if a value has been assigned to Os_ver data member.
226  ///
227  /// Data member Os_ver is mandatory;
228  /// its type is defined as 'typedef int TOs_ver'
229  /// @return
230  /// - true, if a value has been assigned.
231  /// - false, otherwise.
232  bool IsSetOs_ver(void) const;
233 
234  /// Check if it is safe to call GetOs_ver method.
235  ///
236  /// @return
237  /// - true, if the data member is getatable.
238  /// - false, otherwise.
239  bool CanGetOs_ver(void) const;
240 
241  /// Reset Os_ver data member.
242  void ResetOs_ver(void);
243 
244  /// Get the Os_ver member data.
245  ///
246  /// @return
247  /// Copy of the member data.
248  TOs_ver GetOs_ver(void) const;
249 
250  /// Assign a value to Os_ver data member.
251  ///
252  /// @param value
253  /// Value to assign
254  void SetOs_ver(TOs_ver value);
255 
256  /// Assign a value to Os_ver data member.
257  ///
258  /// @return
259  /// Reference to the data value.
260  TOs_ver& SetOs_ver(void);
261 
262  /// os-arch INTEGER OPTIONAL,
263  /// Check if a value has been assigned to Os_ver_string data member.
264  ///
265  /// Data member Os_ver_string is optional;
266  /// its type is defined as 'typedef string TOs_ver_string'
267  /// @return
268  /// - true, if a value has been assigned.
269  /// - false, otherwise.
270  bool IsSetOs_ver_string(void) const;
271 
272  /// Check if it is safe to call GetOs_ver_string method.
273  ///
274  /// @return
275  /// - true, if the data member is getatable.
276  /// - false, otherwise.
277  bool CanGetOs_ver_string(void) const;
278 
279  /// Reset Os_ver_string data member.
280  void ResetOs_ver_string(void);
281 
282  /// Get the Os_ver_string member data.
283  ///
284  /// @return
285  /// Reference to the member data.
286  const TOs_ver_string& GetOs_ver_string(void) const;
287 
288  /// Assign a value to Os_ver_string data member.
289  ///
290  /// @param value
291  /// Value to assign
292  void SetOs_ver_string(const TOs_ver_string& value);
293  void SetOs_ver_string(TOs_ver_string&& value);
294 
295  /// Assign a value to Os_ver_string data member.
296  ///
297  /// @return
298  /// Reference to the data value.
299  TOs_ver_string& SetOs_ver_string(void);
300 
301  /// Check if a value has been assigned to Build_date data member.
302  ///
303  /// Data member Build_date is optional;
304  /// its type is defined as 'typedef CDate TBuild_date'
305  /// @return
306  /// - true, if a value has been assigned.
307  /// - false, otherwise.
308  bool IsSetBuild_date(void) const;
309 
310  /// Check if it is safe to call GetBuild_date method.
311  ///
312  /// @return
313  /// - true, if the data member is getatable.
314  /// - false, otherwise.
315  bool CanGetBuild_date(void) const;
316 
317  /// Reset Build_date data member.
318  void ResetBuild_date(void);
319 
320  /// Get the Build_date member data.
321  ///
322  /// @return
323  /// Reference to the member data.
324  const TBuild_date& GetBuild_date(void) const;
325 
326  /// Assign a value to Build_date data member.
327  ///
328  /// @param value
329  /// Reference to value.
330  void SetBuild_date(TBuild_date& value);
331 
332  /// Assign a value to Build_date data member.
333  ///
334  /// @return
335  /// Reference to the data value.
336  TBuild_date& SetBuild_date(void);
337 
338  /// Reset the whole object
339  virtual void Reset(void);
340 
341 
342 private:
343  // Prohibit copy constructor and assignment operator
346 
347  // data
348  Uint4 m_set_State[1];
352  int m_Os_ver;
355 };
356 
357 /* @} */
358 
359 
360 
361 
362 
363 ///////////////////////////////////////////////////////////
364 ///////////////////// inline methods //////////////////////
365 ///////////////////////////////////////////////////////////
366 inline
368 {
369  return ((m_set_State[0] & 0x3) != 0);
370 }
371 
372 inline
374 {
375  return IsSetVer_major();
376 }
377 
378 inline
380 {
381  m_Ver_major = 0;
382  m_set_State[0] &= ~0x3;
383 }
384 
385 inline
387 {
388  if (!CanGetVer_major()) {
389  ThrowUnassigned(0);
390  }
391  return m_Ver_major;
392 }
393 
394 inline
396 {
397  m_Ver_major = value;
398  m_set_State[0] |= 0x3;
399 }
400 
401 inline
403 {
404 #ifdef _DEBUG
405  if (!IsSetVer_major()) {
406  memset(&m_Ver_major,UnassignedByte(),sizeof(m_Ver_major));
407  }
408 #endif
409  m_set_State[0] |= 0x1;
410  return m_Ver_major;
411 }
412 
413 inline
415 {
416  return ((m_set_State[0] & 0xc) != 0);
417 }
418 
419 inline
421 {
422  return IsSetVer_minor();
423 }
424 
425 inline
427 {
428  m_Ver_minor = 0;
429  m_set_State[0] &= ~0xc;
430 }
431 
432 inline
434 {
435  if (!CanGetVer_minor()) {
436  ThrowUnassigned(1);
437  }
438  return m_Ver_minor;
439 }
440 
441 inline
443 {
444  m_Ver_minor = value;
445  m_set_State[0] |= 0xc;
446 }
447 
448 inline
450 {
451 #ifdef _DEBUG
452  if (!IsSetVer_minor()) {
453  memset(&m_Ver_minor,UnassignedByte(),sizeof(m_Ver_minor));
454  }
455 #endif
456  m_set_State[0] |= 0x4;
457  return m_Ver_minor;
458 }
459 
460 inline
462 {
463  return ((m_set_State[0] & 0x30) != 0);
464 }
465 
466 inline
468 {
469  return IsSetVer_patch();
470 }
471 
472 inline
474 {
475  m_Ver_patch = 0;
476  m_set_State[0] &= ~0x30;
477 }
478 
479 inline
481 {
482  if (!CanGetVer_patch()) {
483  ThrowUnassigned(2);
484  }
485  return m_Ver_patch;
486 }
487 
488 inline
490 {
491  m_Ver_patch = value;
492  m_set_State[0] |= 0x30;
493 }
494 
495 inline
497 {
498 #ifdef _DEBUG
499  if (!IsSetVer_patch()) {
500  memset(&m_Ver_patch,UnassignedByte(),sizeof(m_Ver_patch));
501  }
502 #endif
503  m_set_State[0] |= 0x10;
504  return m_Ver_patch;
505 }
506 
507 inline
509 {
510  return ((m_set_State[0] & 0xc0) != 0);
511 }
512 
513 inline
515 {
516  return IsSetOs_ver();
517 }
518 
519 inline
521 {
522  m_Os_ver = 0;
523  m_set_State[0] &= ~0xc0;
524 }
525 
526 inline
528 {
529  if (!CanGetOs_ver()) {
530  ThrowUnassigned(3);
531  }
532  return m_Os_ver;
533 }
534 
535 inline
537 {
538  m_Os_ver = value;
539  m_set_State[0] |= 0xc0;
540 }
541 
542 inline
544 {
545 #ifdef _DEBUG
546  if (!IsSetOs_ver()) {
547  memset(&m_Os_ver,UnassignedByte(),sizeof(m_Os_ver));
548  }
549 #endif
550  m_set_State[0] |= 0x40;
551  return m_Os_ver;
552 }
553 
554 inline
556 {
557  return ((m_set_State[0] & 0x300) != 0);
558 }
559 
560 inline
562 {
563  return IsSetOs_ver_string();
564 }
565 
566 inline
568 {
569  if (!CanGetOs_ver_string()) {
570  ThrowUnassigned(4);
571  }
572  return m_Os_ver_string;
573 }
574 
575 inline
577 {
579  m_set_State[0] |= 0x300;
580 }
581 
582 inline
584 {
585  m_Os_ver_string = std::forward<CGBenchVersionInfo_Base::TOs_ver_string>(value);
586  m_set_State[0] |= 0x300;
587 }
588 
589 inline
591 {
592 #ifdef _DEBUG
593  if (!IsSetOs_ver_string()) {
595  }
596 #endif
597  m_set_State[0] |= 0x100;
598  return m_Os_ver_string;
599 }
600 
601 inline
603 {
604  return m_Build_date.NotEmpty();
605 }
606 
607 inline
609 {
610  return IsSetBuild_date();
611 }
612 
613 inline
615 {
616  if (!CanGetBuild_date()) {
617  ThrowUnassigned(5);
618  }
619  return (*m_Build_date);
620 }
621 
622 ///////////////////////////////////////////////////////////
623 ////////////////// end of inline methods //////////////////
624 ///////////////////////////////////////////////////////////
625 
626 
627 
628 
629 
630 END_objects_SCOPE // namespace ncbi::objects::
631 
633 
634 
635 #endif // GUI_OBJECTS_GBENCHVERSIONINFO_BASE_HPP
Definition: Date.hpp:53
CGBenchVersionInfo_Base –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
Definition: serialbase.hpp:175
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIOBJECTS_EXPORT
Definition: gui_export.h:511
TVer_major GetVer_major(void) const
Get the Ver_major member data.
bool IsSetVer_minor(void) const
Check if a value has been assigned to Ver_minor data member.
TOs_ver_string & SetOs_ver_string(void)
Assign a value to Os_ver_string data member.
TVer_minor & SetVer_minor(void)
Assign a value to Ver_minor data member.
const TBuild_date & GetBuild_date(void) const
Get the Build_date member data.
bool IsSetVer_patch(void) const
Check if a value has been assigned to Ver_patch data member.
bool CanGetOs_ver(void) const
Check if it is safe to call GetOs_ver method.
bool CanGetOs_ver_string(void) const
Check if it is safe to call GetOs_ver_string method.
bool CanGetVer_minor(void) const
Check if it is safe to call GetVer_minor method.
TVer_major & SetVer_major(void)
Assign a value to Ver_major data member.
void ResetVer_patch(void)
Reset Ver_patch data member.
TVer_patch & SetVer_patch(void)
Assign a value to Ver_patch data member.
void ResetVer_minor(void)
Reset Ver_minor data member.
bool CanGetBuild_date(void) const
Check if it is safe to call GetBuild_date method.
TOs_ver & SetOs_ver(void)
Assign a value to Os_ver data member.
bool CanGetVer_patch(void) const
Check if it is safe to call GetVer_patch method.
bool IsSetOs_ver(void) const
Check if a value has been assigned to Os_ver data member.
TVer_minor GetVer_minor(void) const
Get the Ver_minor member data.
CRef< TBuild_date > m_Build_date
CGBenchVersionInfo_Base(const CGBenchVersionInfo_Base &)
void ResetVer_major(void)
Reset Ver_major data member.
void ResetOs_ver(void)
Reset Os_ver data member.
bool CanGetVer_major(void) const
Check if it is safe to call GetVer_major method.
TVer_patch GetVer_patch(void) const
Get the Ver_patch member data.
bool IsSetOs_ver_string(void) const
os-arch INTEGER OPTIONAL, Check if a value has been assigned to Os_ver_string data member.
Tparent::CMemberIndex< E_memberIndex, 7 > TmemberIndex
bool IsSetBuild_date(void) const
Check if a value has been assigned to Build_date data member.
const TOs_ver_string & GetOs_ver_string(void) const
Get the Os_ver_string member data.
CGBenchVersionInfo_Base & operator=(const CGBenchVersionInfo_Base &)
bool IsSetVer_major(void) const
Check if a value has been assigned to Ver_major data member.
TOs_ver GetOs_ver(void) const
Get the Os_ver member data.
Defines to provide correct exporting from DLLs in Windows.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Jun 14 16:46:59 2024 by modify_doxy.py rev. 669887