NCBI C++ ToolKit
ID2_Reply_Get_Blob_Id_.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 ID2_Reply_Get_Blob_Id_.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/id2/id2.asn">id2.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/id2/id2.def">id2.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_ID2_ID2_REPLY_GET_BLOB_ID_BASE_HPP
42 #define OBJECTS_ID2_ID2_REPLY_GET_BLOB_ID_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
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 // forward declarations
61 class CID2_Blob_Id;
62 class CSeq_id;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_NCBI_ID2Access
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 /// Reply to ID2-Request-Get-Blob-Id.
75 ///
76 /// CID2_Reply_Get_Blob_Id_Base --
77 ///
78 
80 {
82 public:
83  // constructor
85  // destructor
86  virtual ~CID2_Reply_Get_Blob_Id_Base(void);
87 
88  // type info
90 
91  // types
92  typedef CSeq_id TSeq_id;
94  typedef int TSplit_version;
95  typedef list< CRef< CID2S_Seq_annot_Info > > TAnnot_info;
96  typedef int TBlob_state;
97 
98  // member index
99  enum class E_memberIndex {
100  e__allMandatory = 0,
101  e_seq_id,
102  e_blob_id,
103  e_split_version,
104  e_annot_info,
105  e_end_of_reply,
106  e_blob_state
107  };
109 
110  // getters
111  // setters
112 
113  /// requested Seq-id
114  /// Check if a value has been assigned to Seq_id data member.
115  ///
116  /// Data member Seq_id is mandatory;
117  /// its type is defined as 'typedef CSeq_id TSeq_id'
118  /// @return
119  /// - true, if a value has been assigned.
120  /// - false, otherwise.
121  bool IsSetSeq_id(void) const;
122 
123  /// Check if it is safe to call GetSeq_id method.
124  ///
125  /// @return
126  /// - true, if the data member is getatable.
127  /// - false, otherwise.
128  bool CanGetSeq_id(void) const;
129 
130  /// Reset Seq_id data member.
131  void ResetSeq_id(void);
132 
133  /// Get the Seq_id member data.
134  ///
135  /// @return
136  /// Reference to the member data.
137  const TSeq_id& GetSeq_id(void) const;
138 
139  /// Assign a value to Seq_id data member.
140  ///
141  /// @param value
142  /// Reference to value.
143  void SetSeq_id(TSeq_id& value);
144 
145  /// Assign a value to Seq_id data member.
146  ///
147  /// @return
148  /// Reference to the data value.
149  TSeq_id& SetSeq_id(void);
150 
151  /// result
152  /// Check if a value has been assigned to Blob_id data member.
153  ///
154  /// Data member Blob_id is optional;
155  /// its type is defined as 'typedef CID2_Blob_Id TBlob_id'
156  /// @return
157  /// - true, if a value has been assigned.
158  /// - false, otherwise.
159  bool IsSetBlob_id(void) const;
160 
161  /// Check if it is safe to call GetBlob_id method.
162  ///
163  /// @return
164  /// - true, if the data member is getatable.
165  /// - false, otherwise.
166  bool CanGetBlob_id(void) const;
167 
168  /// Reset Blob_id data member.
169  void ResetBlob_id(void);
170 
171  /// Get the Blob_id member data.
172  ///
173  /// @return
174  /// Reference to the member data.
175  const TBlob_id& GetBlob_id(void) const;
176 
177  /// Assign a value to Blob_id data member.
178  ///
179  /// @param value
180  /// Reference to value.
181  void SetBlob_id(TBlob_id& value);
182 
183  /// Assign a value to Blob_id data member.
184  ///
185  /// @return
186  /// Reference to the data value.
187  TBlob_id& SetBlob_id(void);
188 
189  /// version of split data
190  /// (0 for non split)
191  /// Check if a value has been assigned to Split_version data member.
192  ///
193  /// Data member Split_version is optional with default 0;
194  /// its type is defined as 'typedef int TSplit_version'
195  /// @return
196  /// - true, if a value has been assigned.
197  /// - false, otherwise.
198  bool IsSetSplit_version(void) const;
199 
200  /// Check if it is safe to call GetSplit_version method.
201  ///
202  /// @return
203  /// - true, if the data member is getatable.
204  /// - false, otherwise.
205  bool CanGetSplit_version(void) const;
206 
207  /// Reset Split_version data member.
208  void ResetSplit_version(void);
209 
210  /// Assign default value to Split_version data member.
211  void SetDefaultSplit_version(void);
212 
213  /// Get the Split_version member data.
214  ///
215  /// @return
216  /// Copy of the member data.
217  TSplit_version GetSplit_version(void) const;
218 
219  /// Assign a value to Split_version data member.
220  ///
221  /// @param value
222  /// Value to assign
223  void SetSplit_version(TSplit_version value);
224 
225  /// Assign a value to Split_version data member.
226  ///
227  /// @return
228  /// Reference to the data value.
229  TSplit_version& SetSplit_version(void);
230 
231  /// annotation types in this blob
232  /// annotation are unknown if this field is omitted
233  /// Check if a value has been assigned to Annot_info data member.
234  ///
235  /// Data member Annot_info is optional;
236  /// its type is defined as 'typedef list< CRef< CID2S_Seq_annot_Info > > TAnnot_info'
237  /// @return
238  /// - true, if a value has been assigned.
239  /// - false, otherwise.
240  bool IsSetAnnot_info(void) const;
241 
242  /// Check if it is safe to call GetAnnot_info method.
243  ///
244  /// @return
245  /// - true, if the data member is getatable.
246  /// - false, otherwise.
247  bool CanGetAnnot_info(void) const;
248 
249  /// Reset Annot_info data member.
250  void ResetAnnot_info(void);
251 
252  /// Get the Annot_info member data.
253  ///
254  /// @return
255  /// Reference to the member data.
256  const TAnnot_info& GetAnnot_info(void) const;
257 
258  /// Assign a value to Annot_info data member.
259  ///
260  /// @return
261  /// Reference to the data value.
262  TAnnot_info& SetAnnot_info(void);
263 
264  /// this Blob-id is the last one in the request
265  /// Check if a value has been assigned to End_of_reply data member.
266  ///
267  /// Data member End_of_reply is optional
268  /// @return
269  /// - true, if a value has been assigned.
270  /// - false, otherwise.
271  bool IsSetEnd_of_reply(void) const;
272 
273  /// Check if value of End_of_reply member is getatable.
274  ///
275  /// @return
276  /// - false; the data member of type 'NULL' has no value.
277  bool CanGetEnd_of_reply(void) const;
278 
279  /// Reset End_of_reply data member.
280  void ResetEnd_of_reply(void);
281 
282  /// Set NULL data member (assign 'NULL' value to End_of_reply data member).
283  void SetEnd_of_reply(void);
284 
285  /// state bits of the blob, 0 or missing means regular live data
286  /// Check if a value has been assigned to Blob_state data member.
287  ///
288  /// Data member Blob_state is optional;
289  /// its type is defined as 'typedef int TBlob_state'
290  /// @return
291  /// - true, if a value has been assigned.
292  /// - false, otherwise.
293  bool IsSetBlob_state(void) const;
294 
295  /// Check if it is safe to call GetBlob_state method.
296  ///
297  /// @return
298  /// - true, if the data member is getatable.
299  /// - false, otherwise.
300  bool CanGetBlob_state(void) const;
301 
302  /// Reset Blob_state data member.
303  void ResetBlob_state(void);
304 
305  /// Get the Blob_state member data.
306  ///
307  /// @return
308  /// Copy of the member data.
309  TBlob_state GetBlob_state(void) const;
310 
311  /// Assign a value to Blob_state data member.
312  ///
313  /// @param value
314  /// Value to assign
315  void SetBlob_state(TBlob_state value);
316 
317  /// Assign a value to Blob_state data member.
318  ///
319  /// @return
320  /// Reference to the data value.
321  TBlob_state& SetBlob_state(void);
322 
323  /// Reset the whole object
324  virtual void Reset(void);
325 
326 
327 private:
328  // Prohibit copy constructor and assignment operator
331 
332  // data
333  Uint4 m_set_State[1];
337  list< CRef< CID2S_Seq_annot_Info > > m_Annot_info;
339 };
340 
341 /* @} */
342 
343 
344 
345 
346 
347 ///////////////////////////////////////////////////////////
348 ///////////////////// inline methods //////////////////////
349 ///////////////////////////////////////////////////////////
350 inline
352 {
353  return m_Seq_id.NotEmpty();
354 }
355 
356 inline
358 {
359  return true;
360 }
361 
362 inline
364 {
365  if ( !m_Seq_id ) {
366  const_cast<CID2_Reply_Get_Blob_Id_Base*>(this)->ResetSeq_id();
367  }
368  return (*m_Seq_id);
369 }
370 
371 inline
373 {
374  if ( !m_Seq_id ) {
375  ResetSeq_id();
376  }
377  return (*m_Seq_id);
378 }
379 
380 inline
382 {
383  return m_Blob_id.NotEmpty();
384 }
385 
386 inline
388 {
389  return IsSetBlob_id();
390 }
391 
392 inline
394 {
395  if (!CanGetBlob_id()) {
396  ThrowUnassigned(1);
397  }
398  return (*m_Blob_id);
399 }
400 
401 inline
403 {
404  return ((m_set_State[0] & 0x30) != 0);
405 }
406 
407 inline
409 {
410  return true;
411 }
412 
413 inline
415 {
416  m_Split_version = 0;
417  m_set_State[0] &= ~0x30;
418 }
419 
420 inline
422 {
424 }
425 
426 inline
428 {
429  return m_Split_version;
430 }
431 
432 inline
434 {
436  m_set_State[0] |= 0x30;
437 }
438 
439 inline
441 {
442 #ifdef _DEBUG
443  if (!IsSetSplit_version()) {
445  }
446 #endif
447  m_set_State[0] |= 0x10;
448  return m_Split_version;
449 }
450 
451 inline
453 {
454  return ((m_set_State[0] & 0xc0) != 0);
455 }
456 
457 inline
459 {
460  return true;
461 }
462 
463 inline
465 {
466  return m_Annot_info;
467 }
468 
469 inline
471 {
472  m_set_State[0] |= 0x40;
473  return m_Annot_info;
474 }
475 
476 inline
478 {
479  return ((m_set_State[0] & 0x300) != 0);
480 }
481 
482 inline
484 {
485  return false;
486 }
487 
488 inline
490 {
491  m_set_State[0] &= ~0x300;
492 }
493 
494 inline
496 {
497  m_set_State[0] |= 0x300;
498 }
499 
500 inline
502 {
503  return ((m_set_State[0] & 0xc00) != 0);
504 }
505 
506 inline
508 {
509  return IsSetBlob_state();
510 }
511 
512 inline
514 {
515  m_Blob_state = 0;
516  m_set_State[0] &= ~0xc00;
517 }
518 
519 inline
521 {
522  if (!CanGetBlob_state()) {
523  ThrowUnassigned(5);
524  }
525  return m_Blob_state;
526 }
527 
528 inline
530 {
532  m_set_State[0] |= 0xc00;
533 }
534 
535 inline
537 {
538 #ifdef _DEBUG
539  if (!IsSetBlob_state()) {
540  memset(&m_Blob_state,UnassignedByte(),sizeof(m_Blob_state));
541  }
542 #endif
543  m_set_State[0] |= 0x400;
544  return m_Blob_state;
545 }
546 
547 ///////////////////////////////////////////////////////////
548 ////////////////// end of inline methods //////////////////
549 ///////////////////////////////////////////////////////////
550 
551 
552 
553 
554 
555 END_objects_SCOPE // namespace ncbi::objects::
556 
558 
559 
560 #endif // OBJECTS_ID2_ID2_REPLY_GET_BLOB_ID_BASE_HPP
CID2S_Seq_annot_Info –.
CID2_Blob_Id –.
Definition: ID2_Blob_Id.hpp:66
Reply to ID2-Request-Get-Blob-Id.
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
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_ID2_EXPORT
Definition: ncbi_export.h:552
void ResetSplit_version(void)
Reset Split_version data member.
bool IsSetAnnot_info(void) const
annotation types in this blob annotation are unknown if this field is omitted Check if a value has be...
bool CanGetSplit_version(void) const
Check if it is safe to call GetSplit_version method.
bool IsSetSeq_id(void) const
requested Seq-id Check if a value has been assigned to Seq_id data member.
void ResetBlob_state(void)
Reset Blob_state data member.
bool IsSetEnd_of_reply(void) const
this Blob-id is the last one in the request Check if a value has been assigned to End_of_reply data m...
bool IsSetBlob_state(void) const
state bits of the blob, 0 or missing means regular live data Check if a value has been assigned to Bl...
bool CanGetBlob_state(void) const
Check if it is safe to call GetBlob_state method.
void ResetSeq_id(void)
Reset Seq_id data member.
const TSeq_id & GetSeq_id(void) const
Get the Seq_id member data.
void SetEnd_of_reply(void)
Set NULL data member (assign 'NULL' value to End_of_reply data member).
TSplit_version GetSplit_version(void) const
Get the Split_version member data.
bool CanGetEnd_of_reply(void) const
Check if value of End_of_reply member is getatable.
void SetDefaultSplit_version(void)
Assign default value to Split_version data member.
list< CRef< CID2S_Seq_annot_Info > > TAnnot_info
const TAnnot_info & GetAnnot_info(void) const
Get the Annot_info member data.
TBlob_state & SetBlob_state(void)
Assign a value to Blob_state data member.
CID2_Reply_Get_Blob_Id_Base(const CID2_Reply_Get_Blob_Id_Base &)
bool CanGetBlob_id(void) const
Check if it is safe to call GetBlob_id method.
list< CRef< CID2S_Seq_annot_Info > > m_Annot_info
TSplit_version & SetSplit_version(void)
Assign a value to Split_version data member.
TBlob_state GetBlob_state(void) const
Get the Blob_state member data.
const TBlob_id & GetBlob_id(void) const
Get the Blob_id member data.
bool CanGetAnnot_info(void) const
Check if it is safe to call GetAnnot_info method.
void ResetEnd_of_reply(void)
Reset End_of_reply data member.
bool CanGetSeq_id(void) const
Check if it is safe to call GetSeq_id method.
bool IsSetSplit_version(void) const
version of split data (0 for non split) Check if a value has been assigned to Split_version data memb...
CID2_Reply_Get_Blob_Id_Base & operator=(const CID2_Reply_Get_Blob_Id_Base &)
Tparent::CMemberIndex< E_memberIndex, 7 > TmemberIndex
TAnnot_info & SetAnnot_info(void)
Assign a value to Annot_info data member.
TSeq_id & SetSeq_id(void)
Assign a value to Seq_id data member.
bool IsSetBlob_id(void) const
result Check if a value has been assigned to Blob_id data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:58:30 2024 by modify_doxy.py rev. 669887