NCBI C++ ToolKit
Blast4_reply_body_.cpp
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  * File Description:
27  * This code was generated by application DATATOOL
28  * using the following specifications:
29  * 'blast.asn'.
30  *
31  * ATTENTION:
32  * Don't edit or commit this file into CVS as this file will
33  * be overridden (by DATATOOL) without warning!
34  * ===========================================================================
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 #include <serial/serialimpl.hpp>
40 
41 // generated includes
60 
61 BEGIN_objects_SCOPE // namespace ncbi::objects::
62 
63 
64 // generated classes
65 
67 {
68  if ( m_choice != e_not_set )
70 }
71 
73 {
74  switch ( m_choice ) {
75  case e_Finish_params:
76  case e_Get_databases:
77  case e_Get_matrices:
78  case e_Get_parameters:
79  case e_Get_paramsets:
80  case e_Get_programs:
82  case e_Get_sequences:
83  case e_Queue_search:
84  case e_Get_queries:
85  case e_Get_request_info:
89  case e_Get_search_info:
90  case e_Get_databases_ex:
91  m_object->RemoveReference();
92  break;
93  default:
94  break;
95  }
97 }
98 
99 void CBlast4_reply_body_Base::DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* pool)
100 {
101  switch ( index ) {
102  case e_Finish_params:
103  (m_object = new(pool) ncbi::objects::CBlast4_finish_params_reply())->AddReference();
104  break;
105  case e_Get_databases:
106  (m_object = new(pool) ncbi::objects::CBlast4_get_databases_reply())->AddReference();
107  break;
108  case e_Get_matrices:
109  (m_object = new(pool) ncbi::objects::CBlast4_get_matrices_reply())->AddReference();
110  break;
111  case e_Get_parameters:
112  (m_object = new(pool) ncbi::objects::CBlast4_get_parameters_reply())->AddReference();
113  break;
114  case e_Get_paramsets:
115  (m_object = new(pool) ncbi::objects::CBlast4_get_paramsets_reply())->AddReference();
116  break;
117  case e_Get_programs:
118  (m_object = new(pool) ncbi::objects::CBlast4_get_programs_reply())->AddReference();
119  break;
121  (m_object = new(pool) ncbi::objects::CBlast4_get_search_results_reply())->AddReference();
122  break;
123  case e_Get_sequences:
124  (m_object = new(pool) ncbi::objects::CBlast4_get_sequences_reply())->AddReference();
125  break;
126  case e_Queue_search:
127  (m_object = new(pool) ncbi::objects::CBlast4_queue_search_reply())->AddReference();
128  break;
129  case e_Get_queries:
130  (m_object = new(pool) ncbi::objects::CBlast4_get_queries_reply())->AddReference();
131  break;
132  case e_Get_request_info:
133  (m_object = new(pool) ncbi::objects::CBlast4_get_request_info_reply())->AddReference();
134  break;
136  (m_object = new(pool) ncbi::objects::CBlast4_get_seq_parts_reply())->AddReference();
137  break;
139  (m_object = new(pool) ncbi::objects::CBlast4_get_windowmasked_taxids_reply())->AddReference();
140  break;
141  case e_Get_protocol_info:
142  (m_object = new(pool) ncbi::objects::CBlast4_get_protocol_info_reply())->AddReference();
143  break;
144  case e_Get_search_info:
145  (m_object = new(pool) ncbi::objects::CBlast4_get_search_info_reply())->AddReference();
146  break;
147  case e_Get_databases_ex:
148  (m_object = new(pool) ncbi::objects::CBlast4_get_databases_ex_reply())->AddReference();
149  break;
150  default:
151  break;
152  }
153  m_choice = index;
154 }
155 
156 const char* const CBlast4_reply_body_Base::sm_SelectionNames[] = {
157  "not set",
158  "finish-params",
159  "get-databases",
160  "get-matrices",
161  "get-parameters",
162  "get-paramsets",
163  "get-programs",
164  "get-search-results",
165  "get-sequences",
166  "queue-search",
167  "get-queries",
168  "get-request-info",
169  "get-sequence-parts",
170  "get-windowmasked-taxids",
171  "get-protocol-info",
172  "get-search-info",
173  "get-databases-ex"
174 };
175 
177 {
178  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
179 }
180 
182 {
183  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
184 }
185 
187 {
189  return *static_cast<const TFinish_params*>(m_object);
190 }
191 
193 {
195  return *static_cast<TFinish_params*>(m_object);
196 }
197 
199 {
200  TFinish_params* ptr = &value;
201  if ( m_choice != e_Finish_params || m_object != ptr ) {
202  ResetSelection();
203  (m_object = ptr)->AddReference();
205  }
206 }
207 
209 {
211  return *static_cast<const TGet_databases*>(m_object);
212 }
213 
215 {
217  return *static_cast<TGet_databases*>(m_object);
218 }
219 
221 {
222  TGet_databases* ptr = &value;
223  if ( m_choice != e_Get_databases || m_object != ptr ) {
224  ResetSelection();
225  (m_object = ptr)->AddReference();
227  }
228 }
229 
231 {
233  return *static_cast<const TGet_matrices*>(m_object);
234 }
235 
237 {
239  return *static_cast<TGet_matrices*>(m_object);
240 }
241 
243 {
244  TGet_matrices* ptr = &value;
245  if ( m_choice != e_Get_matrices || m_object != ptr ) {
246  ResetSelection();
247  (m_object = ptr)->AddReference();
249  }
250 }
251 
253 {
255  return *static_cast<const TGet_parameters*>(m_object);
256 }
257 
259 {
261  return *static_cast<TGet_parameters*>(m_object);
262 }
263 
265 {
266  TGet_parameters* ptr = &value;
267  if ( m_choice != e_Get_parameters || m_object != ptr ) {
268  ResetSelection();
269  (m_object = ptr)->AddReference();
271  }
272 }
273 
275 {
277  return *static_cast<const TGet_paramsets*>(m_object);
278 }
279 
281 {
283  return *static_cast<TGet_paramsets*>(m_object);
284 }
285 
287 {
288  TGet_paramsets* ptr = &value;
289  if ( m_choice != e_Get_paramsets || m_object != ptr ) {
290  ResetSelection();
291  (m_object = ptr)->AddReference();
293  }
294 }
295 
297 {
299  return *static_cast<const TGet_programs*>(m_object);
300 }
301 
303 {
305  return *static_cast<TGet_programs*>(m_object);
306 }
307 
309 {
310  TGet_programs* ptr = &value;
311  if ( m_choice != e_Get_programs || m_object != ptr ) {
312  ResetSelection();
313  (m_object = ptr)->AddReference();
315  }
316 }
317 
319 {
321  return *static_cast<const TGet_search_results*>(m_object);
322 }
323 
325 {
327  return *static_cast<TGet_search_results*>(m_object);
328 }
329 
331 {
332  TGet_search_results* ptr = &value;
333  if ( m_choice != e_Get_search_results || m_object != ptr ) {
334  ResetSelection();
335  (m_object = ptr)->AddReference();
337  }
338 }
339 
341 {
343  return *static_cast<const TGet_sequences*>(m_object);
344 }
345 
347 {
349  return *static_cast<TGet_sequences*>(m_object);
350 }
351 
353 {
354  TGet_sequences* ptr = &value;
355  if ( m_choice != e_Get_sequences || m_object != ptr ) {
356  ResetSelection();
357  (m_object = ptr)->AddReference();
359  }
360 }
361 
363 {
365  return *static_cast<const TQueue_search*>(m_object);
366 }
367 
369 {
371  return *static_cast<TQueue_search*>(m_object);
372 }
373 
375 {
376  TQueue_search* ptr = &value;
377  if ( m_choice != e_Queue_search || m_object != ptr ) {
378  ResetSelection();
379  (m_object = ptr)->AddReference();
381  }
382 }
383 
385 {
387  return *static_cast<const TGet_queries*>(m_object);
388 }
389 
391 {
393  return *static_cast<TGet_queries*>(m_object);
394 }
395 
397 {
398  TGet_queries* ptr = &value;
399  if ( m_choice != e_Get_queries || m_object != ptr ) {
400  ResetSelection();
401  (m_object = ptr)->AddReference();
403  }
404 }
405 
407 {
409  return *static_cast<const TGet_request_info*>(m_object);
410 }
411 
413 {
415  return *static_cast<TGet_request_info*>(m_object);
416 }
417 
419 {
420  TGet_request_info* ptr = &value;
421  if ( m_choice != e_Get_request_info || m_object != ptr ) {
422  ResetSelection();
423  (m_object = ptr)->AddReference();
425  }
426 }
427 
429 {
431  return *static_cast<const TGet_sequence_parts*>(m_object);
432 }
433 
435 {
437  return *static_cast<TGet_sequence_parts*>(m_object);
438 }
439 
441 {
442  TGet_sequence_parts* ptr = &value;
443  if ( m_choice != e_Get_sequence_parts || m_object != ptr ) {
444  ResetSelection();
445  (m_object = ptr)->AddReference();
447  }
448 }
449 
451 {
453  return *static_cast<const TGet_windowmasked_taxids*>(m_object);
454 }
455 
457 {
459  return *static_cast<TGet_windowmasked_taxids*>(m_object);
460 }
461 
463 {
465  if ( m_choice != e_Get_windowmasked_taxids || m_object != ptr ) {
466  ResetSelection();
467  (m_object = ptr)->AddReference();
469  }
470 }
471 
473 {
475  return *static_cast<const TGet_protocol_info*>(m_object);
476 }
477 
479 {
481  return *static_cast<TGet_protocol_info*>(m_object);
482 }
483 
485 {
486  TGet_protocol_info* ptr = &value;
487  if ( m_choice != e_Get_protocol_info || m_object != ptr ) {
488  ResetSelection();
489  (m_object = ptr)->AddReference();
491  }
492 }
493 
495 {
497  return *static_cast<const TGet_search_info*>(m_object);
498 }
499 
501 {
503  return *static_cast<TGet_search_info*>(m_object);
504 }
505 
507 {
508  TGet_search_info* ptr = &value;
509  if ( m_choice != e_Get_search_info || m_object != ptr ) {
510  ResetSelection();
511  (m_object = ptr)->AddReference();
513  }
514 }
515 
517 {
519  return *static_cast<const TGet_databases_ex*>(m_object);
520 }
521 
523 {
525  return *static_cast<TGet_databases_ex*>(m_object);
526 }
527 
529 {
530  TGet_databases_ex* ptr = &value;
531  if ( m_choice != e_Get_databases_ex || m_object != ptr ) {
532  ResetSelection();
533  (m_object = ptr)->AddReference();
535  }
536 }
537 
538 // helper methods
539 
540 // type info
542 {
543  SET_CHOICE_MODULE("NCBI-Blast4");
544  ADD_NAMED_REF_CHOICE_VARIANT("finish-params", m_object, CBlast4_finish_params_reply);
545  ADD_NAMED_REF_CHOICE_VARIANT("get-databases", m_object, CBlast4_get_databases_reply);
546  ADD_NAMED_REF_CHOICE_VARIANT("get-matrices", m_object, CBlast4_get_matrices_reply);
547  ADD_NAMED_REF_CHOICE_VARIANT("get-parameters", m_object, CBlast4_get_parameters_reply);
548  ADD_NAMED_REF_CHOICE_VARIANT("get-paramsets", m_object, CBlast4_get_paramsets_reply);
549  ADD_NAMED_REF_CHOICE_VARIANT("get-programs", m_object, CBlast4_get_programs_reply);
550  ADD_NAMED_REF_CHOICE_VARIANT("get-search-results", m_object, CBlast4_get_search_results_reply);
551  ADD_NAMED_REF_CHOICE_VARIANT("get-sequences", m_object, CBlast4_get_sequences_reply);
552  ADD_NAMED_REF_CHOICE_VARIANT("queue-search", m_object, CBlast4_queue_search_reply);
554  ADD_NAMED_REF_CHOICE_VARIANT("get-request-info", m_object, CBlast4_get_request_info_reply);
555  ADD_NAMED_REF_CHOICE_VARIANT("get-sequence-parts", m_object, CBlast4_get_seq_parts_reply);
556  ADD_NAMED_REF_CHOICE_VARIANT("get-windowmasked-taxids", m_object, CBlast4_get_windowmasked_taxids_reply);
557  ADD_NAMED_REF_CHOICE_VARIANT("get-protocol-info", m_object, CBlast4_get_protocol_info_reply);
558  ADD_NAMED_REF_CHOICE_VARIANT("get-search-info", m_object, CBlast4_get_search_info_reply);
559  ADD_NAMED_REF_CHOICE_VARIANT("get-databases-ex", m_object, CBlast4_get_databases_ex_reply);
560  info->CodeVersion(22400);
561  info->DataSpec(ncbi::EDataSpec::eASN);
562 }
564 
565 // constructor
567  : m_choice(e_not_set)
568 {
569 }
570 
571 // destructor
573 {
574  Reset();
575 }
576 
577 
578 
579 END_objects_SCOPE // namespace ncbi::objects::
580 
582 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
BEGIN_NAMED_BASE_CHOICE_INFO("Blast4-reply-body", CBlast4_reply_body)
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
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 –.
string
Definition: cgiapp.hpp:687
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:170
#define ADD_NAMED_REF_CHOICE_VARIANT(MemberAlias, MemberName, ClassName)
Definition: serialimpl.hpp:400
#define END_CHOICE_INFO
Definition: serialimpl.hpp:506
#define SET_CHOICE_MODULE(ModuleName)
Definition: serialimpl.hpp:500
@ eDoNotResetVariant
Definition: serialbase.hpp:78
void AddReference(void) const
Add reference to object.
Definition: ncbiobj.hpp:489
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const TGet_search_results & GetGet_search_results(void) const
Get the variant data.
TGet_databases & SetGet_databases(void)
Select the variant.
TGet_parameters & SetGet_parameters(void)
Select the variant.
TGet_sequences & SetGet_sequences(void)
Select the variant.
const TGet_protocol_info & GetGet_protocol_info(void) const
Get the variant data.
TFinish_params & SetFinish_params(void)
Select the variant.
TGet_search_results & SetGet_search_results(void)
Select the variant.
const TGet_parameters & GetGet_parameters(void) const
Get the variant data.
const TGet_sequences & GetGet_sequences(void) const
Get the variant data.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
static const char *const sm_SelectionNames[]
TGet_sequence_parts & SetGet_sequence_parts(void)
Select the variant.
const TGet_queries & GetGet_queries(void) const
Get the variant data.
TGet_request_info & SetGet_request_info(void)
Select the variant.
virtual ~CBlast4_reply_body_Base(void)
TGet_matrices & SetGet_matrices(void)
Select the variant.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
virtual void Reset(void)
Reset the whole object.
const TGet_sequence_parts & GetGet_sequence_parts(void) const
Get the variant data.
const TFinish_params & GetFinish_params(void) const
Get the variant data.
const TGet_databases & GetGet_databases(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TGet_programs & GetGet_programs(void) const
Get the variant data.
const TGet_windowmasked_taxids & GetGet_windowmasked_taxids(void) const
Get the variant data.
TGet_programs & SetGet_programs(void)
Select the variant.
TGet_protocol_info & SetGet_protocol_info(void)
Select the variant.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
NCBI_NS_NCBI::CSerialObject * m_object
const TQueue_search & GetQueue_search(void) const
Get the variant data.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
const TGet_paramsets & GetGet_paramsets(void) const
Get the variant data.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
const TGet_databases_ex & GetGet_databases_ex(void) const
Get the variant data.
TGet_paramsets & SetGet_paramsets(void)
Select the variant.
const TGet_search_info & GetGet_search_info(void) const
Get the variant data.
TQueue_search & SetQueue_search(void)
Select the variant.
TGet_windowmasked_taxids & SetGet_windowmasked_taxids(void)
Select the variant.
const TGet_request_info & GetGet_request_info(void) const
Get the variant data.
const TGet_matrices & GetGet_matrices(void) const
Get the variant data.
TGet_queries & SetGet_queries(void)
Select the variant.
TGet_search_info & SetGet_search_info(void)
Select the variant.
TGet_databases_ex & SetGet_databases_ex(void)
Select the variant.
@ e_not_set
No variant selected.
@ e_not_set
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Apr 27 11:19:12 2024 by modify_doxy.py rev. 669887