NCBI C++ ToolKit
FileConfiguration_.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 FileConfiguration_.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/build-system/project_tree_builder/msvc71_project.dtd">msvc71_project.dtd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/build-system/project_tree_builder/msvc71_project.def">msvc71_project.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 BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILECONFIGURATION_BASE_HPP
42 #define BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILECONFIGURATION_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 CTool;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_msvc71_project
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///
73 /// CFileConfiguration_Base --
74 ///
75 
77 {
79 public:
80  // constructor
82  // destructor
83  virtual ~CFileConfiguration_Base(void);
84 
85  // type info
87 
88  /////////////////////////////////////////////////////////////////////////////
89  ///
90  /// C_Attlist --
91  ///
92 
93  class C_Attlist : public CSerialObject
94  {
96  public:
97  // constructor
98  C_Attlist(void);
99  // destructor
100  ~C_Attlist(void);
101 
102  // type info
104 
105  // types
106  typedef string TName;
107  typedef string TExcludedFromBuild;
108 
109  // member index
110  enum class E_memberIndex {
111  e__allMandatory = 0,
112  e_Name,
114  };
116 
117  // getters
118  // setters
119 
120  /// Check if a value has been assigned to Name data member.
121  ///
122  /// Data member Name is mandatory;
123  /// its type is defined as 'typedef string TName'
124  /// @return
125  /// - true, if a value has been assigned.
126  /// - false, otherwise.
127  bool IsSetName(void) const;
128 
129  /// Check if it is safe to call GetName method.
130  ///
131  /// @return
132  /// - true, if the data member is getatable.
133  /// - false, otherwise.
134  bool CanGetName(void) const;
135 
136  /// Reset Name data member.
137  void ResetName(void);
138 
139  /// Get the Name member data.
140  ///
141  /// @return
142  /// Reference to the member data.
143  const TName& GetName(void) const;
144 
145  /// Assign a value to Name data member.
146  ///
147  /// @param value
148  /// Value to assign
149  void SetName(const TName& value);
150  void SetName(TName&& value);
151 
152  /// Assign a value to Name data member.
153  ///
154  /// @return
155  /// Reference to the data value.
156  TName& SetName(void);
157 
158  /// Check if a value has been assigned to ExcludedFromBuild data member.
159  ///
160  /// Data member ExcludedFromBuild is optional;
161  /// its type is defined as 'typedef string TExcludedFromBuild'
162  /// @return
163  /// - true, if a value has been assigned.
164  /// - false, otherwise.
165  bool IsSetExcludedFromBuild(void) const;
166 
167  /// Check if it is safe to call GetExcludedFromBuild method.
168  ///
169  /// @return
170  /// - true, if the data member is getatable.
171  /// - false, otherwise.
172  bool CanGetExcludedFromBuild(void) const;
173 
174  /// Reset ExcludedFromBuild data member.
175  void ResetExcludedFromBuild(void);
176 
177  /// Get the ExcludedFromBuild member data.
178  ///
179  /// @return
180  /// Reference to the member data.
181  const TExcludedFromBuild& GetExcludedFromBuild(void) const;
182 
183  /// Assign a value to ExcludedFromBuild data member.
184  ///
185  /// @param value
186  /// Value to assign
189 
190  /// Assign a value to ExcludedFromBuild data member.
191  ///
192  /// @return
193  /// Reference to the data value.
195 
196  /// Reset the whole object
197  void Reset(void);
198 
199 
200  private:
201  // Prohibit copy constructor and assignment operator
204 
205  // data
207  string m_Name;
209  };
210  // types
212  typedef CTool TTool;
213 
214  // member index
215  enum class E_memberIndex {
216  e__allMandatory = 0,
217  e_Attlist,
218  e_Tool
219  };
221 
222  // getters
223  // setters
224 
225  /// Check if a value has been assigned to Attlist data member.
226  ///
227  /// Data member Attlist is mandatory;
228  /// its type is defined as 'typedef C_Attlist TAttlist'
229  /// @return
230  /// - true, if a value has been assigned.
231  /// - false, otherwise.
232  bool IsSetAttlist(void) const;
233 
234  /// Check if it is safe to call GetAttlist method.
235  ///
236  /// @return
237  /// - true, if the data member is getatable.
238  /// - false, otherwise.
239  bool CanGetAttlist(void) const;
240 
241  /// Reset Attlist data member.
242  void ResetAttlist(void);
243 
244  /// Get the Attlist member data.
245  ///
246  /// @return
247  /// Reference to the member data.
248  const TAttlist& GetAttlist(void) const;
249 
250  /// Assign a value to Attlist data member.
251  ///
252  /// @param value
253  /// Reference to value.
254  void SetAttlist(TAttlist& value);
255 
256  /// Assign a value to Attlist data member.
257  ///
258  /// @return
259  /// Reference to the data value.
260  TAttlist& SetAttlist(void);
261 
262  /// Check if a value has been assigned to Tool data member.
263  ///
264  /// Data member Tool is optional;
265  /// its type is defined as 'typedef CTool TTool'
266  /// @return
267  /// - true, if a value has been assigned.
268  /// - false, otherwise.
269  bool IsSetTool(void) const;
270 
271  /// Check if value of Tool member is getatable.
272  ///
273  /// @return
274  /// - false; the data member of type 'NULL' has no value.
275  bool CanGetTool(void) const;
276 
277  /// Reset Tool data member.
278  void ResetTool(void);
279 
280  /// Get the Tool member data.
281  ///
282  /// @return
283  /// Reference to the member data.
284  const TTool& GetTool(void) const;
285 
286  /// Assign a value to Tool data member.
287  ///
288  /// @param value
289  /// Reference to value.
290  void SetTool(TTool& value);
291 
292  /// Assign a value to Tool data member.
293  ///
294  /// @return
295  /// Reference to the data value.
296  TTool& SetTool(void);
297 
298  /// Reset the whole object
299  virtual void Reset(void);
300 
301 
302 private:
303  // Prohibit copy constructor and assignment operator
306 
307  // data
311 };
312 
313 /* @} */
314 
315 
316 
317 
318 
319 ///////////////////////////////////////////////////////////
320 ///////////////////// inline methods //////////////////////
321 ///////////////////////////////////////////////////////////
322 inline
324 {
325  return ((m_set_State[0] & 0x3) != 0);
326 }
327 
328 inline
330 {
331  return IsSetName();
332 }
333 
334 inline
336 {
337  if (!CanGetName()) {
338  ThrowUnassigned(0);
339  }
340  return m_Name;
341 }
342 
343 inline
345 {
346  m_Name = value;
347  m_set_State[0] |= 0x3;
348 }
349 
350 inline
352 {
353  m_Name = std::forward<CFileConfiguration_Base::C_Attlist::TName>(value);
354  m_set_State[0] |= 0x3;
355 }
356 
357 inline
359 {
360 #ifdef _DEBUG
361  if (!IsSetName()) {
362  m_Name = UnassignedString();
363  }
364 #endif
365  m_set_State[0] |= 0x1;
366  return m_Name;
367 }
368 
369 inline
371 {
372  return ((m_set_State[0] & 0xc) != 0);
373 }
374 
375 inline
377 {
378  return IsSetExcludedFromBuild();
379 }
380 
381 inline
383 {
384  if (!CanGetExcludedFromBuild()) {
385  ThrowUnassigned(1);
386  }
387  return m_ExcludedFromBuild;
388 }
389 
390 inline
392 {
393  m_ExcludedFromBuild = value;
394  m_set_State[0] |= 0xc;
395 }
396 
397 inline
399 {
400  m_ExcludedFromBuild = std::forward<CFileConfiguration_Base::C_Attlist::TExcludedFromBuild>(value);
401  m_set_State[0] |= 0xc;
402 }
403 
404 inline
406 {
407 #ifdef _DEBUG
408  if (!IsSetExcludedFromBuild()) {
409  m_ExcludedFromBuild = UnassignedString();
410  }
411 #endif
412  m_set_State[0] |= 0x4;
413  return m_ExcludedFromBuild;
414 }
415 
416 inline
418 {
419  return m_Attlist.NotEmpty();
420 }
421 
422 inline
424 {
425  return true;
426 }
427 
428 inline
430 {
431  if ( !m_Attlist ) {
432  const_cast<CFileConfiguration_Base*>(this)->ResetAttlist();
433  }
434  return (*m_Attlist);
435 }
436 
437 inline
439 {
440  if ( !m_Attlist ) {
441  ResetAttlist();
442  }
443  return (*m_Attlist);
444 }
445 
446 inline
448 {
449  return false;
450 }
451 
452 inline
454 {
455  return (*m_Tool);
456 }
457 
458 ///////////////////////////////////////////////////////////
459 ////////////////// end of inline methods //////////////////
460 ///////////////////////////////////////////////////////////
461 
462 
463 
464 
465 
466 END_objects_SCOPE // namespace ncbi::objects::
467 
469 
470 
471 #endif // BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILECONFIGURATION_BASE_HPP
CFileConfiguration_Base –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTool –.
Definition: Tool.hpp:66
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
CFileConfiguration_Base & operator=(const CFileConfiguration_Base &)
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
void ResetExcludedFromBuild(void)
Reset ExcludedFromBuild data member.
TExcludedFromBuild & SetExcludedFromBuild(void)
Assign a value to ExcludedFromBuild data member.
bool CanGetExcludedFromBuild(void) const
Check if it is safe to call GetExcludedFromBuild method.
void ResetTool(void)
Reset Tool data member.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
C_Attlist & operator=(const C_Attlist &)
const TName & GetName(void) const
Get the Name member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
bool CanGetName(void) const
Check if it is safe to call GetName method.
virtual ~CFileConfiguration_Base(void)
const TExcludedFromBuild & GetExcludedFromBuild(void) const
Get the ExcludedFromBuild member data.
virtual void Reset(void)
Reset the whole object.
bool IsSetExcludedFromBuild(void) const
Check if a value has been assigned to ExcludedFromBuild data member.
bool CanGetTool(void) const
Check if value of Tool member is getatable.
TName & SetName(void)
Assign a value to Name data member.
TTool & SetTool(void)
Assign a value to Tool data member.
CFileConfiguration_Base(const CFileConfiguration_Base &)
void Reset(void)
Reset the whole object.
void ResetName(void)
Reset Name data member.
bool IsSetTool(void) const
Check if a value has been assigned to Tool data member.
void ResetAttlist(void)
Reset Attlist data member.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
const TTool & GetTool(void) const
Get the Tool member data.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Jul 13 13:35:06 2024 by modify_doxy.py rev. 669887