NCBI C++ ToolKit
GBenchInitReply_.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 GBenchInitReply_.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/gui/objects/gui_objects.asn">gui_objects.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/gui/objects/gui_objects.def">gui_objects.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 GUI_OBJECTS_GBENCHINITREPLY_BASE_HPP
42 #define GUI_OBJECTS_GBENCHINITREPLY_BASE_HPP
43 
44 // extra headers
45 #include <gui/gui_export.h>
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 CGBenchVersionInfo;
64 class CPluginInfo;
65 class CUser_object;
66 
67 
68 // generated classes
69 
70 
71 /** @addtogroup dataspec_NCBI_GBenchService
72  *
73  * @{
74  */
75 
76 /////////////////////////////////////////////////////////////////////////////
77 ///
78 /// We reply to 'init' with the current version so the client can make a
79 /// decision about whether to request an update
80 /// We also send some configuration information, including:
81 ///
82 /// - a description of publically-available services
83 /// - a set of optional config libraries we can use to customize and upgrade
84 /// the configuration
85 ///
86 ///
87 /// CGBenchInitReply_Base --
88 ///
89 
91 {
93 public:
94  // constructor
96  // destructor
97  virtual ~CGBenchInitReply_Base(void);
98 
99  // type info
101 
102  // types
104  typedef list< CRef< CPluginInfo > > TPublic_services;
105  typedef list< CRef< CUser_object > > TExtra_configs;
106 
107  // member index
108  enum class E_memberIndex {
109  e__allMandatory = 0,
110  e_current_version,
111  e_public_services,
112  e_extra_configs
113  };
115 
116  // getters
117  // setters
118 
119  /// Check if a value has been assigned to Current_version data member.
120  ///
121  /// Data member Current_version is mandatory;
122  /// its type is defined as 'typedef CGBenchVersionInfo TCurrent_version'
123  /// @return
124  /// - true, if a value has been assigned.
125  /// - false, otherwise.
126  bool IsSetCurrent_version(void) const;
127 
128  /// Check if it is safe to call GetCurrent_version method.
129  ///
130  /// @return
131  /// - true, if the data member is getatable.
132  /// - false, otherwise.
133  bool CanGetCurrent_version(void) const;
134 
135  /// Reset Current_version data member.
136  void ResetCurrent_version(void);
137 
138  /// Get the Current_version member data.
139  ///
140  /// @return
141  /// Reference to the member data.
142  const TCurrent_version& GetCurrent_version(void) const;
143 
144  /// Assign a value to Current_version data member.
145  ///
146  /// @param value
147  /// Reference to value.
148  void SetCurrent_version(TCurrent_version& value);
149 
150  /// Assign a value to Current_version data member.
151  ///
152  /// @return
153  /// Reference to the data value.
154  TCurrent_version& SetCurrent_version(void);
155 
156  /// Check if a value has been assigned to Public_services data member.
157  ///
158  /// Data member Public_services is optional;
159  /// its type is defined as 'typedef list< CRef< CPluginInfo > > TPublic_services'
160  /// @return
161  /// - true, if a value has been assigned.
162  /// - false, otherwise.
163  bool IsSetPublic_services(void) const;
164 
165  /// Check if it is safe to call GetPublic_services method.
166  ///
167  /// @return
168  /// - true, if the data member is getatable.
169  /// - false, otherwise.
170  bool CanGetPublic_services(void) const;
171 
172  /// Reset Public_services data member.
173  void ResetPublic_services(void);
174 
175  /// Get the Public_services member data.
176  ///
177  /// @return
178  /// Reference to the member data.
179  const TPublic_services& GetPublic_services(void) const;
180 
181  /// Assign a value to Public_services data member.
182  ///
183  /// @return
184  /// Reference to the data value.
185  TPublic_services& SetPublic_services(void);
186 
187  /// Check if a value has been assigned to Extra_configs data member.
188  ///
189  /// Data member Extra_configs is optional;
190  /// its type is defined as 'typedef list< CRef< CUser_object > > TExtra_configs'
191  /// @return
192  /// - true, if a value has been assigned.
193  /// - false, otherwise.
194  bool IsSetExtra_configs(void) const;
195 
196  /// Check if it is safe to call GetExtra_configs method.
197  ///
198  /// @return
199  /// - true, if the data member is getatable.
200  /// - false, otherwise.
201  bool CanGetExtra_configs(void) const;
202 
203  /// Reset Extra_configs data member.
204  void ResetExtra_configs(void);
205 
206  /// Get the Extra_configs member data.
207  ///
208  /// @return
209  /// Reference to the member data.
210  const TExtra_configs& GetExtra_configs(void) const;
211 
212  /// Assign a value to Extra_configs data member.
213  ///
214  /// @return
215  /// Reference to the data value.
216  TExtra_configs& SetExtra_configs(void);
217 
218  /// Reset the whole object
219  virtual void Reset(void);
220 
221 
222 private:
223  // Prohibit copy constructor and assignment operator
226 
227  // data
228  Uint4 m_set_State[1];
230  list< CRef< CPluginInfo > > m_Public_services;
231  list< CRef< CUser_object > > m_Extra_configs;
232 };
233 
234 /* @} */
235 
236 
237 
238 
239 
240 ///////////////////////////////////////////////////////////
241 ///////////////////// inline methods //////////////////////
242 ///////////////////////////////////////////////////////////
243 inline
245 {
246  return m_Current_version.NotEmpty();
247 }
248 
249 inline
251 {
252  return true;
253 }
254 
255 inline
257 {
258  if ( !m_Current_version ) {
259  const_cast<CGBenchInitReply_Base*>(this)->ResetCurrent_version();
260  }
261  return (*m_Current_version);
262 }
263 
264 inline
266 {
267  if ( !m_Current_version ) {
269  }
270  return (*m_Current_version);
271 }
272 
273 inline
275 {
276  return ((m_set_State[0] & 0xc) != 0);
277 }
278 
279 inline
281 {
282  return true;
283 }
284 
285 inline
287 {
288  return m_Public_services;
289 }
290 
291 inline
293 {
294  m_set_State[0] |= 0x4;
295  return m_Public_services;
296 }
297 
298 inline
300 {
301  return ((m_set_State[0] & 0x30) != 0);
302 }
303 
304 inline
306 {
307  return true;
308 }
309 
310 inline
312 {
313  return m_Extra_configs;
314 }
315 
316 inline
318 {
319  m_set_State[0] |= 0x10;
320  return m_Extra_configs;
321 }
322 
323 ///////////////////////////////////////////////////////////
324 ////////////////// end of inline methods //////////////////
325 ///////////////////////////////////////////////////////////
326 
327 
328 
329 
330 
331 END_objects_SCOPE // namespace ncbi::objects::
332 
334 
335 
336 #endif // GUI_OBJECTS_GBENCHINITREPLY_BASE_HPP
We reply to 'init' with the current version so the client can make a decision about whether to reques...
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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_GUIOBJECTS_EXPORT
Definition: gui_export.h:511
CGBenchInitReply_Base(const CGBenchInitReply_Base &)
CRef< TCurrent_version > m_Current_version
list< CRef< CUser_object > > TExtra_configs
list< CRef< CPluginInfo > > TPublic_services
list< CRef< CUser_object > > m_Extra_configs
CGBenchInitReply_Base & operator=(const CGBenchInitReply_Base &)
TPublic_services & SetPublic_services(void)
Assign a value to Public_services data member.
const TCurrent_version & GetCurrent_version(void) const
Get the Current_version member data.
const TExtra_configs & GetExtra_configs(void) const
Get the Extra_configs member data.
bool CanGetExtra_configs(void) const
Check if it is safe to call GetExtra_configs method.
bool CanGetPublic_services(void) const
Check if it is safe to call GetPublic_services method.
TCurrent_version & SetCurrent_version(void)
Assign a value to Current_version data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
void ResetCurrent_version(void)
Reset Current_version data member.
CGBenchVersionInfo TCurrent_version
bool IsSetExtra_configs(void) const
Check if a value has been assigned to Extra_configs data member.
bool IsSetCurrent_version(void) const
Check if a value has been assigned to Current_version data member.
list< CRef< CPluginInfo > > m_Public_services
TExtra_configs & SetExtra_configs(void)
Assign a value to Extra_configs data member.
bool CanGetCurrent_version(void) const
Check if it is safe to call GetCurrent_version method.
const TPublic_services & GetPublic_services(void) const
Get the Public_services member data.
bool IsSetPublic_services(void) const
Check if a value has been assigned to Public_services data member.
Defines to provide correct exporting from DLLs in Windows.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Thu Jul 18 16:07:44 2024 by modify_doxy.py rev. 669887