NCBI C++ ToolKit
Gene_xref_type_.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 Gene_xref_type_.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/macro/macro.asn">macro.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/macro/macro.def">macro.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_MACRO_GENE_XREF_TYPE_BASE_HPP
42 #define OBJECTS_MACRO_GENE_XREF_TYPE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
51 
53 
54 #ifndef BEGIN_objects_SCOPE
55 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
56 # define END_objects_SCOPE END_SCOPE(objects)
57 #endif
58 BEGIN_objects_SCOPE // namespace ncbi::objects::
59 
60 
61 // generated classes
62 
63 
64 /** @addtogroup dataspec_NCBI_Macro
65  *
66  * @{
67  */
68 
69 /////////////////////////////////////////////////////////////////////////////
70 ///
71 /// CGene_xref_type_Base --
72 ///
73 
75 {
77 public:
78  // constructor
80  // destructor
81  virtual ~CGene_xref_type_Base(void);
82 
83  // type info
85 
86  // types
90 
91  // member index
92  enum class E_memberIndex {
93  e__allMandatory = 0,
94  e_feature,
97  };
99 
100  // getters
101  // setters
102 
103  /// Check if a value has been assigned to Feature data member.
104  ///
105  /// Data member Feature is mandatory;
106  /// its type is defined as 'typedef EMacro_feature_type TFeature'
107  /// @return
108  /// - true, if a value has been assigned.
109  /// - false, otherwise.
110  bool IsSetFeature(void) const;
111 
112  /// Check if it is safe to call GetFeature method.
113  ///
114  /// @return
115  /// - true, if the data member is getatable.
116  /// - false, otherwise.
117  bool CanGetFeature(void) const;
118 
119  /// Reset Feature data member.
120  void ResetFeature(void);
121 
122  /// Get the Feature member data.
123  ///
124  /// @return
125  /// Copy of the member data.
126  TFeature GetFeature(void) const;
127 
128  /// Assign a value to Feature data member.
129  ///
130  /// @param value
131  /// Value to assign
132  void SetFeature(TFeature value);
133 
134  /// Assign a value to Feature data member.
135  ///
136  /// @return
137  /// Reference to the data value.
138  TFeature& SetFeature(void);
139 
140  /// Check if a value has been assigned to Suppression data member.
141  ///
142  /// Data member Suppression is mandatory;
143  /// its type is defined as 'typedef EGene_xref_suppression_type TSuppression'
144  /// @return
145  /// - true, if a value has been assigned.
146  /// - false, otherwise.
147  bool IsSetSuppression(void) const;
148 
149  /// Check if it is safe to call GetSuppression method.
150  ///
151  /// @return
152  /// - true, if the data member is getatable.
153  /// - false, otherwise.
154  bool CanGetSuppression(void) const;
155 
156  /// Reset Suppression data member.
157  void ResetSuppression(void);
158 
159  /// Get the Suppression member data.
160  ///
161  /// @return
162  /// Copy of the member data.
163  TSuppression GetSuppression(void) const;
164 
165  /// Assign a value to Suppression data member.
166  ///
167  /// @param value
168  /// Value to assign
170 
171  /// Assign a value to Suppression data member.
172  ///
173  /// @return
174  /// Reference to the data value.
176 
177  /// Check if a value has been assigned to Necessary data member.
178  ///
179  /// Data member Necessary is mandatory;
180  /// its type is defined as 'typedef EGene_xref_necessary_type TNecessary'
181  /// @return
182  /// - true, if a value has been assigned.
183  /// - false, otherwise.
184  bool IsSetNecessary(void) const;
185 
186  /// Check if it is safe to call GetNecessary method.
187  ///
188  /// @return
189  /// - true, if the data member is getatable.
190  /// - false, otherwise.
191  bool CanGetNecessary(void) const;
192 
193  /// Reset Necessary data member.
194  void ResetNecessary(void);
195 
196  /// Get the Necessary member data.
197  ///
198  /// @return
199  /// Copy of the member data.
200  TNecessary GetNecessary(void) const;
201 
202  /// Assign a value to Necessary data member.
203  ///
204  /// @param value
205  /// Value to assign
207 
208  /// Assign a value to Necessary data member.
209  ///
210  /// @return
211  /// Reference to the data value.
212  TNecessary& SetNecessary(void);
213 
214  /// Reset the whole object
215  virtual void Reset(void);
216 
217 
218 private:
219  // Prohibit copy constructor and assignment operator
222 
223  // data
228 };
229 
230 /* @} */
231 
232 
233 
234 
235 
236 ///////////////////////////////////////////////////////////
237 ///////////////////// inline methods //////////////////////
238 ///////////////////////////////////////////////////////////
239 inline
241 {
242  return ((m_set_State[0] & 0x3) != 0);
243 }
244 
245 inline
247 {
248  return IsSetFeature();
249 }
250 
251 inline
253 {
255  m_set_State[0] &= ~0x3;
256 }
257 
258 inline
260 {
261  if (!CanGetFeature()) {
262  ThrowUnassigned(0);
263  }
264  return m_Feature;
265 }
266 
267 inline
269 {
270  m_Feature = value;
271  m_set_State[0] |= 0x3;
272 }
273 
274 inline
276 {
277 #ifdef _DEBUG
278  if (!IsSetFeature()) {
279  memset(&m_Feature,UnassignedByte(),sizeof(m_Feature));
280  }
281 #endif
282  m_set_State[0] |= 0x1;
283  return m_Feature;
284 }
285 
286 inline
288 {
289  return ((m_set_State[0] & 0xc) != 0);
290 }
291 
292 inline
294 {
295  return IsSetSuppression();
296 }
297 
298 inline
300 {
302  m_set_State[0] &= ~0xc;
303 }
304 
305 inline
307 {
308  if (!CanGetSuppression()) {
309  ThrowUnassigned(1);
310  }
311  return m_Suppression;
312 }
313 
314 inline
316 {
318  m_set_State[0] |= 0xc;
319 }
320 
321 inline
323 {
324 #ifdef _DEBUG
325  if (!IsSetSuppression()) {
326  memset(&m_Suppression,UnassignedByte(),sizeof(m_Suppression));
327  }
328 #endif
329  m_set_State[0] |= 0x4;
330  return m_Suppression;
331 }
332 
333 inline
335 {
336  return ((m_set_State[0] & 0x30) != 0);
337 }
338 
339 inline
341 {
342  return IsSetNecessary();
343 }
344 
345 inline
347 {
349  m_set_State[0] &= ~0x30;
350 }
351 
352 inline
354 {
355  if (!CanGetNecessary()) {
356  ThrowUnassigned(2);
357  }
358  return m_Necessary;
359 }
360 
361 inline
363 {
364  m_Necessary = value;
365  m_set_State[0] |= 0x30;
366 }
367 
368 inline
370 {
371 #ifdef _DEBUG
372  if (!IsSetNecessary()) {
373  memset(&m_Necessary,UnassignedByte(),sizeof(m_Necessary));
374  }
375 #endif
376  m_set_State[0] |= 0x10;
377  return m_Necessary;
378 }
379 
380 ///////////////////////////////////////////////////////////
381 ////////////////// end of inline methods //////////////////
382 ///////////////////////////////////////////////////////////
383 
384 
385 
386 
387 
388 END_objects_SCOPE // namespace ncbi::objects::
389 
391 
392 
393 #endif // OBJECTS_MACRO_GENE_XREF_TYPE_BASE_HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CGene_xref_type_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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
CGene_xref_type_Base(const CGene_xref_type_Base &)
void ResetFeature(void)
Reset Feature data member.
virtual ~CGene_xref_type_Base(void)
EMacro_feature_type m_Feature
TSuppression GetSuppression(void) const
Get the Suppression member data.
virtual void Reset(void)
Reset the whole object.
CGene_xref_type_Base & operator=(const CGene_xref_type_Base &)
bool IsSetNecessary(void) const
Check if a value has been assigned to Necessary data member.
bool IsSetSuppression(void) const
Check if a value has been assigned to Suppression data member.
bool CanGetFeature(void) const
Check if it is safe to call GetFeature method.
TFeature & SetFeature(void)
Assign a value to Feature data member.
TFeature GetFeature(void) const
Get the Feature member data.
void ResetNecessary(void)
Reset Necessary data member.
EMacro_feature_type
feature values
EGene_xref_necessary_type TNecessary
TNecessary & SetNecessary(void)
Assign a value to Necessary data member.
TNecessary GetNecessary(void) const
Get the Necessary member data.
bool CanGetSuppression(void) const
Check if it is safe to call GetSuppression method.
bool IsSetFeature(void) const
Check if a value has been assigned to Feature data member.
EMacro_feature_type TFeature
EGene_xref_suppression_type
Access to EGene_xref_suppression_type's attributes (values, names) as defined in spec.
EGene_xref_necessary_type
Access to EGene_xref_necessary_type's attributes (values, names) as defined in spec.
TSuppression & SetSuppression(void)
Assign a value to Suppression data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
EGene_xref_suppression_type TSuppression
EGene_xref_suppression_type m_Suppression
bool CanGetNecessary(void) const
Check if it is safe to call GetNecessary method.
EGene_xref_necessary_type m_Necessary
void ResetSuppression(void)
Reset Suppression data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed May 29 18:40:19 2024 by modify_doxy.py rev. 669887