NCBI C++ ToolKit
Convert_feature_action_.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 Convert_feature_action_.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/macro/macro.asn">macro.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/macro/macro.def">macro.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_MACRO_CONVERT_FEATURE_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_CONVERT_FEATURE_ACTION_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
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
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_NCBI_Macro
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 ///
75 /// CConvert_feature_action_Base --
76 ///
77 
79 {
81 public:
82  // constructor
84  // destructor
85  virtual ~CConvert_feature_action_Base(void);
86 
87  // type info
89 
90  // types
95  typedef bool TLeave_original;
97 
98  // member index
99  enum class E_memberIndex {
100  e__allMandatory = 0,
101  e_type_from,
102  e_type_to,
107  };
109 
110  // getters
111  // setters
112 
113  /// Check if a value has been assigned to Type_from data member.
114  ///
115  /// Data member Type_from is mandatory;
116  /// its type is defined as 'typedef EMacro_feature_type TType_from'
117  /// @return
118  /// - true, if a value has been assigned.
119  /// - false, otherwise.
120  bool IsSetType_from(void) const;
121 
122  /// Check if it is safe to call GetType_from method.
123  ///
124  /// @return
125  /// - true, if the data member is getatable.
126  /// - false, otherwise.
127  bool CanGetType_from(void) const;
128 
129  /// Reset Type_from data member.
130  void ResetType_from(void);
131 
132  /// Get the Type_from member data.
133  ///
134  /// @return
135  /// Copy of the member data.
136  TType_from GetType_from(void) const;
137 
138  /// Assign a value to Type_from data member.
139  ///
140  /// @param value
141  /// Value to assign
143 
144  /// Assign a value to Type_from data member.
145  ///
146  /// @return
147  /// Reference to the data value.
148  TType_from& SetType_from(void);
149 
150  /// Check if a value has been assigned to Type_to data member.
151  ///
152  /// Data member Type_to is mandatory;
153  /// its type is defined as 'typedef EMacro_feature_type TType_to'
154  /// @return
155  /// - true, if a value has been assigned.
156  /// - false, otherwise.
157  bool IsSetType_to(void) const;
158 
159  /// Check if it is safe to call GetType_to method.
160  ///
161  /// @return
162  /// - true, if the data member is getatable.
163  /// - false, otherwise.
164  bool CanGetType_to(void) const;
165 
166  /// Reset Type_to data member.
167  void ResetType_to(void);
168 
169  /// Get the Type_to member data.
170  ///
171  /// @return
172  /// Copy of the member data.
173  TType_to GetType_to(void) const;
174 
175  /// Assign a value to Type_to data member.
176  ///
177  /// @param value
178  /// Value to assign
179  void SetType_to(TType_to value);
180 
181  /// Assign a value to Type_to data member.
182  ///
183  /// @return
184  /// Reference to the data value.
185  TType_to& SetType_to(void);
186 
187  /// Check if a value has been assigned to Src_options data member.
188  ///
189  /// Data member Src_options is optional;
190  /// its type is defined as 'typedef CConvert_feature_src_options TSrc_options'
191  /// @return
192  /// - true, if a value has been assigned.
193  /// - false, otherwise.
194  bool IsSetSrc_options(void) const;
195 
196  /// Check if it is safe to call GetSrc_options method.
197  ///
198  /// @return
199  /// - true, if the data member is getatable.
200  /// - false, otherwise.
201  bool CanGetSrc_options(void) const;
202 
203  /// Reset Src_options data member.
204  void ResetSrc_options(void);
205 
206  /// Get the Src_options member data.
207  ///
208  /// @return
209  /// Reference to the member data.
210  const TSrc_options& GetSrc_options(void) const;
211 
212  /// Assign a value to Src_options data member.
213  ///
214  /// @param value
215  /// Reference to value.
217 
218  /// Assign a value to Src_options data member.
219  ///
220  /// @return
221  /// Reference to the data value.
223 
224  /// Check if a value has been assigned to Dst_options data member.
225  ///
226  /// Data member Dst_options is optional;
227  /// its type is defined as 'typedef CConvert_feature_dst_options TDst_options'
228  /// @return
229  /// - true, if a value has been assigned.
230  /// - false, otherwise.
231  bool IsSetDst_options(void) const;
232 
233  /// Check if it is safe to call GetDst_options method.
234  ///
235  /// @return
236  /// - true, if the data member is getatable.
237  /// - false, otherwise.
238  bool CanGetDst_options(void) const;
239 
240  /// Reset Dst_options data member.
241  void ResetDst_options(void);
242 
243  /// Get the Dst_options member data.
244  ///
245  /// @return
246  /// Reference to the member data.
247  const TDst_options& GetDst_options(void) const;
248 
249  /// Assign a value to Dst_options data member.
250  ///
251  /// @param value
252  /// Reference to value.
254 
255  /// Assign a value to Dst_options data member.
256  ///
257  /// @return
258  /// Reference to the data value.
260 
261  /// Check if a value has been assigned to Leave_original data member.
262  ///
263  /// Data member Leave_original is mandatory;
264  /// its type is defined as 'typedef bool TLeave_original'
265  /// @return
266  /// - true, if a value has been assigned.
267  /// - false, otherwise.
268  bool IsSetLeave_original(void) const;
269 
270  /// Check if it is safe to call GetLeave_original method.
271  ///
272  /// @return
273  /// - true, if the data member is getatable.
274  /// - false, otherwise.
275  bool CanGetLeave_original(void) const;
276 
277  /// Reset Leave_original data member.
278  void ResetLeave_original(void);
279 
280  /// Get the Leave_original member data.
281  ///
282  /// @return
283  /// Copy of the member data.
285 
286  /// Assign a value to Leave_original data member.
287  ///
288  /// @param value
289  /// Value to assign
291 
292  /// Assign a value to Leave_original data member.
293  ///
294  /// @return
295  /// Reference to the data value.
297 
298  /// Check if a value has been assigned to Src_feat_constraint data member.
299  ///
300  /// Data member Src_feat_constraint is optional;
301  /// its type is defined as 'typedef CConstraint_choice_set TSrc_feat_constraint'
302  /// @return
303  /// - true, if a value has been assigned.
304  /// - false, otherwise.
305  bool IsSetSrc_feat_constraint(void) const;
306 
307  /// Check if it is safe to call GetSrc_feat_constraint method.
308  ///
309  /// @return
310  /// - true, if the data member is getatable.
311  /// - false, otherwise.
312  bool CanGetSrc_feat_constraint(void) const;
313 
314  /// Reset Src_feat_constraint data member.
315  void ResetSrc_feat_constraint(void);
316 
317  /// Get the Src_feat_constraint member data.
318  ///
319  /// @return
320  /// Reference to the member data.
321  const TSrc_feat_constraint& GetSrc_feat_constraint(void) const;
322 
323  /// Assign a value to Src_feat_constraint data member.
324  ///
325  /// @param value
326  /// Reference to value.
328 
329  /// Assign a value to Src_feat_constraint data member.
330  ///
331  /// @return
332  /// Reference to the data value.
334 
335  /// Reset the whole object
336  virtual void Reset(void);
337 
338 
339 private:
340  // Prohibit copy constructor and assignment operator
343 
344  // data
352 };
353 
354 /* @} */
355 
356 
357 
358 
359 
360 ///////////////////////////////////////////////////////////
361 ///////////////////// inline methods //////////////////////
362 ///////////////////////////////////////////////////////////
363 inline
365 {
366  return ((m_set_State[0] & 0x3) != 0);
367 }
368 
369 inline
371 {
372  return IsSetType_from();
373 }
374 
375 inline
377 {
379  m_set_State[0] &= ~0x3;
380 }
381 
382 inline
384 {
385  if (!CanGetType_from()) {
386  ThrowUnassigned(0);
387  }
388  return m_Type_from;
389 }
390 
391 inline
393 {
394  m_Type_from = value;
395  m_set_State[0] |= 0x3;
396 }
397 
398 inline
400 {
401 #ifdef _DEBUG
402  if (!IsSetType_from()) {
403  memset(&m_Type_from,UnassignedByte(),sizeof(m_Type_from));
404  }
405 #endif
406  m_set_State[0] |= 0x1;
407  return m_Type_from;
408 }
409 
410 inline
412 {
413  return ((m_set_State[0] & 0xc) != 0);
414 }
415 
416 inline
418 {
419  return IsSetType_to();
420 }
421 
422 inline
424 {
426  m_set_State[0] &= ~0xc;
427 }
428 
429 inline
431 {
432  if (!CanGetType_to()) {
433  ThrowUnassigned(1);
434  }
435  return m_Type_to;
436 }
437 
438 inline
440 {
441  m_Type_to = value;
442  m_set_State[0] |= 0xc;
443 }
444 
445 inline
447 {
448 #ifdef _DEBUG
449  if (!IsSetType_to()) {
450  memset(&m_Type_to,UnassignedByte(),sizeof(m_Type_to));
451  }
452 #endif
453  m_set_State[0] |= 0x4;
454  return m_Type_to;
455 }
456 
457 inline
459 {
460  return m_Src_options.NotEmpty();
461 }
462 
463 inline
465 {
466  return IsSetSrc_options();
467 }
468 
469 inline
471 {
472  if (!CanGetSrc_options()) {
473  ThrowUnassigned(2);
474  }
475  return (*m_Src_options);
476 }
477 
478 inline
480 {
481  return m_Dst_options.NotEmpty();
482 }
483 
484 inline
486 {
487  return IsSetDst_options();
488 }
489 
490 inline
492 {
493  if (!CanGetDst_options()) {
494  ThrowUnassigned(3);
495  }
496  return (*m_Dst_options);
497 }
498 
499 inline
501 {
502  return ((m_set_State[0] & 0x300) != 0);
503 }
504 
505 inline
507 {
508  return IsSetLeave_original();
509 }
510 
511 inline
513 {
514  m_Leave_original = 0;
515  m_set_State[0] &= ~0x300;
516 }
517 
518 inline
520 {
521  if (!CanGetLeave_original()) {
522  ThrowUnassigned(4);
523  }
524  return m_Leave_original;
525 }
526 
527 inline
529 {
531  m_set_State[0] |= 0x300;
532 }
533 
534 inline
536 {
537 #ifdef _DEBUG
538  if (!IsSetLeave_original()) {
540  }
541 #endif
542  m_set_State[0] |= 0x100;
543  return m_Leave_original;
544 }
545 
546 inline
548 {
549  return m_Src_feat_constraint.NotEmpty();
550 }
551 
552 inline
554 {
555  return IsSetSrc_feat_constraint();
556 }
557 
558 inline
560 {
561  if (!CanGetSrc_feat_constraint()) {
562  ThrowUnassigned(5);
563  }
564  return (*m_Src_feat_constraint);
565 }
566 
567 ///////////////////////////////////////////////////////////
568 ////////////////// end of inline methods //////////////////
569 ///////////////////////////////////////////////////////////
570 
571 
572 
573 
574 
575 END_objects_SCOPE // namespace ncbi::objects::
576 
578 
579 
580 #endif // OBJECTS_MACRO_CONVERT_FEATURE_ACTION_BASE_HPP
User-defined methods of the data storage class.
CConvert_feature_action_Base –.
CConvert_feature_dst_options –.
CConvert_feature_src_options –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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
bool CanGetSrc_options(void) const
Check if it is safe to call GetSrc_options method.
const TSrc_feat_constraint & GetSrc_feat_constraint(void) const
Get the Src_feat_constraint member data.
const TSrc_options & GetSrc_options(void) const
Get the Src_options member data.
void ResetType_from(void)
Reset Type_from data member.
bool CanGetSrc_feat_constraint(void) const
Check if it is safe to call GetSrc_feat_constraint method.
bool IsSetType_from(void) const
Check if a value has been assigned to Type_from data member.
CConvert_feature_dst_options TDst_options
void ResetDst_options(void)
Reset Dst_options data member.
CRef< TSrc_feat_constraint > m_Src_feat_constraint
virtual void Reset(void)
Reset the whole object.
bool CanGetDst_options(void) const
Check if it is safe to call GetDst_options method.
bool CanGetType_to(void) const
Check if it is safe to call GetType_to method.
TLeave_original & SetLeave_original(void)
Assign a value to Leave_original data member.
bool CanGetLeave_original(void) const
Check if it is safe to call GetLeave_original method.
void ResetLeave_original(void)
Reset Leave_original data member.
bool IsSetLeave_original(void) const
Check if a value has been assigned to Leave_original data member.
CConvert_feature_action_Base & operator=(const CConvert_feature_action_Base &)
TLeave_original GetLeave_original(void) const
Get the Leave_original member data.
const TDst_options & GetDst_options(void) const
Get the Dst_options member data.
EMacro_feature_type
feature values
void ResetSrc_options(void)
Reset Src_options data member.
TSrc_feat_constraint & SetSrc_feat_constraint(void)
Assign a value to Src_feat_constraint data member.
TType_from & SetType_from(void)
Assign a value to Type_from data member.
CConvert_feature_src_options TSrc_options
bool IsSetType_to(void) const
Check if a value has been assigned to Type_to data member.
bool IsSetDst_options(void) const
Check if a value has been assigned to Dst_options data member.
Tparent::CMemberIndex< E_memberIndex, 7 > TmemberIndex
TSrc_options & SetSrc_options(void)
Assign a value to Src_options data member.
void ResetType_to(void)
Reset Type_to data member.
TType_from GetType_from(void) const
Get the Type_from member data.
bool IsSetSrc_options(void) const
Check if a value has been assigned to Src_options data member.
bool IsSetSrc_feat_constraint(void) const
Check if a value has been assigned to Src_feat_constraint data member.
CConvert_feature_action_Base(const CConvert_feature_action_Base &)
TType_to & SetType_to(void)
Assign a value to Type_to data member.
TType_to GetType_to(void) const
Get the Type_to member data.
void ResetSrc_feat_constraint(void)
Reset Src_feat_constraint data member.
TDst_options & SetDst_options(void)
Assign a value to Dst_options data member.
bool CanGetType_from(void) const
Check if it is safe to call GetType_from method.
CConstraint_choice_set TSrc_feat_constraint
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed Sep 04 15:00:04 2024 by modify_doxy.py rev. 669887