NCBI C++ ToolKit
Mixturemodel_distribution_.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 Mixturemodel_distribution_.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_MIXTUREMODEL_DISTRIBUTION_BASE_HPP
42 #define ALGO_MS_FORMATS_PEPXML_MIXTUREMODEL_DISTRIBUTION_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_pepXML
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CMixturemodel_distribution_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CMixturemodel_distribution_Base(void);
85 
86  // type info
88 
89  /////////////////////////////////////////////////////////////////////////////
90  ///
91  /// C_Attlist --
92  ///
93 
95  {
97  public:
98  // constructor
99  C_Attlist(void);
100  // destructor
101  ~C_Attlist(void);
102 
103  // type info
105 
106  // types
107  typedef string TName;
108 
109  // member index
110  enum class E_memberIndex {
111  e__allMandatory = 0,
112  e_name
113  };
115 
116  // getters
117  // setters
118 
119  /// Check if a value has been assigned to Name data member.
120  ///
121  /// Data member Name is mandatory;
122  /// its type is defined as 'typedef string TName'
123  /// @return
124  /// - true, if a value has been assigned.
125  /// - false, otherwise.
126  bool IsSetName(void) const;
127 
128  /// Check if it is safe to call GetName method.
129  ///
130  /// @return
131  /// - true, if the data member is getatable.
132  /// - false, otherwise.
133  bool CanGetName(void) const;
134 
135  /// Reset Name data member.
136  void ResetName(void);
137 
138  /// Get the Name member data.
139  ///
140  /// @return
141  /// Reference to the member data.
142  const TName& GetName(void) const;
143 
144  /// Assign a value to Name data member.
145  ///
146  /// @param value
147  /// Value to assign
148  void SetName(const TName& value);
149  void SetName(TName&& value);
150 
151  /// Assign a value to Name data member.
152  ///
153  /// @return
154  /// Reference to the data value.
155  TName& SetName(void);
156 
157  /// Reset the whole object
158  void Reset(void);
159 
160 
161  private:
162  // Prohibit copy constructor and assignment operator
165 
166  // data
167  Uint4 m_set_State[1];
168  string m_Name;
169  };
170  // types
174 
175  // member index
176  enum class E_memberIndex {
177  e__allMandatory = 0,
178  e_Attlist,
179  e_posmodel_distribution,
180  e_negmodel_distribution
181  };
183 
184  // getters
185  // setters
186 
187  /// Check if a value has been assigned to Attlist data member.
188  ///
189  /// Data member Attlist is mandatory;
190  /// its type is defined as 'typedef C_Attlist TAttlist'
191  /// @return
192  /// - true, if a value has been assigned.
193  /// - false, otherwise.
194  bool IsSetAttlist(void) const;
195 
196  /// Check if it is safe to call GetAttlist method.
197  ///
198  /// @return
199  /// - true, if the data member is getatable.
200  /// - false, otherwise.
201  bool CanGetAttlist(void) const;
202 
203  /// Reset Attlist data member.
204  void ResetAttlist(void);
205 
206  /// Get the Attlist member data.
207  ///
208  /// @return
209  /// Reference to the member data.
210  const TAttlist& GetAttlist(void) const;
211 
212  /// Assign a value to Attlist data member.
213  ///
214  /// @param value
215  /// Reference to value.
216  void SetAttlist(TAttlist& value);
217 
218  /// Assign a value to Attlist data member.
219  ///
220  /// @return
221  /// Reference to the data value.
222  TAttlist& SetAttlist(void);
223 
224  /// Check if a value has been assigned to Posmodel_distribution data member.
225  ///
226  /// Data member Posmodel_distribution is mandatory;
227  /// its type is defined as 'typedef CPosmodel_distribution TPosmodel_distribution'
228  /// @return
229  /// - true, if a value has been assigned.
230  /// - false, otherwise.
231  bool IsSetPosmodel_distribution(void) const;
232 
233  /// Check if it is safe to call GetPosmodel_distribution method.
234  ///
235  /// @return
236  /// - true, if the data member is getatable.
237  /// - false, otherwise.
238  bool CanGetPosmodel_distribution(void) const;
239 
240  /// Reset Posmodel_distribution data member.
241  void ResetPosmodel_distribution(void);
242 
243  /// Get the Posmodel_distribution member data.
244  ///
245  /// @return
246  /// Reference to the member data.
247  const TPosmodel_distribution& GetPosmodel_distribution(void) const;
248 
249  /// Assign a value to Posmodel_distribution data member.
250  ///
251  /// @param value
252  /// Reference to value.
253  void SetPosmodel_distribution(TPosmodel_distribution& value);
254 
255  /// Assign a value to Posmodel_distribution data member.
256  ///
257  /// @return
258  /// Reference to the data value.
259  TPosmodel_distribution& SetPosmodel_distribution(void);
260 
261  /// Check if a value has been assigned to Negmodel_distribution data member.
262  ///
263  /// Data member Negmodel_distribution is mandatory;
264  /// its type is defined as 'typedef CNegmodel_distribution TNegmodel_distribution'
265  /// @return
266  /// - true, if a value has been assigned.
267  /// - false, otherwise.
268  bool IsSetNegmodel_distribution(void) const;
269 
270  /// Check if it is safe to call GetNegmodel_distribution method.
271  ///
272  /// @return
273  /// - true, if the data member is getatable.
274  /// - false, otherwise.
275  bool CanGetNegmodel_distribution(void) const;
276 
277  /// Reset Negmodel_distribution data member.
278  void ResetNegmodel_distribution(void);
279 
280  /// Get the Negmodel_distribution member data.
281  ///
282  /// @return
283  /// Reference to the member data.
284  const TNegmodel_distribution& GetNegmodel_distribution(void) const;
285 
286  /// Assign a value to Negmodel_distribution data member.
287  ///
288  /// @param value
289  /// Reference to value.
290  void SetNegmodel_distribution(TNegmodel_distribution& value);
291 
292  /// Assign a value to Negmodel_distribution data member.
293  ///
294  /// @return
295  /// Reference to the data value.
296  TNegmodel_distribution& SetNegmodel_distribution(void);
297 
298  /// Reset the whole object
299  virtual void Reset(void);
300 
301 
302 private:
303  // Prohibit copy constructor and assignment operator
306 
307  // data
308  Uint4 m_set_State[1];
312 };
313 
314 /* @} */
315 
316 
317 
318 
319 
320 ///////////////////////////////////////////////////////////
321 ///////////////////// inline methods //////////////////////
322 ///////////////////////////////////////////////////////////
323 inline
325 {
326  return ((m_set_State[0] & 0x3) != 0);
327 }
328 
329 inline
331 {
332  return IsSetName();
333 }
334 
335 inline
337 {
338  if (!CanGetName()) {
339  ThrowUnassigned(0);
340  }
341  return m_Name;
342 }
343 
344 inline
346 {
347  m_Name = value;
348  m_set_State[0] |= 0x3;
349 }
350 
351 inline
353 {
354  m_Name = std::forward<CMixturemodel_distribution_Base::C_Attlist::TName>(value);
355  m_set_State[0] |= 0x3;
356 }
357 
358 inline
360 {
361 #ifdef _DEBUG
362  if (!IsSetName()) {
363  m_Name = UnassignedString();
364  }
365 #endif
366  m_set_State[0] |= 0x1;
367  return m_Name;
368 }
369 
370 inline
372 {
373  return m_Attlist.NotEmpty();
374 }
375 
376 inline
378 {
379  return true;
380 }
381 
382 inline
384 {
385  if ( !m_Attlist ) {
386  const_cast<CMixturemodel_distribution_Base*>(this)->ResetAttlist();
387  }
388  return (*m_Attlist);
389 }
390 
391 inline
393 {
394  if ( !m_Attlist ) {
395  ResetAttlist();
396  }
397  return (*m_Attlist);
398 }
399 
400 inline
402 {
403  return m_Posmodel_distribution.NotEmpty();
404 }
405 
406 inline
408 {
409  return true;
410 }
411 
412 inline
414 {
415  if ( !m_Posmodel_distribution ) {
417  }
418  return (*m_Posmodel_distribution);
419 }
420 
421 inline
423 {
424  if ( !m_Posmodel_distribution ) {
426  }
427  return (*m_Posmodel_distribution);
428 }
429 
430 inline
432 {
433  return m_Negmodel_distribution.NotEmpty();
434 }
435 
436 inline
438 {
439  return true;
440 }
441 
442 inline
444 {
445  if ( !m_Negmodel_distribution ) {
447  }
448  return (*m_Negmodel_distribution);
449 }
450 
451 inline
453 {
454  if ( !m_Negmodel_distribution ) {
456  }
457  return (*m_Negmodel_distribution);
458 }
459 
460 ///////////////////////////////////////////////////////////
461 ////////////////// end of inline methods //////////////////
462 ///////////////////////////////////////////////////////////
463 
464 
465 
466 
467 
468 END_objects_SCOPE // namespace ncbi::objects::
469 
471 
472 
473 #endif // ALGO_MS_FORMATS_PEPXML_MIXTUREMODEL_DISTRIBUTION_BASE_HPP
CMixturemodel_distribution_Base –.
CNegmodel_distribution –.
CPosmodel_distribution –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
Definition: serialbase.hpp:175
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
void ResetPosmodel_distribution(void)
Reset Posmodel_distribution data member.
bool CanGetNegmodel_distribution(void) const
Check if it is safe to call GetNegmodel_distribution method.
CRef< TNegmodel_distribution > m_Negmodel_distribution
bool IsSetPosmodel_distribution(void) const
Check if a value has been assigned to Posmodel_distribution data member.
void ResetNegmodel_distribution(void)
Reset Negmodel_distribution data member.
bool CanGetName(void) const
Check if it is safe to call GetName method.
C_Attlist & operator=(const C_Attlist &)
const TNegmodel_distribution & GetNegmodel_distribution(void) const
Get the Negmodel_distribution member data.
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
CMixturemodel_distribution_Base(const CMixturemodel_distribution_Base &)
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
const TPosmodel_distribution & GetPosmodel_distribution(void) const
Get the Posmodel_distribution member data.
TPosmodel_distribution & SetPosmodel_distribution(void)
Assign a value to Posmodel_distribution data member.
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
TName & SetName(void)
Assign a value to Name data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
bool CanGetPosmodel_distribution(void) const
Check if it is safe to call GetPosmodel_distribution method.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
const TName & GetName(void) const
Get the Name member data.
CRef< TPosmodel_distribution > m_Posmodel_distribution
TNegmodel_distribution & SetNegmodel_distribution(void)
Assign a value to Negmodel_distribution data member.
CMixturemodel_distribution_Base & operator=(const CMixturemodel_distribution_Base &)
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
bool IsSetNegmodel_distribution(void) const
Check if a value has been assigned to Negmodel_distribution data member.
void ResetAttlist(void)
Reset Attlist data member.
Modified on Sat Mar 02 10:55:58 2024 by modify_doxy.py rev. 669887