NCBI C++ ToolKit
GrantList_.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 GrantList_.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/objtools/eutils/efetch/efetch.xsd">efetch.xsd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/efetch/efetch.def">efetch.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 eutils__OBJTOOLS_EUTILS_EFETCH_GRANTLIST_BASE_HPP
42 #define eutils__OBJTOOLS_EUTILS_EFETCH_GRANTLIST_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 
50 #ifndef BEGIN_eutils_SCOPE
51 # define BEGIN_eutils_SCOPE BEGIN_SCOPE(eutils)
52 # define END_eutils_SCOPE END_SCOPE(eutils)
53 #endif
54 BEGIN_eutils_SCOPE // namespace eutils::
55 
56 
57 // forward declarations
58 class CGrant;
59 
60 
61 // generated classes
62 
63 
64 /** @addtogroup dataspec_efetch
65  *
66  * @{
67  */
68 
69 /////////////////////////////////////////////////////////////////////////////
70 ///
71 /// CGrantList_Base --
72 ///
73 
74 class CGrantList_Base : public NCBI_NS_NCBI::CSerialObject
75 {
76  typedef NCBI_NS_NCBI::CSerialObject Tparent;
77 public:
78  // constructor
79  CGrantList_Base(void);
80  // destructor
81  virtual ~CGrantList_Base(void);
82 
83  // type info
85 
86  /////////////////////////////////////////////////////////////////////////////
87  ///
88  /// C_Attlist --
89  ///
90 
91  class C_Attlist : public NCBI_NS_NCBI::CSerialObject
92  {
93  typedef NCBI_NS_NCBI::CSerialObject Tparent;
94  public:
95  // constructor
96  C_Attlist(void);
97  // destructor
98  ~C_Attlist(void);
99 
100  // type info
102 
106  };
107 
108  /// Access to EAttlist_CompleteYN's attributes (values, names) as defined in spec
109  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EAttlist_CompleteYN)(void);
110 
111  // types
113 
114  // member index
115  enum class E_memberIndex {
116  e__allMandatory = 0,
118  };
119  typedef Tparent::CMemberIndex<E_memberIndex, 2> TmemberIndex;
120 
121  // getters
122  // setters
123 
124  /// Check if a value has been assigned to CompleteYN data member.
125  ///
126  /// Data member CompleteYN is optional with default eAttlist_CompleteYN_Y;
127  /// its type is defined as 'typedef EAttlist_CompleteYN TCompleteYN'
128  /// @return
129  /// - true, if a value has been assigned.
130  /// - false, otherwise.
131  bool IsSetCompleteYN(void) const;
132 
133  /// Check if it is safe to call GetCompleteYN method.
134  ///
135  /// @return
136  /// - true, if the data member is getatable.
137  /// - false, otherwise.
138  bool CanGetCompleteYN(void) const;
139 
140  /// Reset CompleteYN data member.
141  void ResetCompleteYN(void);
142 
143  /// Assign default value to CompleteYN data member.
144  void SetDefaultCompleteYN(void);
145 
146  /// Get the CompleteYN member data.
147  ///
148  /// @return
149  /// Copy of the member data.
150  TCompleteYN GetCompleteYN(void) const;
151 
152  /// Assign a value to CompleteYN data member.
153  ///
154  /// @param value
155  /// Value to assign
157 
158  /// Assign a value to CompleteYN data member.
159  ///
160  /// @return
161  /// Reference to the data value.
162  TCompleteYN& SetCompleteYN(void);
163 
164  /// Reset the whole object
165  void Reset(void);
166 
167 
168  private:
169  // Prohibit copy constructor and assignment operator
172 
173  // data
176  };
177  // types
179  typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CGrant > > TGrant;
180 
181  // member index
182  enum class E_memberIndex {
183  e__allMandatory = 0,
184  e_Attlist,
185  e_Grant
186  };
187  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
188 
189  // getters
190  // setters
191 
192  /// Check if a value has been assigned to Attlist data member.
193  ///
194  /// Data member Attlist is mandatory;
195  /// its type is defined as 'typedef C_Attlist TAttlist'
196  /// @return
197  /// - true, if a value has been assigned.
198  /// - false, otherwise.
199  bool IsSetAttlist(void) const;
200 
201  /// Check if it is safe to call GetAttlist method.
202  ///
203  /// @return
204  /// - true, if the data member is getatable.
205  /// - false, otherwise.
206  bool CanGetAttlist(void) const;
207 
208  /// Reset Attlist data member.
209  void ResetAttlist(void);
210 
211  /// Get the Attlist member data.
212  ///
213  /// @return
214  /// Reference to the member data.
215  const TAttlist& GetAttlist(void) const;
216 
217  /// Assign a value to Attlist data member.
218  ///
219  /// @param value
220  /// Reference to value.
221  void SetAttlist(TAttlist& value);
222 
223  /// Assign a value to Attlist data member.
224  ///
225  /// @return
226  /// Reference to the data value.
227  TAttlist& SetAttlist(void);
228 
229  /// Check if a value has been assigned to Grant data member.
230  ///
231  /// Data member Grant is mandatory;
232  /// its type is defined as 'typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CGrant > > TGrant'
233  /// @return
234  /// - true, if a value has been assigned.
235  /// - false, otherwise.
236  bool IsSetGrant(void) const;
237 
238  /// Check if it is safe to call GetGrant method.
239  ///
240  /// @return
241  /// - true, if the data member is getatable.
242  /// - false, otherwise.
243  bool CanGetGrant(void) const;
244 
245  /// Reset Grant data member.
246  void ResetGrant(void);
247 
248  /// Get the Grant member data.
249  ///
250  /// @return
251  /// Reference to the member data.
252  const TGrant& GetGrant(void) const;
253 
254  /// Assign a value to Grant data member.
255  ///
256  /// @return
257  /// Reference to the data value.
258  TGrant& SetGrant(void);
259 
260  /// Reset the whole object
261  virtual void Reset(void);
262 
263 
264 private:
265  // Prohibit copy constructor and assignment operator
268 
269  // data
271  NCBI_NS_NCBI::CRef< TAttlist > m_Attlist;
272  NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CGrant > > m_Grant;
273 };
274 
275 /* @} */
276 
277 
278 
279 
280 
281 ///////////////////////////////////////////////////////////
282 ///////////////////// inline methods //////////////////////
283 ///////////////////////////////////////////////////////////
284 inline
286 {
287  return ((m_set_State[0] & 0x3) != 0);
288 }
289 
290 inline
292 {
293  return true;
294 }
295 
296 inline
298 {
299  m_CompleteYN = eAttlist_CompleteYN_Y;
300  m_set_State[0] &= ~0x3;
301 }
302 
303 inline
305 {
306  ResetCompleteYN();
307  m_set_State[0] |= 0x1;
308 }
309 
310 inline
312 {
313  return m_CompleteYN;
314 }
315 
316 inline
318 {
319  m_CompleteYN = value;
320  m_set_State[0] |= 0x3;
321 }
322 
323 inline
325 {
326 #ifdef _DEBUG
327  if (!IsSetCompleteYN()) {
328  memset(&m_CompleteYN,UnassignedByte(),sizeof(m_CompleteYN));
329  }
330 #endif
331  m_set_State[0] |= 0x1;
332  return m_CompleteYN;
333 }
334 
335 inline
337 {
338  return m_Attlist.NotEmpty();
339 }
340 
341 inline
343 {
344  return true;
345 }
346 
347 inline
349 {
350  if ( !m_Attlist ) {
351  const_cast<CGrantList_Base*>(this)->ResetAttlist();
352  }
353  return (*m_Attlist);
354 }
355 
356 inline
358 {
359  if ( !m_Attlist ) {
360  ResetAttlist();
361  }
362  return (*m_Attlist);
363 }
364 
365 inline
367 {
368  return ((m_set_State[0] & 0xc) != 0);
369 }
370 
371 inline
373 {
374  return true;
375 }
376 
377 inline
379 {
380  return m_Grant;
381 }
382 
383 inline
385 {
386  m_set_State[0] |= 0x4;
387  return m_Grant;
388 }
389 
390 ///////////////////////////////////////////////////////////
391 ////////////////// end of inline methods //////////////////
392 ///////////////////////////////////////////////////////////
393 
394 
395 
396 
397 
398 END_eutils_SCOPE // namespace eutils::
399 
400 
401 #endif // eutils__OBJTOOLS_EUTILS_EFETCH_GRANTLIST_BASE_HPP
#define BEGIN_eutils_SCOPE
Definition: GrantList_.hpp:51
#define END_eutils_SCOPE
Definition: GrantList_.hpp:52
CGrantList_Base –.
Definition: GrantList_.hpp:75
CGrant –.
Definition: Grant.hpp:64
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
bool IsSetCompleteYN(void) const
Check if a value has been assigned to CompleteYN data member.
Definition: GrantList_.hpp:285
void ResetAttlist(void)
Reset Attlist data member.
Definition: GrantList_.cpp:87
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CGrant > > m_Grant
Definition: GrantList_.hpp:272
C_Attlist & operator=(const C_Attlist &)
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CGrant > > TGrant
Definition: GrantList_.hpp:179
TGrant & SetGrant(void)
Assign a value to Grant data member.
Definition: GrantList_.hpp:384
EAttlist_CompleteYN TCompleteYN
Definition: GrantList_.hpp:112
void ResetCompleteYN(void)
Reset CompleteYN data member.
Definition: GrantList_.hpp:297
EAttlist_CompleteYN m_CompleteYN
Definition: GrantList_.hpp:175
virtual ~CGrantList_Base(void)
Definition: GrantList_.cpp:135
C_Attlist TAttlist
Definition: GrantList_.hpp:178
const TGrant & GetGrant(void) const
Get the Grant member data.
Definition: GrantList_.hpp:378
TCompleteYN GetCompleteYN(void) const
Get the CompleteYN member data.
Definition: GrantList_.hpp:311
TCompleteYN & SetCompleteYN(void)
Assign a value to CompleteYN data member.
Definition: GrantList_.hpp:324
NCBI_NS_NCBI::CSerialObject Tparent
Definition: GrantList_.hpp:76
CGrantList_Base(const CGrantList_Base &)
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
Definition: GrantList_.hpp:342
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
Definition: GrantList_.hpp:336
virtual void Reset(void)
Reset the whole object.
Definition: GrantList_.cpp:107
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Definition: GrantList_.hpp:187
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
Definition: GrantList_.hpp:348
C_Attlist(const C_Attlist &)
Uint4 m_set_State[1]
Definition: GrantList_.hpp:270
void Reset(void)
Reset the whole object.
Definition: GrantList_.cpp:58
void ResetGrant(void)
Reset Grant data member.
Definition: GrantList_.cpp:101
void SetDefaultCompleteYN(void)
Assign default value to CompleteYN data member.
Definition: GrantList_.hpp:304
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
Definition: GrantList_.hpp:271
NCBI_NS_NCBI::CSerialObject Tparent
Definition: GrantList_.hpp:93
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
Definition: GrantList_.hpp:357
bool CanGetCompleteYN(void) const
Check if it is safe to call GetCompleteYN method.
Definition: GrantList_.hpp:291
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
Definition: GrantList_.hpp:119
CGrantList_Base & operator=(const CGrantList_Base &)
bool IsSetGrant(void) const
Check if a value has been assigned to Grant data member.
Definition: GrantList_.hpp:366
bool CanGetGrant(void) const
Check if it is safe to call GetGrant method.
Definition: GrantList_.hpp:372
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:13 2024 by modify_doxy.py rev. 669887