NCBI C++ ToolKit
Blast4_reply_body_.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 Blast4_reply_body_.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/blast/blast.asn">blast.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/blast/blast.def">blast.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_BLAST_BLAST4_REPLY_BODY_BASE_HPP
42 #define OBJECTS_BLAST_BLAST4_REPLY_BODY_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
72 
73 
74 // generated classes
75 
76 
77 /** @addtogroup dataspec_NCBI_Blast4
78  *
79  * @{
80  */
81 
82 /////////////////////////////////////////////////////////////////////////////
83 ///
84 /// CBlast4_reply_body_Base --
85 ///
86 
88 {
90 public:
91  // constructor
93  // destructor
94  virtual ~CBlast4_reply_body_Base(void);
95 
96  // type info
98 
99 
100  /// Choice variants.
101  enum E_Choice {
102  e_not_set = 0, ///< No variant selected
118  e_Get_databases_ex
119  };
120  /// Maximum+1 value of the choice variant enumerator.
122  e_MaxChoice = 17 ///< == e_Get_databases_ex+1
123  };
124 
125  /// Reset the whole object
126  virtual void Reset(void);
127 
128  /// Reset the selection (set it to e_not_set).
129  virtual void ResetSelection(void);
130 
131  /// Which variant is currently selected.
132  ///
133  /// @return
134  /// Choice state enumerator.
135  E_Choice Which(void) const;
136 
137  /// Verify selection, throw exception if it differs from the expected.
138  ///
139  /// @param index
140  /// Expected selection.
141  void CheckSelected(E_Choice index) const;
142 
143  /// Throw 'InvalidSelection' exception.
144  ///
145  /// @param index
146  /// Expected selection.
147  NCBI_NORETURN void ThrowInvalidSelection(E_Choice index) const;
148 
149  /// Retrieve selection name (for diagnostic purposes).
150  ///
151  /// @param index
152  /// One of possible selection states.
153  /// @return
154  /// Name string.
155  static string SelectionName(E_Choice index);
156 
157  /// Select the requested variant if needed.
158  ///
159  /// @param index
160  /// New selection state.
161  /// @param reset
162  /// Flag that defines the resetting of the variant data. The data will
163  /// be reset if either the current selection differs from the new one,
164  /// or the flag is set to eDoResetVariant.
166  /// Select the requested variant if needed,
167  /// allocating CObject variants from memory pool.
168  void Select(E_Choice index,
169  EResetVariant reset,
170  CObjectMemoryPool* pool);
171 
172  // types
189 
190  // getters
191  // setters
192 
193 
194  /// Check if variant Finish_params is selected.
195  ///
196  /// Finish_params type is defined as 'typedef CBlast4_finish_params_reply TFinish_params'.
197  /// @return
198  /// - true, if the variant is selected.
199  /// - false, otherwise.
200  bool IsFinish_params(void) const;
201 
202  /// Get the variant data.
203  ///
204  /// @return
205  /// Reference to the data.
206  const TFinish_params& GetFinish_params(void) const;
207 
208  /// Select the variant.
209  ///
210  /// @return
211  /// Reference to the variant data.
212  TFinish_params& SetFinish_params(void);
213  /// Select the variant and set its data.
214  ///
215  /// @param value
216  /// Reference to the data.
217  void SetFinish_params(TFinish_params& value);
218 
219 
220  /// Check if variant Get_databases is selected.
221  ///
222  /// Get_databases type is defined as 'typedef CBlast4_get_databases_reply TGet_databases'.
223  /// @return
224  /// - true, if the variant is selected.
225  /// - false, otherwise.
226  bool IsGet_databases(void) const;
227 
228  /// Get the variant data.
229  ///
230  /// @return
231  /// Reference to the data.
232  const TGet_databases& GetGet_databases(void) const;
233 
234  /// Select the variant.
235  ///
236  /// @return
237  /// Reference to the variant data.
238  TGet_databases& SetGet_databases(void);
239  /// Select the variant and set its data.
240  ///
241  /// @param value
242  /// Reference to the data.
243  void SetGet_databases(TGet_databases& value);
244 
245 
246  /// Check if variant Get_matrices is selected.
247  ///
248  /// Get_matrices type is defined as 'typedef CBlast4_get_matrices_reply TGet_matrices'.
249  /// @return
250  /// - true, if the variant is selected.
251  /// - false, otherwise.
252  bool IsGet_matrices(void) const;
253 
254  /// Get the variant data.
255  ///
256  /// @return
257  /// Reference to the data.
258  const TGet_matrices& GetGet_matrices(void) const;
259 
260  /// Select the variant.
261  ///
262  /// @return
263  /// Reference to the variant data.
264  TGet_matrices& SetGet_matrices(void);
265  /// Select the variant and set its data.
266  ///
267  /// @param value
268  /// Reference to the data.
269  void SetGet_matrices(TGet_matrices& value);
270 
271 
272  /// Check if variant Get_parameters is selected.
273  ///
274  /// Get_parameters type is defined as 'typedef CBlast4_get_parameters_reply TGet_parameters'.
275  /// @return
276  /// - true, if the variant is selected.
277  /// - false, otherwise.
278  bool IsGet_parameters(void) const;
279 
280  /// Get the variant data.
281  ///
282  /// @return
283  /// Reference to the data.
284  const TGet_parameters& GetGet_parameters(void) const;
285 
286  /// Select the variant.
287  ///
288  /// @return
289  /// Reference to the variant data.
290  TGet_parameters& SetGet_parameters(void);
291  /// Select the variant and set its data.
292  ///
293  /// @param value
294  /// Reference to the data.
295  void SetGet_parameters(TGet_parameters& value);
296 
297 
298  /// Check if variant Get_paramsets is selected.
299  ///
300  /// Get_paramsets type is defined as 'typedef CBlast4_get_paramsets_reply TGet_paramsets'.
301  /// @return
302  /// - true, if the variant is selected.
303  /// - false, otherwise.
304  bool IsGet_paramsets(void) const;
305 
306  /// Get the variant data.
307  ///
308  /// @return
309  /// Reference to the data.
310  const TGet_paramsets& GetGet_paramsets(void) const;
311 
312  /// Select the variant.
313  ///
314  /// @return
315  /// Reference to the variant data.
316  TGet_paramsets& SetGet_paramsets(void);
317  /// Select the variant and set its data.
318  ///
319  /// @param value
320  /// Reference to the data.
321  void SetGet_paramsets(TGet_paramsets& value);
322 
323 
324  /// Check if variant Get_programs is selected.
325  ///
326  /// Get_programs type is defined as 'typedef CBlast4_get_programs_reply TGet_programs'.
327  /// @return
328  /// - true, if the variant is selected.
329  /// - false, otherwise.
330  bool IsGet_programs(void) const;
331 
332  /// Get the variant data.
333  ///
334  /// @return
335  /// Reference to the data.
336  const TGet_programs& GetGet_programs(void) const;
337 
338  /// Select the variant.
339  ///
340  /// @return
341  /// Reference to the variant data.
342  TGet_programs& SetGet_programs(void);
343  /// Select the variant and set its data.
344  ///
345  /// @param value
346  /// Reference to the data.
347  void SetGet_programs(TGet_programs& value);
348 
349 
350  /// Check if variant Get_search_results is selected.
351  ///
352  /// Get_search_results type is defined as 'typedef CBlast4_get_search_results_reply TGet_search_results'.
353  /// @return
354  /// - true, if the variant is selected.
355  /// - false, otherwise.
356  bool IsGet_search_results(void) const;
357 
358  /// Get the variant data.
359  ///
360  /// @return
361  /// Reference to the data.
362  const TGet_search_results& GetGet_search_results(void) const;
363 
364  /// Select the variant.
365  ///
366  /// @return
367  /// Reference to the variant data.
368  TGet_search_results& SetGet_search_results(void);
369  /// Select the variant and set its data.
370  ///
371  /// @param value
372  /// Reference to the data.
373  void SetGet_search_results(TGet_search_results& value);
374 
375 
376  /// Check if variant Get_sequences is selected.
377  ///
378  /// Get_sequences type is defined as 'typedef CBlast4_get_sequences_reply TGet_sequences'.
379  /// @return
380  /// - true, if the variant is selected.
381  /// - false, otherwise.
382  bool IsGet_sequences(void) const;
383 
384  /// Get the variant data.
385  ///
386  /// @return
387  /// Reference to the data.
388  const TGet_sequences& GetGet_sequences(void) const;
389 
390  /// Select the variant.
391  ///
392  /// @return
393  /// Reference to the variant data.
394  TGet_sequences& SetGet_sequences(void);
395  /// Select the variant and set its data.
396  ///
397  /// @param value
398  /// Reference to the data.
399  void SetGet_sequences(TGet_sequences& value);
400 
401 
402  /// Check if variant Queue_search is selected.
403  ///
404  /// Queue_search type is defined as 'typedef CBlast4_queue_search_reply TQueue_search'.
405  /// @return
406  /// - true, if the variant is selected.
407  /// - false, otherwise.
408  bool IsQueue_search(void) const;
409 
410  /// Get the variant data.
411  ///
412  /// @return
413  /// Reference to the data.
414  const TQueue_search& GetQueue_search(void) const;
415 
416  /// Select the variant.
417  ///
418  /// @return
419  /// Reference to the variant data.
420  TQueue_search& SetQueue_search(void);
421  /// Select the variant and set its data.
422  ///
423  /// @param value
424  /// Reference to the data.
425  void SetQueue_search(TQueue_search& value);
426 
427 
428  /// Check if variant Get_queries is selected.
429  ///
430  /// Get_queries type is defined as 'typedef CBlast4_get_queries_reply TGet_queries'.
431  /// @return
432  /// - true, if the variant is selected.
433  /// - false, otherwise.
434  bool IsGet_queries(void) const;
435 
436  /// Get the variant data.
437  ///
438  /// @return
439  /// Reference to the data.
440  const TGet_queries& GetGet_queries(void) const;
441 
442  /// Select the variant.
443  ///
444  /// @return
445  /// Reference to the variant data.
446  TGet_queries& SetGet_queries(void);
447  /// Select the variant and set its data.
448  ///
449  /// @param value
450  /// Reference to the data.
451  void SetGet_queries(TGet_queries& value);
452 
453 
454  /// Check if variant Get_request_info is selected.
455  ///
456  /// Get_request_info type is defined as 'typedef CBlast4_get_request_info_reply TGet_request_info'.
457  /// @return
458  /// - true, if the variant is selected.
459  /// - false, otherwise.
460  bool IsGet_request_info(void) const;
461 
462  /// Get the variant data.
463  ///
464  /// @return
465  /// Reference to the data.
466  const TGet_request_info& GetGet_request_info(void) const;
467 
468  /// Select the variant.
469  ///
470  /// @return
471  /// Reference to the variant data.
472  TGet_request_info& SetGet_request_info(void);
473  /// Select the variant and set its data.
474  ///
475  /// @param value
476  /// Reference to the data.
477  void SetGet_request_info(TGet_request_info& value);
478 
479 
480  /// Check if variant Get_sequence_parts is selected.
481  ///
482  /// Get_sequence_parts type is defined as 'typedef CBlast4_get_seq_parts_reply TGet_sequence_parts'.
483  /// @return
484  /// - true, if the variant is selected.
485  /// - false, otherwise.
486  bool IsGet_sequence_parts(void) const;
487 
488  /// Get the variant data.
489  ///
490  /// @return
491  /// Reference to the data.
492  const TGet_sequence_parts& GetGet_sequence_parts(void) const;
493 
494  /// Select the variant.
495  ///
496  /// @return
497  /// Reference to the variant data.
498  TGet_sequence_parts& SetGet_sequence_parts(void);
499  /// Select the variant and set its data.
500  ///
501  /// @param value
502  /// Reference to the data.
503  void SetGet_sequence_parts(TGet_sequence_parts& value);
504 
505 
506  /// Check if variant Get_windowmasked_taxids is selected.
507  ///
508  /// Get_windowmasked_taxids type is defined as 'typedef CBlast4_get_windowmasked_taxids_reply TGet_windowmasked_taxids'.
509  /// @return
510  /// - true, if the variant is selected.
511  /// - false, otherwise.
512  bool IsGet_windowmasked_taxids(void) const;
513 
514  /// Get the variant data.
515  ///
516  /// @return
517  /// Reference to the data.
518  const TGet_windowmasked_taxids& GetGet_windowmasked_taxids(void) const;
519 
520  /// Select the variant.
521  ///
522  /// @return
523  /// Reference to the variant data.
524  TGet_windowmasked_taxids& SetGet_windowmasked_taxids(void);
525  /// Select the variant and set its data.
526  ///
527  /// @param value
528  /// Reference to the data.
529  void SetGet_windowmasked_taxids(TGet_windowmasked_taxids& value);
530 
531 
532  /// Check if variant Get_protocol_info is selected.
533  ///
534  /// Get_protocol_info type is defined as 'typedef CBlast4_get_protocol_info_reply TGet_protocol_info'.
535  /// @return
536  /// - true, if the variant is selected.
537  /// - false, otherwise.
538  bool IsGet_protocol_info(void) const;
539 
540  /// Get the variant data.
541  ///
542  /// @return
543  /// Reference to the data.
544  const TGet_protocol_info& GetGet_protocol_info(void) const;
545 
546  /// Select the variant.
547  ///
548  /// @return
549  /// Reference to the variant data.
550  TGet_protocol_info& SetGet_protocol_info(void);
551  /// Select the variant and set its data.
552  ///
553  /// @param value
554  /// Reference to the data.
555  void SetGet_protocol_info(TGet_protocol_info& value);
556 
557 
558  /// Check if variant Get_search_info is selected.
559  ///
560  /// Get_search_info type is defined as 'typedef CBlast4_get_search_info_reply TGet_search_info'.
561  /// @return
562  /// - true, if the variant is selected.
563  /// - false, otherwise.
564  bool IsGet_search_info(void) const;
565 
566  /// Get the variant data.
567  ///
568  /// @return
569  /// Reference to the data.
570  const TGet_search_info& GetGet_search_info(void) const;
571 
572  /// Select the variant.
573  ///
574  /// @return
575  /// Reference to the variant data.
576  TGet_search_info& SetGet_search_info(void);
577  /// Select the variant and set its data.
578  ///
579  /// @param value
580  /// Reference to the data.
581  void SetGet_search_info(TGet_search_info& value);
582 
583 
584  /// Check if variant Get_databases_ex is selected.
585  ///
586  /// Get_databases_ex type is defined as 'typedef CBlast4_get_databases_ex_reply TGet_databases_ex'.
587  /// @return
588  /// - true, if the variant is selected.
589  /// - false, otherwise.
590  bool IsGet_databases_ex(void) const;
591 
592  /// Get the variant data.
593  ///
594  /// @return
595  /// Reference to the data.
596  const TGet_databases_ex& GetGet_databases_ex(void) const;
597 
598  /// Select the variant.
599  ///
600  /// @return
601  /// Reference to the variant data.
602  TGet_databases_ex& SetGet_databases_ex(void);
603  /// Select the variant and set its data.
604  ///
605  /// @param value
606  /// Reference to the data.
607  void SetGet_databases_ex(TGet_databases_ex& value);
608 
609 
610 private:
611  // copy constructor and assignment operator
614  // choice state
616  // helper methods
617  void DoSelect(E_Choice index, CObjectMemoryPool* pool = 0);
618 
619  static const char* const sm_SelectionNames[];
620  // data
621  NCBI_NS_NCBI::CSerialObject *m_object;
622 };
623 
624 /* @} */
625 
626 
627 
628 
629 
630 ///////////////////////////////////////////////////////////
631 ///////////////////// inline methods //////////////////////
632 ///////////////////////////////////////////////////////////
633 inline
635 {
636  return m_choice;
637 }
638 
639 inline
641 {
642  if ( m_choice != index )
643  ThrowInvalidSelection(index);
644 }
645 
646 inline
647 void CBlast4_reply_body_Base::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset, NCBI_NS_NCBI::CObjectMemoryPool* pool)
648 {
649  if ( reset == NCBI_NS_NCBI::eDoResetVariant || m_choice != index ) {
650  if ( m_choice != e_not_set )
651  ResetSelection();
652  DoSelect(index, pool);
653  }
654 }
655 
656 inline
658 {
659  Select(index, reset, 0);
660 }
661 
662 inline
664 {
665  return m_choice == e_Finish_params;
666 }
667 
668 inline
670 {
671  return m_choice == e_Get_databases;
672 }
673 
674 inline
676 {
677  return m_choice == e_Get_matrices;
678 }
679 
680 inline
682 {
683  return m_choice == e_Get_parameters;
684 }
685 
686 inline
688 {
689  return m_choice == e_Get_paramsets;
690 }
691 
692 inline
694 {
695  return m_choice == e_Get_programs;
696 }
697 
698 inline
700 {
701  return m_choice == e_Get_search_results;
702 }
703 
704 inline
706 {
707  return m_choice == e_Get_sequences;
708 }
709 
710 inline
712 {
713  return m_choice == e_Queue_search;
714 }
715 
716 inline
718 {
719  return m_choice == e_Get_queries;
720 }
721 
722 inline
724 {
725  return m_choice == e_Get_request_info;
726 }
727 
728 inline
730 {
731  return m_choice == e_Get_sequence_parts;
732 }
733 
734 inline
736 {
738 }
739 
740 inline
742 {
743  return m_choice == e_Get_protocol_info;
744 }
745 
746 inline
748 {
749  return m_choice == e_Get_search_info;
750 }
751 
752 inline
754 {
755  return m_choice == e_Get_databases_ex;
756 }
757 
758 ///////////////////////////////////////////////////////////
759 ////////////////// end of inline methods //////////////////
760 ///////////////////////////////////////////////////////////
761 
762 
763 
764 
765 
766 END_objects_SCOPE // namespace ncbi::objects::
767 
769 
770 
771 #endif // OBJECTS_BLAST_BLAST4_REPLY_BODY_BASE_HPP
CBlast4_finish_params_reply –.
CBlast4_get_databases_ex_reply –.
CBlast4_get_databases_reply –.
CBlast4_get_matrices_reply –.
CBlast4_get_parameters_reply –.
CBlast4_get_paramsets_reply –.
CBlast4_get_programs_reply –.
CBlast4_get_protocol_info_reply –.
CBlast4_get_queries_reply –.
CBlast4_get_request_info_reply –.
CBlast4_get_search_info_reply –.
CBlast4_get_search_results_reply –.
CBlast4_get_seq_parts_reply –.
CBlast4_get_sequences_reply –.
CBlast4_get_windowmasked_taxids_reply –.
CBlast4_queue_search_reply –.
CBlast4_reply_body_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
EResetVariant
Definition: serialbase.hpp:76
@ eDoResetVariant
Definition: serialbase.hpp:77
#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_BLAST_EXPORT
Definition: ncbi_export.h:360
CBlast4_get_paramsets_reply TGet_paramsets
bool IsGet_databases_ex(void) const
Check if variant Get_databases_ex is selected.
CBlast4_queue_search_reply TQueue_search
CBlast4_get_queries_reply TGet_queries
CBlast4_get_programs_reply TGet_programs
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
CBlast4_get_sequences_reply TGet_sequences
CBlast4_get_parameters_reply TGet_parameters
bool IsGet_search_results(void) const
Check if variant Get_search_results is selected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
bool IsGet_sequences(void) const
Check if variant Get_sequences is selected.
CBlast4_get_databases_reply TGet_databases
bool IsGet_programs(void) const
Check if variant Get_programs is selected.
bool IsQueue_search(void) const
Check if variant Queue_search is selected.
bool IsFinish_params(void) const
Check if variant Finish_params is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
CBlast4_get_protocol_info_reply TGet_protocol_info
CBlast4_get_windowmasked_taxids_reply TGet_windowmasked_taxids
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsGet_parameters(void) const
Check if variant Get_parameters is selected.
NCBI_NS_NCBI::CSerialObject * m_object
CBlast4_get_seq_parts_reply TGet_sequence_parts
bool IsGet_databases(void) const
Check if variant Get_databases is selected.
CBlast4_get_search_info_reply TGet_search_info
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
E_Choice Which(void) const
Which variant is currently selected.
CBlast4_get_databases_ex_reply TGet_databases_ex
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsGet_sequence_parts(void) const
Check if variant Get_sequence_parts is selected.
bool IsGet_search_info(void) const
Check if variant Get_search_info is selected.
bool IsGet_matrices(void) const
Check if variant Get_matrices is selected.
CBlast4_get_search_results_reply TGet_search_results
CBlast4_reply_body_Base & operator=(const CBlast4_reply_body_Base &)
CBlast4_finish_params_reply TFinish_params
CBlast4_get_request_info_reply TGet_request_info
bool IsGet_windowmasked_taxids(void) const
Check if variant Get_windowmasked_taxids is selected.
bool IsGet_paramsets(void) const
Check if variant Get_paramsets is selected.
CBlast4_reply_body_Base(const CBlast4_reply_body_Base &)
bool IsGet_protocol_info(void) const
Check if variant Get_protocol_info is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CBlast4_get_matrices_reply TGet_matrices
bool IsGet_queries(void) const
Check if variant Get_queries is selected.
bool IsGet_request_info(void) const
Check if variant Get_request_info is selected.
@ e_not_set
No variant selected.
@ e_not_set
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Tue May 28 05:53:51 2024 by modify_doxy.py rev. 669887