NCBI C++ ToolKit
AaInterval_.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 AaInterval_.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/varrep/varrep.asn">varrep.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/varrep/varrep.def">varrep.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_VARREP_AAINTERVAL_BASE_HPP
42 #define OBJECTS_VARREP_AAINTERVAL_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 CAaSite;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_VariationIRep
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CAaInterval_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CAaInterval_Base(void);
78  // destructor
79  virtual ~CAaInterval_Base(void);
80 
81  // type info
83 
84  // types
85  typedef CAaSite TStart;
86  typedef CAaSite TStop;
87 
88  // member index
89  enum class E_memberIndex {
90  e__allMandatory = 0,
91  e_start,
92  e_stop
93  };
95 
96  // getters
97  // setters
98 
99  /// Check if a value has been assigned to Start data member.
100  ///
101  /// Data member Start is mandatory;
102  /// its type is defined as 'typedef CAaSite TStart'
103  /// @return
104  /// - true, if a value has been assigned.
105  /// - false, otherwise.
106  bool IsSetStart(void) const;
107 
108  /// Check if it is safe to call GetStart method.
109  ///
110  /// @return
111  /// - true, if the data member is getatable.
112  /// - false, otherwise.
113  bool CanGetStart(void) const;
114 
115  /// Reset Start data member.
116  void ResetStart(void);
117 
118  /// Get the Start member data.
119  ///
120  /// @return
121  /// Reference to the member data.
122  const TStart& GetStart(void) const;
123 
124  /// Assign a value to Start data member.
125  ///
126  /// @param value
127  /// Reference to value.
128  void SetStart(TStart& value);
129 
130  /// Assign a value to Start data member.
131  ///
132  /// @return
133  /// Reference to the data value.
134  TStart& SetStart(void);
135 
136  /// Check if a value has been assigned to Stop data member.
137  ///
138  /// Data member Stop is mandatory;
139  /// its type is defined as 'typedef CAaSite TStop'
140  /// @return
141  /// - true, if a value has been assigned.
142  /// - false, otherwise.
143  bool IsSetStop(void) const;
144 
145  /// Check if it is safe to call GetStop method.
146  ///
147  /// @return
148  /// - true, if the data member is getatable.
149  /// - false, otherwise.
150  bool CanGetStop(void) const;
151 
152  /// Reset Stop data member.
153  void ResetStop(void);
154 
155  /// Get the Stop member data.
156  ///
157  /// @return
158  /// Reference to the member data.
159  const TStop& GetStop(void) const;
160 
161  /// Assign a value to Stop data member.
162  ///
163  /// @param value
164  /// Reference to value.
165  void SetStop(TStop& value);
166 
167  /// Assign a value to Stop data member.
168  ///
169  /// @return
170  /// Reference to the data value.
171  TStop& SetStop(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
186 };
187 
188 /* @} */
189 
190 
191 
192 
193 
194 ///////////////////////////////////////////////////////////
195 ///////////////////// inline methods //////////////////////
196 ///////////////////////////////////////////////////////////
197 inline
199 {
200  return m_Start.NotEmpty();
201 }
202 
203 inline
205 {
206  return true;
207 }
208 
209 inline
211 {
212  if ( !m_Start ) {
213  const_cast<CAaInterval_Base*>(this)->ResetStart();
214  }
215  return (*m_Start);
216 }
217 
218 inline
220 {
221  if ( !m_Start ) {
222  ResetStart();
223  }
224  return (*m_Start);
225 }
226 
227 inline
229 {
230  return m_Stop.NotEmpty();
231 }
232 
233 inline
235 {
236  return true;
237 }
238 
239 inline
241 {
242  if ( !m_Stop ) {
243  const_cast<CAaInterval_Base*>(this)->ResetStop();
244  }
245  return (*m_Stop);
246 }
247 
248 inline
250 {
251  if ( !m_Stop ) {
252  ResetStop();
253  }
254  return (*m_Stop);
255 }
256 
257 ///////////////////////////////////////////////////////////
258 ////////////////// end of inline methods //////////////////
259 ///////////////////////////////////////////////////////////
260 
261 
262 
263 
264 
265 END_objects_SCOPE // namespace ncbi::objects::
266 
268 
269 
270 #endif // OBJECTS_VARREP_AAINTERVAL_BASE_HPP
CAaInterval_Base –.
Definition: AaInterval_.hpp:73
CAaSite –.
Definition: AaSite.hpp:66
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
CAaInterval_Base(const CAaInterval_Base &)
TStop & SetStop(void)
Assign a value to Stop data member.
bool CanGetStart(void) const
Check if it is safe to call GetStart method.
const TStop & GetStop(void) const
Get the Stop member data.
virtual void Reset(void)
Reset the whole object.
Definition: AaInterval_.cpp:79
CAaInterval_Base & operator=(const CAaInterval_Base &)
bool CanGetStop(void) const
Check if it is safe to call GetStop method.
Uint4 m_set_State[1]
TStart & SetStart(void)
Assign a value to Start data member.
bool IsSetStop(void) const
Check if a value has been assigned to Stop data member.
const TStart & GetStart(void) const
Get the Start member data.
CRef< TStart > m_Start
void ResetStart(void)
Reset Start data member.
Definition: AaInterval_.cpp:51
void ResetStop(void)
Reset Stop data member.
Definition: AaInterval_.cpp:65
virtual ~CAaInterval_Base(void)
bool IsSetStart(void) const
Check if a value has been assigned to Start data member.
CSerialObject Tparent
Definition: AaInterval_.hpp:74
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Definition: AaInterval_.hpp:94
CRef< TStop > m_Stop
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat May 18 11:35:47 2024 by modify_doxy.py rev. 669887