NCBI C++ ToolKit
Blast4_archive_.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_archive_.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_ARCHIVE_BASE_HPP
42 #define OBJECTS_BLAST_BLAST4_ARCHIVE_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_error;
62 class CBlast4_request;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_NCBI_Blast4
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 /// An archive format for results. the results can be reformatted from
75 /// this format also.
76 ///
77 /// CBlast4_archive_Base --
78 ///
79 
81 {
83 public:
84  // constructor
86  // destructor
87  virtual ~CBlast4_archive_Base(void);
88 
89  // type info
91 
92  // types
95  typedef list< CRef< CBlast4_error > > TMessages;
96 
97  // member index
98  enum class E_memberIndex {
99  e__allMandatory = 0,
100  e_request,
101  e_results,
102  e_messages
103  };
105 
106  // getters
107  // setters
108 
109  /// Query and options
110  /// Check if a value has been assigned to Request data member.
111  ///
112  /// Data member Request is mandatory;
113  /// its type is defined as 'typedef CBlast4_request TRequest'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetRequest(void) const;
118 
119  /// Check if it is safe to call GetRequest method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetRequest(void) const;
125 
126  /// Reset Request data member.
127  void ResetRequest(void);
128 
129  /// Get the Request member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const TRequest& GetRequest(void) const;
134 
135  /// Assign a value to Request data member.
136  ///
137  /// @param value
138  /// Reference to value.
139  void SetRequest(TRequest& value);
140 
141  /// Assign a value to Request data member.
142  ///
143  /// @return
144  /// Reference to the data value.
145  TRequest& SetRequest(void);
146 
147  /// Results of search
148  /// Check if a value has been assigned to Results data member.
149  ///
150  /// Data member Results is mandatory;
151  /// its type is defined as 'typedef CBlast4_get_search_results_reply TResults'
152  /// @return
153  /// - true, if a value has been assigned.
154  /// - false, otherwise.
155  bool IsSetResults(void) const;
156 
157  /// Check if it is safe to call GetResults method.
158  ///
159  /// @return
160  /// - true, if the data member is getatable.
161  /// - false, otherwise.
162  bool CanGetResults(void) const;
163 
164  /// Reset Results data member.
165  void ResetResults(void);
166 
167  /// Get the Results member data.
168  ///
169  /// @return
170  /// Reference to the member data.
171  const TResults& GetResults(void) const;
172 
173  /// Assign a value to Results data member.
174  ///
175  /// @param value
176  /// Reference to value.
177  void SetResults(TResults& value);
178 
179  /// Assign a value to Results data member.
180  ///
181  /// @return
182  /// Reference to the data value.
183  TResults& SetResults(void);
184 
185  /// Check if a value has been assigned to Messages data member.
186  ///
187  /// Data member Messages is optional;
188  /// its type is defined as 'typedef list< CRef< CBlast4_error > > TMessages'
189  /// @return
190  /// - true, if a value has been assigned.
191  /// - false, otherwise.
192  bool IsSetMessages(void) const;
193 
194  /// Check if it is safe to call GetMessages method.
195  ///
196  /// @return
197  /// - true, if the data member is getatable.
198  /// - false, otherwise.
199  bool CanGetMessages(void) const;
200 
201  /// Reset Messages data member.
202  void ResetMessages(void);
203 
204  /// Get the Messages member data.
205  ///
206  /// @return
207  /// Reference to the member data.
208  const TMessages& GetMessages(void) const;
209 
210  /// Assign a value to Messages data member.
211  ///
212  /// @return
213  /// Reference to the data value.
214  TMessages& SetMessages(void);
215 
216  /// Reset the whole object
217  virtual void Reset(void);
218 
219 
220 private:
221  // Prohibit copy constructor and assignment operator
224 
225  // data
226  Uint4 m_set_State[1];
229  list< CRef< CBlast4_error > > m_Messages;
230 };
231 
232 /* @} */
233 
234 
235 
236 
237 
238 ///////////////////////////////////////////////////////////
239 ///////////////////// inline methods //////////////////////
240 ///////////////////////////////////////////////////////////
241 inline
243 {
244  return m_Request.NotEmpty();
245 }
246 
247 inline
249 {
250  return true;
251 }
252 
253 inline
255 {
256  if ( !m_Request ) {
257  const_cast<CBlast4_archive_Base*>(this)->ResetRequest();
258  }
259  return (*m_Request);
260 }
261 
262 inline
264 {
265  if ( !m_Request ) {
266  ResetRequest();
267  }
268  return (*m_Request);
269 }
270 
271 inline
273 {
274  return m_Results.NotEmpty();
275 }
276 
277 inline
279 {
280  return true;
281 }
282 
283 inline
285 {
286  if ( !m_Results ) {
287  const_cast<CBlast4_archive_Base*>(this)->ResetResults();
288  }
289  return (*m_Results);
290 }
291 
292 inline
294 {
295  if ( !m_Results ) {
296  ResetResults();
297  }
298  return (*m_Results);
299 }
300 
301 inline
303 {
304  return ((m_set_State[0] & 0x30) != 0);
305 }
306 
307 inline
309 {
310  return true;
311 }
312 
313 inline
315 {
316  return m_Messages;
317 }
318 
319 inline
321 {
322  m_set_State[0] |= 0x10;
323  return m_Messages;
324 }
325 
326 ///////////////////////////////////////////////////////////
327 ////////////////// end of inline methods //////////////////
328 ///////////////////////////////////////////////////////////
329 
330 
331 
332 
333 
334 END_objects_SCOPE // namespace ncbi::objects::
335 
337 
338 
339 #endif // OBJECTS_BLAST_BLAST4_ARCHIVE_BASE_HPP
An archive format for results.
CBlast4_error –.
CBlast4_get_search_results_reply –.
CBlast4_request –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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 IsSetResults(void) const
Results of search Check if a value has been assigned to Results data member.
bool CanGetRequest(void) const
Check if it is safe to call GetRequest method.
bool CanGetResults(void) const
Check if it is safe to call GetResults method.
void ResetRequest(void)
Reset Request data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
list< CRef< CBlast4_error > > TMessages
TRequest & SetRequest(void)
Assign a value to Request data member.
CBlast4_request TRequest
const TRequest & GetRequest(void) const
Get the Request member data.
CBlast4_archive_Base & operator=(const CBlast4_archive_Base &)
void ResetResults(void)
Reset Results data member.
CBlast4_archive_Base(const CBlast4_archive_Base &)
const TMessages & GetMessages(void) const
Get the Messages member data.
TResults & SetResults(void)
Assign a value to Results data member.
bool IsSetMessages(void) const
Check if a value has been assigned to Messages data member.
TMessages & SetMessages(void)
Assign a value to Messages data member.
CBlast4_get_search_results_reply TResults
CRef< TResults > m_Results
bool IsSetRequest(void) const
Query and options Check if a value has been assigned to Request data member.
list< CRef< CBlast4_error > > m_Messages
const TResults & GetResults(void) const
Get the Results member data.
bool CanGetMessages(void) const
Check if it is safe to call GetMessages method.
CRef< TRequest > m_Request
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon Jul 22 05:03:01 2024 by modify_doxy.py rev. 669887