NCBI C++ ToolKit
Blast4_queue_search_reques_.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_queue_search_reques_.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_QUEUE_SEARCH_REQUES_BASE_HPP
42 #define OBJECTS_BLAST_BLAST4_QUEUE_SEARCH_REQUES_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 // forward declarations
60 class CBlast4_parameters;
61 class CBlast4_queries;
62 class CBlast4_subject;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_NCBI_Blast4
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 /// Options have been broken down into three groups as part of the BLAST
75 /// API work. The algorithm options essentially correspond to those
76 /// options available via the CBlastOptions class.
77 /// For definitions of the names used in the Blast4-parameter structures, see
78 /// c++/{include,src}/objects/blast/names.[hc]pp in the NCBI C++ toolkit.
79 /// algorithm-options: Options for BLAST (ie. seq comparison) algorithm.
80 /// program-options: Options for controlling program execution and/or
81 /// database filtering
82 /// format-options: Options for formatting BLAST results, clients should
83 /// use this only if applicable, otherwise they should be
84 /// ignored
85 ///
86 /// CBlast4_queue_search_request_Base --
87 ///
88 
90 {
92 public:
93  // constructor
95  // destructor
96  virtual ~CBlast4_queue_search_request_Base(void);
97 
98  // type info
100 
101  // types
102  typedef string TProgram;
103  typedef string TService;
106  typedef string TParamset;
110 
111  // member index
112  enum class E_memberIndex {
113  e__allMandatory = 0,
114  e_program,
115  e_service,
116  e_queries,
117  e_subject,
118  e_paramset,
119  e_algorithm_options,
120  e_program_options,
121  e_format_options
122  };
124 
125  // getters
126  // setters
127 
128  /// Check if a value has been assigned to Program data member.
129  ///
130  /// Data member Program is mandatory;
131  /// its type is defined as 'typedef string TProgram'
132  /// @return
133  /// - true, if a value has been assigned.
134  /// - false, otherwise.
135  bool IsSetProgram(void) const;
136 
137  /// Check if it is safe to call GetProgram method.
138  ///
139  /// @return
140  /// - true, if the data member is getatable.
141  /// - false, otherwise.
142  bool CanGetProgram(void) const;
143 
144  /// Reset Program data member.
145  void ResetProgram(void);
146 
147  /// Get the Program member data.
148  ///
149  /// @return
150  /// Reference to the member data.
151  const TProgram& GetProgram(void) const;
152 
153  /// Assign a value to Program data member.
154  ///
155  /// @param value
156  /// Value to assign
157  void SetProgram(const TProgram& value);
158  void SetProgram(TProgram&& value);
159 
160  /// Assign a value to Program data member.
161  ///
162  /// @return
163  /// Reference to the data value.
164  TProgram& SetProgram(void);
165 
166  /// Check if a value has been assigned to Service data member.
167  ///
168  /// Data member Service is mandatory;
169  /// its type is defined as 'typedef string TService'
170  /// @return
171  /// - true, if a value has been assigned.
172  /// - false, otherwise.
173  bool IsSetService(void) const;
174 
175  /// Check if it is safe to call GetService method.
176  ///
177  /// @return
178  /// - true, if the data member is getatable.
179  /// - false, otherwise.
180  bool CanGetService(void) const;
181 
182  /// Reset Service data member.
183  void ResetService(void);
184 
185  /// Get the Service member data.
186  ///
187  /// @return
188  /// Reference to the member data.
189  const TService& GetService(void) const;
190 
191  /// Assign a value to Service data member.
192  ///
193  /// @param value
194  /// Value to assign
195  void SetService(const TService& value);
196  void SetService(TService&& value);
197 
198  /// Assign a value to Service data member.
199  ///
200  /// @return
201  /// Reference to the data value.
202  TService& SetService(void);
203 
204  /// Check if a value has been assigned to Queries data member.
205  ///
206  /// Data member Queries is mandatory;
207  /// its type is defined as 'typedef CBlast4_queries TQueries'
208  /// @return
209  /// - true, if a value has been assigned.
210  /// - false, otherwise.
211  bool IsSetQueries(void) const;
212 
213  /// Check if it is safe to call GetQueries method.
214  ///
215  /// @return
216  /// - true, if the data member is getatable.
217  /// - false, otherwise.
218  bool CanGetQueries(void) const;
219 
220  /// Reset Queries data member.
221  void ResetQueries(void);
222 
223  /// Get the Queries member data.
224  ///
225  /// @return
226  /// Reference to the member data.
227  const TQueries& GetQueries(void) const;
228 
229  /// Assign a value to Queries data member.
230  ///
231  /// @param value
232  /// Reference to value.
233  void SetQueries(TQueries& value);
234 
235  /// Assign a value to Queries data member.
236  ///
237  /// @return
238  /// Reference to the data value.
239  TQueries& SetQueries(void);
240 
241  /// Check if a value has been assigned to Subject data member.
242  ///
243  /// Data member Subject is mandatory;
244  /// its type is defined as 'typedef CBlast4_subject TSubject'
245  /// @return
246  /// - true, if a value has been assigned.
247  /// - false, otherwise.
248  bool IsSetSubject(void) const;
249 
250  /// Check if it is safe to call GetSubject method.
251  ///
252  /// @return
253  /// - true, if the data member is getatable.
254  /// - false, otherwise.
255  bool CanGetSubject(void) const;
256 
257  /// Reset Subject data member.
258  void ResetSubject(void);
259 
260  /// Get the Subject member data.
261  ///
262  /// @return
263  /// Reference to the member data.
264  const TSubject& GetSubject(void) const;
265 
266  /// Assign a value to Subject data member.
267  ///
268  /// @param value
269  /// Reference to value.
270  void SetSubject(TSubject& value);
271 
272  /// Assign a value to Subject data member.
273  ///
274  /// @return
275  /// Reference to the data value.
276  TSubject& SetSubject(void);
277 
278  /// This field contains a task description
279  /// Check if a value has been assigned to Paramset data member.
280  ///
281  /// Data member Paramset is optional;
282  /// its type is defined as 'typedef string TParamset'
283  /// @return
284  /// - true, if a value has been assigned.
285  /// - false, otherwise.
286  bool IsSetParamset(void) const;
287 
288  /// Check if it is safe to call GetParamset method.
289  ///
290  /// @return
291  /// - true, if the data member is getatable.
292  /// - false, otherwise.
293  bool CanGetParamset(void) const;
294 
295  /// Reset Paramset data member.
296  void ResetParamset(void);
297 
298  /// Get the Paramset member data.
299  ///
300  /// @return
301  /// Reference to the member data.
302  const TParamset& GetParamset(void) const;
303 
304  /// Assign a value to Paramset data member.
305  ///
306  /// @param value
307  /// Value to assign
308  void SetParamset(const TParamset& value);
309  void SetParamset(TParamset&& value);
310 
311  /// Assign a value to Paramset data member.
312  ///
313  /// @return
314  /// Reference to the data value.
315  TParamset& SetParamset(void);
316 
317  /// Check if a value has been assigned to Algorithm_options data member.
318  ///
319  /// Data member Algorithm_options is optional;
320  /// its type is defined as 'typedef CBlast4_parameters TAlgorithm_options'
321  /// @return
322  /// - true, if a value has been assigned.
323  /// - false, otherwise.
324  bool IsSetAlgorithm_options(void) const;
325 
326  /// Check if it is safe to call GetAlgorithm_options method.
327  ///
328  /// @return
329  /// - true, if the data member is getatable.
330  /// - false, otherwise.
331  bool CanGetAlgorithm_options(void) const;
332 
333  /// Reset Algorithm_options data member.
334  void ResetAlgorithm_options(void);
335 
336  /// Get the Algorithm_options member data.
337  ///
338  /// @return
339  /// Reference to the member data.
340  const TAlgorithm_options& GetAlgorithm_options(void) const;
341 
342  /// Assign a value to Algorithm_options data member.
343  ///
344  /// @param value
345  /// Reference to value.
346  void SetAlgorithm_options(TAlgorithm_options& value);
347 
348  /// Assign a value to Algorithm_options data member.
349  ///
350  /// @return
351  /// Reference to the data value.
352  TAlgorithm_options& SetAlgorithm_options(void);
353 
354  /// Check if a value has been assigned to Program_options data member.
355  ///
356  /// Data member Program_options is optional;
357  /// its type is defined as 'typedef CBlast4_parameters TProgram_options'
358  /// @return
359  /// - true, if a value has been assigned.
360  /// - false, otherwise.
361  bool IsSetProgram_options(void) const;
362 
363  /// Check if it is safe to call GetProgram_options method.
364  ///
365  /// @return
366  /// - true, if the data member is getatable.
367  /// - false, otherwise.
368  bool CanGetProgram_options(void) const;
369 
370  /// Reset Program_options data member.
371  void ResetProgram_options(void);
372 
373  /// Get the Program_options member data.
374  ///
375  /// @return
376  /// Reference to the member data.
377  const TProgram_options& GetProgram_options(void) const;
378 
379  /// Assign a value to Program_options data member.
380  ///
381  /// @param value
382  /// Reference to value.
383  void SetProgram_options(TProgram_options& value);
384 
385  /// Assign a value to Program_options data member.
386  ///
387  /// @return
388  /// Reference to the data value.
389  TProgram_options& SetProgram_options(void);
390 
391  /// Check if a value has been assigned to Format_options data member.
392  ///
393  /// Data member Format_options is optional;
394  /// its type is defined as 'typedef CBlast4_parameters TFormat_options'
395  /// @return
396  /// - true, if a value has been assigned.
397  /// - false, otherwise.
398  bool IsSetFormat_options(void) const;
399 
400  /// Check if it is safe to call GetFormat_options method.
401  ///
402  /// @return
403  /// - true, if the data member is getatable.
404  /// - false, otherwise.
405  bool CanGetFormat_options(void) const;
406 
407  /// Reset Format_options data member.
408  void ResetFormat_options(void);
409 
410  /// Get the Format_options member data.
411  ///
412  /// @return
413  /// Reference to the member data.
414  const TFormat_options& GetFormat_options(void) const;
415 
416  /// Assign a value to Format_options data member.
417  ///
418  /// @param value
419  /// Reference to value.
420  void SetFormat_options(TFormat_options& value);
421 
422  /// Assign a value to Format_options data member.
423  ///
424  /// @return
425  /// Reference to the data value.
426  TFormat_options& SetFormat_options(void);
427 
428  /// Reset the whole object
429  virtual void Reset(void);
430 
431 
432 private:
433  // Prohibit copy constructor and assignment operator
436 
437  // data
438  Uint4 m_set_State[1];
439  string m_Program;
440  string m_Service;
443  string m_Paramset;
447 };
448 
449 /* @} */
450 
451 
452 
453 
454 
455 ///////////////////////////////////////////////////////////
456 ///////////////////// inline methods //////////////////////
457 ///////////////////////////////////////////////////////////
458 inline
460 {
461  return ((m_set_State[0] & 0x3) != 0);
462 }
463 
464 inline
466 {
467  return IsSetProgram();
468 }
469 
470 inline
472 {
473  if (!CanGetProgram()) {
474  ThrowUnassigned(0);
475  }
476  return m_Program;
477 }
478 
479 inline
481 {
482  m_Program = value;
483  m_set_State[0] |= 0x3;
484 }
485 
486 inline
488 {
489  m_Program = std::forward<CBlast4_queue_search_request_Base::TProgram>(value);
490  m_set_State[0] |= 0x3;
491 }
492 
493 inline
495 {
496 #ifdef _DEBUG
497  if (!IsSetProgram()) {
499  }
500 #endif
501  m_set_State[0] |= 0x1;
502  return m_Program;
503 }
504 
505 inline
507 {
508  return ((m_set_State[0] & 0xc) != 0);
509 }
510 
511 inline
513 {
514  return IsSetService();
515 }
516 
517 inline
519 {
520  if (!CanGetService()) {
521  ThrowUnassigned(1);
522  }
523  return m_Service;
524 }
525 
526 inline
528 {
529  m_Service = value;
530  m_set_State[0] |= 0xc;
531 }
532 
533 inline
535 {
536  m_Service = std::forward<CBlast4_queue_search_request_Base::TService>(value);
537  m_set_State[0] |= 0xc;
538 }
539 
540 inline
542 {
543 #ifdef _DEBUG
544  if (!IsSetService()) {
546  }
547 #endif
548  m_set_State[0] |= 0x4;
549  return m_Service;
550 }
551 
552 inline
554 {
555  return m_Queries.NotEmpty();
556 }
557 
558 inline
560 {
561  return true;
562 }
563 
564 inline
566 {
567  if ( !m_Queries ) {
568  const_cast<CBlast4_queue_search_request_Base*>(this)->ResetQueries();
569  }
570  return (*m_Queries);
571 }
572 
573 inline
575 {
576  if ( !m_Queries ) {
577  ResetQueries();
578  }
579  return (*m_Queries);
580 }
581 
582 inline
584 {
585  return m_Subject.NotEmpty();
586 }
587 
588 inline
590 {
591  return true;
592 }
593 
594 inline
596 {
597  if ( !m_Subject ) {
598  const_cast<CBlast4_queue_search_request_Base*>(this)->ResetSubject();
599  }
600  return (*m_Subject);
601 }
602 
603 inline
605 {
606  if ( !m_Subject ) {
607  ResetSubject();
608  }
609  return (*m_Subject);
610 }
611 
612 inline
614 {
615  return ((m_set_State[0] & 0x300) != 0);
616 }
617 
618 inline
620 {
621  return IsSetParamset();
622 }
623 
624 inline
626 {
627  if (!CanGetParamset()) {
628  ThrowUnassigned(4);
629  }
630  return m_Paramset;
631 }
632 
633 inline
635 {
636  m_Paramset = value;
637  m_set_State[0] |= 0x300;
638 }
639 
640 inline
642 {
643  m_Paramset = std::forward<CBlast4_queue_search_request_Base::TParamset>(value);
644  m_set_State[0] |= 0x300;
645 }
646 
647 inline
649 {
650 #ifdef _DEBUG
651  if (!IsSetParamset()) {
653  }
654 #endif
655  m_set_State[0] |= 0x100;
656  return m_Paramset;
657 }
658 
659 inline
661 {
662  return m_Algorithm_options.NotEmpty();
663 }
664 
665 inline
667 {
668  return IsSetAlgorithm_options();
669 }
670 
671 inline
673 {
674  if (!CanGetAlgorithm_options()) {
675  ThrowUnassigned(5);
676  }
677  return (*m_Algorithm_options);
678 }
679 
680 inline
682 {
683  return m_Program_options.NotEmpty();
684 }
685 
686 inline
688 {
689  return IsSetProgram_options();
690 }
691 
692 inline
694 {
695  if (!CanGetProgram_options()) {
696  ThrowUnassigned(6);
697  }
698  return (*m_Program_options);
699 }
700 
701 inline
703 {
704  return m_Format_options.NotEmpty();
705 }
706 
707 inline
709 {
710  return IsSetFormat_options();
711 }
712 
713 inline
715 {
716  if (!CanGetFormat_options()) {
717  ThrowUnassigned(7);
718  }
719  return (*m_Format_options);
720 }
721 
722 ///////////////////////////////////////////////////////////
723 ////////////////// end of inline methods //////////////////
724 ///////////////////////////////////////////////////////////
725 
726 
727 
728 
729 
730 END_objects_SCOPE // namespace ncbi::objects::
731 
733 
734 
735 #endif // OBJECTS_BLAST_BLAST4_QUEUE_SEARCH_REQUES_BASE_HPP
Options have been broken down into three groups as part of the BLAST API work.
CBlast4_subject –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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_BLAST_EXPORT
Definition: ncbi_export.h:360
Tparent::CMemberIndex< E_memberIndex, 9 > TmemberIndex
bool IsSetService(void) const
Check if a value has been assigned to Service data member.
const TSubject & GetSubject(void) const
Get the Subject member data.
const TService & GetService(void) const
Get the Service member data.
const TFormat_options & GetFormat_options(void) const
Get the Format_options member data.
const TParamset & GetParamset(void) const
Get the Paramset member data.
bool IsSetQueries(void) const
Check if a value has been assigned to Queries data member.
TParamset & SetParamset(void)
Assign a value to Paramset data member.
bool CanGetProgram(void) const
Check if it is safe to call GetProgram method.
TService & SetService(void)
Assign a value to Service data member.
bool IsSetParamset(void) const
This field contains a task description Check if a value has been assigned to Paramset data member.
bool CanGetQueries(void) const
Check if it is safe to call GetQueries method.
bool CanGetParamset(void) const
Check if it is safe to call GetParamset method.
CBlast4_queue_search_request_Base & operator=(const CBlast4_queue_search_request_Base &)
bool CanGetSubject(void) const
Check if it is safe to call GetSubject method.
CBlast4_queue_search_request_Base(const CBlast4_queue_search_request_Base &)
bool IsSetProgram(void) const
Check if a value has been assigned to Program data member.
bool IsSetProgram_options(void) const
Check if a value has been assigned to Program_options data member.
void ResetSubject(void)
Reset Subject data member.
TQueries & SetQueries(void)
Assign a value to Queries data member.
bool CanGetProgram_options(void) const
Check if it is safe to call GetProgram_options method.
TSubject & SetSubject(void)
Assign a value to Subject data member.
bool CanGetService(void) const
Check if it is safe to call GetService method.
const TProgram_options & GetProgram_options(void) const
Get the Program_options member data.
const TQueries & GetQueries(void) const
Get the Queries member data.
bool IsSetFormat_options(void) const
Check if a value has been assigned to Format_options data member.
TProgram & SetProgram(void)
Assign a value to Program data member.
void ResetQueries(void)
Reset Queries data member.
bool CanGetFormat_options(void) const
Check if it is safe to call GetFormat_options method.
const TAlgorithm_options & GetAlgorithm_options(void) const
Get the Algorithm_options member data.
bool IsSetAlgorithm_options(void) const
Check if a value has been assigned to Algorithm_options data member.
bool IsSetSubject(void) const
Check if a value has been assigned to Subject data member.
const TProgram & GetProgram(void) const
Get the Program member data.
bool CanGetAlgorithm_options(void) const
Check if it is safe to call GetAlgorithm_options method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:08 2024 by modify_doxy.py rev. 669887