NCBI C++ ToolKit
TMgr_SeqTrackIdReply_.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_SeqTrackIdReply_.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_SEQTRACKIDREPLY_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_SEQTRACKIDREPLY_BASE_HPP
43 
44 // extra headers
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
49 
50 // generated includes
51 #include <list>
53 
55 
56 #ifndef BEGIN_objects_SCOPE
57 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
58 # define END_objects_SCOPE END_SCOPE(objects)
59 #endif
60 BEGIN_objects_SCOPE // namespace ncbi::objects::
61 
62 
63 // forward declarations
64 class CTMgr_DTrackId;
65 class CTMgr_Message;
66 
67 
68 // generated classes
69 
70 
71 /** @addtogroup dataspec_NCBI_TrackManager
72  *
73  * @{
74  */
75 
76 /////////////////////////////////////////////////////////////////////////////
77 ///
78 /// CTMgr_SeqTrackIdReply_Base --
79 ///
80 
82 {
84 public:
85  // constructor
87  // destructor
88  virtual ~CTMgr_SeqTrackIdReply_Base(void);
89 
90  // type info
92 
93  // types
94  typedef int TStatus;
95  typedef list< CRef< CTMgr_Message > > TMessages;
97 
98  // member index
99  enum class E_memberIndex {
100  e__allMandatory = 0,
101  e_status,
102  e_messages,
103  e_dtrack_id
104  };
106 
107  // getters
108  // setters
109 
110  /// Check if a value has been assigned to Status data member.
111  ///
112  /// Data member Status is mandatory;
113  /// its type is defined as 'typedef int TStatus'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetStatus(void) const;
118 
119  /// Check if it is safe to call GetStatus method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetStatus(void) const;
125 
126  /// Reset Status data member.
127  void ResetStatus(void);
128 
129  /// Get the Status member data.
130  ///
131  /// @return
132  /// Copy of the member data.
133  TStatus GetStatus(void) const;
134 
135  /// Assign a value to Status data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetStatus(TStatus value);
140 
141  /// Assign a value to Status data member.
142  ///
143  /// @return
144  /// Reference to the data value.
145  TStatus& SetStatus(void);
146 
147  /// Check if a value has been assigned to Messages data member.
148  ///
149  /// Data member Messages is optional;
150  /// its type is defined as 'typedef list< CRef< CTMgr_Message > > TMessages'
151  /// @return
152  /// - true, if a value has been assigned.
153  /// - false, otherwise.
154  bool IsSetMessages(void) const;
155 
156  /// Check if it is safe to call GetMessages method.
157  ///
158  /// @return
159  /// - true, if the data member is getatable.
160  /// - false, otherwise.
161  bool CanGetMessages(void) const;
162 
163  /// Reset Messages data member.
164  void ResetMessages(void);
165 
166  /// Get the Messages member data.
167  ///
168  /// @return
169  /// Reference to the member data.
170  const TMessages& GetMessages(void) const;
171 
172  /// Assign a value to Messages data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TMessages& SetMessages(void);
177 
178  /// Check if a value has been assigned to Dtrack_id data member.
179  ///
180  /// Data member Dtrack_id is optional;
181  /// its type is defined as 'typedef CTMgr_DTrackId TDtrack_id'
182  /// @return
183  /// - true, if a value has been assigned.
184  /// - false, otherwise.
185  bool IsSetDtrack_id(void) const;
186 
187  /// Check if it is safe to call GetDtrack_id method.
188  ///
189  /// @return
190  /// - true, if the data member is getatable.
191  /// - false, otherwise.
192  bool CanGetDtrack_id(void) const;
193 
194  /// Reset Dtrack_id data member.
195  void ResetDtrack_id(void);
196 
197  /// Get the Dtrack_id member data.
198  ///
199  /// @return
200  /// Reference to the member data.
201  const TDtrack_id& GetDtrack_id(void) const;
202 
203  /// Assign a value to Dtrack_id data member.
204  ///
205  /// @param value
206  /// Reference to value.
207  void SetDtrack_id(TDtrack_id& value);
208 
209  /// Assign a value to Dtrack_id data member.
210  ///
211  /// @return
212  /// Reference to the data value.
213  TDtrack_id& SetDtrack_id(void);
214 
215  /// Reset the whole object
216  virtual void Reset(void);
217 
218 
219 private:
220  // Prohibit copy constructor and assignment operator
223 
224  // data
225  Uint4 m_set_State[1];
226  int m_Status;
227  list< CRef< CTMgr_Message > > m_Messages;
229 };
230 
231 /* @} */
232 
233 
234 
235 
236 
237 ///////////////////////////////////////////////////////////
238 ///////////////////// inline methods //////////////////////
239 ///////////////////////////////////////////////////////////
240 inline
242 {
243  return ((m_set_State[0] & 0x3) != 0);
244 }
245 
246 inline
248 {
249  return IsSetStatus();
250 }
251 
252 inline
254 {
255  m_Status = (int)(0);
256  m_set_State[0] &= ~0x3;
257 }
258 
259 inline
261 {
262  if (!CanGetStatus()) {
263  ThrowUnassigned(0);
264  }
265  return m_Status;
266 }
267 
268 inline
270 {
271  m_Status = value;
272  m_set_State[0] |= 0x3;
273 }
274 
275 inline
277 {
278 #ifdef _DEBUG
279  if (!IsSetStatus()) {
280  memset(&m_Status,UnassignedByte(),sizeof(m_Status));
281  }
282 #endif
283  m_set_State[0] |= 0x1;
284  return m_Status;
285 }
286 
287 inline
289 {
290  return ((m_set_State[0] & 0xc) != 0);
291 }
292 
293 inline
295 {
296  return true;
297 }
298 
299 inline
301 {
302  return m_Messages;
303 }
304 
305 inline
307 {
308  m_set_State[0] |= 0x4;
309  return m_Messages;
310 }
311 
312 inline
314 {
315  return m_Dtrack_id.NotEmpty();
316 }
317 
318 inline
320 {
321  return IsSetDtrack_id();
322 }
323 
324 inline
326 {
327  if (!CanGetDtrack_id()) {
328  ThrowUnassigned(2);
329  }
330  return (*m_Dtrack_id);
331 }
332 
333 ///////////////////////////////////////////////////////////
334 ////////////////// end of inline methods //////////////////
335 ///////////////////////////////////////////////////////////
336 
337 
338 
339 
340 
341 END_objects_SCOPE // namespace ncbi::objects::
342 
344 
345 
346 #endif // OBJECTS_TRACKMGR_TMGR_SEQTRACKIDREPLY_BASE_HPP
User-defined methods of the data storage class.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTMgr_SeqTrackIdReply_Base –.
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
list< CRef< CTMgr_Message > > m_Messages
TStatus & SetStatus(void)
Assign a value to Status data member.
bool IsSetMessages(void) const
Check if a value has been assigned to Messages data member.
bool IsSetStatus(void) const
Check if a value has been assigned to Status data member.
bool CanGetStatus(void) const
Check if it is safe to call GetStatus method.
const TDtrack_id & GetDtrack_id(void) const
Get the Dtrack_id member data.
bool CanGetDtrack_id(void) const
Check if it is safe to call GetDtrack_id method.
TMessages & SetMessages(void)
Assign a value to Messages data member.
bool CanGetMessages(void) const
Check if it is safe to call GetMessages method.
void ResetStatus(void)
Reset Status data member.
list< CRef< CTMgr_Message > > TMessages
CTMgr_SeqTrackIdReply_Base & operator=(const CTMgr_SeqTrackIdReply_Base &)
TStatus GetStatus(void) const
Get the Status member data.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
const TMessages & GetMessages(void) const
Get the Messages member data.
CTMgr_SeqTrackIdReply_Base(const CTMgr_SeqTrackIdReply_Base &)
bool IsSetDtrack_id(void) const
Check if a value has been assigned to Dtrack_id data member.
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
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 Fri Sep 20 14:57:52 2024 by modify_doxy.py rev. 669887