NCBI C++ ToolKit
CategoriesBundle_.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 CategoriesBundle_.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_CATEGORIESBUNDLE_BASE_HPP
42 #define GUI_OBJECTS_CATEGORIESBUNDLE_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 #include <string>
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 CCategory;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_SeqGraphical
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 ///
77 /// CCategoriesBundle_Base --
78 ///
79 
81 {
83 public:
84  // constructor
86  // destructor
87  virtual ~CCategoriesBundle_Base(void);
88 
89  // type info
91 
92  // types
93  typedef string TVersion;
94  typedef list< CRef< CCategory > > TCategories;
95  typedef list< CRef< CCategory > > TSubcategories;
96 
97  // member index
98  enum class E_memberIndex {
99  e__allMandatory = 0,
100  e_version,
101  e_categories,
102  e_subcategories
103  };
105 
106  // getters
107  // setters
108 
109  /// Check if a value has been assigned to Version data member.
110  ///
111  /// Data member Version is optional with default "1.0";
112  /// its type is defined as 'typedef string TVersion'
113  /// @return
114  /// - true, if a value has been assigned.
115  /// - false, otherwise.
116  bool IsSetVersion(void) const;
117 
118  /// Check if it is safe to call GetVersion method.
119  ///
120  /// @return
121  /// - true, if the data member is getatable.
122  /// - false, otherwise.
123  bool CanGetVersion(void) const;
124 
125  /// Reset Version data member.
126  void ResetVersion(void);
127 
128  /// Assign default value to Version data member.
129  void SetDefaultVersion(void);
130 
131  /// Get the Version member data.
132  ///
133  /// @return
134  /// Reference to the member data.
135  const TVersion& GetVersion(void) const;
136 
137  /// Assign a value to Version data member.
138  ///
139  /// @param value
140  /// Value to assign
141  void SetVersion(const TVersion& value);
142  void SetVersion(TVersion&& value);
143 
144  /// Assign a value to Version data member.
145  ///
146  /// @return
147  /// Reference to the data value.
148  TVersion& SetVersion(void);
149 
150  /// Check if a value has been assigned to Categories data member.
151  ///
152  /// Data member Categories is mandatory;
153  /// its type is defined as 'typedef list< CRef< CCategory > > TCategories'
154  /// @return
155  /// - true, if a value has been assigned.
156  /// - false, otherwise.
157  bool IsSetCategories(void) const;
158 
159  /// Check if it is safe to call GetCategories method.
160  ///
161  /// @return
162  /// - true, if the data member is getatable.
163  /// - false, otherwise.
164  bool CanGetCategories(void) const;
165 
166  /// Reset Categories data member.
167  void ResetCategories(void);
168 
169  /// Get the Categories member data.
170  ///
171  /// @return
172  /// Reference to the member data.
173  const TCategories& GetCategories(void) const;
174 
175  /// Assign a value to Categories data member.
176  ///
177  /// @return
178  /// Reference to the data value.
179  TCategories& SetCategories(void);
180 
181  /// Check if a value has been assigned to Subcategories data member.
182  ///
183  /// Data member Subcategories is mandatory;
184  /// its type is defined as 'typedef list< CRef< CCategory > > TSubcategories'
185  /// @return
186  /// - true, if a value has been assigned.
187  /// - false, otherwise.
188  bool IsSetSubcategories(void) const;
189 
190  /// Check if it is safe to call GetSubcategories method.
191  ///
192  /// @return
193  /// - true, if the data member is getatable.
194  /// - false, otherwise.
195  bool CanGetSubcategories(void) const;
196 
197  /// Reset Subcategories data member.
198  void ResetSubcategories(void);
199 
200  /// Get the Subcategories member data.
201  ///
202  /// @return
203  /// Reference to the member data.
204  const TSubcategories& GetSubcategories(void) const;
205 
206  /// Assign a value to Subcategories data member.
207  ///
208  /// @return
209  /// Reference to the data value.
210  TSubcategories& SetSubcategories(void);
211 
212  /// Reset the whole object
213  virtual void Reset(void);
214 
215 
216 private:
217  // Prohibit copy constructor and assignment operator
220 
221  // data
222  Uint4 m_set_State[1];
223  string m_Version;
224  list< CRef< CCategory > > m_Categories;
225  list< CRef< CCategory > > m_Subcategories;
226 };
227 
228 /* @} */
229 
230 
231 
232 
233 
234 ///////////////////////////////////////////////////////////
235 ///////////////////// inline methods //////////////////////
236 ///////////////////////////////////////////////////////////
237 inline
239 {
240  return ((m_set_State[0] & 0x3) != 0);
241 }
242 
243 inline
245 {
246  return true;
247 }
248 
249 inline
251 {
252  m_Version = "1.0";
253  m_set_State[0] &= ~0x3;
254 }
255 
256 inline
258 {
259  ResetVersion();
260 }
261 
262 inline
264 {
265  return m_Version;
266 }
267 
268 inline
270 {
271  m_Version = value;
272  m_set_State[0] |= 0x3;
273 }
274 
275 inline
277 {
278  m_Version = std::forward<CCategoriesBundle_Base::TVersion>(value);
279  m_set_State[0] |= 0x3;
280 }
281 
282 inline
284 {
285 #ifdef _DEBUG
286  if (!IsSetVersion()) {
288  }
289 #endif
290  m_set_State[0] |= 0x1;
291  return m_Version;
292 }
293 
294 inline
296 {
297  return ((m_set_State[0] & 0xc) != 0);
298 }
299 
300 inline
302 {
303  return true;
304 }
305 
306 inline
308 {
309  return m_Categories;
310 }
311 
312 inline
314 {
315  m_set_State[0] |= 0x4;
316  return m_Categories;
317 }
318 
319 inline
321 {
322  return ((m_set_State[0] & 0x30) != 0);
323 }
324 
325 inline
327 {
328  return true;
329 }
330 
331 inline
333 {
334  return m_Subcategories;
335 }
336 
337 inline
339 {
340  m_set_State[0] |= 0x10;
341  return m_Subcategories;
342 }
343 
344 ///////////////////////////////////////////////////////////
345 ////////////////// end of inline methods //////////////////
346 ///////////////////////////////////////////////////////////
347 
348 
349 
350 
351 
352 END_objects_SCOPE // namespace ncbi::objects::
353 
355 
356 
357 #endif // GUI_OBJECTS_CATEGORIESBUNDLE_BASE_HPP
CCategoriesBundle_Base –.
CCategory –.
Definition: Category.hpp:66
Base class for all serializable objects.
Definition: serialbase.hpp:150
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
#define NCBI_GUIOBJECTS_EXPORT
Definition: gui_export.h:511
bool CanGetSubcategories(void) const
Check if it is safe to call GetSubcategories method.
bool CanGetVersion(void) const
Check if it is safe to call GetVersion method.
bool IsSetVersion(void) const
Check if a value has been assigned to Version data member.
list< CRef< CCategory > > m_Subcategories
TCategories & SetCategories(void)
Assign a value to Categories data member.
void ResetVersion(void)
Reset Version data member.
const TVersion & GetVersion(void) const
Get the Version member data.
void SetDefaultVersion(void)
Assign default value to Version data member.
bool CanGetCategories(void) const
Check if it is safe to call GetCategories method.
list< CRef< CCategory > > TCategories
list< CRef< CCategory > > TSubcategories
list< CRef< CCategory > > m_Categories
CCategoriesBundle_Base(const CCategoriesBundle_Base &)
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
CCategoriesBundle_Base & operator=(const CCategoriesBundle_Base &)
bool IsSetSubcategories(void) const
Check if a value has been assigned to Subcategories data member.
bool IsSetCategories(void) const
Check if a value has been assigned to Categories data member.
TVersion & SetVersion(void)
Assign a value to Version data member.
TSubcategories & SetSubcategories(void)
Assign a value to Subcategories data member.
const TCategories & GetCategories(void) const
Get the Categories member data.
const TSubcategories & GetSubcategories(void) const
Get the Subcategories member data.
Defines to provide correct exporting from DLLs in Windows.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon Jun 17 05:09:07 2024 by modify_doxy.py rev. 669887