NCBI C++ ToolKit
Dataset_derivation_.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 Dataset_derivation_.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_DATASET_DERIVATION_BASE_HPP
42 #define ALGO_MS_FORMATS_PEPXML_DATASET_DERIVATION_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 CData_filter;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_pepXML
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///Source and filtering criteria used to generate dataset
73 ///
74 /// CDataset_derivation_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CDataset_derivation_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 int TGeneration_no;
108 
109  // member index
110  enum class E_memberIndex {
111  e__allMandatory = 0,
112  e_generation_no
113  };
115 
116  // getters
117  // setters
118 
119  /// Check if a value has been assigned to Generation_no data member.
120  ///
121  /// Data member Generation_no is mandatory;
122  /// its type is defined as 'typedef int TGeneration_no'
123  /// @return
124  /// - true, if a value has been assigned.
125  /// - false, otherwise.
126  bool IsSetGeneration_no(void) const;
127 
128  /// Check if it is safe to call GetGeneration_no method.
129  ///
130  /// @return
131  /// - true, if the data member is getatable.
132  /// - false, otherwise.
133  bool CanGetGeneration_no(void) const;
134 
135  /// Reset Generation_no data member.
136  void ResetGeneration_no(void);
137 
138  /// Get the Generation_no member data.
139  ///
140  /// @return
141  /// Copy of the member data.
142  TGeneration_no GetGeneration_no(void) const;
143 
144  /// Assign a value to Generation_no data member.
145  ///
146  /// @param value
147  /// Value to assign
148  void SetGeneration_no(TGeneration_no value);
149 
150  /// Assign a value to Generation_no data member.
151  ///
152  /// @return
153  /// Reference to the data value.
154  TGeneration_no& SetGeneration_no(void);
155 
156  /// Reset the whole object
157  void Reset(void);
158 
159 
160  private:
161  // Prohibit copy constructor and assignment operator
164 
165  // data
166  Uint4 m_set_State[1];
168  };
169  // types
171  typedef list< CRef< CData_filter > > TData_filter;
172 
173  // member index
174  enum class E_memberIndex {
175  e__allMandatory = 0,
176  e_Attlist,
177  e_data_filter
178  };
180 
181  // getters
182  // setters
183 
184  /// Check if a value has been assigned to Attlist data member.
185  ///
186  /// Data member Attlist is mandatory;
187  /// its type is defined as 'typedef C_Attlist TAttlist'
188  /// @return
189  /// - true, if a value has been assigned.
190  /// - false, otherwise.
191  bool IsSetAttlist(void) const;
192 
193  /// Check if it is safe to call GetAttlist method.
194  ///
195  /// @return
196  /// - true, if the data member is getatable.
197  /// - false, otherwise.
198  bool CanGetAttlist(void) const;
199 
200  /// Reset Attlist data member.
201  void ResetAttlist(void);
202 
203  /// Get the Attlist member data.
204  ///
205  /// @return
206  /// Reference to the member data.
207  const TAttlist& GetAttlist(void) const;
208 
209  /// Assign a value to Attlist data member.
210  ///
211  /// @param value
212  /// Reference to value.
213  void SetAttlist(TAttlist& value);
214 
215  /// Assign a value to Attlist data member.
216  ///
217  /// @return
218  /// Reference to the data value.
219  TAttlist& SetAttlist(void);
220 
221  /// Check if a value has been assigned to Data_filter data member.
222  ///
223  /// Data member Data_filter is optional;
224  /// its type is defined as 'typedef list< CRef< CData_filter > > TData_filter'
225  /// @return
226  /// - true, if a value has been assigned.
227  /// - false, otherwise.
228  bool IsSetData_filter(void) const;
229 
230  /// Check if it is safe to call GetData_filter method.
231  ///
232  /// @return
233  /// - true, if the data member is getatable.
234  /// - false, otherwise.
235  bool CanGetData_filter(void) const;
236 
237  /// Reset Data_filter data member.
238  void ResetData_filter(void);
239 
240  /// Get the Data_filter member data.
241  ///
242  /// @return
243  /// Reference to the member data.
244  const TData_filter& GetData_filter(void) const;
245 
246  /// Assign a value to Data_filter data member.
247  ///
248  /// @return
249  /// Reference to the data value.
250  TData_filter& SetData_filter(void);
251 
252  /// Reset the whole object
253  virtual void Reset(void);
254 
255 
256 private:
257  // Prohibit copy constructor and assignment operator
260 
261  // data
262  Uint4 m_set_State[1];
264  list< CRef< CData_filter > > m_Data_filter;
265 };
266 
267 /* @} */
268 
269 
270 
271 
272 
273 ///////////////////////////////////////////////////////////
274 ///////////////////// inline methods //////////////////////
275 ///////////////////////////////////////////////////////////
276 inline
278 {
279  return ((m_set_State[0] & 0x3) != 0);
280 }
281 
282 inline
284 {
285  return IsSetGeneration_no();
286 }
287 
288 inline
290 {
291  m_Generation_no = 0;
292  m_set_State[0] &= ~0x3;
293 }
294 
295 inline
297 {
298  if (!CanGetGeneration_no()) {
299  ThrowUnassigned(0);
300  }
301  return m_Generation_no;
302 }
303 
304 inline
306 {
307  m_Generation_no = value;
308  m_set_State[0] |= 0x3;
309 }
310 
311 inline
313 {
314 #ifdef _DEBUG
315  if (!IsSetGeneration_no()) {
316  memset(&m_Generation_no,UnassignedByte(),sizeof(m_Generation_no));
317  }
318 #endif
319  m_set_State[0] |= 0x1;
320  return m_Generation_no;
321 }
322 
323 inline
325 {
326  return m_Attlist.NotEmpty();
327 }
328 
329 inline
331 {
332  return true;
333 }
334 
335 inline
337 {
338  if ( !m_Attlist ) {
339  const_cast<CDataset_derivation_Base*>(this)->ResetAttlist();
340  }
341  return (*m_Attlist);
342 }
343 
344 inline
346 {
347  if ( !m_Attlist ) {
348  ResetAttlist();
349  }
350  return (*m_Attlist);
351 }
352 
353 inline
355 {
356  return ((m_set_State[0] & 0xc) != 0);
357 }
358 
359 inline
361 {
362  return true;
363 }
364 
365 inline
367 {
368  return m_Data_filter;
369 }
370 
371 inline
373 {
374  m_set_State[0] |= 0x4;
375  return m_Data_filter;
376 }
377 
378 ///////////////////////////////////////////////////////////
379 ////////////////// end of inline methods //////////////////
380 ///////////////////////////////////////////////////////////
381 
382 
383 
384 
385 
386 END_objects_SCOPE // namespace ncbi::objects::
387 
389 
390 
391 #endif // ALGO_MS_FORMATS_PEPXML_DATASET_DERIVATION_BASE_HPP
CData_filter –.
Definition: Data_filter.hpp:66
Source and filtering criteria used to generate dataset.
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
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
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
bool CanGetData_filter(void) const
Check if it is safe to call GetData_filter method.
bool IsSetData_filter(void) const
Check if a value has been assigned to Data_filter data member.
TGeneration_no & SetGeneration_no(void)
Assign a value to Generation_no data member.
TData_filter & SetData_filter(void)
Assign a value to Data_filter data member.
C_Attlist & operator=(const C_Attlist &)
list< CRef< CData_filter > > TData_filter
list< CRef< CData_filter > > m_Data_filter
TGeneration_no GetGeneration_no(void) const
Get the Generation_no member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
CDataset_derivation_Base(const CDataset_derivation_Base &)
const TData_filter & GetData_filter(void) const
Get the Data_filter member data.
void ResetGeneration_no(void)
Reset Generation_no data member.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
bool CanGetGeneration_no(void) const
Check if it is safe to call GetGeneration_no method.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
void ResetAttlist(void)
Reset Attlist data member.
bool IsSetGeneration_no(void) const
Check if a value has been assigned to Generation_no data member.
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
CDataset_derivation_Base & operator=(const CDataset_derivation_Base &)
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
Modified on Fri Jan 05 07:22:11 2024 by modify_doxy.py rev. 669887