NCBI C++ ToolKit
Entrez2_boolean_exp_.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_boolean_exp_.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_BOOLEAN_EXP_BASE_HPP
42 #define OBJECTS_ENTREZ2_ENTREZ2_BOOLEAN_EXP_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // forward declarations
62 class CEntrez2_limits;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_NCBI_Entrez2
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 ///****************************************
75 /// The structured form of the boolean is the same in a request or
76 /// return so that it easy to modify a query. This means some
77 /// fields are only considered in a return value, like counts
78 /// by term. They are ignored in a request.
79 /// The structured boolean supports specific boolean components,
80 /// an unparsed string in query syntax, and UID lists as
81 /// elements of a boolean. This makes it possible to submit
82 /// a single string, a fully structured query, or a mixture.
83 /// The UID list feature means one can also perform refinements
84 /// on UID lists from links, neighbors, or other operations.
85 /// UID list query now returns a history key for subsequent use.
86 ///*****************************************
87 ///
88 /// CEntrez2_boolean_exp_Base --
89 ///
90 
92 {
94 public:
95  // constructor
97  // destructor
98  virtual ~CEntrez2_boolean_exp_Base(void);
99 
100  // type info
102 
103  // types
105  typedef list< CRef< CEntrez2_boolean_element > > TExp;
107 
108  // member index
109  enum class E_memberIndex {
110  e__allMandatory = 0,
111  e_db,
112  e_exp,
113  e_limits
114  };
116 
117  // getters
118  // setters
119 
120  /// database for this query
121  /// Check if a value has been assigned to Db data member.
122  ///
123  /// Data member Db is mandatory;
124  /// its type is defined as 'typedef CEntrez2_db_id TDb'
125  /// @return
126  /// - true, if a value has been assigned.
127  /// - false, otherwise.
128  bool IsSetDb(void) const;
129 
130  /// Check if it is safe to call GetDb method.
131  ///
132  /// @return
133  /// - true, if the data member is getatable.
134  /// - false, otherwise.
135  bool CanGetDb(void) const;
136 
137  /// Reset Db data member.
138  void ResetDb(void);
139 
140  /// Get the Db member data.
141  ///
142  /// @return
143  /// Reference to the member data.
144  const TDb& GetDb(void) const;
145 
146  /// Assign a value to Db data member.
147  ///
148  /// @param value
149  /// Value to assign
150  void SetDb(const TDb& value);
151 
152  /// Assign a value to Db data member.
153  ///
154  /// @return
155  /// Reference to the data value.
156  TDb& SetDb(void);
157 
158  /// the Boolean
159  /// Check if a value has been assigned to Exp data member.
160  ///
161  /// Data member Exp is mandatory;
162  /// its type is defined as 'typedef list< CRef< CEntrez2_boolean_element > > TExp'
163  /// @return
164  /// - true, if a value has been assigned.
165  /// - false, otherwise.
166  bool IsSetExp(void) const;
167 
168  /// Check if it is safe to call GetExp method.
169  ///
170  /// @return
171  /// - true, if the data member is getatable.
172  /// - false, otherwise.
173  bool CanGetExp(void) const;
174 
175  /// Reset Exp data member.
176  void ResetExp(void);
177 
178  /// Get the Exp member data.
179  ///
180  /// @return
181  /// Reference to the member data.
182  const TExp& GetExp(void) const;
183 
184  /// Assign a value to Exp data member.
185  ///
186  /// @return
187  /// Reference to the data value.
188  TExp& SetExp(void);
189 
190  /// date bounds
191  /// Check if a value has been assigned to Limits data member.
192  ///
193  /// Data member Limits is optional;
194  /// its type is defined as 'typedef CEntrez2_limits TLimits'
195  /// @return
196  /// - true, if a value has been assigned.
197  /// - false, otherwise.
198  bool IsSetLimits(void) const;
199 
200  /// Check if it is safe to call GetLimits method.
201  ///
202  /// @return
203  /// - true, if the data member is getatable.
204  /// - false, otherwise.
205  bool CanGetLimits(void) const;
206 
207  /// Reset Limits data member.
208  void ResetLimits(void);
209 
210  /// Get the Limits member data.
211  ///
212  /// @return
213  /// Reference to the member data.
214  const TLimits& GetLimits(void) const;
215 
216  /// Assign a value to Limits data member.
217  ///
218  /// @param value
219  /// Reference to value.
220  void SetLimits(TLimits& value);
221 
222  /// Assign a value to Limits data member.
223  ///
224  /// @return
225  /// Reference to the data value.
226  TLimits& SetLimits(void);
227 
228  /// Reset the whole object
229  virtual void Reset(void);
230 
231 
232 private:
233  // Prohibit copy constructor and assignment operator
236 
237  // data
238  Uint4 m_set_State[1];
240  list< CRef< CEntrez2_boolean_element > > m_Exp;
242 };
243 
244 /* @} */
245 
246 
247 
248 
249 
250 ///////////////////////////////////////////////////////////
251 ///////////////////// inline methods //////////////////////
252 ///////////////////////////////////////////////////////////
253 inline
255 {
256  return ((m_set_State[0] & 0x3) != 0);
257 }
258 
259 inline
261 {
262  return IsSetDb();
263 }
264 
265 inline
267 {
268  if (!CanGetDb()) {
269  ThrowUnassigned(0);
270  }
271  return m_Db;
272 }
273 
274 inline
276 {
277  m_Db = value;
278  m_set_State[0] |= 0x3;
279 }
280 
281 inline
283 {
284  m_set_State[0] |= 0x1;
285  return m_Db;
286 }
287 
288 inline
290 {
291  return ((m_set_State[0] & 0xc) != 0);
292 }
293 
294 inline
296 {
297  return true;
298 }
299 
300 inline
302 {
303  return m_Exp;
304 }
305 
306 inline
308 {
309  m_set_State[0] |= 0x4;
310  return m_Exp;
311 }
312 
313 inline
315 {
316  return m_Limits.NotEmpty();
317 }
318 
319 inline
321 {
322  return IsSetLimits();
323 }
324 
325 inline
327 {
328  if (!CanGetLimits()) {
329  ThrowUnassigned(2);
330  }
331  return (*m_Limits);
332 }
333 
334 ///////////////////////////////////////////////////////////
335 ////////////////// end of inline methods //////////////////
336 ///////////////////////////////////////////////////////////
337 
338 
339 
340 
341 
342 END_objects_SCOPE // namespace ncbi::objects::
343 
345 
346 
347 #endif // OBJECTS_ENTREZ2_ENTREZ2_BOOLEAN_EXP_BASE_HPP
User-defined methods of the data storage class.
CEntrez2_boolean_element –.
**************************************** The structured form of the boolean is the same in a request ...
CEntrez2_db_id –.
CEntrez2_limits –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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_ENTREZ2_EXPORT
Definition: ncbi_export.h:464
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
TDb & SetDb(void)
Assign a value to Db data member.
const TLimits & GetLimits(void) const
Get the Limits member data.
list< CRef< CEntrez2_boolean_element > > m_Exp
CEntrez2_boolean_exp_Base & operator=(const CEntrez2_boolean_exp_Base &)
list< CRef< CEntrez2_boolean_element > > TExp
bool CanGetExp(void) const
Check if it is safe to call GetExp method.
const TDb & GetDb(void) const
Get the Db member data.
bool IsSetLimits(void) const
date bounds Check if a value has been assigned to Limits data member.
bool IsSetExp(void) const
the Boolean Check if a value has been assigned to Exp data member.
TExp & SetExp(void)
Assign a value to Exp data member.
const TExp & GetExp(void) const
Get the Exp member data.
bool CanGetDb(void) const
Check if it is safe to call GetDb method.
CEntrez2_boolean_exp_Base(const CEntrez2_boolean_exp_Base &)
bool CanGetLimits(void) const
Check if it is safe to call GetLimits method.
bool IsSetDb(void) const
database for this query Check if a value has been assigned to Db data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:58:21 2024 by modify_doxy.py rev. 669887