NCBI C++ ToolKit
SimpleVariantSeq_.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 SimpleVariantSeq_.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/varrep/varrep.asn">varrep.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/varrep/varrep.def">varrep.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_VARREP_SIMPLEVARIANTSEQ_BASE_HPP
42 #define OBJECTS_VARREP_SIMPLEVARIANTSEQ_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 
51 
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
55 #endif
56 BEGIN_objects_SCOPE // namespace ncbi::objects::
57 
58 
59 // forward declarations
60 class CSimpleVariant;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_VariationIRep
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 /// SimpleVarSeq is deprecated and should go
73 ///
74 /// CSimpleVariantSeq_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CSimpleVariantSeq_Base(void);
85 
86  // type info
88 
89  // types
90  typedef list< CRef< CSimpleVariant > > TVariants;
91  typedef bool TSisters;
92  typedef bool TFuzzy;
93 
94  // member index
95  enum class E_memberIndex {
96  e__allMandatory = 0,
97  e_variants,
98  e_sisters,
99  e_fuzzy
100  };
102 
103  // getters
104  // setters
105 
106  /// Check if a value has been assigned to Variants data member.
107  ///
108  /// Data member Variants is mandatory;
109  /// its type is defined as 'typedef list< CRef< CSimpleVariant > > TVariants'
110  /// @return
111  /// - true, if a value has been assigned.
112  /// - false, otherwise.
113  bool IsSetVariants(void) const;
114 
115  /// Check if it is safe to call GetVariants method.
116  ///
117  /// @return
118  /// - true, if the data member is getatable.
119  /// - false, otherwise.
120  bool CanGetVariants(void) const;
121 
122  /// Reset Variants data member.
123  void ResetVariants(void);
124 
125  /// Get the Variants member data.
126  ///
127  /// @return
128  /// Reference to the member data.
129  const TVariants& GetVariants(void) const;
130 
131  /// Assign a value to Variants data member.
132  ///
133  /// @return
134  /// Reference to the data value.
135  TVariants& SetVariants(void);
136 
137  /// Check if a value has been assigned to Sisters data member.
138  ///
139  /// Data member Sisters is optional with default false;
140  /// its type is defined as 'typedef bool TSisters'
141  /// @return
142  /// - true, if a value has been assigned.
143  /// - false, otherwise.
144  bool IsSetSisters(void) const;
145 
146  /// Check if it is safe to call GetSisters method.
147  ///
148  /// @return
149  /// - true, if the data member is getatable.
150  /// - false, otherwise.
151  bool CanGetSisters(void) const;
152 
153  /// Reset Sisters data member.
154  void ResetSisters(void);
155 
156  /// Assign default value to Sisters data member.
157  void SetDefaultSisters(void);
158 
159  /// Get the Sisters member data.
160  ///
161  /// @return
162  /// Copy of the member data.
163  TSisters GetSisters(void) const;
164 
165  /// Assign a value to Sisters data member.
166  ///
167  /// @param value
168  /// Value to assign
169  void SetSisters(TSisters value);
170 
171  /// Assign a value to Sisters data member.
172  ///
173  /// @return
174  /// Reference to the data value.
175  TSisters& SetSisters(void);
176 
177  /// Check if a value has been assigned to Fuzzy data member.
178  ///
179  /// Data member Fuzzy is optional with default false;
180  /// its type is defined as 'typedef bool TFuzzy'
181  /// @return
182  /// - true, if a value has been assigned.
183  /// - false, otherwise.
184  bool IsSetFuzzy(void) const;
185 
186  /// Check if it is safe to call GetFuzzy method.
187  ///
188  /// @return
189  /// - true, if the data member is getatable.
190  /// - false, otherwise.
191  bool CanGetFuzzy(void) const;
192 
193  /// Reset Fuzzy data member.
194  void ResetFuzzy(void);
195 
196  /// Assign default value to Fuzzy data member.
197  void SetDefaultFuzzy(void);
198 
199  /// Get the Fuzzy member data.
200  ///
201  /// @return
202  /// Copy of the member data.
203  TFuzzy GetFuzzy(void) const;
204 
205  /// Assign a value to Fuzzy data member.
206  ///
207  /// @param value
208  /// Value to assign
209  void SetFuzzy(TFuzzy value);
210 
211  /// Assign a value to Fuzzy data member.
212  ///
213  /// @return
214  /// Reference to the data value.
215  TFuzzy& SetFuzzy(void);
216 
217  /// Reset the whole object
218  virtual void Reset(void);
219 
220 
221 private:
222  // Prohibit copy constructor and assignment operator
225 
226  // data
228  list< CRef< CSimpleVariant > > m_Variants;
229  bool m_Sisters;
230  bool m_Fuzzy;
231 };
232 
233 /* @} */
234 
235 
236 
237 
238 
239 ///////////////////////////////////////////////////////////
240 ///////////////////// inline methods //////////////////////
241 ///////////////////////////////////////////////////////////
242 inline
244 {
245  return ((m_set_State[0] & 0x3) != 0);
246 }
247 
248 inline
250 {
251  return true;
252 }
253 
254 inline
256 {
257  return m_Variants;
258 }
259 
260 inline
262 {
263  m_set_State[0] |= 0x1;
264  return m_Variants;
265 }
266 
267 inline
269 {
270  return ((m_set_State[0] & 0xc) != 0);
271 }
272 
273 inline
275 {
276  return true;
277 }
278 
279 inline
281 {
282  m_Sisters = false;
283  m_set_State[0] &= ~0xc;
284 }
285 
286 inline
288 {
289  ResetSisters();
290 }
291 
292 inline
294 {
295  return m_Sisters;
296 }
297 
298 inline
300 {
301  m_Sisters = value;
302  m_set_State[0] |= 0xc;
303 }
304 
305 inline
307 {
308 #ifdef _DEBUG
309  if (!IsSetSisters()) {
310  memset(&m_Sisters,UnassignedByte(),sizeof(m_Sisters));
311  }
312 #endif
313  m_set_State[0] |= 0x4;
314  return m_Sisters;
315 }
316 
317 inline
319 {
320  return ((m_set_State[0] & 0x30) != 0);
321 }
322 
323 inline
325 {
326  return true;
327 }
328 
329 inline
331 {
332  m_Fuzzy = false;
333  m_set_State[0] &= ~0x30;
334 }
335 
336 inline
338 {
339  ResetFuzzy();
340 }
341 
342 inline
344 {
345  return m_Fuzzy;
346 }
347 
348 inline
350 {
351  m_Fuzzy = value;
352  m_set_State[0] |= 0x30;
353 }
354 
355 inline
357 {
358 #ifdef _DEBUG
359  if (!IsSetFuzzy()) {
360  memset(&m_Fuzzy,UnassignedByte(),sizeof(m_Fuzzy));
361  }
362 #endif
363  m_set_State[0] |= 0x10;
364  return m_Fuzzy;
365 }
366 
367 ///////////////////////////////////////////////////////////
368 ////////////////// end of inline methods //////////////////
369 ///////////////////////////////////////////////////////////
370 
371 
372 
373 
374 
375 END_objects_SCOPE // namespace ncbi::objects::
376 
378 
379 
380 #endif // OBJECTS_VARREP_SIMPLEVARIANTSEQ_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
SimpleVarSeq is deprecated and should go.
CSimpleVariant –.
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
void SetDefaultSisters(void)
Assign default value to Sisters data member.
bool CanGetVariants(void) const
Check if it is safe to call GetVariants method.
TSisters GetSisters(void) const
Get the Sisters member data.
TFuzzy & SetFuzzy(void)
Assign a value to Fuzzy data member.
virtual ~CSimpleVariantSeq_Base(void)
bool IsSetVariants(void) const
Check if a value has been assigned to Variants data member.
virtual void Reset(void)
Reset the whole object.
list< CRef< CSimpleVariant > > TVariants
bool IsSetFuzzy(void) const
Check if a value has been assigned to Fuzzy data member.
void ResetSisters(void)
Reset Sisters data member.
TSisters & SetSisters(void)
Assign a value to Sisters data member.
CSimpleVariantSeq_Base & operator=(const CSimpleVariantSeq_Base &)
void ResetFuzzy(void)
Reset Fuzzy data member.
void ResetVariants(void)
Reset Variants data member.
const TVariants & GetVariants(void) const
Get the Variants member data.
void SetDefaultFuzzy(void)
Assign default value to Fuzzy data member.
bool CanGetFuzzy(void) const
Check if it is safe to call GetFuzzy method.
CSimpleVariantSeq_Base(const CSimpleVariantSeq_Base &)
list< CRef< CSimpleVariant > > m_Variants
bool CanGetSisters(void) const
Check if it is safe to call GetSisters method.
TFuzzy GetFuzzy(void) const
Get the Fuzzy member data.
TVariants & SetVariants(void)
Assign a value to Variants data member.
bool IsSetSisters(void) const
Check if a value has been assigned to Sisters data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Thu May 23 12:33:19 2024 by modify_doxy.py rev. 669887