NCBI C++ ToolKit
Taxon2_data_.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 Taxon2_data_.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/taxon1/taxon1.asn">taxon1.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/taxon1/taxon1.def">taxon1.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_TAXON1_TAXON2_DATA_BASE_HPP
42 #define OBJECTS_TAXON1_TAXON2_DATA_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #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 // forward declarations
61 class COrg_ref;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_Taxon1
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CTaxon2_data_Base --
75 ///
76 
78 {
80 public:
81  // constructor
82  CTaxon2_data_Base(void);
83  // destructor
84  virtual ~CTaxon2_data_Base(void);
85 
86  // type info
88 
89  // types
90  typedef COrg_ref TOrg;
91  typedef list< string > TBlast_name;
92  typedef bool TIs_uncultured;
93  typedef bool TIs_species_level;
94 
95  // member index
96  enum class E_memberIndex {
97  e__allMandatory = 0,
98  e_org,
99  e_blast_name,
100  e_is_uncultured,
101  e_is_species_level
102  };
104 
105  // getters
106  // setters
107 
108  /// Org-ref with Org-name and db filled in
109  /// Check if a value has been assigned to Org data member.
110  ///
111  /// Data member Org is optional;
112  /// its type is defined as 'typedef COrg_ref TOrg'
113  /// @return
114  /// - true, if a value has been assigned.
115  /// - false, otherwise.
116  bool IsSetOrg(void) const;
117 
118  /// Check if it is safe to call GetOrg method.
119  ///
120  /// @return
121  /// - true, if the data member is getatable.
122  /// - false, otherwise.
123  bool CanGetOrg(void) const;
124 
125  /// Reset Org data member.
126  void ResetOrg(void);
127 
128  /// Get the Org member data.
129  ///
130  /// @return
131  /// Reference to the member data.
132  const TOrg& GetOrg(void) const;
133 
134  /// Assign a value to Org data member.
135  ///
136  /// @param value
137  /// Reference to value.
138  void SetOrg(TOrg& value);
139 
140  /// Assign a value to Org data member.
141  ///
142  /// @return
143  /// Reference to the data value.
144  TOrg& SetOrg(void);
145 
146  /// inherited blast name
147  /// Check if a value has been assigned to Blast_name data member.
148  ///
149  /// Data member Blast_name is optional;
150  /// its type is defined as 'typedef list< string > TBlast_name'
151  /// @return
152  /// - true, if a value has been assigned.
153  /// - false, otherwise.
154  bool IsSetBlast_name(void) const;
155 
156  /// Check if it is safe to call GetBlast_name method.
157  ///
158  /// @return
159  /// - true, if the data member is getatable.
160  /// - false, otherwise.
161  bool CanGetBlast_name(void) const;
162 
163  /// Reset Blast_name data member.
164  void ResetBlast_name(void);
165 
166  /// Get the Blast_name member data.
167  ///
168  /// @return
169  /// Reference to the member data.
170  const TBlast_name& GetBlast_name(void) const;
171 
172  /// Assign a value to Blast_name data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TBlast_name& SetBlast_name(void);
177 
178  /// belongs to environmental bin
179  /// Check if a value has been assigned to Is_uncultured data member.
180  ///
181  /// Data member Is_uncultured is mandatory;
182  /// its type is defined as 'typedef bool TIs_uncultured'
183  /// @return
184  /// - true, if a value has been assigned.
185  /// - false, otherwise.
186  bool IsSetIs_uncultured(void) const;
187 
188  /// Check if it is safe to call GetIs_uncultured method.
189  ///
190  /// @return
191  /// - true, if the data member is getatable.
192  /// - false, otherwise.
193  bool CanGetIs_uncultured(void) const;
194 
195  /// Reset Is_uncultured data member.
196  void ResetIs_uncultured(void);
197 
198  /// Get the Is_uncultured member data.
199  ///
200  /// @return
201  /// Copy of the member data.
202  TIs_uncultured GetIs_uncultured(void) const;
203 
204  /// Assign a value to Is_uncultured data member.
205  ///
206  /// @param value
207  /// Value to assign
208  void SetIs_uncultured(TIs_uncultured value);
209 
210  /// Assign a value to Is_uncultured data member.
211  ///
212  /// @return
213  /// Reference to the data value.
214  TIs_uncultured& SetIs_uncultured(void);
215 
216  /// species level or below
217  /// Check if a value has been assigned to Is_species_level data member.
218  ///
219  /// Data member Is_species_level is mandatory;
220  /// its type is defined as 'typedef bool TIs_species_level'
221  /// @return
222  /// - true, if a value has been assigned.
223  /// - false, otherwise.
224  bool IsSetIs_species_level(void) const;
225 
226  /// Check if it is safe to call GetIs_species_level method.
227  ///
228  /// @return
229  /// - true, if the data member is getatable.
230  /// - false, otherwise.
231  bool CanGetIs_species_level(void) const;
232 
233  /// Reset Is_species_level data member.
234  void ResetIs_species_level(void);
235 
236  /// Get the Is_species_level member data.
237  ///
238  /// @return
239  /// Copy of the member data.
240  TIs_species_level GetIs_species_level(void) const;
241 
242  /// Assign a value to Is_species_level data member.
243  ///
244  /// @param value
245  /// Value to assign
246  void SetIs_species_level(TIs_species_level value);
247 
248  /// Assign a value to Is_species_level data member.
249  ///
250  /// @return
251  /// Reference to the data value.
252  TIs_species_level& SetIs_species_level(void);
253 
254  /// Reset the whole object
255  virtual void Reset(void);
256 
257 
258 private:
259  // Prohibit copy constructor and assignment operator
262 
263  // data
264  Uint4 m_set_State[1];
266  list< string > m_Blast_name;
269 };
270 
271 /* @} */
272 
273 
274 
275 
276 
277 ///////////////////////////////////////////////////////////
278 ///////////////////// inline methods //////////////////////
279 ///////////////////////////////////////////////////////////
280 inline
282 {
283  return m_Org.NotEmpty();
284 }
285 
286 inline
288 {
289  return IsSetOrg();
290 }
291 
292 inline
294 {
295  if (!CanGetOrg()) {
296  ThrowUnassigned(0);
297  }
298  return (*m_Org);
299 }
300 
301 inline
303 {
304  return ((m_set_State[0] & 0xc) != 0);
305 }
306 
307 inline
309 {
310  return true;
311 }
312 
313 inline
315 {
316  return m_Blast_name;
317 }
318 
319 inline
321 {
322  m_set_State[0] |= 0x4;
323  return m_Blast_name;
324 }
325 
326 inline
328 {
329  return ((m_set_State[0] & 0x30) != 0);
330 }
331 
332 inline
334 {
335  return IsSetIs_uncultured();
336 }
337 
338 inline
340 {
341  m_Is_uncultured = 0;
342  m_set_State[0] &= ~0x30;
343 }
344 
345 inline
347 {
348  if (!CanGetIs_uncultured()) {
349  ThrowUnassigned(2);
350  }
351  return m_Is_uncultured;
352 }
353 
354 inline
356 {
358  m_set_State[0] |= 0x30;
359 }
360 
361 inline
363 {
364 #ifdef _DEBUG
365  if (!IsSetIs_uncultured()) {
367  }
368 #endif
369  m_set_State[0] |= 0x10;
370  return m_Is_uncultured;
371 }
372 
373 inline
375 {
376  return ((m_set_State[0] & 0xc0) != 0);
377 }
378 
379 inline
381 {
382  return IsSetIs_species_level();
383 }
384 
385 inline
387 {
388  m_Is_species_level = 0;
389  m_set_State[0] &= ~0xc0;
390 }
391 
392 inline
394 {
395  if (!CanGetIs_species_level()) {
396  ThrowUnassigned(3);
397  }
398  return m_Is_species_level;
399 }
400 
401 inline
403 {
405  m_set_State[0] |= 0xc0;
406 }
407 
408 inline
410 {
411 #ifdef _DEBUG
412  if (!IsSetIs_species_level()) {
414  }
415 #endif
416  m_set_State[0] |= 0x40;
417  return m_Is_species_level;
418 }
419 
420 ///////////////////////////////////////////////////////////
421 ////////////////// end of inline methods //////////////////
422 ///////////////////////////////////////////////////////////
423 
424 
425 
426 
427 
428 END_objects_SCOPE // namespace ncbi::objects::
429 
431 
432 
433 #endif // OBJECTS_TAXON1_TAXON2_DATA_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTaxon2_data_Base –.
char value[7]
Definition: config.c:431
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
#define NCBI_TAXON1_EXPORT
Definition: ncbi_export.h:857
bool IsSetOrg(void) const
Org-ref with Org-name and db filled in Check if a value has been assigned to Org data member.
bool CanGetIs_uncultured(void) const
Check if it is safe to call GetIs_uncultured method.
CTaxon2_data_Base(const CTaxon2_data_Base &)
CTaxon2_data_Base & operator=(const CTaxon2_data_Base &)
void ResetIs_uncultured(void)
Reset Is_uncultured data member.
TIs_species_level & SetIs_species_level(void)
Assign a value to Is_species_level data member.
TBlast_name & SetBlast_name(void)
Assign a value to Blast_name data member.
TIs_species_level GetIs_species_level(void) const
Get the Is_species_level member data.
void ResetIs_species_level(void)
Reset Is_species_level data member.
bool CanGetBlast_name(void) const
Check if it is safe to call GetBlast_name method.
bool IsSetBlast_name(void) const
inherited blast name Check if a value has been assigned to Blast_name data member.
const TOrg & GetOrg(void) const
Get the Org member data.
TIs_uncultured GetIs_uncultured(void) const
Get the Is_uncultured member data.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
const TBlast_name & GetBlast_name(void) const
Get the Blast_name member data.
bool IsSetIs_species_level(void) const
species level or below Check if a value has been assigned to Is_species_level data member.
TIs_uncultured & SetIs_uncultured(void)
Assign a value to Is_uncultured data member.
bool CanGetIs_species_level(void) const
Check if it is safe to call GetIs_species_level method.
CSerialObject Tparent
CRef< TOrg > m_Org
list< string > TBlast_name
list< string > m_Blast_name
bool CanGetOrg(void) const
Check if it is safe to call GetOrg method.
bool IsSetIs_uncultured(void) const
belongs to environmental bin Check if a value has been assigned to Is_uncultured data member.
Modified on Thu Feb 22 17:06:46 2024 by modify_doxy.py rev. 669887