NCBI C++ ToolKit
GCClient_AssemblyInfo_.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 GCClient_AssemblyInfo_.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/objects/genomecoll/gencoll_client.asn">gencoll_client.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/genomecoll/gencoll_client.def">gencoll_client.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 OBJECTS_GENOMECOLL_GCCLIENT_ASSEMBLYINFO_BASE_HPP
42 #define OBJECTS_GENOMECOLL_GCCLIENT_ASSEMBLYINFO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
49 
51 
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
55 #endif
56 BEGIN_objects_SCOPE // namespace ncbi::objects::
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_GencollClient
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CGCClient_AssemblyInfo_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
79  virtual ~CGCClient_AssemblyInfo_Base(void);
80 
81  // type info
83 
84  enum EType {
86  eType_refseq = 2
87  };
88 
89  /// Access to EType's attributes (values, names) as defined in spec
90  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EType)(void);
91 
92  // types
93  typedef string TAccession;
94  typedef bool TLatest;
95  typedef bool TMajor;
96  typedef bool TAnnotated;
97  typedef int TType;
98 
99  // member index
100  enum class E_memberIndex {
101  e__allMandatory = 0,
102  e_accession,
103  e_latest,
104  e_major,
105  e_annotated,
106  e_type
107  };
109 
110  // getters
111  // setters
112 
113  /// Check if a value has been assigned to Accession data member.
114  ///
115  /// Data member Accession is mandatory;
116  /// its type is defined as 'typedef string TAccession'
117  /// @return
118  /// - true, if a value has been assigned.
119  /// - false, otherwise.
120  bool IsSetAccession(void) const;
121 
122  /// Check if it is safe to call GetAccession method.
123  ///
124  /// @return
125  /// - true, if the data member is getatable.
126  /// - false, otherwise.
127  bool CanGetAccession(void) const;
128 
129  /// Reset Accession data member.
130  void ResetAccession(void);
131 
132  /// Get the Accession member data.
133  ///
134  /// @return
135  /// Reference to the member data.
136  const TAccession& GetAccession(void) const;
137 
138  /// Assign a value to Accession data member.
139  ///
140  /// @param value
141  /// Value to assign
142  void SetAccession(const TAccession& value);
143  void SetAccession(TAccession&& value);
144 
145  /// Assign a value to Accession data member.
146  ///
147  /// @return
148  /// Reference to the data value.
149  TAccession& SetAccession(void);
150 
151  /// Check if a value has been assigned to Latest data member.
152  ///
153  /// Data member Latest is mandatory;
154  /// its type is defined as 'typedef bool TLatest'
155  /// @return
156  /// - true, if a value has been assigned.
157  /// - false, otherwise.
158  bool IsSetLatest(void) const;
159 
160  /// Check if it is safe to call GetLatest method.
161  ///
162  /// @return
163  /// - true, if the data member is getatable.
164  /// - false, otherwise.
165  bool CanGetLatest(void) const;
166 
167  /// Reset Latest data member.
168  void ResetLatest(void);
169 
170  /// Get the Latest member data.
171  ///
172  /// @return
173  /// Copy of the member data.
174  TLatest GetLatest(void) const;
175 
176  /// Assign a value to Latest data member.
177  ///
178  /// @param value
179  /// Value to assign
180  void SetLatest(TLatest value);
181 
182  /// Assign a value to Latest data member.
183  ///
184  /// @return
185  /// Reference to the data value.
186  TLatest& SetLatest(void);
187 
188  /// Check if a value has been assigned to Major data member.
189  ///
190  /// Data member Major is mandatory;
191  /// its type is defined as 'typedef bool TMajor'
192  /// @return
193  /// - true, if a value has been assigned.
194  /// - false, otherwise.
195  bool IsSetMajor(void) const;
196 
197  /// Check if it is safe to call GetMajor method.
198  ///
199  /// @return
200  /// - true, if the data member is getatable.
201  /// - false, otherwise.
202  bool CanGetMajor(void) const;
203 
204  /// Reset Major data member.
205  void ResetMajor(void);
206 
207  /// Get the Major member data.
208  ///
209  /// @return
210  /// Copy of the member data.
211  TMajor GetMajor(void) const;
212 
213  /// Assign a value to Major data member.
214  ///
215  /// @param value
216  /// Value to assign
217  void SetMajor(TMajor value);
218 
219  /// Assign a value to Major data member.
220  ///
221  /// @return
222  /// Reference to the data value.
223  TMajor& SetMajor(void);
224 
225  /// Check if a value has been assigned to Annotated data member.
226  ///
227  /// Data member Annotated is optional;
228  /// its type is defined as 'typedef bool TAnnotated'
229  /// @return
230  /// - true, if a value has been assigned.
231  /// - false, otherwise.
232  bool IsSetAnnotated(void) const;
233 
234  /// Check if it is safe to call GetAnnotated method.
235  ///
236  /// @return
237  /// - true, if the data member is getatable.
238  /// - false, otherwise.
239  bool CanGetAnnotated(void) const;
240 
241  /// Reset Annotated data member.
242  void ResetAnnotated(void);
243 
244  /// Get the Annotated member data.
245  ///
246  /// @return
247  /// Copy of the member data.
248  TAnnotated GetAnnotated(void) const;
249 
250  /// Assign a value to Annotated data member.
251  ///
252  /// @param value
253  /// Value to assign
255 
256  /// Assign a value to Annotated data member.
257  ///
258  /// @return
259  /// Reference to the data value.
260  TAnnotated& SetAnnotated(void);
261 
262  /// Check if a value has been assigned to Type data member.
263  ///
264  /// Data member Type is optional;
265  /// its type is defined as 'typedef int TType'
266  /// @return
267  /// - true, if a value has been assigned.
268  /// - false, otherwise.
269  bool IsSetType(void) const;
270 
271  /// Check if it is safe to call GetType method.
272  ///
273  /// @return
274  /// - true, if the data member is getatable.
275  /// - false, otherwise.
276  bool CanGetType(void) const;
277 
278  /// Reset Type data member.
279  void ResetType(void);
280 
281  /// Get the Type member data.
282  ///
283  /// @return
284  /// Copy of the member data.
285  TType GetType(void) const;
286 
287  /// Assign a value to Type data member.
288  ///
289  /// @param value
290  /// Value to assign
291  void SetType(TType value);
292 
293  /// Assign a value to Type data member.
294  ///
295  /// @return
296  /// Reference to the data value.
297  TType& SetType(void);
298 
299  /// Reset the whole object
300  virtual void Reset(void);
301 
302 
303 private:
304  // Prohibit copy constructor and assignment operator
307 
308  // data
310  string m_Accession;
311  bool m_Latest;
312  bool m_Major;
314  int m_Type;
315 };
316 
317 /* @} */
318 
319 
320 
321 
322 
323 ///////////////////////////////////////////////////////////
324 ///////////////////// inline methods //////////////////////
325 ///////////////////////////////////////////////////////////
326 inline
328 {
329  return ((m_set_State[0] & 0x3) != 0);
330 }
331 
332 inline
334 {
335  return IsSetAccession();
336 }
337 
338 inline
340 {
341  if (!CanGetAccession()) {
342  ThrowUnassigned(0);
343  }
344  return m_Accession;
345 }
346 
347 inline
349 {
350  m_Accession = value;
351  m_set_State[0] |= 0x3;
352 }
353 
354 inline
356 {
357  m_Accession = std::forward<CGCClient_AssemblyInfo_Base::TAccession>(value);
358  m_set_State[0] |= 0x3;
359 }
360 
361 inline
363 {
364 #ifdef _DEBUG
365  if (!IsSetAccession()) {
367  }
368 #endif
369  m_set_State[0] |= 0x1;
370  return m_Accession;
371 }
372 
373 inline
375 {
376  return ((m_set_State[0] & 0xc) != 0);
377 }
378 
379 inline
381 {
382  return IsSetLatest();
383 }
384 
385 inline
387 {
388  m_Latest = 0;
389  m_set_State[0] &= ~0xc;
390 }
391 
392 inline
394 {
395  if (!CanGetLatest()) {
396  ThrowUnassigned(1);
397  }
398  return m_Latest;
399 }
400 
401 inline
403 {
404  m_Latest = value;
405  m_set_State[0] |= 0xc;
406 }
407 
408 inline
410 {
411 #ifdef _DEBUG
412  if (!IsSetLatest()) {
413  memset(&m_Latest,UnassignedByte(),sizeof(m_Latest));
414  }
415 #endif
416  m_set_State[0] |= 0x4;
417  return m_Latest;
418 }
419 
420 inline
422 {
423  return ((m_set_State[0] & 0x30) != 0);
424 }
425 
426 inline
428 {
429  return IsSetMajor();
430 }
431 
432 inline
434 {
435  m_Major = 0;
436  m_set_State[0] &= ~0x30;
437 }
438 
439 inline
441 {
442  if (!CanGetMajor()) {
443  ThrowUnassigned(2);
444  }
445  return m_Major;
446 }
447 
448 inline
450 {
451  m_Major = value;
452  m_set_State[0] |= 0x30;
453 }
454 
455 inline
457 {
458 #ifdef _DEBUG
459  if (!IsSetMajor()) {
460  memset(&m_Major,UnassignedByte(),sizeof(m_Major));
461  }
462 #endif
463  m_set_State[0] |= 0x10;
464  return m_Major;
465 }
466 
467 inline
469 {
470  return ((m_set_State[0] & 0xc0) != 0);
471 }
472 
473 inline
475 {
476  return IsSetAnnotated();
477 }
478 
479 inline
481 {
482  m_Annotated = 0;
483  m_set_State[0] &= ~0xc0;
484 }
485 
486 inline
488 {
489  if (!CanGetAnnotated()) {
490  ThrowUnassigned(3);
491  }
492  return m_Annotated;
493 }
494 
495 inline
497 {
498  m_Annotated = value;
499  m_set_State[0] |= 0xc0;
500 }
501 
502 inline
504 {
505 #ifdef _DEBUG
506  if (!IsSetAnnotated()) {
507  memset(&m_Annotated,UnassignedByte(),sizeof(m_Annotated));
508  }
509 #endif
510  m_set_State[0] |= 0x40;
511  return m_Annotated;
512 }
513 
514 inline
516 {
517  return ((m_set_State[0] & 0x300) != 0);
518 }
519 
520 inline
522 {
523  return IsSetType();
524 }
525 
526 inline
528 {
529  m_Type = (EType)(0);
530  m_set_State[0] &= ~0x300;
531 }
532 
533 inline
535 {
536  if (!CanGetType()) {
537  ThrowUnassigned(4);
538  }
539  return m_Type;
540 }
541 
542 inline
544 {
545  m_Type = value;
546  m_set_State[0] |= 0x300;
547 }
548 
549 inline
551 {
552 #ifdef _DEBUG
553  if (!IsSetType()) {
554  memset(&m_Type,UnassignedByte(),sizeof(m_Type));
555  }
556 #endif
557  m_set_State[0] |= 0x100;
558  return m_Type;
559 }
560 
561 ///////////////////////////////////////////////////////////
562 ////////////////// end of inline methods //////////////////
563 ///////////////////////////////////////////////////////////
564 
565 
566 
567 
568 
569 END_objects_SCOPE // namespace ncbi::objects::
570 
572 
573 
574 #endif // OBJECTS_GENOMECOLL_GCCLIENT_ASSEMBLYINFO_BASE_HPP
CGCClient_AssemblyInfo_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
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
TAnnotated & SetAnnotated(void)
Assign a value to Annotated data member.
TType & SetType(void)
Assign a value to Type data member.
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
bool CanGetAnnotated(void) const
Check if it is safe to call GetAnnotated method.
bool CanGetMajor(void) const
Check if it is safe to call GetMajor method.
TType GetType(void) const
Get the Type member data.
bool CanGetType(void) const
Check if it is safe to call GetType method.
bool IsSetMajor(void) const
Check if a value has been assigned to Major data member.
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
TMajor & SetMajor(void)
Assign a value to Major data member.
void ResetMajor(void)
Reset Major data member.
void ResetLatest(void)
Reset Latest data member.
bool CanGetLatest(void) const
Check if it is safe to call GetLatest method.
TAnnotated GetAnnotated(void) const
Get the Annotated member data.
bool IsSetLatest(void) const
Check if a value has been assigned to Latest data member.
CGCClient_AssemblyInfo_Base(const CGCClient_AssemblyInfo_Base &)
void ResetAccession(void)
Reset Accession data member.
void ResetAnnotated(void)
Reset Annotated data member.
TLatest & SetLatest(void)
Assign a value to Latest data member.
bool IsSetAnnotated(void) const
Check if a value has been assigned to Annotated data member.
const TAccession & GetAccession(void) const
Get the Accession member data.
CGCClient_AssemblyInfo_Base & operator=(const CGCClient_AssemblyInfo_Base &)
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
TMajor GetMajor(void) const
Get the Major member data.
bool CanGetAccession(void) const
Check if it is safe to call GetAccession method.
TAccession & SetAccession(void)
Assign a value to Accession data member.
void ResetType(void)
Reset Type data member.
virtual void Reset(void)
Reset the whole object.
TLatest GetLatest(void) const
Get the Latest member data.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon Jul 22 05:00:22 2024 by modify_doxy.py rev. 669887