NCBI C++ ToolKit
Linkage_evidence_.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 Linkage_evidence_.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/seq/seq.asn">seq.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seq/seq.def">seq.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_SEQ_LINKAGE_EVIDENCE_BASE_HPP
42 #define OBJECTS_SEQ_LINKAGE_EVIDENCE_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 // generated classes
56 
57 
58 /** @addtogroup dataspec_NCBI_Sequence
59  *
60  * @{
61  */
62 
63 /////////////////////////////////////////////////////////////////////////////
64 ///
65 /// CLinkage_evidence_Base --
66 ///
67 
69 {
71 public:
72  // constructor
74  // destructor
75  virtual ~CLinkage_evidence_Base(void);
76 
77  // type info
79 
80  enum EType {
81  eType_paired_ends = 0,
82  eType_align_genus = 1,
83  eType_align_xgenus = 2,
84  eType_align_trnscpt = 3,
85  eType_within_clone = 4,
86  eType_clone_contig = 5,
87  eType_map = 6,
88  eType_strobe = 7,
89  eType_unspecified = 8,
90  eType_pcr = 9,
91  eType_proximity_ligation = 10,
92  eType_other = 255
93  };
94 
95  /// Access to EType's attributes (values, names) as defined in spec
96  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EType)(void);
97 
98  // types
99  typedef int TType;
100 
101  // member index
102  enum class E_memberIndex {
103  e__allMandatory = 0,
104  e_type
105  };
107 
108  // getters
109  // setters
110 
111  /// Check if a value has been assigned to Type data member.
112  ///
113  /// Data member Type is mandatory;
114  /// its type is defined as 'typedef int TType'
115  /// @return
116  /// - true, if a value has been assigned.
117  /// - false, otherwise.
118  bool IsSetType(void) const;
119 
120  /// Check if it is safe to call GetType method.
121  ///
122  /// @return
123  /// - true, if the data member is getatable.
124  /// - false, otherwise.
125  bool CanGetType(void) const;
126 
127  /// Reset Type data member.
128  void ResetType(void);
129 
130  /// Get the Type member data.
131  ///
132  /// @return
133  /// Copy of the member data.
134  TType GetType(void) const;
135 
136  /// Assign a value to Type data member.
137  ///
138  /// @param value
139  /// Value to assign
140  void SetType(TType value);
141 
142  /// Assign a value to Type data member.
143  ///
144  /// @return
145  /// Reference to the data value.
146  TType& SetType(void);
147 
148  /// Reset the whole object
149  virtual void Reset(void);
150 
151 
152 private:
153  // Prohibit copy constructor and assignment operator
156 
157  // data
158  Uint4 m_set_State[1];
159  int m_Type;
160 };
161 
162 /* @} */
163 
164 
165 
166 
167 
168 ///////////////////////////////////////////////////////////
169 ///////////////////// inline methods //////////////////////
170 ///////////////////////////////////////////////////////////
171 inline
173 {
174  return ((m_set_State[0] & 0x3) != 0);
175 }
176 
177 inline
179 {
180  return IsSetType();
181 }
182 
183 inline
185 {
186  m_Type = (EType)(0);
187  m_set_State[0] &= ~0x3;
188 }
189 
190 inline
192 {
193  if (!CanGetType()) {
194  ThrowUnassigned(0);
195  }
196  return m_Type;
197 }
198 
199 inline
201 {
202  m_Type = value;
203  m_set_State[0] |= 0x3;
204 }
205 
206 inline
208 {
209 #ifdef _DEBUG
210  if (!IsSetType()) {
211  memset(&m_Type,UnassignedByte(),sizeof(m_Type));
212  }
213 #endif
214  m_set_State[0] |= 0x1;
215  return m_Type;
216 }
217 
218 ///////////////////////////////////////////////////////////
219 ////////////////// end of inline methods //////////////////
220 ///////////////////////////////////////////////////////////
221 
222 
223 
224 
225 
226 END_objects_SCOPE // namespace ncbi::objects::
227 
229 
230 
231 #endif // OBJECTS_SEQ_LINKAGE_EVIDENCE_BASE_HPP
CLinkage_evidence_Base –.
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
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
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_SEQ_EXPORT
Definition: ncbi_export.h:825
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
CLinkage_evidence_Base(const CLinkage_evidence_Base &)
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
TType GetType(void) const
Get the Type member data.
CLinkage_evidence_Base & operator=(const CLinkage_evidence_Base &)
bool CanGetType(void) const
Check if it is safe to call GetType method.
TType & SetType(void)
Assign a value to Type data member.
void ResetType(void)
Reset Type data member.
Modified on Wed Mar 27 11:26:05 2024 by modify_doxy.py rev. 669887