NCBI C++ ToolKit
Seq_test_result_.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 Seq_test_result_.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/seqtest/seqtest.asn">seqtest.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqtest/seqtest.def">seqtest.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_SEQTEST_SEQ_TEST_RESULT_BASE_HPP
42 #define OBJECTS_SEQTEST_SEQ_TEST_RESULT_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 CDate;
61 class CUser_object;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_SeqTest
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CSeq_test_result_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CSeq_test_result_Base(void);
85 
86  // type info
88 
89  // types
90  typedef string TTest;
91  typedef CDate TDate;
93 
94  // member index
95  enum class E_memberIndex {
96  e__allMandatory = 0,
97  e_test,
98  e_date,
99  e_output_data
100  };
102 
103  // getters
104  // setters
105 
106  /// Check if a value has been assigned to Test data member.
107  ///
108  /// Data member Test is mandatory;
109  /// its type is defined as 'typedef string TTest'
110  /// @return
111  /// - true, if a value has been assigned.
112  /// - false, otherwise.
113  bool IsSetTest(void) const;
114 
115  /// Check if it is safe to call GetTest method.
116  ///
117  /// @return
118  /// - true, if the data member is getatable.
119  /// - false, otherwise.
120  bool CanGetTest(void) const;
121 
122  /// Reset Test data member.
123  void ResetTest(void);
124 
125  /// Get the Test member data.
126  ///
127  /// @return
128  /// Reference to the member data.
129  const TTest& GetTest(void) const;
130 
131  /// Assign a value to Test data member.
132  ///
133  /// @param value
134  /// Value to assign
135  void SetTest(const TTest& value);
136  void SetTest(TTest&& value);
137 
138  /// Assign a value to Test data member.
139  ///
140  /// @return
141  /// Reference to the data value.
142  TTest& SetTest(void);
143 
144  /// Check if a value has been assigned to Date data member.
145  ///
146  /// Data member Date is mandatory;
147  /// its type is defined as 'typedef CDate TDate'
148  /// @return
149  /// - true, if a value has been assigned.
150  /// - false, otherwise.
151  bool IsSetDate(void) const;
152 
153  /// Check if it is safe to call GetDate method.
154  ///
155  /// @return
156  /// - true, if the data member is getatable.
157  /// - false, otherwise.
158  bool CanGetDate(void) const;
159 
160  /// Reset Date data member.
161  void ResetDate(void);
162 
163  /// Get the Date member data.
164  ///
165  /// @return
166  /// Reference to the member data.
167  const TDate& GetDate(void) const;
168 
169  /// Assign a value to Date data member.
170  ///
171  /// @param value
172  /// Reference to value.
173  void SetDate(TDate& value);
174 
175  /// Assign a value to Date data member.
176  ///
177  /// @return
178  /// Reference to the data value.
179  TDate& SetDate(void);
180 
181  /// Check if a value has been assigned to Output_data data member.
182  ///
183  /// Data member Output_data is mandatory;
184  /// its type is defined as 'typedef CUser_object TOutput_data'
185  /// @return
186  /// - true, if a value has been assigned.
187  /// - false, otherwise.
188  bool IsSetOutput_data(void) const;
189 
190  /// Check if it is safe to call GetOutput_data method.
191  ///
192  /// @return
193  /// - true, if the data member is getatable.
194  /// - false, otherwise.
195  bool CanGetOutput_data(void) const;
196 
197  /// Reset Output_data data member.
198  void ResetOutput_data(void);
199 
200  /// Get the Output_data member data.
201  ///
202  /// @return
203  /// Reference to the member data.
204  const TOutput_data& GetOutput_data(void) const;
205 
206  /// Assign a value to Output_data data member.
207  ///
208  /// @param value
209  /// Reference to value.
210  void SetOutput_data(TOutput_data& value);
211 
212  /// Assign a value to Output_data data member.
213  ///
214  /// @return
215  /// Reference to the data value.
216  TOutput_data& SetOutput_data(void);
217 
218  /// Reset the whole object
219  virtual void Reset(void);
220 
221 
222 private:
223  // Prohibit copy constructor and assignment operator
226 
227  // data
228  Uint4 m_set_State[1];
229  string m_Test;
232 };
233 
234 /* @} */
235 
236 
237 
238 
239 
240 ///////////////////////////////////////////////////////////
241 ///////////////////// inline methods //////////////////////
242 ///////////////////////////////////////////////////////////
243 inline
245 {
246  return ((m_set_State[0] & 0x3) != 0);
247 }
248 
249 inline
251 {
252  return IsSetTest();
253 }
254 
255 inline
257 {
258  if (!CanGetTest()) {
259  ThrowUnassigned(0);
260  }
261  return m_Test;
262 }
263 
264 inline
266 {
267  m_Test = value;
268  m_set_State[0] |= 0x3;
269 }
270 
271 inline
273 {
274  m_Test = std::forward<CSeq_test_result_Base::TTest>(value);
275  m_set_State[0] |= 0x3;
276 }
277 
278 inline
280 {
281 #ifdef _DEBUG
282  if (!IsSetTest()) {
284  }
285 #endif
286  m_set_State[0] |= 0x1;
287  return m_Test;
288 }
289 
290 inline
292 {
293  return m_Date.NotEmpty();
294 }
295 
296 inline
298 {
299  return true;
300 }
301 
302 inline
304 {
305  if ( !m_Date ) {
306  const_cast<CSeq_test_result_Base*>(this)->ResetDate();
307  }
308  return (*m_Date);
309 }
310 
311 inline
313 {
314  if ( !m_Date ) {
315  ResetDate();
316  }
317  return (*m_Date);
318 }
319 
320 inline
322 {
323  return m_Output_data.NotEmpty();
324 }
325 
326 inline
328 {
329  return true;
330 }
331 
332 inline
334 {
335  if ( !m_Output_data ) {
336  const_cast<CSeq_test_result_Base*>(this)->ResetOutput_data();
337  }
338  return (*m_Output_data);
339 }
340 
341 inline
343 {
344  if ( !m_Output_data ) {
346  }
347  return (*m_Output_data);
348 }
349 
350 ///////////////////////////////////////////////////////////
351 ////////////////// end of inline methods //////////////////
352 ///////////////////////////////////////////////////////////
353 
354 
355 
356 
357 
358 END_objects_SCOPE // namespace ncbi::objects::
359 
361 
362 
363 #endif // OBJECTS_SEQTEST_SEQ_TEST_RESULT_BASE_HPP
Definition: Date.hpp:53
CRef –.
Definition: ncbiobj.hpp:618
CSeq_test_result_Base –.
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
#define NCBI_SEQTEST_EXPORT
Definition: ncbi_export.h:817
const TTest & GetTest(void) const
Get the Test member data.
bool CanGetOutput_data(void) const
Check if it is safe to call GetOutput_data method.
TOutput_data & SetOutput_data(void)
Assign a value to Output_data data member.
bool IsSetTest(void) const
Check if a value has been assigned to Test data member.
void ResetDate(void)
Reset Date data member.
bool IsSetOutput_data(void) const
Check if a value has been assigned to Output_data data member.
CSeq_test_result_Base(const CSeq_test_result_Base &)
const TOutput_data & GetOutput_data(void) const
Get the Output_data member data.
void ResetOutput_data(void)
Reset Output_data data member.
bool CanGetDate(void) const
Check if it is safe to call GetDate method.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
bool CanGetTest(void) const
Check if it is safe to call GetTest method.
bool IsSetDate(void) const
Check if a value has been assigned to Date data member.
TDate & SetDate(void)
Assign a value to Date data member.
CSeq_test_result_Base & operator=(const CSeq_test_result_Base &)
CRef< TOutput_data > m_Output_data
const TDate & GetDate(void) const
Get the Date member data.
TTest & SetTest(void)
Assign a value to Test data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
static void SetTest()
Definition: stress32.cpp:16843
Modified on Mon Apr 22 04:04:57 2024 by modify_doxy.py rev. 669887