NCBI C++ ToolKit
Analysis_result_.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 Analysis_result_.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/algo/ms/formats/pepxml/pepXML.xsd">pepXML.xsd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/algo/ms/formats/pepxml/pepXML.def">pepXML.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 ALGO_MS_FORMATS_PEPXML_ANALYSIS_RESULT_BASE_HPP
42 #define ALGO_MS_FORMATS_PEPXML_ANALYSIS_RESULT_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 CAsapratio_result;
64 
65 
66 // generated classes
67 
68 
69 /** @addtogroup dataspec_pepXML
70  *
71  * @{
72  */
73 
74 /////////////////////////////////////////////////////////////////////////////
75 ///
76 /// CAnalysis_result_Base --
77 ///
78 
80 {
82 public:
83  // constructor
85  // destructor
86  virtual ~CAnalysis_result_Base(void);
87 
88  // type info
90 
91  /////////////////////////////////////////////////////////////////////////////
92  ///
93  /// C_Attlist --
94  ///
95 
97  {
99  public:
100  // constructor
101  C_Attlist(void);
102  // destructor
103  ~C_Attlist(void);
104 
105  // type info
107 
108  // types
109  typedef string TAnalysis;
110  typedef int TId;
111 
112  // member index
113  enum class E_memberIndex {
114  e__allMandatory = 0,
115  e_analysis,
116  e_id
117  };
119 
120  // getters
121  // setters
122 
123  /// Check if a value has been assigned to Analysis data member.
124  ///
125  /// Data member Analysis is mandatory;
126  /// its type is defined as 'typedef string TAnalysis'
127  /// @return
128  /// - true, if a value has been assigned.
129  /// - false, otherwise.
130  bool IsSetAnalysis(void) const;
131 
132  /// Check if it is safe to call GetAnalysis method.
133  ///
134  /// @return
135  /// - true, if the data member is getatable.
136  /// - false, otherwise.
137  bool CanGetAnalysis(void) const;
138 
139  /// Reset Analysis data member.
140  void ResetAnalysis(void);
141 
142  /// Get the Analysis member data.
143  ///
144  /// @return
145  /// Reference to the member data.
146  const TAnalysis& GetAnalysis(void) const;
147 
148  /// Assign a value to Analysis data member.
149  ///
150  /// @param value
151  /// Value to assign
152  void SetAnalysis(const TAnalysis& value);
153  void SetAnalysis(TAnalysis&& value);
154 
155  /// Assign a value to Analysis data member.
156  ///
157  /// @return
158  /// Reference to the data value.
159  TAnalysis& SetAnalysis(void);
160 
161  /// Check if a value has been assigned to Id data member.
162  ///
163  /// Data member Id is optional with default 1;
164  /// its type is defined as 'typedef int TId'
165  /// @return
166  /// - true, if a value has been assigned.
167  /// - false, otherwise.
168  bool IsSetId(void) const;
169 
170  /// Check if it is safe to call GetId method.
171  ///
172  /// @return
173  /// - true, if the data member is getatable.
174  /// - false, otherwise.
175  bool CanGetId(void) const;
176 
177  /// Reset Id data member.
178  void ResetId(void);
179 
180  /// Assign default value to Id data member.
181  void SetDefaultId(void);
182 
183  /// Get the Id member data.
184  ///
185  /// @return
186  /// Copy of the member data.
187  TId GetId(void) const;
188 
189  /// Assign a value to Id data member.
190  ///
191  /// @param value
192  /// Value to assign
193  void SetId(TId value);
194 
195  /// Assign a value to Id data member.
196  ///
197  /// @return
198  /// Reference to the data value.
199  TId& SetId(void);
200 
201  /// Reset the whole object
202  void Reset(void);
203 
204 
205  private:
206  // Prohibit copy constructor and assignment operator
209 
210  // data
211  Uint4 m_set_State[1];
212  string m_Analysis;
213  int m_Id;
214  };
215  // types
217  typedef list< CRef< CPeptideprophet_result > > TPeptideprophet_result;
218  typedef list< CRef< CAsapratio_result > > TAsapratio_result;
219  typedef list< CRef< CXpressratio_result > > TXpressratio_result;
220 
221  // member index
222  enum class E_memberIndex {
223  e__allMandatory = 0,
224  e_Attlist,
225  e_peptideprophet_result,
226  e_asapratio_result,
227  e_xpressratio_result
228  };
230 
231  // getters
232  // setters
233 
234  /// Check if a value has been assigned to Attlist data member.
235  ///
236  /// Data member Attlist is mandatory;
237  /// its type is defined as 'typedef C_Attlist TAttlist'
238  /// @return
239  /// - true, if a value has been assigned.
240  /// - false, otherwise.
241  bool IsSetAttlist(void) const;
242 
243  /// Check if it is safe to call GetAttlist method.
244  ///
245  /// @return
246  /// - true, if the data member is getatable.
247  /// - false, otherwise.
248  bool CanGetAttlist(void) const;
249 
250  /// Reset Attlist data member.
251  void ResetAttlist(void);
252 
253  /// Get the Attlist member data.
254  ///
255  /// @return
256  /// Reference to the member data.
257  const TAttlist& GetAttlist(void) const;
258 
259  /// Assign a value to Attlist data member.
260  ///
261  /// @param value
262  /// Reference to value.
263  void SetAttlist(TAttlist& value);
264 
265  /// Assign a value to Attlist data member.
266  ///
267  /// @return
268  /// Reference to the data value.
269  TAttlist& SetAttlist(void);
270 
271  /// Check if a value has been assigned to Peptideprophet_result data member.
272  ///
273  /// Data member Peptideprophet_result is optional;
274  /// its type is defined as 'typedef list< CRef< CPeptideprophet_result > > TPeptideprophet_result'
275  /// @return
276  /// - true, if a value has been assigned.
277  /// - false, otherwise.
278  bool IsSetPeptideprophet_result(void) const;
279 
280  /// Check if it is safe to call GetPeptideprophet_result method.
281  ///
282  /// @return
283  /// - true, if the data member is getatable.
284  /// - false, otherwise.
285  bool CanGetPeptideprophet_result(void) const;
286 
287  /// Reset Peptideprophet_result data member.
288  void ResetPeptideprophet_result(void);
289 
290  /// Get the Peptideprophet_result member data.
291  ///
292  /// @return
293  /// Reference to the member data.
294  const TPeptideprophet_result& GetPeptideprophet_result(void) const;
295 
296  /// Assign a value to Peptideprophet_result data member.
297  ///
298  /// @return
299  /// Reference to the data value.
300  TPeptideprophet_result& SetPeptideprophet_result(void);
301 
302  /// Check if a value has been assigned to Asapratio_result data member.
303  ///
304  /// Data member Asapratio_result is optional;
305  /// its type is defined as 'typedef list< CRef< CAsapratio_result > > TAsapratio_result'
306  /// @return
307  /// - true, if a value has been assigned.
308  /// - false, otherwise.
309  bool IsSetAsapratio_result(void) const;
310 
311  /// Check if it is safe to call GetAsapratio_result method.
312  ///
313  /// @return
314  /// - true, if the data member is getatable.
315  /// - false, otherwise.
316  bool CanGetAsapratio_result(void) const;
317 
318  /// Reset Asapratio_result data member.
319  void ResetAsapratio_result(void);
320 
321  /// Get the Asapratio_result member data.
322  ///
323  /// @return
324  /// Reference to the member data.
325  const TAsapratio_result& GetAsapratio_result(void) const;
326 
327  /// Assign a value to Asapratio_result data member.
328  ///
329  /// @return
330  /// Reference to the data value.
331  TAsapratio_result& SetAsapratio_result(void);
332 
333  /// Check if a value has been assigned to Xpressratio_result data member.
334  ///
335  /// Data member Xpressratio_result is optional;
336  /// its type is defined as 'typedef list< CRef< CXpressratio_result > > TXpressratio_result'
337  /// @return
338  /// - true, if a value has been assigned.
339  /// - false, otherwise.
340  bool IsSetXpressratio_result(void) const;
341 
342  /// Check if it is safe to call GetXpressratio_result method.
343  ///
344  /// @return
345  /// - true, if the data member is getatable.
346  /// - false, otherwise.
347  bool CanGetXpressratio_result(void) const;
348 
349  /// Reset Xpressratio_result data member.
350  void ResetXpressratio_result(void);
351 
352  /// Get the Xpressratio_result member data.
353  ///
354  /// @return
355  /// Reference to the member data.
356  const TXpressratio_result& GetXpressratio_result(void) const;
357 
358  /// Assign a value to Xpressratio_result data member.
359  ///
360  /// @return
361  /// Reference to the data value.
362  TXpressratio_result& SetXpressratio_result(void);
363 
364  /// Reset the whole object
365  virtual void Reset(void);
366 
367 
368 private:
369  // Prohibit copy constructor and assignment operator
372 
373  // data
374  Uint4 m_set_State[1];
376  list< CRef< CPeptideprophet_result > > m_Peptideprophet_result;
377  list< CRef< CAsapratio_result > > m_Asapratio_result;
378  list< CRef< CXpressratio_result > > m_Xpressratio_result;
379 };
380 
381 /* @} */
382 
383 
384 
385 
386 
387 ///////////////////////////////////////////////////////////
388 ///////////////////// inline methods //////////////////////
389 ///////////////////////////////////////////////////////////
390 inline
392 {
393  return ((m_set_State[0] & 0x3) != 0);
394 }
395 
396 inline
398 {
399  return IsSetAnalysis();
400 }
401 
402 inline
404 {
405  if (!CanGetAnalysis()) {
406  ThrowUnassigned(0);
407  }
408  return m_Analysis;
409 }
410 
411 inline
413 {
414  m_Analysis = value;
415  m_set_State[0] |= 0x3;
416 }
417 
418 inline
420 {
421  m_Analysis = std::forward<CAnalysis_result_Base::C_Attlist::TAnalysis>(value);
422  m_set_State[0] |= 0x3;
423 }
424 
425 inline
427 {
428 #ifdef _DEBUG
429  if (!IsSetAnalysis()) {
430  m_Analysis = UnassignedString();
431  }
432 #endif
433  m_set_State[0] |= 0x1;
434  return m_Analysis;
435 }
436 
437 inline
439 {
440  return ((m_set_State[0] & 0xc) != 0);
441 }
442 
443 inline
445 {
446  return true;
447 }
448 
449 inline
451 {
452  m_Id = 1;
453  m_set_State[0] &= ~0xc;
454 }
455 
456 inline
458 {
459  ResetId();
460  m_set_State[0] |= 0x4;
461 }
462 
463 inline
465 {
466  return m_Id;
467 }
468 
469 inline
471 {
472  m_Id = value;
473  m_set_State[0] |= 0xc;
474 }
475 
476 inline
478 {
479 #ifdef _DEBUG
480  if (!IsSetId()) {
481  memset(&m_Id,UnassignedByte(),sizeof(m_Id));
482  }
483 #endif
484  m_set_State[0] |= 0x4;
485  return m_Id;
486 }
487 
488 inline
490 {
491  return m_Attlist.NotEmpty();
492 }
493 
494 inline
496 {
497  return true;
498 }
499 
500 inline
502 {
503  if ( !m_Attlist ) {
504  const_cast<CAnalysis_result_Base*>(this)->ResetAttlist();
505  }
506  return (*m_Attlist);
507 }
508 
509 inline
511 {
512  if ( !m_Attlist ) {
513  ResetAttlist();
514  }
515  return (*m_Attlist);
516 }
517 
518 inline
520 {
521  return ((m_set_State[0] & 0xc) != 0);
522 }
523 
524 inline
526 {
527  return true;
528 }
529 
530 inline
532 {
534 }
535 
536 inline
538 {
539  m_set_State[0] |= 0x4;
541 }
542 
543 inline
545 {
546  return ((m_set_State[0] & 0x30) != 0);
547 }
548 
549 inline
551 {
552  return true;
553 }
554 
555 inline
557 {
558  return m_Asapratio_result;
559 }
560 
561 inline
563 {
564  m_set_State[0] |= 0x10;
565  return m_Asapratio_result;
566 }
567 
568 inline
570 {
571  return ((m_set_State[0] & 0xc0) != 0);
572 }
573 
574 inline
576 {
577  return true;
578 }
579 
580 inline
582 {
583  return m_Xpressratio_result;
584 }
585 
586 inline
588 {
589  m_set_State[0] |= 0x40;
590  return m_Xpressratio_result;
591 }
592 
593 ///////////////////////////////////////////////////////////
594 ////////////////// end of inline methods //////////////////
595 ///////////////////////////////////////////////////////////
596 
597 
598 
599 
600 
601 END_objects_SCOPE // namespace ncbi::objects::
602 
604 
605 
606 #endif // ALGO_MS_FORMATS_PEPXML_ANALYSIS_RESULT_BASE_HPP
CAnalysis_result_Base –.
CAsapratio_result –.
CPeptideprophet_result –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CXpressratio_result –.
char value[7]
Definition: config.c:431
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
Definition: serialbase.hpp:175
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_PEPXML_EXPORT
Definition: ncbi_export.h:696
CRef< TAttlist > m_Attlist
bool CanGetXpressratio_result(void) const
Check if it is safe to call GetXpressratio_result method.
TId GetId(void) const
Get the Id member data.
bool IsSetAnalysis(void) const
Check if a value has been assigned to Analysis data member.
void ResetId(void)
Reset Id data member.
TXpressratio_result & SetXpressratio_result(void)
Assign a value to Xpressratio_result data member.
list< CRef< CXpressratio_result > > m_Xpressratio_result
bool CanGetId(void) const
Check if it is safe to call GetId method.
TPeptideprophet_result & SetPeptideprophet_result(void)
Assign a value to Peptideprophet_result data member.
bool CanGetAsapratio_result(void) const
Check if it is safe to call GetAsapratio_result method.
C_Attlist & operator=(const C_Attlist &)
const TPeptideprophet_result & GetPeptideprophet_result(void) const
Get the Peptideprophet_result member data.
CAnalysis_result_Base(const CAnalysis_result_Base &)
void SetDefaultId(void)
Assign default value to Id data member.
TId & SetId(void)
Assign a value to Id data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
bool IsSetAsapratio_result(void) const
Check if a value has been assigned to Asapratio_result data member.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
list< CRef< CAsapratio_result > > TAsapratio_result
TAnalysis & SetAnalysis(void)
Assign a value to Analysis data member.
list< CRef< CPeptideprophet_result > > m_Peptideprophet_result
list< CRef< CAsapratio_result > > m_Asapratio_result
bool CanGetPeptideprophet_result(void) const
Check if it is safe to call GetPeptideprophet_result method.
bool CanGetAnalysis(void) const
Check if it is safe to call GetAnalysis method.
const TAsapratio_result & GetAsapratio_result(void) const
Get the Asapratio_result member data.
const TXpressratio_result & GetXpressratio_result(void) const
Get the Xpressratio_result member data.
list< CRef< CPeptideprophet_result > > TPeptideprophet_result
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
CAnalysis_result_Base & operator=(const CAnalysis_result_Base &)
bool IsSetXpressratio_result(void) const
Check if a value has been assigned to Xpressratio_result data member.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
list< CRef< CXpressratio_result > > TXpressratio_result
TAsapratio_result & SetAsapratio_result(void)
Assign a value to Asapratio_result data member.
bool IsSetPeptideprophet_result(void) const
Check if a value has been assigned to Peptideprophet_result data member.
void ResetAttlist(void)
Reset Attlist data member.
const TAnalysis & GetAnalysis(void) const
Get the Analysis member data.
Modified on Wed Mar 27 11:19:09 2024 by modify_doxy.py rev. 669887