NCBI C++ ToolKit
ModelEvidenceItem_.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 ModelEvidenceItem_.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/seqfeat/seqfeat.asn">seqfeat.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqfeat/seqfeat.def">seqfeat.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_SEQFEAT_MODELEVIDENCEITEM_BASE_HPP
42 #define OBJECTS_SEQFEAT_MODELEVIDENCEITEM_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
56 class CSeq_id;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Seqfeat
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CModelEvidenceItem_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
79  virtual ~CModelEvidenceItem_Base(void);
80 
81  // type info
83 
84  // types
85  typedef CSeq_id TId;
86  typedef int TExon_count;
87  typedef int TExon_length;
88  typedef bool TFull_length;
90 
91  // member index
92  enum class E_memberIndex {
93  e__allMandatory = 0,
94  e_id,
95  e_exon_count,
96  e_exon_length,
97  e_full_length,
98  e_supports_all_exon_combo
99  };
101 
102  // getters
103  // setters
104 
105  /// Check if a value has been assigned to Id data member.
106  ///
107  /// Data member Id is mandatory;
108  /// its type is defined as 'typedef CSeq_id TId'
109  /// @return
110  /// - true, if a value has been assigned.
111  /// - false, otherwise.
112  bool IsSetId(void) const;
113 
114  /// Check if it is safe to call GetId method.
115  ///
116  /// @return
117  /// - true, if the data member is getatable.
118  /// - false, otherwise.
119  bool CanGetId(void) const;
120 
121  /// Reset Id data member.
122  void ResetId(void);
123 
124  /// Get the Id member data.
125  ///
126  /// @return
127  /// Reference to the member data.
128  const TId& GetId(void) const;
129 
130  /// Assign a value to Id data member.
131  ///
132  /// @param value
133  /// Reference to value.
134  void SetId(TId& value);
135 
136  /// Assign a value to Id data member.
137  ///
138  /// @return
139  /// Reference to the data value.
140  TId& SetId(void);
141 
142  /// Check if a value has been assigned to Exon_count data member.
143  ///
144  /// Data member Exon_count is optional;
145  /// its type is defined as 'typedef int TExon_count'
146  /// @return
147  /// - true, if a value has been assigned.
148  /// - false, otherwise.
149  bool IsSetExon_count(void) const;
150 
151  /// Check if it is safe to call GetExon_count method.
152  ///
153  /// @return
154  /// - true, if the data member is getatable.
155  /// - false, otherwise.
156  bool CanGetExon_count(void) const;
157 
158  /// Reset Exon_count data member.
159  void ResetExon_count(void);
160 
161  /// Get the Exon_count member data.
162  ///
163  /// @return
164  /// Copy of the member data.
165  TExon_count GetExon_count(void) const;
166 
167  /// Assign a value to Exon_count data member.
168  ///
169  /// @param value
170  /// Value to assign
171  void SetExon_count(TExon_count value);
172 
173  /// Assign a value to Exon_count data member.
174  ///
175  /// @return
176  /// Reference to the data value.
177  TExon_count& SetExon_count(void);
178 
179  /// Check if a value has been assigned to Exon_length data member.
180  ///
181  /// Data member Exon_length is optional;
182  /// its type is defined as 'typedef int TExon_length'
183  /// @return
184  /// - true, if a value has been assigned.
185  /// - false, otherwise.
186  bool IsSetExon_length(void) const;
187 
188  /// Check if it is safe to call GetExon_length method.
189  ///
190  /// @return
191  /// - true, if the data member is getatable.
192  /// - false, otherwise.
193  bool CanGetExon_length(void) const;
194 
195  /// Reset Exon_length data member.
196  void ResetExon_length(void);
197 
198  /// Get the Exon_length member data.
199  ///
200  /// @return
201  /// Copy of the member data.
202  TExon_length GetExon_length(void) const;
203 
204  /// Assign a value to Exon_length data member.
205  ///
206  /// @param value
207  /// Value to assign
208  void SetExon_length(TExon_length value);
209 
210  /// Assign a value to Exon_length data member.
211  ///
212  /// @return
213  /// Reference to the data value.
214  TExon_length& SetExon_length(void);
215 
216  /// Check if a value has been assigned to Full_length data member.
217  ///
218  /// Data member Full_length is optional with default false;
219  /// its type is defined as 'typedef bool TFull_length'
220  /// @return
221  /// - true, if a value has been assigned.
222  /// - false, otherwise.
223  bool IsSetFull_length(void) const;
224 
225  /// Check if it is safe to call GetFull_length method.
226  ///
227  /// @return
228  /// - true, if the data member is getatable.
229  /// - false, otherwise.
230  bool CanGetFull_length(void) const;
231 
232  /// Reset Full_length data member.
233  void ResetFull_length(void);
234 
235  /// Assign default value to Full_length data member.
236  void SetDefaultFull_length(void);
237 
238  /// Get the Full_length member data.
239  ///
240  /// @return
241  /// Copy of the member data.
242  TFull_length GetFull_length(void) const;
243 
244  /// Assign a value to Full_length data member.
245  ///
246  /// @param value
247  /// Value to assign
248  void SetFull_length(TFull_length value);
249 
250  /// Assign a value to Full_length data member.
251  ///
252  /// @return
253  /// Reference to the data value.
254  TFull_length& SetFull_length(void);
255 
256  /// Check if a value has been assigned to Supports_all_exon_combo data member.
257  ///
258  /// Data member Supports_all_exon_combo is optional with default false;
259  /// its type is defined as 'typedef bool TSupports_all_exon_combo'
260  /// @return
261  /// - true, if a value has been assigned.
262  /// - false, otherwise.
263  bool IsSetSupports_all_exon_combo(void) const;
264 
265  /// Check if it is safe to call GetSupports_all_exon_combo method.
266  ///
267  /// @return
268  /// - true, if the data member is getatable.
269  /// - false, otherwise.
270  bool CanGetSupports_all_exon_combo(void) const;
271 
272  /// Reset Supports_all_exon_combo data member.
273  void ResetSupports_all_exon_combo(void);
274 
275  /// Assign default value to Supports_all_exon_combo data member.
276  void SetDefaultSupports_all_exon_combo(void);
277 
278  /// Get the Supports_all_exon_combo member data.
279  ///
280  /// @return
281  /// Copy of the member data.
282  TSupports_all_exon_combo GetSupports_all_exon_combo(void) const;
283 
284  /// Assign a value to Supports_all_exon_combo data member.
285  ///
286  /// @param value
287  /// Value to assign
288  void SetSupports_all_exon_combo(TSupports_all_exon_combo value);
289 
290  /// Assign a value to Supports_all_exon_combo data member.
291  ///
292  /// @return
293  /// Reference to the data value.
294  TSupports_all_exon_combo& SetSupports_all_exon_combo(void);
295 
296  /// Reset the whole object
297  virtual void Reset(void);
298 
299 
300 private:
301  // Prohibit copy constructor and assignment operator
304 
305  // data
306  Uint4 m_set_State[1];
312 };
313 
314 /* @} */
315 
316 
317 
318 
319 
320 ///////////////////////////////////////////////////////////
321 ///////////////////// inline methods //////////////////////
322 ///////////////////////////////////////////////////////////
323 inline
325 {
326  return m_Id.NotEmpty();
327 }
328 
329 inline
331 {
332  return true;
333 }
334 
335 inline
337 {
338  if ( !m_Id ) {
339  const_cast<CModelEvidenceItem_Base*>(this)->ResetId();
340  }
341  return (*m_Id);
342 }
343 
344 inline
346 {
347  if ( !m_Id ) {
348  ResetId();
349  }
350  return (*m_Id);
351 }
352 
353 inline
355 {
356  return ((m_set_State[0] & 0xc) != 0);
357 }
358 
359 inline
361 {
362  return IsSetExon_count();
363 }
364 
365 inline
367 {
368  m_Exon_count = 0;
369  m_set_State[0] &= ~0xc;
370 }
371 
372 inline
374 {
375  if (!CanGetExon_count()) {
376  ThrowUnassigned(1);
377  }
378  return m_Exon_count;
379 }
380 
381 inline
383 {
385  m_set_State[0] |= 0xc;
386 }
387 
388 inline
390 {
391 #ifdef _DEBUG
392  if (!IsSetExon_count()) {
393  memset(&m_Exon_count,UnassignedByte(),sizeof(m_Exon_count));
394  }
395 #endif
396  m_set_State[0] |= 0x4;
397  return m_Exon_count;
398 }
399 
400 inline
402 {
403  return ((m_set_State[0] & 0x30) != 0);
404 }
405 
406 inline
408 {
409  return IsSetExon_length();
410 }
411 
412 inline
414 {
415  m_Exon_length = 0;
416  m_set_State[0] &= ~0x30;
417 }
418 
419 inline
421 {
422  if (!CanGetExon_length()) {
423  ThrowUnassigned(2);
424  }
425  return m_Exon_length;
426 }
427 
428 inline
430 {
432  m_set_State[0] |= 0x30;
433 }
434 
435 inline
437 {
438 #ifdef _DEBUG
439  if (!IsSetExon_length()) {
440  memset(&m_Exon_length,UnassignedByte(),sizeof(m_Exon_length));
441  }
442 #endif
443  m_set_State[0] |= 0x10;
444  return m_Exon_length;
445 }
446 
447 inline
449 {
450  return ((m_set_State[0] & 0xc0) != 0);
451 }
452 
453 inline
455 {
456  return true;
457 }
458 
459 inline
461 {
462  m_Full_length = false;
463  m_set_State[0] &= ~0xc0;
464 }
465 
466 inline
468 {
470 }
471 
472 inline
474 {
475  return m_Full_length;
476 }
477 
478 inline
480 {
482  m_set_State[0] |= 0xc0;
483 }
484 
485 inline
487 {
488 #ifdef _DEBUG
489  if (!IsSetFull_length()) {
490  memset(&m_Full_length,UnassignedByte(),sizeof(m_Full_length));
491  }
492 #endif
493  m_set_State[0] |= 0x40;
494  return m_Full_length;
495 }
496 
497 inline
499 {
500  return ((m_set_State[0] & 0x300) != 0);
501 }
502 
503 inline
505 {
506  return true;
507 }
508 
509 inline
511 {
513  m_set_State[0] &= ~0x300;
514 }
515 
516 inline
518 {
520 }
521 
522 inline
524 {
526 }
527 
528 inline
530 {
532  m_set_State[0] |= 0x300;
533 }
534 
535 inline
537 {
538 #ifdef _DEBUG
541  }
542 #endif
543  m_set_State[0] |= 0x100;
545 }
546 
547 ///////////////////////////////////////////////////////////
548 ////////////////// end of inline methods //////////////////
549 ///////////////////////////////////////////////////////////
550 
551 
552 
553 
554 
555 END_objects_SCOPE // namespace ncbi::objects::
556 
558 
559 
560 #endif // OBJECTS_SEQFEAT_MODELEVIDENCEITEM_BASE_HPP
CModelEvidenceItem_Base –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
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_SEQFEAT_EXPORT
Definition: ncbi_export.h:768
TId & SetId(void)
Assign a value to Id data member.
bool CanGetId(void) const
Check if it is safe to call GetId method.
TExon_count GetExon_count(void) const
Get the Exon_count member data.
TFull_length & SetFull_length(void)
Assign a value to Full_length data member.
void ResetId(void)
Reset Id data member.
bool CanGetFull_length(void) const
Check if it is safe to call GetFull_length method.
bool IsSetExon_count(void) const
Check if a value has been assigned to Exon_count data member.
CModelEvidenceItem_Base(const CModelEvidenceItem_Base &)
CModelEvidenceItem_Base & operator=(const CModelEvidenceItem_Base &)
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
TSupports_all_exon_combo & SetSupports_all_exon_combo(void)
Assign a value to Supports_all_exon_combo data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
void ResetExon_length(void)
Reset Exon_length data member.
TExon_length & SetExon_length(void)
Assign a value to Exon_length data member.
bool IsSetSupports_all_exon_combo(void) const
Check if a value has been assigned to Supports_all_exon_combo data member.
void ResetSupports_all_exon_combo(void)
Reset Supports_all_exon_combo data member.
const TId & GetId(void) const
Get the Id member data.
bool CanGetExon_count(void) const
Check if it is safe to call GetExon_count method.
TExon_count & SetExon_count(void)
Assign a value to Exon_count data member.
TSupports_all_exon_combo GetSupports_all_exon_combo(void) const
Get the Supports_all_exon_combo member data.
bool CanGetSupports_all_exon_combo(void) const
Check if it is safe to call GetSupports_all_exon_combo method.
void SetDefaultFull_length(void)
Assign default value to Full_length data member.
void ResetExon_count(void)
Reset Exon_count data member.
void ResetFull_length(void)
Reset Full_length data member.
TExon_length GetExon_length(void) const
Get the Exon_length member data.
bool IsSetExon_length(void) const
Check if a value has been assigned to Exon_length data member.
bool CanGetExon_length(void) const
Check if it is safe to call GetExon_length method.
bool IsSetFull_length(void) const
Check if a value has been assigned to Full_length data member.
TFull_length GetFull_length(void) const
Get the Full_length member data.
void SetDefaultSupports_all_exon_combo(void)
Assign default value to Supports_all_exon_combo data member.
Modified on Sat Dec 02 09:21:58 2023 by modify_doxy.py rev. 669887