NCBI C++ ToolKit
GuiPkgManifest_.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 GuiPkgManifest_.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/framework/gui_framework.dtd">gui_framework.dtd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/gui/framework/gui_framework.def">gui_framework.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_FRAMEWORK_GUIPKGMANIFEST_BASE_HPP
42 #define GUI_FRAMEWORK_GUIPKGMANIFEST_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <string>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // forward declarations
61 class CGuiPkgDependency;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_gui_framework
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CGuiPkgManifest_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CGuiPkgManifest_Base(void);
85 
86  // type info
88 
89  // types
90  typedef string TName;
91  typedef string TDescription;
92  typedef string TVersion;
93  typedef string TMainDll;
94  typedef list< CRef< CGuiPkgDependency > > TGuiPkgDependency;
95 
96  // member index
97  enum class E_memberIndex {
98  e__allMandatory = 0,
99  e_Name,
101  e_Version,
102  e_MainDll,
104  };
106 
107  // getters
108  // setters
109 
110  /// .+
111  /// Check if a value has been assigned to Name data member.
112  ///
113  /// Data member Name is mandatory;
114  /// its type is defined as 'typedef string TName'
115  /// @return
116  /// - true, if a value has been assigned.
117  /// - false, otherwise.
118  bool IsSetName(void) const;
119 
120  /// Check if it is safe to call GetName method.
121  ///
122  /// @return
123  /// - true, if the data member is getatable.
124  /// - false, otherwise.
125  bool CanGetName(void) const;
126 
127  /// Reset Name data member.
128  void ResetName(void);
129 
130  /// Get the Name member data.
131  ///
132  /// @return
133  /// Reference to the member data.
134  const TName& GetName(void) const;
135 
136  /// Assign a value to Name data member.
137  ///
138  /// @param value
139  /// Value to assign
140  void SetName(const TName& value);
141  void SetName(TName&& value);
142 
143  /// Assign a value to Name data member.
144  ///
145  /// @return
146  /// Reference to the data value.
147  TName& SetName(void);
148 
149  /// .+
150  /// Check if a value has been assigned to Description data member.
151  ///
152  /// Data member Description is mandatory;
153  /// its type is defined as 'typedef string TDescription'
154  /// @return
155  /// - true, if a value has been assigned.
156  /// - false, otherwise.
157  bool IsSetDescription(void) const;
158 
159  /// Check if it is safe to call GetDescription method.
160  ///
161  /// @return
162  /// - true, if the data member is getatable.
163  /// - false, otherwise.
164  bool CanGetDescription(void) const;
165 
166  /// Reset Description data member.
167  void ResetDescription(void);
168 
169  /// Get the Description member data.
170  ///
171  /// @return
172  /// Reference to the member data.
173  const TDescription& GetDescription(void) const;
174 
175  /// Assign a value to Description data member.
176  ///
177  /// @param value
178  /// Value to assign
179  void SetDescription(const TDescription& value);
181 
182  /// Assign a value to Description data member.
183  ///
184  /// @return
185  /// Reference to the data value.
187 
188  /// \d\d\.\d\d\.\d\d\d\d
189  /// Check if a value has been assigned to Version data member.
190  ///
191  /// Data member Version is mandatory;
192  /// its type is defined as 'typedef string TVersion'
193  /// @return
194  /// - true, if a value has been assigned.
195  /// - false, otherwise.
196  bool IsSetVersion(void) const;
197 
198  /// Check if it is safe to call GetVersion method.
199  ///
200  /// @return
201  /// - true, if the data member is getatable.
202  /// - false, otherwise.
203  bool CanGetVersion(void) const;
204 
205  /// Reset Version data member.
206  void ResetVersion(void);
207 
208  /// Get the Version member data.
209  ///
210  /// @return
211  /// Reference to the member data.
212  const TVersion& GetVersion(void) const;
213 
214  /// Assign a value to Version data member.
215  ///
216  /// @param value
217  /// Value to assign
218  void SetVersion(const TVersion& value);
219  void SetVersion(TVersion&& value);
220 
221  /// Assign a value to Version data member.
222  ///
223  /// @return
224  /// Reference to the data value.
225  TVersion& SetVersion(void);
226 
227  /// .+
228  /// Check if a value has been assigned to MainDll data member.
229  ///
230  /// Data member MainDll is mandatory;
231  /// its type is defined as 'typedef string TMainDll'
232  /// @return
233  /// - true, if a value has been assigned.
234  /// - false, otherwise.
235  bool IsSetMainDll(void) const;
236 
237  /// Check if it is safe to call GetMainDll method.
238  ///
239  /// @return
240  /// - true, if the data member is getatable.
241  /// - false, otherwise.
242  bool CanGetMainDll(void) const;
243 
244  /// Reset MainDll data member.
245  void ResetMainDll(void);
246 
247  /// Get the MainDll member data.
248  ///
249  /// @return
250  /// Reference to the member data.
251  const TMainDll& GetMainDll(void) const;
252 
253  /// Assign a value to MainDll data member.
254  ///
255  /// @param value
256  /// Value to assign
257  void SetMainDll(const TMainDll& value);
258  void SetMainDll(TMainDll&& value);
259 
260  /// Assign a value to MainDll data member.
261  ///
262  /// @return
263  /// Reference to the data value.
264  TMainDll& SetMainDll(void);
265 
266  /// Check if a value has been assigned to GuiPkgDependency data member.
267  ///
268  /// Data member GuiPkgDependency is optional;
269  /// its type is defined as 'typedef list< CRef< CGuiPkgDependency > > TGuiPkgDependency'
270  /// @return
271  /// - true, if a value has been assigned.
272  /// - false, otherwise.
273  bool IsSetGuiPkgDependency(void) const;
274 
275  /// Check if it is safe to call GetGuiPkgDependency method.
276  ///
277  /// @return
278  /// - true, if the data member is getatable.
279  /// - false, otherwise.
280  bool CanGetGuiPkgDependency(void) const;
281 
282  /// Reset GuiPkgDependency data member.
283  void ResetGuiPkgDependency(void);
284 
285  /// Get the GuiPkgDependency member data.
286  ///
287  /// @return
288  /// Reference to the member data.
289  const TGuiPkgDependency& GetGuiPkgDependency(void) const;
290 
291  /// Assign a value to GuiPkgDependency data member.
292  ///
293  /// @return
294  /// Reference to the data value.
296 
297  /// Reset the whole object
298  virtual void Reset(void);
299 
300 
301 private:
302  // Prohibit copy constructor and assignment operator
305 
306  // data
308  string m_Name;
310  string m_Version;
311  string m_MainDll;
312  list< CRef< CGuiPkgDependency > > m_GuiPkgDependency;
313 };
314 
315 /* @} */
316 
317 
318 
319 
320 
321 ///////////////////////////////////////////////////////////
322 ///////////////////// inline methods //////////////////////
323 ///////////////////////////////////////////////////////////
324 inline
326 {
327  return ((m_set_State[0] & 0x3) != 0);
328 }
329 
330 inline
332 {
333  return IsSetName();
334 }
335 
336 inline
338 {
339  if (!CanGetName()) {
340  ThrowUnassigned(0);
341  }
342  return m_Name;
343 }
344 
345 inline
347 {
348  m_Name = value;
349  m_set_State[0] |= 0x3;
350 }
351 
352 inline
354 {
355  m_Name = std::forward<CGuiPkgManifest_Base::TName>(value);
356  m_set_State[0] |= 0x3;
357 }
358 
359 inline
361 {
362 #ifdef _DEBUG
363  if (!IsSetName()) {
365  }
366 #endif
367  m_set_State[0] |= 0x1;
368  return m_Name;
369 }
370 
371 inline
373 {
374  return ((m_set_State[0] & 0xc) != 0);
375 }
376 
377 inline
379 {
380  return IsSetDescription();
381 }
382 
383 inline
385 {
386  if (!CanGetDescription()) {
387  ThrowUnassigned(1);
388  }
389  return m_Description;
390 }
391 
392 inline
394 {
396  m_set_State[0] |= 0xc;
397 }
398 
399 inline
401 {
402  m_Description = std::forward<CGuiPkgManifest_Base::TDescription>(value);
403  m_set_State[0] |= 0xc;
404 }
405 
406 inline
408 {
409 #ifdef _DEBUG
410  if (!IsSetDescription()) {
412  }
413 #endif
414  m_set_State[0] |= 0x4;
415  return m_Description;
416 }
417 
418 inline
420 {
421  return ((m_set_State[0] & 0x30) != 0);
422 }
423 
424 inline
426 {
427  return IsSetVersion();
428 }
429 
430 inline
432 {
433  if (!CanGetVersion()) {
434  ThrowUnassigned(2);
435  }
436  return m_Version;
437 }
438 
439 inline
441 {
442  m_Version = value;
443  m_set_State[0] |= 0x30;
444 }
445 
446 inline
448 {
449  m_Version = std::forward<CGuiPkgManifest_Base::TVersion>(value);
450  m_set_State[0] |= 0x30;
451 }
452 
453 inline
455 {
456 #ifdef _DEBUG
457  if (!IsSetVersion()) {
459  }
460 #endif
461  m_set_State[0] |= 0x10;
462  return m_Version;
463 }
464 
465 inline
467 {
468  return ((m_set_State[0] & 0xc0) != 0);
469 }
470 
471 inline
473 {
474  return IsSetMainDll();
475 }
476 
477 inline
479 {
480  if (!CanGetMainDll()) {
481  ThrowUnassigned(3);
482  }
483  return m_MainDll;
484 }
485 
486 inline
488 {
489  m_MainDll = value;
490  m_set_State[0] |= 0xc0;
491 }
492 
493 inline
495 {
496  m_MainDll = std::forward<CGuiPkgManifest_Base::TMainDll>(value);
497  m_set_State[0] |= 0xc0;
498 }
499 
500 inline
502 {
503 #ifdef _DEBUG
504  if (!IsSetMainDll()) {
506  }
507 #endif
508  m_set_State[0] |= 0x40;
509  return m_MainDll;
510 }
511 
512 inline
514 {
515  return ((m_set_State[0] & 0x300) != 0);
516 }
517 
518 inline
520 {
521  return true;
522 }
523 
524 inline
526 {
527  return m_GuiPkgDependency;
528 }
529 
530 inline
532 {
533  m_set_State[0] |= 0x100;
534  return m_GuiPkgDependency;
535 }
536 
537 ///////////////////////////////////////////////////////////
538 ////////////////// end of inline methods //////////////////
539 ///////////////////////////////////////////////////////////
540 
541 
542 
543 
544 
545 END_objects_SCOPE // namespace ncbi::objects::
546 
548 
549 
550 #endif // GUI_FRAMEWORK_GUIPKGMANIFEST_BASE_HPP
CGuiPkgManifest_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
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
const TGuiPkgDependency & GetGuiPkgDependency(void) const
Get the GuiPkgDependency member data.
bool CanGetVersion(void) const
Check if it is safe to call GetVersion method.
TName & SetName(void)
Assign a value to Name data member.
bool CanGetDescription(void) const
Check if it is safe to call GetDescription method.
bool CanGetGuiPkgDependency(void) const
Check if it is safe to call GetGuiPkgDependency method.
void ResetDescription(void)
Reset Description data member.
virtual void Reset(void)
Reset the whole object.
const TName & GetName(void) const
Get the Name member data.
void ResetVersion(void)
Reset Version data member.
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
bool CanGetMainDll(void) const
Check if it is safe to call GetMainDll method.
list< CRef< CGuiPkgDependency > > m_GuiPkgDependency
void ResetGuiPkgDependency(void)
Reset GuiPkgDependency data member.
bool CanGetName(void) const
Check if it is safe to call GetName method.
void ResetMainDll(void)
Reset MainDll data member.
bool IsSetVersion(void) const
\d\d.
CGuiPkgManifest_Base(const CGuiPkgManifest_Base &)
const TVersion & GetVersion(void) const
Get the Version member data.
bool IsSetGuiPkgDependency(void) const
Check if a value has been assigned to GuiPkgDependency data member.
bool IsSetMainDll(void) const
bool IsSetDescription(void) const
TMainDll & SetMainDll(void)
Assign a value to MainDll data member.
void ResetName(void)
Reset Name data member.
TDescription & SetDescription(void)
Assign a value to Description data member.
CGuiPkgManifest_Base & operator=(const CGuiPkgManifest_Base &)
const TDescription & GetDescription(void) const
Get the Description member data.
bool IsSetName(void) const
const TMainDll & GetMainDll(void) const
Get the MainDll member data.
list< CRef< CGuiPkgDependency > > TGuiPkgDependency
TGuiPkgDependency & SetGuiPkgDependency(void)
Assign a value to GuiPkgDependency data member.
virtual ~CGuiPkgManifest_Base(void)
TVersion & SetVersion(void)
Assign a value to Version data member.
Modified on Thu Nov 30 04:52:17 2023 by modify_doxy.py rev. 669887