NCBI C++ ToolKit
Blast4_get_sequenc_request_.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_get_sequenc_request_.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_GET_SEQUENC_REQUEST_BASE_HPP
42 #define OBJECTS_BLAST_BLAST4_GET_SEQUENC_REQUEST_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
60 class CBlast4_database;
61 class CSeq_id;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_Blast4
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 /// Fetch sequence data from a BLAST database
74 ///
75 /// CBlast4_get_sequences_request_Base --
76 ///
77 
79 {
81 public:
82  // constructor
84  // destructor
86 
87  // type info
89 
90  // types
92  typedef list< CRef< CSeq_id > > TSeq_ids;
93  typedef bool TSkip_seq_data;
94  typedef bool TTarget_only;
95 
96  // member index
97  enum class E_memberIndex {
98  e__allMandatory = 0,
99  e_database,
100  e_seq_ids,
101  e_skip_seq_data,
102  e_target_only
103  };
105 
106  // getters
107  // setters
108 
109  /// Name of the BLAST database from which to retrieve the sequence data
110  /// Check if a value has been assigned to Database data member.
111  ///
112  /// Data member Database is mandatory;
113  /// its type is defined as 'typedef CBlast4_database TDatabase'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetDatabase(void) const;
118 
119  /// Check if it is safe to call GetDatabase method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetDatabase(void) const;
125 
126  /// Reset Database data member.
127  void ResetDatabase(void);
128 
129  /// Get the Database member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const TDatabase& GetDatabase(void) const;
134 
135  /// Assign a value to Database data member.
136  ///
137  /// @param value
138  /// Reference to value.
139  void SetDatabase(TDatabase& value);
140 
141  /// Assign a value to Database data member.
142  ///
143  /// @return
144  /// Reference to the data value.
145  TDatabase& SetDatabase(void);
146 
147  /// Sequence identifiers for the sequence to get
148  /// Check if a value has been assigned to Seq_ids data member.
149  ///
150  /// Data member Seq_ids is mandatory;
151  /// its type is defined as 'typedef list< CRef< CSeq_id > > TSeq_ids'
152  /// @return
153  /// - true, if a value has been assigned.
154  /// - false, otherwise.
155  bool IsSetSeq_ids(void) const;
156 
157  /// Check if it is safe to call GetSeq_ids method.
158  ///
159  /// @return
160  /// - true, if the data member is getatable.
161  /// - false, otherwise.
162  bool CanGetSeq_ids(void) const;
163 
164  /// Reset Seq_ids data member.
165  void ResetSeq_ids(void);
166 
167  /// Get the Seq_ids member data.
168  ///
169  /// @return
170  /// Reference to the member data.
171  const TSeq_ids& GetSeq_ids(void) const;
172 
173  /// Assign a value to Seq_ids data member.
174  ///
175  /// @return
176  /// Reference to the data value.
177  TSeq_ids& SetSeq_ids(void);
178 
179  /// Determines whether the returned Bioseqs should contain the sequence data
180  /// or not
181  /// Check if a value has been assigned to Skip_seq_data data member.
182  ///
183  /// Data member Skip_seq_data is optional with default false;
184  /// its type is defined as 'typedef bool TSkip_seq_data'
185  /// @return
186  /// - true, if a value has been assigned.
187  /// - false, otherwise.
188  bool IsSetSkip_seq_data(void) const;
189 
190  /// Check if it is safe to call GetSkip_seq_data method.
191  ///
192  /// @return
193  /// - true, if the data member is getatable.
194  /// - false, otherwise.
195  bool CanGetSkip_seq_data(void) const;
196 
197  /// Reset Skip_seq_data data member.
198  void ResetSkip_seq_data(void);
199 
200  /// Assign default value to Skip_seq_data data member.
201  void SetDefaultSkip_seq_data(void);
202 
203  /// Get the Skip_seq_data member data.
204  ///
205  /// @return
206  /// Copy of the member data.
207  TSkip_seq_data GetSkip_seq_data(void) const;
208 
209  /// Assign a value to Skip_seq_data data member.
210  ///
211  /// @param value
212  /// Value to assign
213  void SetSkip_seq_data(TSkip_seq_data value);
214 
215  /// Assign a value to Skip_seq_data data member.
216  ///
217  /// @return
218  /// Reference to the data value.
219  TSkip_seq_data& SetSkip_seq_data(void);
220 
221  /// Determines whether or not the defline of the returned Bioseqs should
222  /// contain only the requested seq id. This optional field only applies
223  /// to non-redundant BLAST database
224  /// Check if a value has been assigned to Target_only data member.
225  ///
226  /// Data member Target_only is optional;
227  /// its type is defined as 'typedef bool TTarget_only'
228  /// @return
229  /// - true, if a value has been assigned.
230  /// - false, otherwise.
231  bool IsSetTarget_only(void) const;
232 
233  /// Check if it is safe to call GetTarget_only method.
234  ///
235  /// @return
236  /// - true, if the data member is getatable.
237  /// - false, otherwise.
238  bool CanGetTarget_only(void) const;
239 
240  /// Reset Target_only data member.
241  void ResetTarget_only(void);
242 
243  /// Get the Target_only member data.
244  ///
245  /// @return
246  /// Copy of the member data.
247  TTarget_only GetTarget_only(void) const;
248 
249  /// Assign a value to Target_only data member.
250  ///
251  /// @param value
252  /// Value to assign
253  void SetTarget_only(TTarget_only value);
254 
255  /// Assign a value to Target_only data member.
256  ///
257  /// @return
258  /// Reference to the data value.
259  TTarget_only& SetTarget_only(void);
260 
261  /// Reset the whole object
262  virtual void Reset(void);
263 
264 
265 private:
266  // Prohibit copy constructor and assignment operator
269 
270  // data
271  Uint4 m_set_State[1];
273  list< CRef< CSeq_id > > m_Seq_ids;
276 };
277 
278 /* @} */
279 
280 
281 
282 
283 
284 ///////////////////////////////////////////////////////////
285 ///////////////////// inline methods //////////////////////
286 ///////////////////////////////////////////////////////////
287 inline
289 {
290  return m_Database.NotEmpty();
291 }
292 
293 inline
295 {
296  return true;
297 }
298 
299 inline
301 {
302  if ( !m_Database ) {
304  }
305  return (*m_Database);
306 }
307 
308 inline
310 {
311  if ( !m_Database ) {
312  ResetDatabase();
313  }
314  return (*m_Database);
315 }
316 
317 inline
319 {
320  return ((m_set_State[0] & 0xc) != 0);
321 }
322 
323 inline
325 {
326  return true;
327 }
328 
329 inline
331 {
332  return m_Seq_ids;
333 }
334 
335 inline
337 {
338  m_set_State[0] |= 0x4;
339  return m_Seq_ids;
340 }
341 
342 inline
344 {
345  return ((m_set_State[0] & 0x30) != 0);
346 }
347 
348 inline
350 {
351  return true;
352 }
353 
354 inline
356 {
357  m_Skip_seq_data = false;
358  m_set_State[0] &= ~0x30;
359 }
360 
361 inline
363 {
365 }
366 
367 inline
369 {
370  return m_Skip_seq_data;
371 }
372 
373 inline
375 {
377  m_set_State[0] |= 0x30;
378 }
379 
380 inline
382 {
383 #ifdef _DEBUG
384  if (!IsSetSkip_seq_data()) {
386  }
387 #endif
388  m_set_State[0] |= 0x10;
389  return m_Skip_seq_data;
390 }
391 
392 inline
394 {
395  return ((m_set_State[0] & 0xc0) != 0);
396 }
397 
398 inline
400 {
401  return IsSetTarget_only();
402 }
403 
404 inline
406 {
407  m_Target_only = 0;
408  m_set_State[0] &= ~0xc0;
409 }
410 
411 inline
413 {
414  if (!CanGetTarget_only()) {
415  ThrowUnassigned(3);
416  }
417  return m_Target_only;
418 }
419 
420 inline
422 {
424  m_set_State[0] |= 0xc0;
425 }
426 
427 inline
429 {
430 #ifdef _DEBUG
431  if (!IsSetTarget_only()) {
432  memset(&m_Target_only,UnassignedByte(),sizeof(m_Target_only));
433  }
434 #endif
435  m_set_State[0] |= 0x40;
436  return m_Target_only;
437 }
438 
439 ///////////////////////////////////////////////////////////
440 ////////////////// end of inline methods //////////////////
441 ///////////////////////////////////////////////////////////
442 
443 
444 
445 
446 
447 END_objects_SCOPE // namespace ncbi::objects::
448 
450 
451 
452 #endif // OBJECTS_BLAST_BLAST4_GET_SEQUENC_REQUEST_BASE_HPP
Fetch sequence data from a BLAST database.
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_BLAST_EXPORT
Definition: ncbi_export.h:360
bool CanGetSeq_ids(void) const
Check if it is safe to call GetSeq_ids method.
void ResetSkip_seq_data(void)
Reset Skip_seq_data data member.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
TSeq_ids & SetSeq_ids(void)
Assign a value to Seq_ids data member.
void ResetTarget_only(void)
Reset Target_only data member.
CBlast4_get_sequences_request_Base(const CBlast4_get_sequences_request_Base &)
TTarget_only & SetTarget_only(void)
Assign a value to Target_only data member.
bool CanGetSkip_seq_data(void) const
Check if it is safe to call GetSkip_seq_data method.
TDatabase & SetDatabase(void)
Assign a value to Database data member.
void ResetDatabase(void)
Reset Database data member.
TTarget_only GetTarget_only(void) const
Get the Target_only member data.
void SetDefaultSkip_seq_data(void)
Assign default value to Skip_seq_data data member.
const TDatabase & GetDatabase(void) const
Get the Database member data.
bool CanGetDatabase(void) const
Check if it is safe to call GetDatabase method.
bool IsSetDatabase(void) const
Name of the BLAST database from which to retrieve the sequence data Check if a value has been assigne...
bool IsSetSkip_seq_data(void) const
Determines whether the returned Bioseqs should contain the sequence data or not Check if a value has ...
TSkip_seq_data GetSkip_seq_data(void) const
Get the Skip_seq_data member data.
bool IsSetTarget_only(void) const
Determines whether or not the defline of the returned Bioseqs should contain only the requested seq i...
bool CanGetTarget_only(void) const
Check if it is safe to call GetTarget_only method.
const TSeq_ids & GetSeq_ids(void) const
Get the Seq_ids member data.
CBlast4_get_sequences_request_Base & operator=(const CBlast4_get_sequences_request_Base &)
bool IsSetSeq_ids(void) const
Sequence identifiers for the sequence to get Check if a value has been assigned to Seq_ids data membe...
TSkip_seq_data & SetSkip_seq_data(void)
Assign a value to Skip_seq_data data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sun Apr 28 04:45:52 2024 by modify_doxy.py rev. 669887