NCBI C++ ToolKit
Entrez2_docsum_field_info_.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_docsum_field_info_.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_DOCSUM_FIELD_INFO_BASE_HPP
42 #define OBJECTS_ENTREZ2_ENTREZ2_DOCSUM_FIELD_INFO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_Entrez2
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CEntrez2_docsum_field_info_Base --
71 ///
72 
74 {
76 public:
77  // constructor
79  // destructor
80  virtual ~CEntrez2_docsum_field_info_Base(void);
81 
82  // type info
84 
85  // types
86  typedef string TField_name;
87  typedef string TField_description;
88  typedef int TField_type;
89 
90  // member index
91  enum class E_memberIndex {
92  e__allMandatory = 0,
93  e_field_name,
94  e_field_description,
95  e_field_type
96  };
98 
99  // getters
100  // setters
101 
102  /// Check if a value has been assigned to Field_name data member.
103  ///
104  /// Data member Field_name is mandatory;
105  /// its type is defined as 'typedef string TField_name'
106  /// @return
107  /// - true, if a value has been assigned.
108  /// - false, otherwise.
109  bool IsSetField_name(void) const;
110 
111  /// Check if it is safe to call GetField_name method.
112  ///
113  /// @return
114  /// - true, if the data member is getatable.
115  /// - false, otherwise.
116  bool CanGetField_name(void) const;
117 
118  /// Reset Field_name data member.
119  void ResetField_name(void);
120 
121  /// Get the Field_name member data.
122  ///
123  /// @return
124  /// Reference to the member data.
125  const TField_name& GetField_name(void) const;
126 
127  /// Assign a value to Field_name data member.
128  ///
129  /// @param value
130  /// Value to assign
131  void SetField_name(const TField_name& value);
132  void SetField_name(TField_name&& value);
133 
134  /// Assign a value to Field_name data member.
135  ///
136  /// @return
137  /// Reference to the data value.
138  TField_name& SetField_name(void);
139 
140  /// Check if a value has been assigned to Field_description data member.
141  ///
142  /// Data member Field_description is mandatory;
143  /// its type is defined as 'typedef string TField_description'
144  /// @return
145  /// - true, if a value has been assigned.
146  /// - false, otherwise.
147  bool IsSetField_description(void) const;
148 
149  /// Check if it is safe to call GetField_description method.
150  ///
151  /// @return
152  /// - true, if the data member is getatable.
153  /// - false, otherwise.
154  bool CanGetField_description(void) const;
155 
156  /// Reset Field_description data member.
157  void ResetField_description(void);
158 
159  /// Get the Field_description member data.
160  ///
161  /// @return
162  /// Reference to the member data.
163  const TField_description& GetField_description(void) const;
164 
165  /// Assign a value to Field_description data member.
166  ///
167  /// @param value
168  /// Value to assign
169  void SetField_description(const TField_description& value);
170  void SetField_description(TField_description&& value);
171 
172  /// Assign a value to Field_description data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TField_description& SetField_description(void);
177 
178  /// Check if a value has been assigned to Field_type data member.
179  ///
180  /// Data member Field_type is mandatory;
181  /// its type is defined as 'typedef int TField_type'
182  /// @return
183  /// - true, if a value has been assigned.
184  /// - false, otherwise.
185  bool IsSetField_type(void) const;
186 
187  /// Check if it is safe to call GetField_type method.
188  ///
189  /// @return
190  /// - true, if the data member is getatable.
191  /// - false, otherwise.
192  bool CanGetField_type(void) const;
193 
194  /// Reset Field_type data member.
195  void ResetField_type(void);
196 
197  /// Get the Field_type member data.
198  ///
199  /// @return
200  /// Copy of the member data.
201  TField_type GetField_type(void) const;
202 
203  /// Assign a value to Field_type data member.
204  ///
205  /// @param value
206  /// Value to assign
207  void SetField_type(TField_type value);
208 
209  /// Assign a value to Field_type data member.
210  ///
211  /// @return
212  /// Reference to the data value.
213  TField_type& SetField_type(void);
214 
215  /// Reset the whole object
216  virtual void Reset(void);
217 
218 
219 private:
220  // Prohibit copy constructor and assignment operator
223 
224  // data
225  Uint4 m_set_State[1];
226  string m_Field_name;
229 };
230 
231 /* @} */
232 
233 
234 
235 
236 
237 ///////////////////////////////////////////////////////////
238 ///////////////////// inline methods //////////////////////
239 ///////////////////////////////////////////////////////////
240 inline
242 {
243  return ((m_set_State[0] & 0x3) != 0);
244 }
245 
246 inline
248 {
249  return IsSetField_name();
250 }
251 
252 inline
254 {
255  if (!CanGetField_name()) {
256  ThrowUnassigned(0);
257  }
258  return m_Field_name;
259 }
260 
261 inline
263 {
265  m_set_State[0] |= 0x3;
266 }
267 
268 inline
270 {
271  m_Field_name = std::forward<CEntrez2_docsum_field_info_Base::TField_name>(value);
272  m_set_State[0] |= 0x3;
273 }
274 
275 inline
277 {
278 #ifdef _DEBUG
279  if (!IsSetField_name()) {
281  }
282 #endif
283  m_set_State[0] |= 0x1;
284  return m_Field_name;
285 }
286 
287 inline
289 {
290  return ((m_set_State[0] & 0xc) != 0);
291 }
292 
293 inline
295 {
296  return IsSetField_description();
297 }
298 
299 inline
301 {
302  if (!CanGetField_description()) {
303  ThrowUnassigned(1);
304  }
305  return m_Field_description;
306 }
307 
308 inline
310 {
312  m_set_State[0] |= 0xc;
313 }
314 
315 inline
317 {
318  m_Field_description = std::forward<CEntrez2_docsum_field_info_Base::TField_description>(value);
319  m_set_State[0] |= 0xc;
320 }
321 
322 inline
324 {
325 #ifdef _DEBUG
326  if (!IsSetField_description()) {
328  }
329 #endif
330  m_set_State[0] |= 0x4;
331  return m_Field_description;
332 }
333 
334 inline
336 {
337  return ((m_set_State[0] & 0x30) != 0);
338 }
339 
340 inline
342 {
343  return IsSetField_type();
344 }
345 
346 inline
348 {
349  m_Field_type = (int)(0);
350  m_set_State[0] &= ~0x30;
351 }
352 
353 inline
355 {
356  if (!CanGetField_type()) {
357  ThrowUnassigned(2);
358  }
359  return m_Field_type;
360 }
361 
362 inline
364 {
366  m_set_State[0] |= 0x30;
367 }
368 
369 inline
371 {
372 #ifdef _DEBUG
373  if (!IsSetField_type()) {
374  memset(&m_Field_type,UnassignedByte(),sizeof(m_Field_type));
375  }
376 #endif
377  m_set_State[0] |= 0x10;
378  return m_Field_type;
379 }
380 
381 ///////////////////////////////////////////////////////////
382 ////////////////// end of inline methods //////////////////
383 ///////////////////////////////////////////////////////////
384 
385 
386 
387 
388 
389 END_objects_SCOPE // namespace ncbi::objects::
390 
392 
393 
394 #endif // OBJECTS_ENTREZ2_ENTREZ2_DOCSUM_FIELD_INFO_BASE_HPP
User-defined methods of the data storage class.
CEntrez2_docsum_field_info_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
Definition: serialbase.hpp:175
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
CEntrez2_docsum_field_info_Base & operator=(const CEntrez2_docsum_field_info_Base &)
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
TField_description & SetField_description(void)
Assign a value to Field_description data member.
bool CanGetField_type(void) const
Check if it is safe to call GetField_type method.
void ResetField_type(void)
Reset Field_type data member.
CEntrez2_docsum_field_info_Base(const CEntrez2_docsum_field_info_Base &)
const TField_name & GetField_name(void) const
Get the Field_name member data.
const TField_description & GetField_description(void) const
Get the Field_description member data.
bool CanGetField_description(void) const
Check if it is safe to call GetField_description method.
bool CanGetField_name(void) const
Check if it is safe to call GetField_name method.
bool IsSetField_description(void) const
Check if a value has been assigned to Field_description data member.
TField_type GetField_type(void) const
Get the Field_type member data.
bool IsSetField_type(void) const
Check if a value has been assigned to Field_type data member.
bool IsSetField_name(void) const
Check if a value has been assigned to Field_name data member.
TField_name & SetField_name(void)
Assign a value to Field_name data member.
TField_type & SetField_type(void)
Assign a value to Field_type data member.
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon May 20 05:02:58 2024 by modify_doxy.py rev. 669887