NCBI C++ ToolKit
Taxon3_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 Taxon3_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/taxon3/taxon3.asn">taxon3.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/taxon3/taxon3.def">taxon3.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_TAXON3_TAXON3_REQUEST_BASE_HPP
42 #define OBJECTS_TAXON3_TAXON3_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 CT3Request;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_Taxon3
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///
73 /// CTaxon3_request_Base --
74 ///
75 
77 {
79 public:
80  // constructor
82  // destructor
83  virtual ~CTaxon3_request_Base(void);
84 
85  // type info
87 
88  // types
89  typedef list< CRef< CT3Request > > TRequest;
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
95  e_request,
96  e_options
97  };
99 
100  // getters
101  // setters
102 
103  /// Check if a value has been assigned to Request data member.
104  ///
105  /// Data member Request is mandatory;
106  /// its type is defined as 'typedef list< CRef< CT3Request > > TRequest'
107  /// @return
108  /// - true, if a value has been assigned.
109  /// - false, otherwise.
110  bool IsSetRequest(void) const;
111 
112  /// Check if it is safe to call GetRequest method.
113  ///
114  /// @return
115  /// - true, if the data member is getatable.
116  /// - false, otherwise.
117  bool CanGetRequest(void) const;
118 
119  /// Reset Request data member.
120  void ResetRequest(void);
121 
122  /// Get the Request member data.
123  ///
124  /// @return
125  /// Reference to the member data.
126  const TRequest& GetRequest(void) const;
127 
128  /// Assign a value to Request data member.
129  ///
130  /// @return
131  /// Reference to the data value.
132  TRequest& SetRequest(void);
133 
134  /// Check if a value has been assigned to Options data member.
135  ///
136  /// Data member Options is optional;
137  /// its type is defined as 'typedef CBitString TOptions'
138  /// @return
139  /// - true, if a value has been assigned.
140  /// - false, otherwise.
141  bool IsSetOptions(void) const;
142 
143  /// Check if it is safe to call GetOptions method.
144  ///
145  /// @return
146  /// - true, if the data member is getatable.
147  /// - false, otherwise.
148  bool CanGetOptions(void) const;
149 
150  /// Reset Options data member.
151  void ResetOptions(void);
152 
153  /// Get the Options member data.
154  ///
155  /// @return
156  /// Reference to the member data.
157  const TOptions& GetOptions(void) const;
158 
159  /// Assign a value to Options data member.
160  ///
161  /// @return
162  /// Reference to the data value.
163  TOptions& SetOptions(void);
164 
165  /// Reset the whole object
166  virtual void Reset(void);
167 
168 
169 private:
170  // Prohibit copy constructor and assignment operator
173 
174  // data
175  Uint4 m_set_State[1];
176  list< CRef< CT3Request > > m_Request;
178 };
179 
180 /* @} */
181 
182 
183 
184 
185 
186 ///////////////////////////////////////////////////////////
187 ///////////////////// inline methods //////////////////////
188 ///////////////////////////////////////////////////////////
189 inline
191 {
192  return ((m_set_State[0] & 0x3) != 0);
193 }
194 
195 inline
197 {
198  return true;
199 }
200 
201 inline
203 {
204  return m_Request;
205 }
206 
207 inline
209 {
210  m_set_State[0] |= 0x1;
211  return m_Request;
212 }
213 
214 inline
216 {
217  return ((m_set_State[0] & 0xc) != 0);
218 }
219 
220 inline
222 {
223  return IsSetOptions();
224 }
225 
226 inline
228 {
229  if (!CanGetOptions()) {
230  ThrowUnassigned(1);
231  }
232  return m_Options;
233 }
234 
235 inline
237 {
238  m_set_State[0] |= 0x4;
239  return m_Options;
240 }
241 
242 ///////////////////////////////////////////////////////////
243 ////////////////// end of inline methods //////////////////
244 ///////////////////////////////////////////////////////////
245 
246 
247 
248 
249 
250 END_objects_SCOPE // namespace ncbi::objects::
251 
253 
254 
255 #endif // OBJECTS_TAXON3_TAXON3_REQUEST_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
CT3Request –.
Definition: T3Request.hpp:66
CTaxon3_request_Base –.
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_TAXON3_EXPORT
Definition: ncbi_export.h:865
list< CRef< CT3Request > > TRequest
bool CanGetOptions(void) const
Check if it is safe to call GetOptions method.
const TOptions & GetOptions(void) const
Get the Options member data.
bool IsSetOptions(void) const
Check if a value has been assigned to Options data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
list< CRef< CT3Request > > m_Request
TOptions & SetOptions(void)
Assign a value to Options data member.
TRequest & SetRequest(void)
Assign a value to Request data member.
CTaxon3_request_Base & operator=(const CTaxon3_request_Base &)
bool IsSetRequest(void) const
Check if a value has been assigned to Request data member.
bool CanGetRequest(void) const
Check if it is safe to call GetRequest method.
const TRequest & GetRequest(void) const
Get the Request member data.
CTaxon3_request_Base(const CTaxon3_request_Base &)
Modified on Fri Apr 12 17:20:56 2024 by modify_doxy.py rev. 669887