NCBI C++ ToolKit
File_.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 File_.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_FILE_BASE_HPP
42 #define BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILE_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 CFileConfiguration;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_msvc71_project
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CFFile_Base --
75 ///
76 
77 class CFFile_Base : public CSerialObject
78 {
80 public:
81  // constructor
82  CFFile_Base(void);
83  // destructor
84  virtual ~CFFile_Base(void);
85 
86  // type info
88 
89  /////////////////////////////////////////////////////////////////////////////
90  ///
91  /// C_Attlist --
92  ///
93 
94  class C_Attlist : public CSerialObject
95  {
97  public:
98  // constructor
99  C_Attlist(void);
100  // destructor
101  ~C_Attlist(void);
102 
103  // type info
105 
106  // types
107  typedef string TRelativePath;
108 
109  // member index
110  enum class E_memberIndex {
111  e__allMandatory = 0,
113  };
115 
116  // getters
117  // setters
118 
119  /// Check if a value has been assigned to RelativePath data member.
120  ///
121  /// Data member RelativePath is mandatory;
122  /// its type is defined as 'typedef string TRelativePath'
123  /// @return
124  /// - true, if a value has been assigned.
125  /// - false, otherwise.
126  bool IsSetRelativePath(void) const;
127 
128  /// Check if it is safe to call GetRelativePath method.
129  ///
130  /// @return
131  /// - true, if the data member is getatable.
132  /// - false, otherwise.
133  bool CanGetRelativePath(void) const;
134 
135  /// Reset RelativePath data member.
136  void ResetRelativePath(void);
137 
138  /// Get the RelativePath member data.
139  ///
140  /// @return
141  /// Reference to the member data.
142  const TRelativePath& GetRelativePath(void) const;
143 
144  /// Assign a value to RelativePath data member.
145  ///
146  /// @param value
147  /// Value to assign
148  void SetRelativePath(const TRelativePath& value);
150 
151  /// Assign a value to RelativePath data member.
152  ///
153  /// @return
154  /// Reference to the data value.
156 
157  /// Reset the whole object
158  void Reset(void);
159 
160 
161  private:
162  // Prohibit copy constructor and assignment operator
165 
166  // data
169  };
170  // types
172  typedef list< CRef< CFileConfiguration > > TFileConfiguration;
173 
174  // member index
175  enum class E_memberIndex {
176  e__allMandatory = 0,
177  e_Attlist,
179  };
181 
182  // getters
183  // setters
184 
185  /// Check if a value has been assigned to Attlist data member.
186  ///
187  /// Data member Attlist is mandatory;
188  /// its type is defined as 'typedef C_Attlist TAttlist'
189  /// @return
190  /// - true, if a value has been assigned.
191  /// - false, otherwise.
192  bool IsSetAttlist(void) const;
193 
194  /// Check if it is safe to call GetAttlist method.
195  ///
196  /// @return
197  /// - true, if the data member is getatable.
198  /// - false, otherwise.
199  bool CanGetAttlist(void) const;
200 
201  /// Reset Attlist data member.
202  void ResetAttlist(void);
203 
204  /// Get the Attlist member data.
205  ///
206  /// @return
207  /// Reference to the member data.
208  const TAttlist& GetAttlist(void) const;
209 
210  /// Assign a value to Attlist data member.
211  ///
212  /// @param value
213  /// Reference to value.
214  void SetAttlist(TAttlist& value);
215 
216  /// Assign a value to Attlist data member.
217  ///
218  /// @return
219  /// Reference to the data value.
220  TAttlist& SetAttlist(void);
221 
222  /// Check if a value has been assigned to FileConfiguration data member.
223  ///
224  /// Data member FileConfiguration is optional;
225  /// its type is defined as 'typedef list< CRef< CFileConfiguration > > TFileConfiguration'
226  /// @return
227  /// - true, if a value has been assigned.
228  /// - false, otherwise.
229  bool IsSetFileConfiguration(void) const;
230 
231  /// Check if it is safe to call GetFileConfiguration method.
232  ///
233  /// @return
234  /// - true, if the data member is getatable.
235  /// - false, otherwise.
236  bool CanGetFileConfiguration(void) const;
237 
238  /// Reset FileConfiguration data member.
239  void ResetFileConfiguration(void);
240 
241  /// Get the FileConfiguration member data.
242  ///
243  /// @return
244  /// Reference to the member data.
245  const TFileConfiguration& GetFileConfiguration(void) const;
246 
247  /// Assign a value to FileConfiguration data member.
248  ///
249  /// @return
250  /// Reference to the data value.
252 
253  /// Reset the whole object
254  virtual void Reset(void);
255 
256 
257 private:
258  // Prohibit copy constructor and assignment operator
261 
262  // data
265  list< CRef< CFileConfiguration > > m_FileConfiguration;
266 };
267 
268 /* @} */
269 
270 
271 
272 
273 
274 ///////////////////////////////////////////////////////////
275 ///////////////////// inline methods //////////////////////
276 ///////////////////////////////////////////////////////////
277 inline
279 {
280  return ((m_set_State[0] & 0x3) != 0);
281 }
282 
283 inline
285 {
286  return IsSetRelativePath();
287 }
288 
289 inline
291 {
292  if (!CanGetRelativePath()) {
293  ThrowUnassigned(0);
294  }
295  return m_RelativePath;
296 }
297 
298 inline
300 {
301  m_RelativePath = value;
302  m_set_State[0] |= 0x3;
303 }
304 
305 inline
307 {
308  m_RelativePath = std::forward<CFFile_Base::C_Attlist::TRelativePath>(value);
309  m_set_State[0] |= 0x3;
310 }
311 
312 inline
314 {
315 #ifdef _DEBUG
316  if (!IsSetRelativePath()) {
317  m_RelativePath = UnassignedString();
318  }
319 #endif
320  m_set_State[0] |= 0x1;
321  return m_RelativePath;
322 }
323 
324 inline
326 {
327  return m_Attlist.NotEmpty();
328 }
329 
330 inline
332 {
333  return true;
334 }
335 
336 inline
338 {
339  if ( !m_Attlist ) {
340  const_cast<CFFile_Base*>(this)->ResetAttlist();
341  }
342  return (*m_Attlist);
343 }
344 
345 inline
347 {
348  if ( !m_Attlist ) {
349  ResetAttlist();
350  }
351  return (*m_Attlist);
352 }
353 
354 inline
356 {
357  return ((m_set_State[0] & 0xc) != 0);
358 }
359 
360 inline
362 {
363  return true;
364 }
365 
366 inline
368 {
369  return m_FileConfiguration;
370 }
371 
372 inline
374 {
375  m_set_State[0] |= 0x4;
376  return m_FileConfiguration;
377 }
378 
379 ///////////////////////////////////////////////////////////
380 ////////////////// end of inline methods //////////////////
381 ///////////////////////////////////////////////////////////
382 
383 
384 
385 
386 
387 END_objects_SCOPE // namespace ncbi::objects::
388 
390 
391 
392 #endif // BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILE_BASE_HPP
C_Attlist –.
Definition: File_.hpp:95
CFFile_Base –.
Definition: File_.hpp:78
CFileConfiguration –.
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
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Definition: File_.hpp:180
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
Definition: File_.hpp:346
virtual void Reset(void)
Reset the whole object.
Definition: File_.cpp:105
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
Definition: File_.hpp:114
void ResetAttlist(void)
Reset Attlist data member.
Definition: File_.cpp:85
list< CRef< CFileConfiguration > > TFileConfiguration
Definition: File_.hpp:172
bool CanGetFileConfiguration(void) const
Check if it is safe to call GetFileConfiguration method.
Definition: File_.hpp:361
void ResetFileConfiguration(void)
Reset FileConfiguration data member.
Definition: File_.cpp:99
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
Definition: File_.hpp:337
Uint4 m_set_State[1]
Definition: File_.hpp:167
C_Attlist TAttlist
Definition: File_.hpp:171
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
Definition: File_.hpp:331
void ResetRelativePath(void)
Reset RelativePath data member.
Definition: File_.cpp:51
C_Attlist & operator=(const C_Attlist &)
TFileConfiguration & SetFileConfiguration(void)
Assign a value to FileConfiguration data member.
Definition: File_.hpp:373
bool IsSetRelativePath(void) const
Check if a value has been assigned to RelativePath data member.
Definition: File_.hpp:278
void Reset(void)
Reset the whole object.
Definition: File_.cpp:57
const TRelativePath & GetRelativePath(void) const
Get the RelativePath member data.
Definition: File_.hpp:290
CSerialObject Tparent
Definition: File_.hpp:79
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetFileConfiguration(void) const
Check if a value has been assigned to FileConfiguration data member.
Definition: File_.hpp:355
virtual ~CFFile_Base(void)
Definition: File_.cpp:132
Uint4 m_set_State[1]
Definition: File_.hpp:263
CFFile_Base(void)
Definition: File_.cpp:123
CRef< TAttlist > m_Attlist
Definition: File_.hpp:264
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
Definition: File_.hpp:325
const TFileConfiguration & GetFileConfiguration(void) const
Get the FileConfiguration member data.
Definition: File_.hpp:367
bool CanGetRelativePath(void) const
Check if it is safe to call GetRelativePath method.
Definition: File_.hpp:284
TRelativePath & SetRelativePath(void)
Assign a value to RelativePath data member.
Definition: File_.hpp:313
C_Attlist(const C_Attlist &)
CFFile_Base(const CFFile_Base &)
CSerialObject Tparent
Definition: File_.hpp:96
CFFile_Base & operator=(const CFFile_Base &)
list< CRef< CFileConfiguration > > m_FileConfiguration
Definition: File_.hpp:265
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:39 2024 by modify_doxy.py rev. 669887