NCBI C++ ToolKit
Edit_featur_locatio_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 Edit_featur_locatio_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_EDIT_FEATUR_LOCATIO_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_EDIT_FEATUR_LOCATIO_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
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_Macro
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CEdit_feature_location_action_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
85 
86  // type info
88 
89  // types
92  typedef bool TRetranslate_cds;
93  typedef bool TAlso_edit_gene;
95 
96  // member index
97  enum class E_memberIndex {
98  e__allMandatory = 0,
99  e_type,
100  e_action,
104  };
106 
107  // getters
108  // setters
109 
110  /// Check if a value has been assigned to Type data member.
111  ///
112  /// Data member Type is mandatory;
113  /// its type is defined as 'typedef EMacro_feature_type TType'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetType(void) const;
118 
119  /// Check if it is safe to call GetType method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetType(void) const;
125 
126  /// Reset Type data member.
127  void ResetType(void);
128 
129  /// Get the Type member data.
130  ///
131  /// @return
132  /// Copy of the member data.
133  TType GetType(void) const;
134 
135  /// Assign a value to Type data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetType(TType value);
140 
141  /// Assign a value to Type data member.
142  ///
143  /// @return
144  /// Reference to the data value.
145  TType& SetType(void);
146 
147  /// Check if a value has been assigned to Action data member.
148  ///
149  /// Data member Action is mandatory;
150  /// its type is defined as 'typedef CLocation_edit_type TAction'
151  /// @return
152  /// - true, if a value has been assigned.
153  /// - false, otherwise.
154  bool IsSetAction(void) const;
155 
156  /// Check if it is safe to call GetAction method.
157  ///
158  /// @return
159  /// - true, if the data member is getatable.
160  /// - false, otherwise.
161  bool CanGetAction(void) const;
162 
163  /// Reset Action data member.
164  void ResetAction(void);
165 
166  /// Get the Action member data.
167  ///
168  /// @return
169  /// Reference to the member data.
170  const TAction& GetAction(void) const;
171 
172  /// Assign a value to Action data member.
173  ///
174  /// @param value
175  /// Reference to value.
176  void SetAction(TAction& value);
177 
178  /// Assign a value to Action data member.
179  ///
180  /// @return
181  /// Reference to the data value.
182  TAction& SetAction(void);
183 
184  /// Check if a value has been assigned to Retranslate_cds data member.
185  ///
186  /// Data member Retranslate_cds is optional;
187  /// its type is defined as 'typedef bool TRetranslate_cds'
188  /// @return
189  /// - true, if a value has been assigned.
190  /// - false, otherwise.
191  bool IsSetRetranslate_cds(void) const;
192 
193  /// Check if it is safe to call GetRetranslate_cds method.
194  ///
195  /// @return
196  /// - true, if the data member is getatable.
197  /// - false, otherwise.
198  bool CanGetRetranslate_cds(void) const;
199 
200  /// Reset Retranslate_cds data member.
201  void ResetRetranslate_cds(void);
202 
203  /// Get the Retranslate_cds member data.
204  ///
205  /// @return
206  /// Copy of the member data.
208 
209  /// Assign a value to Retranslate_cds data member.
210  ///
211  /// @param value
212  /// Value to assign
214 
215  /// Assign a value to Retranslate_cds data member.
216  ///
217  /// @return
218  /// Reference to the data value.
220 
221  /// Check if a value has been assigned to Also_edit_gene data member.
222  ///
223  /// Data member Also_edit_gene is optional;
224  /// its type is defined as 'typedef bool TAlso_edit_gene'
225  /// @return
226  /// - true, if a value has been assigned.
227  /// - false, otherwise.
228  bool IsSetAlso_edit_gene(void) const;
229 
230  /// Check if it is safe to call GetAlso_edit_gene method.
231  ///
232  /// @return
233  /// - true, if the data member is getatable.
234  /// - false, otherwise.
235  bool CanGetAlso_edit_gene(void) const;
236 
237  /// Reset Also_edit_gene data member.
238  void ResetAlso_edit_gene(void);
239 
240  /// Get the Also_edit_gene member data.
241  ///
242  /// @return
243  /// Copy of the member data.
245 
246  /// Assign a value to Also_edit_gene data member.
247  ///
248  /// @param value
249  /// Value to assign
251 
252  /// Assign a value to Also_edit_gene data member.
253  ///
254  /// @return
255  /// Reference to the data value.
257 
258  /// Check if a value has been assigned to Constraint data member.
259  ///
260  /// Data member Constraint is optional;
261  /// its type is defined as 'typedef CConstraint_choice_set TConstraint'
262  /// @return
263  /// - true, if a value has been assigned.
264  /// - false, otherwise.
265  bool IsSetConstraint(void) const;
266 
267  /// Check if it is safe to call GetConstraint method.
268  ///
269  /// @return
270  /// - true, if the data member is getatable.
271  /// - false, otherwise.
272  bool CanGetConstraint(void) const;
273 
274  /// Reset Constraint data member.
275  void ResetConstraint(void);
276 
277  /// Get the Constraint member data.
278  ///
279  /// @return
280  /// Reference to the member data.
281  const TConstraint& GetConstraint(void) const;
282 
283  /// Assign a value to Constraint data member.
284  ///
285  /// @param value
286  /// Reference to value.
288 
289  /// Assign a value to Constraint data member.
290  ///
291  /// @return
292  /// Reference to the data value.
293  TConstraint& SetConstraint(void);
294 
295  /// Reset the whole object
296  virtual void Reset(void);
297 
298 
299 private:
300  // Prohibit copy constructor and assignment operator
303 
304  // data
311 };
312 
313 /* @} */
314 
315 
316 
317 
318 
319 ///////////////////////////////////////////////////////////
320 ///////////////////// inline methods //////////////////////
321 ///////////////////////////////////////////////////////////
322 inline
324 {
325  return ((m_set_State[0] & 0x3) != 0);
326 }
327 
328 inline
330 {
331  return IsSetType();
332 }
333 
334 inline
336 {
338  m_set_State[0] &= ~0x3;
339 }
340 
341 inline
343 {
344  if (!CanGetType()) {
345  ThrowUnassigned(0);
346  }
347  return m_Type;
348 }
349 
350 inline
352 {
353  m_Type = value;
354  m_set_State[0] |= 0x3;
355 }
356 
357 inline
359 {
360 #ifdef _DEBUG
361  if (!IsSetType()) {
362  memset(&m_Type,UnassignedByte(),sizeof(m_Type));
363  }
364 #endif
365  m_set_State[0] |= 0x1;
366  return m_Type;
367 }
368 
369 inline
371 {
372  return m_Action.NotEmpty();
373 }
374 
375 inline
377 {
378  return true;
379 }
380 
381 inline
383 {
384  if ( !m_Action ) {
385  const_cast<CEdit_feature_location_action_Base*>(this)->ResetAction();
386  }
387  return (*m_Action);
388 }
389 
390 inline
392 {
393  if ( !m_Action ) {
394  ResetAction();
395  }
396  return (*m_Action);
397 }
398 
399 inline
401 {
402  return ((m_set_State[0] & 0x30) != 0);
403 }
404 
405 inline
407 {
408  return IsSetRetranslate_cds();
409 }
410 
411 inline
413 {
414  m_Retranslate_cds = 0;
415  m_set_State[0] &= ~0x30;
416 }
417 
418 inline
420 {
421  if (!CanGetRetranslate_cds()) {
422  ThrowUnassigned(2);
423  }
424  return m_Retranslate_cds;
425 }
426 
427 inline
429 {
431  m_set_State[0] |= 0x30;
432 }
433 
434 inline
436 {
437 #ifdef _DEBUG
438  if (!IsSetRetranslate_cds()) {
440  }
441 #endif
442  m_set_State[0] |= 0x10;
443  return m_Retranslate_cds;
444 }
445 
446 inline
448 {
449  return ((m_set_State[0] & 0xc0) != 0);
450 }
451 
452 inline
454 {
455  return IsSetAlso_edit_gene();
456 }
457 
458 inline
460 {
461  m_Also_edit_gene = 0;
462  m_set_State[0] &= ~0xc0;
463 }
464 
465 inline
467 {
468  if (!CanGetAlso_edit_gene()) {
469  ThrowUnassigned(3);
470  }
471  return m_Also_edit_gene;
472 }
473 
474 inline
476 {
478  m_set_State[0] |= 0xc0;
479 }
480 
481 inline
483 {
484 #ifdef _DEBUG
485  if (!IsSetAlso_edit_gene()) {
487  }
488 #endif
489  m_set_State[0] |= 0x40;
490  return m_Also_edit_gene;
491 }
492 
493 inline
495 {
496  return m_Constraint.NotEmpty();
497 }
498 
499 inline
501 {
502  return IsSetConstraint();
503 }
504 
505 inline
507 {
508  if (!CanGetConstraint()) {
509  ThrowUnassigned(4);
510  }
511  return (*m_Constraint);
512 }
513 
514 ///////////////////////////////////////////////////////////
515 ////////////////// end of inline methods //////////////////
516 ///////////////////////////////////////////////////////////
517 
518 
519 
520 
521 
522 END_objects_SCOPE // namespace ncbi::objects::
523 
525 
526 
527 #endif // OBJECTS_MACRO_EDIT_FEATUR_LOCATIO_ACTION_BASE_HPP
User-defined methods of the data storage class.
CEdit_feature_location_action_Base –.
CLocation_edit_type –.
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 IsSetAlso_edit_gene(void) const
Check if a value has been assigned to Also_edit_gene data member.
TType GetType(void) const
Get the Type member data.
void ResetRetranslate_cds(void)
Reset Retranslate_cds data member.
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
CEdit_feature_location_action_Base & operator=(const CEdit_feature_location_action_Base &)
void ResetType(void)
Reset Type data member.
TAlso_edit_gene GetAlso_edit_gene(void) const
Get the Also_edit_gene member data.
const TAction & GetAction(void) const
Get the Action member data.
bool CanGetAction(void) const
Check if it is safe to call GetAction method.
TRetranslate_cds GetRetranslate_cds(void) const
Get the Retranslate_cds member data.
void ResetAlso_edit_gene(void)
Reset Also_edit_gene data member.
bool CanGetRetranslate_cds(void) const
Check if it is safe to call GetRetranslate_cds method.
TConstraint & SetConstraint(void)
Assign a value to Constraint data member.
bool CanGetAlso_edit_gene(void) const
Check if it is safe to call GetAlso_edit_gene method.
EMacro_feature_type
feature values
bool CanGetConstraint(void) const
Check if it is safe to call GetConstraint method.
bool IsSetConstraint(void) const
Check if a value has been assigned to Constraint data member.
void ResetAction(void)
Reset Action data member.
const TConstraint & GetConstraint(void) const
Get the Constraint member data.
CEdit_feature_location_action_Base(const CEdit_feature_location_action_Base &)
bool IsSetRetranslate_cds(void) const
Check if a value has been assigned to Retranslate_cds data member.
bool CanGetType(void) const
Check if it is safe to call GetType method.
TRetranslate_cds & SetRetranslate_cds(void)
Assign a value to Retranslate_cds data member.
virtual void Reset(void)
Reset the whole object.
TType & SetType(void)
Assign a value to Type data member.
TAction & SetAction(void)
Assign a value to Action data member.
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
void ResetConstraint(void)
Reset Constraint data member.
TAlso_edit_gene & SetAlso_edit_gene(void)
Assign a value to Also_edit_gene data member.
bool IsSetAction(void) const
Check if a value has been assigned to Action data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed May 08 12:12:55 2024 by modify_doxy.py rev. 669887