NCBI C++ ToolKit
TMgr_RenameMyNCBICollectio_.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_RenameMyNCBICollectio_.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_RENAMEMYNCBICOLLECTIO_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_RENAMEMYNCBICOLLECTIO_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_Message;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_TrackManager
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 ///
77 /// CTMgr_RenameMyNCBICollectionReply_Base --
78 ///
79 
81 {
83 public:
84  // constructor
86  // destructor
88 
89  // type info
91 
92  // types
93  typedef list< CRef< CTMgr_Message > > TMessages;
94  typedef int TStatus;
95 
96  // member index
97  enum class E_memberIndex {
98  e__allMandatory = 0,
99  e_messages,
100  e_status
101  };
103 
104  // getters
105  // setters
106 
107  /// Check if a value has been assigned to Messages data member.
108  ///
109  /// Data member Messages is optional;
110  /// its type is defined as 'typedef list< CRef< CTMgr_Message > > TMessages'
111  /// @return
112  /// - true, if a value has been assigned.
113  /// - false, otherwise.
114  bool IsSetMessages(void) const;
115 
116  /// Check if it is safe to call GetMessages method.
117  ///
118  /// @return
119  /// - true, if the data member is getatable.
120  /// - false, otherwise.
121  bool CanGetMessages(void) const;
122 
123  /// Reset Messages data member.
124  void ResetMessages(void);
125 
126  /// Get the Messages member data.
127  ///
128  /// @return
129  /// Reference to the member data.
130  const TMessages& GetMessages(void) const;
131 
132  /// Assign a value to Messages data member.
133  ///
134  /// @return
135  /// Reference to the data value.
136  TMessages& SetMessages(void);
137 
138  /// Check if a value has been assigned to Status data member.
139  ///
140  /// Data member Status is mandatory;
141  /// its type is defined as 'typedef int TStatus'
142  /// @return
143  /// - true, if a value has been assigned.
144  /// - false, otherwise.
145  bool IsSetStatus(void) const;
146 
147  /// Check if it is safe to call GetStatus method.
148  ///
149  /// @return
150  /// - true, if the data member is getatable.
151  /// - false, otherwise.
152  bool CanGetStatus(void) const;
153 
154  /// Reset Status data member.
155  void ResetStatus(void);
156 
157  /// Get the Status member data.
158  ///
159  /// @return
160  /// Copy of the member data.
161  TStatus GetStatus(void) const;
162 
163  /// Assign a value to Status data member.
164  ///
165  /// @param value
166  /// Value to assign
167  void SetStatus(TStatus value);
168 
169  /// Assign a value to Status data member.
170  ///
171  /// @return
172  /// Reference to the data value.
173  TStatus& SetStatus(void);
174 
175  /// Reset the whole object
176  virtual void Reset(void);
177 
178 
179 private:
180  // Prohibit copy constructor and assignment operator
183 
184  // data
185  Uint4 m_set_State[1];
186  list< CRef< CTMgr_Message > > m_Messages;
187  int m_Status;
188 };
189 
190 /* @} */
191 
192 
193 
194 
195 
196 ///////////////////////////////////////////////////////////
197 ///////////////////// inline methods //////////////////////
198 ///////////////////////////////////////////////////////////
199 inline
201 {
202  return ((m_set_State[0] & 0x3) != 0);
203 }
204 
205 inline
207 {
208  return true;
209 }
210 
211 inline
213 {
214  return m_Messages;
215 }
216 
217 inline
219 {
220  m_set_State[0] |= 0x1;
221  return m_Messages;
222 }
223 
224 inline
226 {
227  return ((m_set_State[0] & 0xc) != 0);
228 }
229 
230 inline
232 {
233  return IsSetStatus();
234 }
235 
236 inline
238 {
239  m_Status = (int)(0);
240  m_set_State[0] &= ~0xc;
241 }
242 
243 inline
245 {
246  if (!CanGetStatus()) {
247  ThrowUnassigned(1);
248  }
249  return m_Status;
250 }
251 
252 inline
254 {
255  m_Status = value;
256  m_set_State[0] |= 0xc;
257 }
258 
259 inline
261 {
262 #ifdef _DEBUG
263  if (!IsSetStatus()) {
264  memset(&m_Status,UnassignedByte(),sizeof(m_Status));
265  }
266 #endif
267  m_set_State[0] |= 0x4;
268  return m_Status;
269 }
270 
271 ///////////////////////////////////////////////////////////
272 ////////////////// end of inline methods //////////////////
273 ///////////////////////////////////////////////////////////
274 
275 
276 
277 
278 
279 END_objects_SCOPE // namespace ncbi::objects::
280 
282 
283 
284 #endif // OBJECTS_TRACKMGR_TMGR_RENAMEMYNCBICOLLECTIO_BASE_HPP
User-defined methods of the data storage class.
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTMgr_RenameMyNCBICollectionReply_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
const TMessages & GetMessages(void) const
Get the Messages member data.
TStatus & SetStatus(void)
Assign a value to Status data member.
bool CanGetMessages(void) const
Check if it is safe to call GetMessages method.
void ResetStatus(void)
Reset Status data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TMessages & SetMessages(void)
Assign a value to Messages data member.
bool IsSetStatus(void) const
Check if a value has been assigned to Status data member.
CTMgr_RenameMyNCBICollectionReply_Base(const CTMgr_RenameMyNCBICollectionReply_Base &)
bool IsSetMessages(void) const
Check if a value has been assigned to Messages data member.
TStatus GetStatus(void) const
Get the Status member data.
CTMgr_RenameMyNCBICollectionReply_Base & operator=(const CTMgr_RenameMyNCBICollectionReply_Base &)
bool CanGetStatus(void) const
Check if it is safe to call GetStatus method.
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 Wed May 29 18:43:06 2024 by modify_doxy.py rev. 669887