NCBI C++ ToolKit
Blast_finish_params_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 Blast_finish_params_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_BLAST_FINISH_PARAMS_REQUES_BASE_HPP
42 #define OBJECTS_BLAST_BLAST_FINISH_PARAMS_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 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_Blast4
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 /// END ADD EXT INFO
73 ///
74 /// CBlast4_finish_params_request_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
85 
86  // type info
88 
89  // types
90  typedef string TProgram;
91  typedef string TService;
92  typedef string TParamset;
94 
95  // member index
96  enum class E_memberIndex {
97  e__allMandatory = 0,
98  e_program,
99  e_service,
100  e_paramset,
101  e_params
102  };
104 
105  // getters
106  // setters
107 
108  /// Check if a value has been assigned to Program data member.
109  ///
110  /// Data member Program is mandatory;
111  /// its type is defined as 'typedef string TProgram'
112  /// @return
113  /// - true, if a value has been assigned.
114  /// - false, otherwise.
115  bool IsSetProgram(void) const;
116 
117  /// Check if it is safe to call GetProgram method.
118  ///
119  /// @return
120  /// - true, if the data member is getatable.
121  /// - false, otherwise.
122  bool CanGetProgram(void) const;
123 
124  /// Reset Program data member.
125  void ResetProgram(void);
126 
127  /// Get the Program member data.
128  ///
129  /// @return
130  /// Reference to the member data.
131  const TProgram& GetProgram(void) const;
132 
133  /// Assign a value to Program data member.
134  ///
135  /// @param value
136  /// Value to assign
137  void SetProgram(const TProgram& value);
138  void SetProgram(TProgram&& value);
139 
140  /// Assign a value to Program data member.
141  ///
142  /// @return
143  /// Reference to the data value.
144  TProgram& SetProgram(void);
145 
146  /// Check if a value has been assigned to Service data member.
147  ///
148  /// Data member Service is mandatory;
149  /// its type is defined as 'typedef string TService'
150  /// @return
151  /// - true, if a value has been assigned.
152  /// - false, otherwise.
153  bool IsSetService(void) const;
154 
155  /// Check if it is safe to call GetService method.
156  ///
157  /// @return
158  /// - true, if the data member is getatable.
159  /// - false, otherwise.
160  bool CanGetService(void) const;
161 
162  /// Reset Service data member.
163  void ResetService(void);
164 
165  /// Get the Service member data.
166  ///
167  /// @return
168  /// Reference to the member data.
169  const TService& GetService(void) const;
170 
171  /// Assign a value to Service data member.
172  ///
173  /// @param value
174  /// Value to assign
175  void SetService(const TService& value);
176  void SetService(TService&& value);
177 
178  /// Assign a value to Service data member.
179  ///
180  /// @return
181  /// Reference to the data value.
182  TService& SetService(void);
183 
184  /// Check if a value has been assigned to Paramset data member.
185  ///
186  /// Data member Paramset is optional;
187  /// its type is defined as 'typedef string TParamset'
188  /// @return
189  /// - true, if a value has been assigned.
190  /// - false, otherwise.
191  bool IsSetParamset(void) const;
192 
193  /// Check if it is safe to call GetParamset method.
194  ///
195  /// @return
196  /// - true, if the data member is getatable.
197  /// - false, otherwise.
198  bool CanGetParamset(void) const;
199 
200  /// Reset Paramset data member.
201  void ResetParamset(void);
202 
203  /// Get the Paramset member data.
204  ///
205  /// @return
206  /// Reference to the member data.
207  const TParamset& GetParamset(void) const;
208 
209  /// Assign a value to Paramset data member.
210  ///
211  /// @param value
212  /// Value to assign
213  void SetParamset(const TParamset& value);
214  void SetParamset(TParamset&& value);
215 
216  /// Assign a value to Paramset data member.
217  ///
218  /// @return
219  /// Reference to the data value.
220  TParamset& SetParamset(void);
221 
222  /// Check if a value has been assigned to Params data member.
223  ///
224  /// Data member Params is optional;
225  /// its type is defined as 'typedef CBlast4_parameters TParams'
226  /// @return
227  /// - true, if a value has been assigned.
228  /// - false, otherwise.
229  bool IsSetParams(void) const;
230 
231  /// Check if it is safe to call GetParams method.
232  ///
233  /// @return
234  /// - true, if the data member is getatable.
235  /// - false, otherwise.
236  bool CanGetParams(void) const;
237 
238  /// Reset Params data member.
239  void ResetParams(void);
240 
241  /// Get the Params member data.
242  ///
243  /// @return
244  /// Reference to the member data.
245  const TParams& GetParams(void) const;
246 
247  /// Assign a value to Params data member.
248  ///
249  /// @param value
250  /// Reference to value.
251  void SetParams(TParams& value);
252 
253  /// Assign a value to Params data member.
254  ///
255  /// @return
256  /// Reference to the data value.
257  TParams& SetParams(void);
258 
259  /// Reset the whole object
260  virtual void Reset(void);
261 
262 
263 private:
264  // Prohibit copy constructor and assignment operator
267 
268  // data
269  Uint4 m_set_State[1];
270  string m_Program;
271  string m_Service;
272  string m_Paramset;
274 };
275 
276 /* @} */
277 
278 
279 
280 
281 
282 ///////////////////////////////////////////////////////////
283 ///////////////////// inline methods //////////////////////
284 ///////////////////////////////////////////////////////////
285 inline
287 {
288  return ((m_set_State[0] & 0x3) != 0);
289 }
290 
291 inline
293 {
294  return IsSetProgram();
295 }
296 
297 inline
299 {
300  if (!CanGetProgram()) {
301  ThrowUnassigned(0);
302  }
303  return m_Program;
304 }
305 
306 inline
308 {
309  m_Program = value;
310  m_set_State[0] |= 0x3;
311 }
312 
313 inline
315 {
316  m_Program = std::forward<CBlast4_finish_params_request_Base::TProgram>(value);
317  m_set_State[0] |= 0x3;
318 }
319 
320 inline
322 {
323 #ifdef _DEBUG
324  if (!IsSetProgram()) {
326  }
327 #endif
328  m_set_State[0] |= 0x1;
329  return m_Program;
330 }
331 
332 inline
334 {
335  return ((m_set_State[0] & 0xc) != 0);
336 }
337 
338 inline
340 {
341  return IsSetService();
342 }
343 
344 inline
346 {
347  if (!CanGetService()) {
348  ThrowUnassigned(1);
349  }
350  return m_Service;
351 }
352 
353 inline
355 {
356  m_Service = value;
357  m_set_State[0] |= 0xc;
358 }
359 
360 inline
362 {
363  m_Service = std::forward<CBlast4_finish_params_request_Base::TService>(value);
364  m_set_State[0] |= 0xc;
365 }
366 
367 inline
369 {
370 #ifdef _DEBUG
371  if (!IsSetService()) {
373  }
374 #endif
375  m_set_State[0] |= 0x4;
376  return m_Service;
377 }
378 
379 inline
381 {
382  return ((m_set_State[0] & 0x30) != 0);
383 }
384 
385 inline
387 {
388  return IsSetParamset();
389 }
390 
391 inline
393 {
394  if (!CanGetParamset()) {
395  ThrowUnassigned(2);
396  }
397  return m_Paramset;
398 }
399 
400 inline
402 {
403  m_Paramset = value;
404  m_set_State[0] |= 0x30;
405 }
406 
407 inline
409 {
410  m_Paramset = std::forward<CBlast4_finish_params_request_Base::TParamset>(value);
411  m_set_State[0] |= 0x30;
412 }
413 
414 inline
416 {
417 #ifdef _DEBUG
418  if (!IsSetParamset()) {
420  }
421 #endif
422  m_set_State[0] |= 0x10;
423  return m_Paramset;
424 }
425 
426 inline
428 {
429  return m_Params.NotEmpty();
430 }
431 
432 inline
434 {
435  return IsSetParams();
436 }
437 
438 inline
440 {
441  if (!CanGetParams()) {
442  ThrowUnassigned(3);
443  }
444  return (*m_Params);
445 }
446 
447 ///////////////////////////////////////////////////////////
448 ////////////////// end of inline methods //////////////////
449 ///////////////////////////////////////////////////////////
450 
451 
452 
453 
454 
455 END_objects_SCOPE // namespace ncbi::objects::
456 
458 
459 
460 #endif // OBJECTS_BLAST_BLAST_FINISH_PARAMS_REQUES_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
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
virtual void SetParams()
Called at the beginning of Run, before creating thread pool.
#define NCBI_BLAST_EXPORT
Definition: ncbi_export.h:360
bool CanGetService(void) const
Check if it is safe to call GetService method.
TProgram & SetProgram(void)
Assign a value to Program data member.
bool CanGetParamset(void) const
Check if it is safe to call GetParamset method.
TService & SetService(void)
Assign a value to Service data member.
const TParams & GetParams(void) const
Get the Params member data.
CBlast4_finish_params_request_Base & operator=(const CBlast4_finish_params_request_Base &)
const TParamset & GetParamset(void) const
Get the Paramset member data.
const TProgram & GetProgram(void) const
Get the Program member data.
bool IsSetProgram(void) const
Check if a value has been assigned to Program data member.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
bool IsSetParams(void) const
Check if a value has been assigned to Params data member.
bool CanGetParams(void) const
Check if it is safe to call GetParams method.
bool CanGetProgram(void) const
Check if it is safe to call GetProgram method.
bool IsSetParamset(void) const
Check if a value has been assigned to Paramset data member.
TParamset & SetParamset(void)
Assign a value to Paramset data member.
const TService & GetService(void) const
Get the Service member data.
bool IsSetService(void) const
Check if a value has been assigned to Service data member.
CBlast4_finish_params_request_Base(const CBlast4_finish_params_request_Base &)
static CRef< CUser_object > GetParams()
Modified on Wed Feb 21 09:54:54 2024 by modify_doxy.py rev. 669887