NCBI C++ ToolKit
ID2_Reply_Get_Package_.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 ID2_Reply_Get_Package_.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/id2/id2.asn">id2.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/id2/id2.def">id2.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_ID2_ID2_REPLY_GET_PACKAGE_BASE_HPP
42 #define OBJECTS_ID2_ID2_REPLY_GET_PACKAGE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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 CID2_Params;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_ID2Access
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 /// Reply to ID2-Request-Get-Packages.
73 ///
74 /// CID2_Reply_Get_Package_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CID2_Reply_Get_Package_Base(void);
85 
86  // type info
88 
89  // types
90  typedef string TName;
92 
93  // member index
94  enum class E_memberIndex {
95  e__allMandatory = 0,
96  e_name,
97  e_params
98  };
100 
101  // getters
102  // setters
103 
104  /// Check if a value has been assigned to Name data member.
105  ///
106  /// Data member Name is mandatory;
107  /// its type is defined as 'typedef string TName'
108  /// @return
109  /// - true, if a value has been assigned.
110  /// - false, otherwise.
111  bool IsSetName(void) const;
112 
113  /// Check if it is safe to call GetName method.
114  ///
115  /// @return
116  /// - true, if the data member is getatable.
117  /// - false, otherwise.
118  bool CanGetName(void) const;
119 
120  /// Reset Name data member.
121  void ResetName(void);
122 
123  /// Get the Name member data.
124  ///
125  /// @return
126  /// Reference to the member data.
127  const TName& GetName(void) const;
128 
129  /// Assign a value to Name data member.
130  ///
131  /// @param value
132  /// Value to assign
133  void SetName(const TName& value);
134  void SetName(TName&& value);
135 
136  /// Assign a value to Name data member.
137  ///
138  /// @return
139  /// Reference to the data value.
140  TName& SetName(void);
141 
142  /// Check if a value has been assigned to Params data member.
143  ///
144  /// Data member Params is optional;
145  /// its type is defined as 'typedef CID2_Params TParams'
146  /// @return
147  /// - true, if a value has been assigned.
148  /// - false, otherwise.
149  bool IsSetParams(void) const;
150 
151  /// Check if it is safe to call GetParams method.
152  ///
153  /// @return
154  /// - true, if the data member is getatable.
155  /// - false, otherwise.
156  bool CanGetParams(void) const;
157 
158  /// Reset Params data member.
159  void ResetParams(void);
160 
161  /// Get the Params member data.
162  ///
163  /// @return
164  /// Reference to the member data.
165  const TParams& GetParams(void) const;
166 
167  /// Assign a value to Params data member.
168  ///
169  /// @param value
170  /// Reference to value.
171  void SetParams(TParams& value);
172 
173  /// Assign a value to Params data member.
174  ///
175  /// @return
176  /// Reference to the data value.
177  TParams& SetParams(void);
178 
179  /// Reset the whole object
180  virtual void Reset(void);
181 
182 
183 private:
184  // Prohibit copy constructor and assignment operator
187 
188  // data
189  Uint4 m_set_State[1];
190  string m_Name;
192 };
193 
194 /* @} */
195 
196 
197 
198 
199 
200 ///////////////////////////////////////////////////////////
201 ///////////////////// inline methods //////////////////////
202 ///////////////////////////////////////////////////////////
203 inline
205 {
206  return ((m_set_State[0] & 0x3) != 0);
207 }
208 
209 inline
211 {
212  return IsSetName();
213 }
214 
215 inline
217 {
218  if (!CanGetName()) {
219  ThrowUnassigned(0);
220  }
221  return m_Name;
222 }
223 
224 inline
226 {
227  m_Name = value;
228  m_set_State[0] |= 0x3;
229 }
230 
231 inline
233 {
234  m_Name = std::forward<CID2_Reply_Get_Package_Base::TName>(value);
235  m_set_State[0] |= 0x3;
236 }
237 
238 inline
240 {
241 #ifdef _DEBUG
242  if (!IsSetName()) {
244  }
245 #endif
246  m_set_State[0] |= 0x1;
247  return m_Name;
248 }
249 
250 inline
252 {
253  return m_Params.NotEmpty();
254 }
255 
256 inline
258 {
259  return IsSetParams();
260 }
261 
262 inline
264 {
265  if (!CanGetParams()) {
266  ThrowUnassigned(1);
267  }
268  return (*m_Params);
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_ID2_ID2_REPLY_GET_PACKAGE_BASE_HPP
CID2_Params –.
Definition: ID2_Params.hpp:66
Reply to ID2-Request-Get-Packages.
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
virtual void SetParams()
Called at the beginning of Run, before creating thread pool.
#define NCBI_ID2_EXPORT
Definition: ncbi_export.h:552
CID2_Reply_Get_Package_Base(const CID2_Reply_Get_Package_Base &)
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
CID2_Reply_Get_Package_Base & operator=(const CID2_Reply_Get_Package_Base &)
bool CanGetParams(void) const
Check if it is safe to call GetParams method.
const TParams & GetParams(void) const
Get the Params member data.
const TName & GetName(void) const
Get the Name member data.
TName & SetName(void)
Assign a value to Name data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetParams(void) const
Check if a value has been assigned to Params data member.
bool CanGetName(void) const
Check if it is safe to call GetName method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
static CRef< CUser_object > GetParams()
Modified on Wed Jun 19 17:02:04 2024 by modify_doxy.py rev. 669887