NCBI C++ ToolKit
Remap_query_.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 Remap_query_.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/remap/remap.asn">remap.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/remap/remap.def">remap.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_REMAP_REMAP_QUERY_BASE_HPP
42 #define OBJECTS_REMAP_REMAP_QUERY_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <string>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // forward declarations
61 class CSeq_loc;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_Remap
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CRemap_query_Base --
75 ///
76 
78 {
80 public:
81  // constructor
82  CRemap_query_Base(void);
83  // destructor
84  virtual ~CRemap_query_Base(void);
85 
86  // type info
88 
89  // types
90  typedef string TFrom_build;
91  typedef string TTo_build;
92  typedef list< CRef< CSeq_loc > > TLocs;
93 
94  // member index
95  enum class E_memberIndex {
96  e__allMandatory = 0,
97  e_from_build,
98  e_to_build,
99  e_locs
100  };
102 
103  // getters
104  // setters
105 
106  /// build to map from
107  /// Check if a value has been assigned to From_build data member.
108  ///
109  /// Data member From_build is mandatory;
110  /// its type is defined as 'typedef string TFrom_build'
111  /// @return
112  /// - true, if a value has been assigned.
113  /// - false, otherwise.
114  bool IsSetFrom_build(void) const;
115 
116  /// Check if it is safe to call GetFrom_build method.
117  ///
118  /// @return
119  /// - true, if the data member is getatable.
120  /// - false, otherwise.
121  bool CanGetFrom_build(void) const;
122 
123  /// Reset From_build data member.
124  void ResetFrom_build(void);
125 
126  /// Get the From_build member data.
127  ///
128  /// @return
129  /// Reference to the member data.
130  const TFrom_build& GetFrom_build(void) const;
131 
132  /// Assign a value to From_build data member.
133  ///
134  /// @param value
135  /// Value to assign
136  void SetFrom_build(const TFrom_build& value);
137  void SetFrom_build(TFrom_build&& value);
138 
139  /// Assign a value to From_build data member.
140  ///
141  /// @return
142  /// Reference to the data value.
143  TFrom_build& SetFrom_build(void);
144 
145  /// build to map to
146  /// Check if a value has been assigned to To_build data member.
147  ///
148  /// Data member To_build is mandatory;
149  /// its type is defined as 'typedef string TTo_build'
150  /// @return
151  /// - true, if a value has been assigned.
152  /// - false, otherwise.
153  bool IsSetTo_build(void) const;
154 
155  /// Check if it is safe to call GetTo_build method.
156  ///
157  /// @return
158  /// - true, if the data member is getatable.
159  /// - false, otherwise.
160  bool CanGetTo_build(void) const;
161 
162  /// Reset To_build data member.
163  void ResetTo_build(void);
164 
165  /// Get the To_build member data.
166  ///
167  /// @return
168  /// Reference to the member data.
169  const TTo_build& GetTo_build(void) const;
170 
171  /// Assign a value to To_build data member.
172  ///
173  /// @param value
174  /// Value to assign
175  void SetTo_build(const TTo_build& value);
176  void SetTo_build(TTo_build&& value);
177 
178  /// Assign a value to To_build data member.
179  ///
180  /// @return
181  /// Reference to the data value.
182  TTo_build& SetTo_build(void);
183 
184  /// the locations to remap
185  /// Check if a value has been assigned to Locs data member.
186  ///
187  /// Data member Locs is mandatory;
188  /// its type is defined as 'typedef list< CRef< CSeq_loc > > TLocs'
189  /// @return
190  /// - true, if a value has been assigned.
191  /// - false, otherwise.
192  bool IsSetLocs(void) const;
193 
194  /// Check if it is safe to call GetLocs method.
195  ///
196  /// @return
197  /// - true, if the data member is getatable.
198  /// - false, otherwise.
199  bool CanGetLocs(void) const;
200 
201  /// Reset Locs data member.
202  void ResetLocs(void);
203 
204  /// Get the Locs member data.
205  ///
206  /// @return
207  /// Reference to the member data.
208  const TLocs& GetLocs(void) const;
209 
210  /// Assign a value to Locs data member.
211  ///
212  /// @return
213  /// Reference to the data value.
214  TLocs& SetLocs(void);
215 
216  /// Reset the whole object
217  virtual void Reset(void);
218 
219 
220 private:
221  // Prohibit copy constructor and assignment operator
224 
225  // data
226  Uint4 m_set_State[1];
227  string m_From_build;
228  string m_To_build;
229  list< CRef< CSeq_loc > > m_Locs;
230 };
231 
232 /* @} */
233 
234 
235 
236 
237 
238 ///////////////////////////////////////////////////////////
239 ///////////////////// inline methods //////////////////////
240 ///////////////////////////////////////////////////////////
241 inline
243 {
244  return ((m_set_State[0] & 0x3) != 0);
245 }
246 
247 inline
249 {
250  return IsSetFrom_build();
251 }
252 
253 inline
255 {
256  if (!CanGetFrom_build()) {
257  ThrowUnassigned(0);
258  }
259  return m_From_build;
260 }
261 
262 inline
264 {
266  m_set_State[0] |= 0x3;
267 }
268 
269 inline
271 {
272  m_From_build = std::forward<CRemap_query_Base::TFrom_build>(value);
273  m_set_State[0] |= 0x3;
274 }
275 
276 inline
278 {
279 #ifdef _DEBUG
280  if (!IsSetFrom_build()) {
282  }
283 #endif
284  m_set_State[0] |= 0x1;
285  return m_From_build;
286 }
287 
288 inline
290 {
291  return ((m_set_State[0] & 0xc) != 0);
292 }
293 
294 inline
296 {
297  return IsSetTo_build();
298 }
299 
300 inline
302 {
303  if (!CanGetTo_build()) {
304  ThrowUnassigned(1);
305  }
306  return m_To_build;
307 }
308 
309 inline
311 {
312  m_To_build = value;
313  m_set_State[0] |= 0xc;
314 }
315 
316 inline
318 {
319  m_To_build = std::forward<CRemap_query_Base::TTo_build>(value);
320  m_set_State[0] |= 0xc;
321 }
322 
323 inline
325 {
326 #ifdef _DEBUG
327  if (!IsSetTo_build()) {
329  }
330 #endif
331  m_set_State[0] |= 0x4;
332  return m_To_build;
333 }
334 
335 inline
337 {
338  return ((m_set_State[0] & 0x30) != 0);
339 }
340 
341 inline
343 {
344  return true;
345 }
346 
347 inline
349 {
350  return m_Locs;
351 }
352 
353 inline
355 {
356  m_set_State[0] |= 0x10;
357  return m_Locs;
358 }
359 
360 ///////////////////////////////////////////////////////////
361 ////////////////// end of inline methods //////////////////
362 ///////////////////////////////////////////////////////////
363 
364 
365 
366 
367 
368 END_objects_SCOPE // namespace ncbi::objects::
369 
371 
372 
373 #endif // OBJECTS_REMAP_REMAP_QUERY_BASE_HPP
CRemap_query_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_REMAP_EXPORT
Definition: ncbi_export.h:728
TFrom_build & SetFrom_build(void)
Assign a value to From_build data member.
TTo_build & SetTo_build(void)
Assign a value to To_build data member.
CRemap_query_Base & operator=(const CRemap_query_Base &)
TLocs & SetLocs(void)
Assign a value to Locs data member.
bool IsSetLocs(void) const
the locations to remap Check if a value has been assigned to Locs data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
bool IsSetTo_build(void) const
build to map to Check if a value has been assigned to To_build data member.
bool CanGetFrom_build(void) const
Check if it is safe to call GetFrom_build method.
bool IsSetFrom_build(void) const
build to map from Check if a value has been assigned to From_build data member.
CSerialObject Tparent
const TTo_build & GetTo_build(void) const
Get the To_build member data.
const TFrom_build & GetFrom_build(void) const
Get the From_build member data.
list< CRef< CSeq_loc > > m_Locs
list< CRef< CSeq_loc > > TLocs
const TLocs & GetLocs(void) const
Get the Locs member data.
bool CanGetLocs(void) const
Check if it is safe to call GetLocs method.
CRemap_query_Base(const CRemap_query_Base &)
bool CanGetTo_build(void) const
Check if it is safe to call GetTo_build method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed Sep 04 15:05:07 2024 by modify_doxy.py rev. 669887