NCBI C++ ToolKit
ProjectFolder_.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 ProjectFolder_.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/objects/gbproj/gbproj.asn">gbproj.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/gbproj/gbproj.def">gbproj.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 OBJECTS_GBPROJ_PROJECTFOLDER_BASE_HPP
42 #define OBJECTS_GBPROJ_PROJECTFOLDER_BASE_HPP
43 
44 // extra headers
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 CFolderInfo;
64 class CProjectFolder;
65 class CProjectItem;
66 
67 
68 // generated classes
69 
70 
71 /** @addtogroup dataspec_NCBI_GBProject
72  *
73  * @{
74  */
75 
76 /////////////////////////////////////////////////////////////////////////////
77 ///
78 /// CProjectFolder_Base --
79 ///
80 
82 {
84 public:
85  // constructor
86  CProjectFolder_Base(void);
87  // destructor
88  virtual ~CProjectFolder_Base(void);
89 
90  // type info
92 
93  // types
94  typedef CFolderInfo TInfo;
95  typedef list< CRef< CProjectFolder > > TFolders;
96  typedef list< CRef< CProjectItem > > TItems;
97 
98  // member index
99  enum class E_memberIndex {
100  e__allMandatory = 0,
101  e_info,
102  e_folders,
103  e_items
104  };
106 
107  // getters
108  // setters
109 
110  /// Check if a value has been assigned to Info data member.
111  ///
112  /// Data member Info is mandatory;
113  /// its type is defined as 'typedef CFolderInfo TInfo'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetInfo(void) const;
118 
119  /// Check if it is safe to call GetInfo method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetInfo(void) const;
125 
126  /// Reset Info data member.
127  void ResetInfo(void);
128 
129  /// Get the Info member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const TInfo& GetInfo(void) const;
134 
135  /// Assign a value to Info data member.
136  ///
137  /// @param value
138  /// Reference to value.
139  void SetInfo(TInfo& value);
140 
141  /// Assign a value to Info data member.
142  ///
143  /// @return
144  /// Reference to the data value.
145  TInfo& SetInfo(void);
146 
147  /// Check if a value has been assigned to Folders data member.
148  ///
149  /// Data member Folders is optional;
150  /// its type is defined as 'typedef list< CRef< CProjectFolder > > TFolders'
151  /// @return
152  /// - true, if a value has been assigned.
153  /// - false, otherwise.
154  bool IsSetFolders(void) const;
155 
156  /// Check if it is safe to call GetFolders method.
157  ///
158  /// @return
159  /// - true, if the data member is getatable.
160  /// - false, otherwise.
161  bool CanGetFolders(void) const;
162 
163  /// Reset Folders data member.
164  void ResetFolders(void);
165 
166  /// Get the Folders member data.
167  ///
168  /// @return
169  /// Reference to the member data.
170  const TFolders& GetFolders(void) const;
171 
172  /// Assign a value to Folders data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TFolders& SetFolders(void);
177 
178  /// Check if a value has been assigned to Items data member.
179  ///
180  /// Data member Items is optional;
181  /// its type is defined as 'typedef list< CRef< CProjectItem > > TItems'
182  /// @return
183  /// - true, if a value has been assigned.
184  /// - false, otherwise.
185  bool IsSetItems(void) const;
186 
187  /// Check if it is safe to call GetItems method.
188  ///
189  /// @return
190  /// - true, if the data member is getatable.
191  /// - false, otherwise.
192  bool CanGetItems(void) const;
193 
194  /// Reset Items data member.
195  void ResetItems(void);
196 
197  /// Get the Items member data.
198  ///
199  /// @return
200  /// Reference to the member data.
201  const TItems& GetItems(void) const;
202 
203  /// Assign a value to Items data member.
204  ///
205  /// @return
206  /// Reference to the data value.
207  TItems& SetItems(void);
208 
209  /// Reset the whole object
210  virtual void Reset(void);
211 
212 
213 private:
214  // Prohibit copy constructor and assignment operator
217 
218  // data
219  Uint4 m_set_State[1];
221  list< CRef< CProjectFolder > > m_Folders;
222  list< CRef< CProjectItem > > m_Items;
223 };
224 
225 /* @} */
226 
227 
228 
229 
230 
231 ///////////////////////////////////////////////////////////
232 ///////////////////// inline methods //////////////////////
233 ///////////////////////////////////////////////////////////
234 inline
236 {
237  return m_Info.NotEmpty();
238 }
239 
240 inline
242 {
243  return true;
244 }
245 
246 inline
248 {
249  if ( !m_Info ) {
250  const_cast<CProjectFolder_Base*>(this)->ResetInfo();
251  }
252  return (*m_Info);
253 }
254 
255 inline
257 {
258  if ( !m_Info ) {
259  ResetInfo();
260  }
261  return (*m_Info);
262 }
263 
264 inline
266 {
267  return ((m_set_State[0] & 0xc) != 0);
268 }
269 
270 inline
272 {
273  return true;
274 }
275 
276 inline
278 {
279  return m_Folders;
280 }
281 
282 inline
284 {
285  m_set_State[0] |= 0x4;
286  return m_Folders;
287 }
288 
289 inline
291 {
292  return ((m_set_State[0] & 0x30) != 0);
293 }
294 
295 inline
297 {
298  return true;
299 }
300 
301 inline
303 {
304  return m_Items;
305 }
306 
307 inline
309 {
310  m_set_State[0] |= 0x10;
311  return m_Items;
312 }
313 
314 ///////////////////////////////////////////////////////////
315 ////////////////// end of inline methods //////////////////
316 ///////////////////////////////////////////////////////////
317 
318 
319 
320 
321 
322 END_objects_SCOPE // namespace ncbi::objects::
323 
325 
326 
327 #endif // OBJECTS_GBPROJ_PROJECTFOLDER_BASE_HPP
CProjectFolder_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
Defines to provide correct exporting from DLLs in Windows.
#define NCBI_GBPROJ_EXPORT
Definition: gbproj_export.h:69
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
Definition: ncbiobj.hpp:726
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
CProjectFolder_Base(const CProjectFolder_Base &)
CProjectFolder_Base & operator=(const CProjectFolder_Base &)
list< CRef< CProjectItem > > TItems
const TInfo & GetInfo(void) const
Get the Info member data.
void ResetInfo(void)
Reset Info data member.
TFolders & SetFolders(void)
Assign a value to Folders data member.
bool IsSetFolders(void) const
Check if a value has been assigned to Folders data member.
bool IsSetItems(void) const
Check if a value has been assigned to Items data member.
const TFolders & GetFolders(void) const
Get the Folders member data.
CSerialObject Tparent
bool CanGetInfo(void) const
Check if it is safe to call GetInfo method.
TInfo & SetInfo(void)
Assign a value to Info data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
list< CRef< CProjectFolder > > TFolders
bool CanGetItems(void) const
Check if it is safe to call GetItems method.
bool IsSetInfo(void) const
Check if a value has been assigned to Info data member.
const TItems & GetItems(void) const
Get the Items member data.
list< CRef< CProjectFolder > > m_Folders
bool CanGetFolders(void) const
Check if it is safe to call GetFolders method.
TItems & SetItems(void)
Assign a value to Items data member.
list< CRef< CProjectItem > > m_Items
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Jul 19 17:09:18 2024 by modify_doxy.py rev. 669887