NCBI C++ ToolKit
Entrez2_eval_boolean_.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 Entrez2_eval_boolean_.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/entrez2/entrez2.asn">entrez2.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/entrez2/entrez2.def">entrez2.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_ENTREZ2_ENTREZ2_EVAL_BOOLEAN_BASE_HPP
42 #define OBJECTS_ENTREZ2_ENTREZ2_EVAL_BOOLEAN_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Entrez2
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///****************************************
69 /// When evaluating a boolean query the counts of hits is always
70 /// returned.
71 /// In addition, you can request the UIDs of the hits or the
72 /// the parsed query in structured form (with counts by term),
73 /// or both.
74 ///****************************************
75 /// evaluate Boolean query
76 ///
77 /// CEntrez2_eval_boolean_Base --
78 ///
79 
81 {
83 public:
84  // constructor
86  // destructor
87  virtual ~CEntrez2_eval_boolean_Base(void);
88 
89  // type info
91 
92  // types
93  typedef bool TReturn_UIDs;
94  typedef bool TReturn_parse;
96 
97  // member index
98  enum class E_memberIndex {
99  e__allMandatory = 0,
100  e_return_UIDs,
101  e_return_parse,
102  e_query
103  };
105 
106  // getters
107  // setters
108 
109  /// return UID list?
110  /// Check if a value has been assigned to Return_UIDs data member.
111  ///
112  /// Data member Return_UIDs is optional with default false;
113  /// its type is defined as 'typedef bool TReturn_UIDs'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetReturn_UIDs(void) const;
118 
119  /// Check if it is safe to call GetReturn_UIDs method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetReturn_UIDs(void) const;
125 
126  /// Reset Return_UIDs data member.
127  void ResetReturn_UIDs(void);
128 
129  /// Assign default value to Return_UIDs data member.
130  void SetDefaultReturn_UIDs(void);
131 
132  /// Get the Return_UIDs member data.
133  ///
134  /// @return
135  /// Copy of the member data.
136  TReturn_UIDs GetReturn_UIDs(void) const;
137 
138  /// Assign a value to Return_UIDs data member.
139  ///
140  /// @param value
141  /// Value to assign
142  void SetReturn_UIDs(TReturn_UIDs value);
143 
144  /// Assign a value to Return_UIDs data member.
145  ///
146  /// @return
147  /// Reference to the data value.
148  TReturn_UIDs& SetReturn_UIDs(void);
149 
150  /// return parsed query?
151  /// Check if a value has been assigned to Return_parse data member.
152  ///
153  /// Data member Return_parse is optional with default false;
154  /// its type is defined as 'typedef bool TReturn_parse'
155  /// @return
156  /// - true, if a value has been assigned.
157  /// - false, otherwise.
158  bool IsSetReturn_parse(void) const;
159 
160  /// Check if it is safe to call GetReturn_parse method.
161  ///
162  /// @return
163  /// - true, if the data member is getatable.
164  /// - false, otherwise.
165  bool CanGetReturn_parse(void) const;
166 
167  /// Reset Return_parse data member.
168  void ResetReturn_parse(void);
169 
170  /// Assign default value to Return_parse data member.
171  void SetDefaultReturn_parse(void);
172 
173  /// Get the Return_parse member data.
174  ///
175  /// @return
176  /// Copy of the member data.
177  TReturn_parse GetReturn_parse(void) const;
178 
179  /// Assign a value to Return_parse data member.
180  ///
181  /// @param value
182  /// Value to assign
183  void SetReturn_parse(TReturn_parse value);
184 
185  /// Assign a value to Return_parse data member.
186  ///
187  /// @return
188  /// Reference to the data value.
189  TReturn_parse& SetReturn_parse(void);
190 
191  /// the actual query
192  /// Check if a value has been assigned to Query data member.
193  ///
194  /// Data member Query is mandatory;
195  /// its type is defined as 'typedef CEntrez2_boolean_exp TQuery'
196  /// @return
197  /// - true, if a value has been assigned.
198  /// - false, otherwise.
199  bool IsSetQuery(void) const;
200 
201  /// Check if it is safe to call GetQuery method.
202  ///
203  /// @return
204  /// - true, if the data member is getatable.
205  /// - false, otherwise.
206  bool CanGetQuery(void) const;
207 
208  /// Reset Query data member.
209  void ResetQuery(void);
210 
211  /// Get the Query member data.
212  ///
213  /// @return
214  /// Reference to the member data.
215  const TQuery& GetQuery(void) const;
216 
217  /// Assign a value to Query data member.
218  ///
219  /// @param value
220  /// Reference to value.
221  void SetQuery(TQuery& value);
222 
223  /// Assign a value to Query data member.
224  ///
225  /// @return
226  /// Reference to the data value.
227  TQuery& SetQuery(void);
228 
229  /// Reset the whole object
230  virtual void Reset(void);
231 
232 
233 private:
234  // Prohibit copy constructor and assignment operator
237 
238  // data
239  Uint4 m_set_State[1];
243 };
244 
245 /* @} */
246 
247 
248 
249 
250 
251 ///////////////////////////////////////////////////////////
252 ///////////////////// inline methods //////////////////////
253 ///////////////////////////////////////////////////////////
254 inline
256 {
257  return ((m_set_State[0] & 0x3) != 0);
258 }
259 
260 inline
262 {
263  return true;
264 }
265 
266 inline
268 {
269  m_Return_UIDs = false;
270  m_set_State[0] &= ~0x3;
271 }
272 
273 inline
275 {
277 }
278 
279 inline
281 {
282  return m_Return_UIDs;
283 }
284 
285 inline
287 {
289  m_set_State[0] |= 0x3;
290 }
291 
292 inline
294 {
295 #ifdef _DEBUG
296  if (!IsSetReturn_UIDs()) {
297  memset(&m_Return_UIDs,UnassignedByte(),sizeof(m_Return_UIDs));
298  }
299 #endif
300  m_set_State[0] |= 0x1;
301  return m_Return_UIDs;
302 }
303 
304 inline
306 {
307  return ((m_set_State[0] & 0xc) != 0);
308 }
309 
310 inline
312 {
313  return true;
314 }
315 
316 inline
318 {
319  m_Return_parse = false;
320  m_set_State[0] &= ~0xc;
321 }
322 
323 inline
325 {
327 }
328 
329 inline
331 {
332  return m_Return_parse;
333 }
334 
335 inline
337 {
339  m_set_State[0] |= 0xc;
340 }
341 
342 inline
344 {
345 #ifdef _DEBUG
346  if (!IsSetReturn_parse()) {
347  memset(&m_Return_parse,UnassignedByte(),sizeof(m_Return_parse));
348  }
349 #endif
350  m_set_State[0] |= 0x4;
351  return m_Return_parse;
352 }
353 
354 inline
356 {
357  return m_Query.NotEmpty();
358 }
359 
360 inline
362 {
363  return true;
364 }
365 
366 inline
368 {
369  if ( !m_Query ) {
370  const_cast<CEntrez2_eval_boolean_Base*>(this)->ResetQuery();
371  }
372  return (*m_Query);
373 }
374 
375 inline
377 {
378  if ( !m_Query ) {
379  ResetQuery();
380  }
381  return (*m_Query);
382 }
383 
384 ///////////////////////////////////////////////////////////
385 ////////////////// end of inline methods //////////////////
386 ///////////////////////////////////////////////////////////
387 
388 
389 
390 
391 
392 END_objects_SCOPE // namespace ncbi::objects::
393 
395 
396 
397 #endif // OBJECTS_ENTREZ2_ENTREZ2_EVAL_BOOLEAN_BASE_HPP
CEntrez2_boolean_exp –.
**************************************** When evaluating a boolean query the counts of hits is always...
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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_ENTREZ2_EXPORT
Definition: ncbi_export.h:464
bool IsSetReturn_parse(void) const
return parsed query? Check if a value has been assigned to Return_parse data member.
CEntrez2_eval_boolean_Base(const CEntrez2_eval_boolean_Base &)
void SetDefaultReturn_parse(void)
Assign default value to Return_parse data member.
TReturn_UIDs GetReturn_UIDs(void) const
Get the Return_UIDs member data.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
void ResetReturn_UIDs(void)
Reset Return_UIDs data member.
void SetDefaultReturn_UIDs(void)
Assign default value to Return_UIDs data member.
TReturn_parse GetReturn_parse(void) const
Get the Return_parse member data.
bool IsSetReturn_UIDs(void) const
return UID list? Check if a value has been assigned to Return_UIDs data member.
bool CanGetReturn_parse(void) const
Check if it is safe to call GetReturn_parse method.
bool CanGetReturn_UIDs(void) const
Check if it is safe to call GetReturn_UIDs method.
TQuery & SetQuery(void)
Assign a value to Query data member.
void ResetReturn_parse(void)
Reset Return_parse data member.
CEntrez2_eval_boolean_Base & operator=(const CEntrez2_eval_boolean_Base &)
bool IsSetQuery(void) const
the actual query Check if a value has been assigned to Query data member.
const TQuery & GetQuery(void) const
Get the Query member data.
TReturn_UIDs & SetReturn_UIDs(void)
Assign a value to Return_UIDs data member.
TReturn_parse & SetReturn_parse(void)
Assign a value to Return_parse data member.
bool CanGetQuery(void) const
Check if it is safe to call GetQuery method.
void ResetQuery(void)
Reset Query data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon Apr 22 04:05:58 2024 by modify_doxy.py rev. 669887