NCBI C++ ToolKit
Interact_summary_.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 Interact_summary_.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_INTERACT_SUMMARY_BASE_HPP
42 #define ALGO_MS_FORMATS_PEPXML_INTERACT_SUMMARY_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 CInputfile;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_pepXML
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///Combined datasets
74 ///
75 /// CInteract_summary_Base --
76 ///
77 
79 {
81 public:
82  // constructor
84  // destructor
85  virtual ~CInteract_summary_Base(void);
86 
87  // type info
89 
90  /////////////////////////////////////////////////////////////////////////////
91  ///
92  /// C_Attlist --
93  ///
94 
96  {
98  public:
99  // constructor
100  C_Attlist(void);
101  // destructor
102  ~C_Attlist(void);
103 
104  // type info
106 
107  // types
108  typedef string TFilename;
109  typedef string TDirectory;
110 
111  // member index
112  enum class E_memberIndex {
113  e__allMandatory = 0,
114  e_filename,
115  e_directory
116  };
118 
119  // getters
120  // setters
121 
122  /// Check if a value has been assigned to Filename data member.
123  ///
124  /// Data member Filename is mandatory;
125  /// its type is defined as 'typedef string TFilename'
126  /// @return
127  /// - true, if a value has been assigned.
128  /// - false, otherwise.
129  bool IsSetFilename(void) const;
130 
131  /// Check if it is safe to call GetFilename method.
132  ///
133  /// @return
134  /// - true, if the data member is getatable.
135  /// - false, otherwise.
136  bool CanGetFilename(void) const;
137 
138  /// Reset Filename data member.
139  void ResetFilename(void);
140 
141  /// Get the Filename member data.
142  ///
143  /// @return
144  /// Reference to the member data.
145  const TFilename& GetFilename(void) const;
146 
147  /// Assign a value to Filename data member.
148  ///
149  /// @param value
150  /// Value to assign
151  void SetFilename(const TFilename& value);
152  void SetFilename(TFilename&& value);
153 
154  /// Assign a value to Filename data member.
155  ///
156  /// @return
157  /// Reference to the data value.
158  TFilename& SetFilename(void);
159 
160  /// Check if a value has been assigned to Directory data member.
161  ///
162  /// Data member Directory is mandatory;
163  /// its type is defined as 'typedef string TDirectory'
164  /// @return
165  /// - true, if a value has been assigned.
166  /// - false, otherwise.
167  bool IsSetDirectory(void) const;
168 
169  /// Check if it is safe to call GetDirectory method.
170  ///
171  /// @return
172  /// - true, if the data member is getatable.
173  /// - false, otherwise.
174  bool CanGetDirectory(void) const;
175 
176  /// Reset Directory data member.
177  void ResetDirectory(void);
178 
179  /// Get the Directory member data.
180  ///
181  /// @return
182  /// Reference to the member data.
183  const TDirectory& GetDirectory(void) const;
184 
185  /// Assign a value to Directory data member.
186  ///
187  /// @param value
188  /// Value to assign
189  void SetDirectory(const TDirectory& value);
190  void SetDirectory(TDirectory&& value);
191 
192  /// Assign a value to Directory data member.
193  ///
194  /// @return
195  /// Reference to the data value.
196  TDirectory& SetDirectory(void);
197 
198  /// Reset the whole object
199  void Reset(void);
200 
201 
202  private:
203  // Prohibit copy constructor and assignment operator
206 
207  // data
208  Uint4 m_set_State[1];
209  string m_Filename;
210  string m_Directory;
211  };
212  // types
214  typedef list< CRef< CInputfile > > TInputfile;
215 
216  // member index
217  enum class E_memberIndex {
218  e__allMandatory = 0,
219  e_Attlist,
220  e_inputfile
221  };
223 
224  // getters
225  // setters
226 
227  /// Check if a value has been assigned to Attlist data member.
228  ///
229  /// Data member Attlist is mandatory;
230  /// its type is defined as 'typedef C_Attlist TAttlist'
231  /// @return
232  /// - true, if a value has been assigned.
233  /// - false, otherwise.
234  bool IsSetAttlist(void) const;
235 
236  /// Check if it is safe to call GetAttlist method.
237  ///
238  /// @return
239  /// - true, if the data member is getatable.
240  /// - false, otherwise.
241  bool CanGetAttlist(void) const;
242 
243  /// Reset Attlist data member.
244  void ResetAttlist(void);
245 
246  /// Get the Attlist member data.
247  ///
248  /// @return
249  /// Reference to the member data.
250  const TAttlist& GetAttlist(void) const;
251 
252  /// Assign a value to Attlist data member.
253  ///
254  /// @param value
255  /// Reference to value.
256  void SetAttlist(TAttlist& value);
257 
258  /// Assign a value to Attlist data member.
259  ///
260  /// @return
261  /// Reference to the data value.
262  TAttlist& SetAttlist(void);
263 
264  /// Check if a value has been assigned to Inputfile data member.
265  ///
266  /// Data member Inputfile is mandatory;
267  /// its type is defined as 'typedef list< CRef< CInputfile > > TInputfile'
268  /// @return
269  /// - true, if a value has been assigned.
270  /// - false, otherwise.
271  bool IsSetInputfile(void) const;
272 
273  /// Check if it is safe to call GetInputfile method.
274  ///
275  /// @return
276  /// - true, if the data member is getatable.
277  /// - false, otherwise.
278  bool CanGetInputfile(void) const;
279 
280  /// Reset Inputfile data member.
281  void ResetInputfile(void);
282 
283  /// Get the Inputfile member data.
284  ///
285  /// @return
286  /// Reference to the member data.
287  const TInputfile& GetInputfile(void) const;
288 
289  /// Assign a value to Inputfile data member.
290  ///
291  /// @return
292  /// Reference to the data value.
293  TInputfile& SetInputfile(void);
294 
295  /// Reset the whole object
296  virtual void Reset(void);
297 
298 
299 private:
300  // Prohibit copy constructor and assignment operator
303 
304  // data
305  Uint4 m_set_State[1];
307  list< CRef< CInputfile > > m_Inputfile;
308 };
309 
310 /* @} */
311 
312 
313 
314 
315 
316 ///////////////////////////////////////////////////////////
317 ///////////////////// inline methods //////////////////////
318 ///////////////////////////////////////////////////////////
319 inline
321 {
322  return ((m_set_State[0] & 0x3) != 0);
323 }
324 
325 inline
327 {
328  return IsSetFilename();
329 }
330 
331 inline
333 {
334  if (!CanGetFilename()) {
335  ThrowUnassigned(0);
336  }
337  return m_Filename;
338 }
339 
340 inline
342 {
343  m_Filename = value;
344  m_set_State[0] |= 0x3;
345 }
346 
347 inline
349 {
350  m_Filename = std::forward<CInteract_summary_Base::C_Attlist::TFilename>(value);
351  m_set_State[0] |= 0x3;
352 }
353 
354 inline
356 {
357 #ifdef _DEBUG
358  if (!IsSetFilename()) {
359  m_Filename = UnassignedString();
360  }
361 #endif
362  m_set_State[0] |= 0x1;
363  return m_Filename;
364 }
365 
366 inline
368 {
369  return ((m_set_State[0] & 0xc) != 0);
370 }
371 
372 inline
374 {
375  return IsSetDirectory();
376 }
377 
378 inline
380 {
381  if (!CanGetDirectory()) {
382  ThrowUnassigned(1);
383  }
384  return m_Directory;
385 }
386 
387 inline
389 {
390  m_Directory = value;
391  m_set_State[0] |= 0xc;
392 }
393 
394 inline
396 {
397  m_Directory = std::forward<CInteract_summary_Base::C_Attlist::TDirectory>(value);
398  m_set_State[0] |= 0xc;
399 }
400 
401 inline
403 {
404 #ifdef _DEBUG
405  if (!IsSetDirectory()) {
406  m_Directory = UnassignedString();
407  }
408 #endif
409  m_set_State[0] |= 0x4;
410  return m_Directory;
411 }
412 
413 inline
415 {
416  return m_Attlist.NotEmpty();
417 }
418 
419 inline
421 {
422  return true;
423 }
424 
425 inline
427 {
428  if ( !m_Attlist ) {
429  const_cast<CInteract_summary_Base*>(this)->ResetAttlist();
430  }
431  return (*m_Attlist);
432 }
433 
434 inline
436 {
437  if ( !m_Attlist ) {
438  ResetAttlist();
439  }
440  return (*m_Attlist);
441 }
442 
443 inline
445 {
446  return ((m_set_State[0] & 0xc) != 0);
447 }
448 
449 inline
451 {
452  return true;
453 }
454 
455 inline
457 {
458  return m_Inputfile;
459 }
460 
461 inline
463 {
464  m_set_State[0] |= 0x4;
465  return m_Inputfile;
466 }
467 
468 ///////////////////////////////////////////////////////////
469 ////////////////// end of inline methods //////////////////
470 ///////////////////////////////////////////////////////////
471 
472 
473 
474 
475 
476 END_objects_SCOPE // namespace ncbi::objects::
477 
479 
480 
481 #endif // ALGO_MS_FORMATS_PEPXML_INTERACT_SUMMARY_BASE_HPP
CInputfile –.
Definition: Inputfile.hpp:66
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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
bool CanGetDirectory(void) const
Check if it is safe to call GetDirectory method.
C_Attlist & operator=(const C_Attlist &)
bool IsSetFilename(void) const
Check if a value has been assigned to Filename data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetInputfile(void) const
Check if a value has been assigned to Inputfile data member.
list< CRef< CInputfile > > m_Inputfile
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
bool CanGetFilename(void) const
Check if it is safe to call GetFilename method.
void ResetAttlist(void)
Reset Attlist data member.
TDirectory & SetDirectory(void)
Assign a value to Directory data member.
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
TFilename & SetFilename(void)
Assign a value to Filename data member.
const TFilename & GetFilename(void) const
Get the Filename member data.
bool IsSetDirectory(void) const
Check if a value has been assigned to Directory data member.
CInteract_summary_Base(const CInteract_summary_Base &)
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool CanGetInputfile(void) const
Check if it is safe to call GetInputfile method.
const TInputfile & GetInputfile(void) const
Get the Inputfile member data.
TInputfile & SetInputfile(void)
Assign a value to Inputfile data member.
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
const TDirectory & GetDirectory(void) const
Get the Directory member data.
list< CRef< CInputfile > > TInputfile
CInteract_summary_Base & operator=(const CInteract_summary_Base &)
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:43 2024 by modify_doxy.py rev. 669887