NCBI C++ ToolKit
TMgr_RetrieveTracksetReply_.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 TMgr_RetrieveTracksetReply_.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/trackmgr/trackmgr.asn">trackmgr.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/trackmgr/trackmgr.def">trackmgr.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_TRACKMGR_TMGR_RETRIEVETRACKSETREPLY_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_RETRIEVETRACKSETREPLY_BASE_HPP
43 
44 // extra headers
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
49 
50 // generated includes
51 #include <list>
52 
54 
55 #ifndef BEGIN_objects_SCOPE
56 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
57 # define END_objects_SCOPE END_SCOPE(objects)
58 #endif
59 BEGIN_objects_SCOPE // namespace ncbi::objects::
60 
61 
62 // forward declarations
63 class CTMgr_Message;
64 class CTMgr_TrackSet;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_TrackManager
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 ///
77 /// CTMgr_RetrieveTracksetReply_Base --
78 ///
79 
81 {
83 public:
84  // constructor
86  // destructor
87  virtual ~CTMgr_RetrieveTracksetReply_Base(void);
88 
89  // type info
91 
92  /////////////////////////////////////////////////////////////////////////////
93  ///
94  /// C_Flags --
95  ///
96 
98  {
100  public:
101  // constructor
102  C_Flags(void);
103  // destructor
104  ~C_Flags(void);
105 
106  // type info
108 
109  // types
110  typedef bool TInclude_track_items;
111 
112  // member index
113  enum class E_memberIndex {
114  e__allMandatory = 0,
115  e_include_track_items
116  };
118 
119  // getters
120  // setters
121 
122  /// Check if a value has been assigned to Include_track_items data member.
123  ///
124  /// Data member Include_track_items is optional with default false;
125  /// its type is defined as 'typedef bool TInclude_track_items'
126  /// @return
127  /// - true, if a value has been assigned.
128  /// - false, otherwise.
129  bool IsSetInclude_track_items(void) const;
130 
131  /// Check if it is safe to call GetInclude_track_items method.
132  ///
133  /// @return
134  /// - true, if the data member is getatable.
135  /// - false, otherwise.
136  bool CanGetInclude_track_items(void) const;
137 
138  /// Reset Include_track_items data member.
139  void ResetInclude_track_items(void);
140 
141  /// Assign default value to Include_track_items data member.
142  void SetDefaultInclude_track_items(void);
143 
144  /// Get the Include_track_items member data.
145  ///
146  /// @return
147  /// Copy of the member data.
148  TInclude_track_items GetInclude_track_items(void) const;
149 
150  /// Assign a value to Include_track_items data member.
151  ///
152  /// @param value
153  /// Value to assign
154  void SetInclude_track_items(TInclude_track_items value);
155 
156  /// Assign a value to Include_track_items data member.
157  ///
158  /// @return
159  /// Reference to the data value.
160  TInclude_track_items& SetInclude_track_items(void);
161 
162  /// Reset the whole object
163  void Reset(void);
164 
165 
166  private:
167  // Prohibit copy constructor and assignment operator
168  C_Flags(const C_Flags&);
170 
171  // data
172  Uint4 m_set_State[1];
174  };
175  // types
176  typedef list< CRef< CTMgr_Message > > TMessages;
177  typedef list< CRef< CTMgr_TrackSet > > TTracksets;
178  typedef C_Flags TFlags;
179 
180  // member index
181  enum class E_memberIndex {
182  e__allMandatory = 0,
183  e_messages,
184  e_tracksets,
185  e_flags
186  };
188 
189  // getters
190  // setters
191 
192  /// Check if a value has been assigned to Messages data member.
193  ///
194  /// Data member Messages is optional;
195  /// its type is defined as 'typedef list< CRef< CTMgr_Message > > TMessages'
196  /// @return
197  /// - true, if a value has been assigned.
198  /// - false, otherwise.
199  bool IsSetMessages(void) const;
200 
201  /// Check if it is safe to call GetMessages method.
202  ///
203  /// @return
204  /// - true, if the data member is getatable.
205  /// - false, otherwise.
206  bool CanGetMessages(void) const;
207 
208  /// Reset Messages data member.
209  void ResetMessages(void);
210 
211  /// Get the Messages member data.
212  ///
213  /// @return
214  /// Reference to the member data.
215  const TMessages& GetMessages(void) const;
216 
217  /// Assign a value to Messages data member.
218  ///
219  /// @return
220  /// Reference to the data value.
221  TMessages& SetMessages(void);
222 
223  /// Check if a value has been assigned to Tracksets data member.
224  ///
225  /// Data member Tracksets is optional;
226  /// its type is defined as 'typedef list< CRef< CTMgr_TrackSet > > TTracksets'
227  /// @return
228  /// - true, if a value has been assigned.
229  /// - false, otherwise.
230  bool IsSetTracksets(void) const;
231 
232  /// Check if it is safe to call GetTracksets method.
233  ///
234  /// @return
235  /// - true, if the data member is getatable.
236  /// - false, otherwise.
237  bool CanGetTracksets(void) const;
238 
239  /// Reset Tracksets data member.
240  void ResetTracksets(void);
241 
242  /// Get the Tracksets member data.
243  ///
244  /// @return
245  /// Reference to the member data.
246  const TTracksets& GetTracksets(void) const;
247 
248  /// Assign a value to Tracksets data member.
249  ///
250  /// @return
251  /// Reference to the data value.
252  TTracksets& SetTracksets(void);
253 
254  /// Check if a value has been assigned to Flags data member.
255  ///
256  /// Data member Flags is optional;
257  /// its type is defined as 'typedef C_Flags TFlags'
258  /// @return
259  /// - true, if a value has been assigned.
260  /// - false, otherwise.
261  bool IsSetFlags(void) const;
262 
263  /// Check if it is safe to call GetFlags method.
264  ///
265  /// @return
266  /// - true, if the data member is getatable.
267  /// - false, otherwise.
268  bool CanGetFlags(void) const;
269 
270  /// Reset Flags data member.
271  void ResetFlags(void);
272 
273  /// Get the Flags member data.
274  ///
275  /// @return
276  /// Reference to the member data.
277  const TFlags& GetFlags(void) const;
278 
279  /// Assign a value to Flags data member.
280  ///
281  /// @param value
282  /// Reference to value.
283  void SetFlags(TFlags& value);
284 
285  /// Assign a value to Flags data member.
286  ///
287  /// @return
288  /// Reference to the data value.
289  TFlags& SetFlags(void);
290 
291  /// Reset the whole object
292  virtual void Reset(void);
293 
294 
295 private:
296  // Prohibit copy constructor and assignment operator
299 
300  // data
301  Uint4 m_set_State[1];
302  list< CRef< CTMgr_Message > > m_Messages;
303  list< CRef< CTMgr_TrackSet > > m_Tracksets;
305 };
306 
307 /* @} */
308 
309 
310 
311 
312 
313 ///////////////////////////////////////////////////////////
314 ///////////////////// inline methods //////////////////////
315 ///////////////////////////////////////////////////////////
316 inline
318 {
319  return ((m_set_State[0] & 0x3) != 0);
320 }
321 
322 inline
324 {
325  return true;
326 }
327 
328 inline
330 {
331  m_Include_track_items = false;
332  m_set_State[0] &= ~0x3;
333 }
334 
335 inline
337 {
338  ResetInclude_track_items();
339 }
340 
341 inline
343 {
344  return m_Include_track_items;
345 }
346 
347 inline
349 {
350  m_Include_track_items = value;
351  m_set_State[0] |= 0x3;
352 }
353 
354 inline
356 {
357 #ifdef _DEBUG
358  if (!IsSetInclude_track_items()) {
359  memset(&m_Include_track_items,UnassignedByte(),sizeof(m_Include_track_items));
360  }
361 #endif
362  m_set_State[0] |= 0x1;
363  return m_Include_track_items;
364 }
365 
366 inline
368 {
369  return ((m_set_State[0] & 0x3) != 0);
370 }
371 
372 inline
374 {
375  return true;
376 }
377 
378 inline
380 {
381  return m_Messages;
382 }
383 
384 inline
386 {
387  m_set_State[0] |= 0x1;
388  return m_Messages;
389 }
390 
391 inline
393 {
394  return ((m_set_State[0] & 0xc) != 0);
395 }
396 
397 inline
399 {
400  return true;
401 }
402 
403 inline
405 {
406  return m_Tracksets;
407 }
408 
409 inline
411 {
412  m_set_State[0] |= 0x4;
413  return m_Tracksets;
414 }
415 
416 inline
418 {
419  return m_Flags.NotEmpty();
420 }
421 
422 inline
424 {
425  return IsSetFlags();
426 }
427 
428 inline
430 {
431  if (!CanGetFlags()) {
432  ThrowUnassigned(2);
433  }
434  return (*m_Flags);
435 }
436 
437 ///////////////////////////////////////////////////////////
438 ////////////////// end of inline methods //////////////////
439 ///////////////////////////////////////////////////////////
440 
441 
442 
443 
444 
445 END_objects_SCOPE // namespace ncbi::objects::
446 
448 
449 
450 #endif // OBJECTS_TRACKMGR_TMGR_RETRIEVETRACKSETREPLY_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTMgr_RetrieveTracksetReply_Base –.
CTMgr_TrackSet –.
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
const TTracksets & GetTracksets(void) const
Get the Tracksets member data.
list< CRef< CTMgr_TrackSet > > m_Tracksets
bool IsSetInclude_track_items(void) const
Check if a value has been assigned to Include_track_items data member.
bool CanGetFlags(void) const
Check if it is safe to call GetFlags method.
void SetDefaultInclude_track_items(void)
Assign default value to Include_track_items data member.
list< CRef< CTMgr_TrackSet > > TTracksets
CTMgr_RetrieveTracksetReply_Base(const CTMgr_RetrieveTracksetReply_Base &)
bool IsSetMessages(void) const
Check if a value has been assigned to Messages data member.
bool CanGetTracksets(void) const
Check if it is safe to call GetTracksets method.
C_Flags & operator=(const C_Flags &)
const TMessages & GetMessages(void) const
Get the Messages member data.
TInclude_track_items GetInclude_track_items(void) const
Get the Include_track_items member data.
void ResetInclude_track_items(void)
Reset Include_track_items data member.
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
bool CanGetMessages(void) const
Check if it is safe to call GetMessages method.
TInclude_track_items & SetInclude_track_items(void)
Assign a value to Include_track_items data member.
CTMgr_RetrieveTracksetReply_Base & operator=(const CTMgr_RetrieveTracksetReply_Base &)
TTracksets & SetTracksets(void)
Assign a value to Tracksets data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
TMessages & SetMessages(void)
Assign a value to Messages data member.
const TFlags & GetFlags(void) const
Get the Flags member data.
bool IsSetFlags(void) const
Check if a value has been assigned to Flags data member.
bool CanGetInclude_track_items(void) const
Check if it is safe to call GetInclude_track_items method.
bool IsSetTracksets(void) const
Check if a value has been assigned to Tracksets data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Defines to provide correct exporting from DLLs in Windows.
#define NCBI_TRACKMGR_EXPORT
Modified on Thu Jul 18 16:07:07 2024 by modify_doxy.py rev. 669887