NCBI C++ ToolKit
PCRReaction_.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 PCRReaction_.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/seqfeat/seqfeat.asn">seqfeat.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqfeat/seqfeat.def">seqfeat.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_SEQFEAT_PCRREACTION_BASE_HPP
42 #define OBJECTS_SEQFEAT_PCRREACTION_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
56 class CPCRPrimerSet;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_BioSource
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CPCRReaction_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CPCRReaction_Base(void);
78  // destructor
79  virtual ~CPCRReaction_Base(void);
80 
81  // type info
83 
84  // types
87 
88  // member index
89  enum class E_memberIndex {
90  e__allMandatory = 0,
91  e_forward,
92  e_reverse
93  };
95 
96  // getters
97  // setters
98 
99  /// Check if a value has been assigned to Forward data member.
100  ///
101  /// Data member Forward is optional;
102  /// its type is defined as 'typedef CPCRPrimerSet TForward'
103  /// @return
104  /// - true, if a value has been assigned.
105  /// - false, otherwise.
106  bool IsSetForward(void) const;
107 
108  /// Check if it is safe to call GetForward method.
109  ///
110  /// @return
111  /// - true, if the data member is getatable.
112  /// - false, otherwise.
113  bool CanGetForward(void) const;
114 
115  /// Reset Forward data member.
116  void ResetForward(void);
117 
118  /// Get the Forward member data.
119  ///
120  /// @return
121  /// Reference to the member data.
122  const TForward& GetForward(void) const;
123 
124  /// Assign a value to Forward data member.
125  ///
126  /// @param value
127  /// Reference to value.
128  void SetForward(TForward& value);
129 
130  /// Assign a value to Forward data member.
131  ///
132  /// @return
133  /// Reference to the data value.
134  TForward& SetForward(void);
135 
136  /// Check if a value has been assigned to Reverse data member.
137  ///
138  /// Data member Reverse is optional;
139  /// its type is defined as 'typedef CPCRPrimerSet TReverse'
140  /// @return
141  /// - true, if a value has been assigned.
142  /// - false, otherwise.
143  bool IsSetReverse(void) const;
144 
145  /// Check if it is safe to call GetReverse method.
146  ///
147  /// @return
148  /// - true, if the data member is getatable.
149  /// - false, otherwise.
150  bool CanGetReverse(void) const;
151 
152  /// Reset Reverse data member.
153  void ResetReverse(void);
154 
155  /// Get the Reverse member data.
156  ///
157  /// @return
158  /// Reference to the member data.
159  const TReverse& GetReverse(void) const;
160 
161  /// Assign a value to Reverse data member.
162  ///
163  /// @param value
164  /// Reference to value.
165  void SetReverse(TReverse& value);
166 
167  /// Assign a value to Reverse data member.
168  ///
169  /// @return
170  /// Reference to the data value.
171  TReverse& SetReverse(void);
172 
173  /// Reset the whole object
174  virtual void Reset(void);
175 
176 
177 private:
178  // Prohibit copy constructor and assignment operator
181 
182  // data
183  Uint4 m_set_State[1];
186 };
187 
188 /* @} */
189 
190 
191 
192 
193 
194 ///////////////////////////////////////////////////////////
195 ///////////////////// inline methods //////////////////////
196 ///////////////////////////////////////////////////////////
197 inline
199 {
200  return m_Forward.NotEmpty();
201 }
202 
203 inline
205 {
206  return IsSetForward();
207 }
208 
209 inline
211 {
212  if (!CanGetForward()) {
213  ThrowUnassigned(0);
214  }
215  return (*m_Forward);
216 }
217 
218 inline
220 {
221  return m_Reverse.NotEmpty();
222 }
223 
224 inline
226 {
227  return IsSetReverse();
228 }
229 
230 inline
232 {
233  if (!CanGetReverse()) {
234  ThrowUnassigned(1);
235  }
236  return (*m_Reverse);
237 }
238 
239 ///////////////////////////////////////////////////////////
240 ////////////////// end of inline methods //////////////////
241 ///////////////////////////////////////////////////////////
242 
243 
244 
245 
246 
247 END_objects_SCOPE // namespace ncbi::objects::
248 
250 
251 
252 #endif // OBJECTS_SEQFEAT_PCRREACTION_BASE_HPP
CPCRPrimerSet –.
CPCRReaction_Base –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
void ThrowUnassigned(TMemberIndex index) const
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_SEQFEAT_EXPORT
Definition: ncbi_export.h:768
CPCRReaction_Base & operator=(const CPCRReaction_Base &)
CPCRPrimerSet TForward
CSerialObject Tparent
CRef< TForward > m_Forward
bool CanGetReverse(void) const
Check if it is safe to call GetReverse method.
const TForward & GetForward(void) const
Get the Forward member data.
CRef< TReverse > m_Reverse
bool IsSetReverse(void) const
Check if a value has been assigned to Reverse data member.
CPCRPrimerSet TReverse
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
const TReverse & GetReverse(void) const
Get the Reverse member data.
CPCRReaction_Base(const CPCRReaction_Base &)
bool IsSetForward(void) const
Check if a value has been assigned to Forward data member.
bool CanGetForward(void) const
Check if it is safe to call GetForward method.
Modified on Sat Dec 02 09:22:26 2023 by modify_doxy.py rev. 669887