NCBI C++ ToolKit
Mim_set_.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 Mim_set_.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/mim/mim.asn">mim.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/mim/mim.def">mim.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_MIM_MIM_SET_BASE_HPP
42 #define OBJECTS_MIM_MIM_SET_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
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 CMim_date;
61 class CMim_entry;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_Mim
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CMim_set_Base --
75 ///
76 
78 {
80 public:
81  // constructor
82  CMim_set_Base(void);
83  // destructor
84  virtual ~CMim_set_Base(void);
85 
86  // type info
88 
89  // types
91  typedef list< CRef< CMim_entry > > TMimEntries;
92 
93  // member index
94  enum class E_memberIndex {
95  e__allMandatory = 0,
96  e_releaseDate,
97  e_mimEntries
98  };
100 
101  // getters
102  // setters
103 
104  /// Check if a value has been assigned to ReleaseDate data member.
105  ///
106  /// Data member ReleaseDate is mandatory;
107  /// its type is defined as 'typedef CMim_date TReleaseDate'
108  /// @return
109  /// - true, if a value has been assigned.
110  /// - false, otherwise.
111  bool IsSetReleaseDate(void) const;
112 
113  /// Check if it is safe to call GetReleaseDate method.
114  ///
115  /// @return
116  /// - true, if the data member is getatable.
117  /// - false, otherwise.
118  bool CanGetReleaseDate(void) const;
119 
120  /// Reset ReleaseDate data member.
121  void ResetReleaseDate(void);
122 
123  /// Get the ReleaseDate member data.
124  ///
125  /// @return
126  /// Reference to the member data.
127  const TReleaseDate& GetReleaseDate(void) const;
128 
129  /// Assign a value to ReleaseDate data member.
130  ///
131  /// @param value
132  /// Reference to value.
133  void SetReleaseDate(TReleaseDate& value);
134 
135  /// Assign a value to ReleaseDate data member.
136  ///
137  /// @return
138  /// Reference to the data value.
139  TReleaseDate& SetReleaseDate(void);
140 
141  /// Check if a value has been assigned to MimEntries data member.
142  ///
143  /// Data member MimEntries is mandatory;
144  /// its type is defined as 'typedef list< CRef< CMim_entry > > TMimEntries'
145  /// @return
146  /// - true, if a value has been assigned.
147  /// - false, otherwise.
148  bool IsSetMimEntries(void) const;
149 
150  /// Check if it is safe to call GetMimEntries method.
151  ///
152  /// @return
153  /// - true, if the data member is getatable.
154  /// - false, otherwise.
155  bool CanGetMimEntries(void) const;
156 
157  /// Reset MimEntries data member.
158  void ResetMimEntries(void);
159 
160  /// Get the MimEntries member data.
161  ///
162  /// @return
163  /// Reference to the member data.
164  const TMimEntries& GetMimEntries(void) const;
165 
166  /// Assign a value to MimEntries data member.
167  ///
168  /// @return
169  /// Reference to the data value.
170  TMimEntries& SetMimEntries(void);
171 
172  /// Reset the whole object
173  virtual void Reset(void);
174 
175 
176 private:
177  // Prohibit copy constructor and assignment operator
180 
181  // data
182  Uint4 m_set_State[1];
184  list< CRef< CMim_entry > > m_MimEntries;
185 };
186 
187 /* @} */
188 
189 
190 
191 
192 
193 ///////////////////////////////////////////////////////////
194 ///////////////////// inline methods //////////////////////
195 ///////////////////////////////////////////////////////////
196 inline
198 {
199  return m_ReleaseDate.NotEmpty();
200 }
201 
202 inline
204 {
205  return true;
206 }
207 
208 inline
210 {
211  if ( !m_ReleaseDate ) {
212  const_cast<CMim_set_Base*>(this)->ResetReleaseDate();
213  }
214  return (*m_ReleaseDate);
215 }
216 
217 inline
219 {
220  if ( !m_ReleaseDate ) {
222  }
223  return (*m_ReleaseDate);
224 }
225 
226 inline
228 {
229  return ((m_set_State[0] & 0xc) != 0);
230 }
231 
232 inline
234 {
235  return true;
236 }
237 
238 inline
240 {
241  return m_MimEntries;
242 }
243 
244 inline
246 {
247  m_set_State[0] |= 0x4;
248  return m_MimEntries;
249 }
250 
251 ///////////////////////////////////////////////////////////
252 ////////////////// end of inline methods //////////////////
253 ///////////////////////////////////////////////////////////
254 
255 
256 
257 
258 
259 END_objects_SCOPE // namespace ncbi::objects::
260 
262 
263 
264 #endif // OBJECTS_MIM_MIM_SET_BASE_HPP
CMim_date –.
Definition: Mim_date.hpp:66
CMim_entry –.
Definition: Mim_entry.hpp:66
CMim_set_Base –.
Definition: Mim_set_.hpp:78
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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_MIM_EXPORT
Definition: ncbi_export.h:608
bool CanGetReleaseDate(void) const
Check if it is safe to call GetReleaseDate method.
Definition: Mim_set_.hpp:203
bool CanGetMimEntries(void) const
Check if it is safe to call GetMimEntries method.
Definition: Mim_set_.hpp:233
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Definition: Mim_set_.hpp:99
CMim_set_Base(const CMim_set_Base &)
list< CRef< CMim_entry > > TMimEntries
Definition: Mim_set_.hpp:91
bool IsSetReleaseDate(void) const
Check if a value has been assigned to ReleaseDate data member.
Definition: Mim_set_.hpp:197
TReleaseDate & SetReleaseDate(void)
Assign a value to ReleaseDate data member.
Definition: Mim_set_.hpp:218
CMim_set_Base & operator=(const CMim_set_Base &)
const TReleaseDate & GetReleaseDate(void) const
Get the ReleaseDate member data.
Definition: Mim_set_.hpp:209
const TMimEntries & GetMimEntries(void) const
Get the MimEntries member data.
Definition: Mim_set_.hpp:239
list< CRef< CMim_entry > > m_MimEntries
Definition: Mim_set_.hpp:184
CMim_date TReleaseDate
Definition: Mim_set_.hpp:90
CSerialObject Tparent
Definition: Mim_set_.hpp:79
CRef< TReleaseDate > m_ReleaseDate
Definition: Mim_set_.hpp:183
Uint4 m_set_State[1]
Definition: Mim_set_.hpp:182
void ResetReleaseDate(void)
Reset ReleaseDate data member.
Definition: Mim_set_.cpp:52
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetMimEntries(void) const
Check if a value has been assigned to MimEntries data member.
Definition: Mim_set_.hpp:227
TMimEntries & SetMimEntries(void)
Assign a value to MimEntries data member.
Definition: Mim_set_.hpp:245
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed May 01 14:20:29 2024 by modify_doxy.py rev. 669887