NCBI C++ ToolKit
Apply_table_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 Apply_table_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_APPLY_TABLE_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_APPLY_TABLE_ACTION_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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
61 class CTable_match;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_Macro
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 ///
74 /// CApply_table_action_Base --
75 ///
76 
78 {
80 public:
81  // constructor
83  // destructor
84  virtual ~CApply_table_action_Base(void);
85 
86  // type info
88 
89  // types
90  typedef string TFilename;
93  typedef bool TAlso_change_mrna;
94  typedef bool TSkip_blanks;
95 
96  // member index
97  enum class E_memberIndex {
98  e__allMandatory = 0,
99  e_filename,
100  e_match_type,
104  };
106 
107  // getters
108  // setters
109 
110  /// Check if a value has been assigned to Filename data member.
111  ///
112  /// Data member Filename is mandatory;
113  /// its type is defined as 'typedef string TFilename'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetFilename(void) const;
118 
119  /// Check if it is safe to call GetFilename method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetFilename(void) const;
125 
126  /// Reset Filename data member.
127  void ResetFilename(void);
128 
129  /// Get the Filename member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const TFilename& GetFilename(void) const;
134 
135  /// Assign a value to Filename data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetFilename(const TFilename& value);
140  void SetFilename(TFilename&& value);
141 
142  /// Assign a value to Filename data member.
143  ///
144  /// @return
145  /// Reference to the data value.
146  TFilename& SetFilename(void);
147 
148  /// Check if a value has been assigned to Match_type data member.
149  ///
150  /// Data member Match_type is mandatory;
151  /// its type is defined as 'typedef CTable_match TMatch_type'
152  /// @return
153  /// - true, if a value has been assigned.
154  /// - false, otherwise.
155  bool IsSetMatch_type(void) const;
156 
157  /// Check if it is safe to call GetMatch_type method.
158  ///
159  /// @return
160  /// - true, if the data member is getatable.
161  /// - false, otherwise.
162  bool CanGetMatch_type(void) const;
163 
164  /// Reset Match_type data member.
165  void ResetMatch_type(void);
166 
167  /// Get the Match_type member data.
168  ///
169  /// @return
170  /// Reference to the member data.
171  const TMatch_type& GetMatch_type(void) const;
172 
173  /// Assign a value to Match_type data member.
174  ///
175  /// @param value
176  /// Reference to value.
178 
179  /// Assign a value to Match_type data member.
180  ///
181  /// @return
182  /// Reference to the data value.
183  TMatch_type& SetMatch_type(void);
184 
185  /// Check if a value has been assigned to In_memory_table data member.
186  ///
187  /// Data member In_memory_table is optional;
188  /// its type is defined as 'typedef CApply_table_extra_data TIn_memory_table'
189  /// @return
190  /// - true, if a value has been assigned.
191  /// - false, otherwise.
192  bool IsSetIn_memory_table(void) const;
193 
194  /// Check if it is safe to call GetIn_memory_table method.
195  ///
196  /// @return
197  /// - true, if the data member is getatable.
198  /// - false, otherwise.
199  bool CanGetIn_memory_table(void) const;
200 
201  /// Reset In_memory_table data member.
202  void ResetIn_memory_table(void);
203 
204  /// Get the In_memory_table member data.
205  ///
206  /// @return
207  /// Reference to the member data.
208  const TIn_memory_table& GetIn_memory_table(void) const;
209 
210  /// Assign a value to In_memory_table data member.
211  ///
212  /// @param value
213  /// Reference to value.
215 
216  /// Assign a value to In_memory_table data member.
217  ///
218  /// @return
219  /// Reference to the data value.
221 
222  /// Check if a value has been assigned to Also_change_mrna data member.
223  ///
224  /// Data member Also_change_mrna is optional with default false;
225  /// its type is defined as 'typedef bool TAlso_change_mrna'
226  /// @return
227  /// - true, if a value has been assigned.
228  /// - false, otherwise.
229  bool IsSetAlso_change_mrna(void) const;
230 
231  /// Check if it is safe to call GetAlso_change_mrna method.
232  ///
233  /// @return
234  /// - true, if the data member is getatable.
235  /// - false, otherwise.
236  bool CanGetAlso_change_mrna(void) const;
237 
238  /// Reset Also_change_mrna data member.
239  void ResetAlso_change_mrna(void);
240 
241  /// Assign default value to Also_change_mrna data member.
242  void SetDefaultAlso_change_mrna(void);
243 
244  /// Get the Also_change_mrna member data.
245  ///
246  /// @return
247  /// Copy of the member data.
249 
250  /// Assign a value to Also_change_mrna data member.
251  ///
252  /// @param value
253  /// Value to assign
255 
256  /// Assign a value to Also_change_mrna data member.
257  ///
258  /// @return
259  /// Reference to the data value.
261 
262  /// Check if a value has been assigned to Skip_blanks data member.
263  ///
264  /// Data member Skip_blanks is optional with default true;
265  /// its type is defined as 'typedef bool TSkip_blanks'
266  /// @return
267  /// - true, if a value has been assigned.
268  /// - false, otherwise.
269  bool IsSetSkip_blanks(void) const;
270 
271  /// Check if it is safe to call GetSkip_blanks method.
272  ///
273  /// @return
274  /// - true, if the data member is getatable.
275  /// - false, otherwise.
276  bool CanGetSkip_blanks(void) const;
277 
278  /// Reset Skip_blanks data member.
279  void ResetSkip_blanks(void);
280 
281  /// Assign default value to Skip_blanks data member.
282  void SetDefaultSkip_blanks(void);
283 
284  /// Get the Skip_blanks member data.
285  ///
286  /// @return
287  /// Copy of the member data.
288  TSkip_blanks GetSkip_blanks(void) const;
289 
290  /// Assign a value to Skip_blanks data member.
291  ///
292  /// @param value
293  /// Value to assign
295 
296  /// Assign a value to Skip_blanks data member.
297  ///
298  /// @return
299  /// Reference to the data value.
301 
302  /// Reset the whole object
303  virtual void Reset(void);
304 
305 
306 private:
307  // Prohibit copy constructor and assignment operator
310 
311  // data
313  string m_Filename;
318 };
319 
320 /* @} */
321 
322 
323 
324 
325 
326 ///////////////////////////////////////////////////////////
327 ///////////////////// inline methods //////////////////////
328 ///////////////////////////////////////////////////////////
329 inline
331 {
332  return ((m_set_State[0] & 0x3) != 0);
333 }
334 
335 inline
337 {
338  return IsSetFilename();
339 }
340 
341 inline
343 {
344  if (!CanGetFilename()) {
345  ThrowUnassigned(0);
346  }
347  return m_Filename;
348 }
349 
350 inline
352 {
353  m_Filename = value;
354  m_set_State[0] |= 0x3;
355 }
356 
357 inline
359 {
360  m_Filename = std::forward<CApply_table_action_Base::TFilename>(value);
361  m_set_State[0] |= 0x3;
362 }
363 
364 inline
366 {
367 #ifdef _DEBUG
368  if (!IsSetFilename()) {
370  }
371 #endif
372  m_set_State[0] |= 0x1;
373  return m_Filename;
374 }
375 
376 inline
378 {
379  return m_Match_type.NotEmpty();
380 }
381 
382 inline
384 {
385  return true;
386 }
387 
388 inline
390 {
391  if ( !m_Match_type ) {
392  const_cast<CApply_table_action_Base*>(this)->ResetMatch_type();
393  }
394  return (*m_Match_type);
395 }
396 
397 inline
399 {
400  if ( !m_Match_type ) {
401  ResetMatch_type();
402  }
403  return (*m_Match_type);
404 }
405 
406 inline
408 {
409  return m_In_memory_table.NotEmpty();
410 }
411 
412 inline
414 {
415  return IsSetIn_memory_table();
416 }
417 
418 inline
420 {
421  if (!CanGetIn_memory_table()) {
422  ThrowUnassigned(2);
423  }
424  return (*m_In_memory_table);
425 }
426 
427 inline
429 {
430  return ((m_set_State[0] & 0xc0) != 0);
431 }
432 
433 inline
435 {
436  return true;
437 }
438 
439 inline
441 {
442  m_Also_change_mrna = false;
443  m_set_State[0] &= ~0xc0;
444 }
445 
446 inline
448 {
450 }
451 
452 inline
454 {
455  return m_Also_change_mrna;
456 }
457 
458 inline
460 {
462  m_set_State[0] |= 0xc0;
463 }
464 
465 inline
467 {
468 #ifdef _DEBUG
469  if (!IsSetAlso_change_mrna()) {
471  }
472 #endif
473  m_set_State[0] |= 0x40;
474  return m_Also_change_mrna;
475 }
476 
477 inline
479 {
480  return ((m_set_State[0] & 0x300) != 0);
481 }
482 
483 inline
485 {
486  return true;
487 }
488 
489 inline
491 {
492  m_Skip_blanks = true;
493  m_set_State[0] &= ~0x300;
494 }
495 
496 inline
498 {
500 }
501 
502 inline
504 {
505  return m_Skip_blanks;
506 }
507 
508 inline
510 {
512  m_set_State[0] |= 0x300;
513 }
514 
515 inline
517 {
518 #ifdef _DEBUG
519  if (!IsSetSkip_blanks()) {
520  memset(&m_Skip_blanks,UnassignedByte(),sizeof(m_Skip_blanks));
521  }
522 #endif
523  m_set_State[0] |= 0x100;
524  return m_Skip_blanks;
525 }
526 
527 ///////////////////////////////////////////////////////////
528 ////////////////// end of inline methods //////////////////
529 ///////////////////////////////////////////////////////////
530 
531 
532 
533 
534 
535 END_objects_SCOPE // namespace ncbi::objects::
536 
538 
539 
540 #endif // OBJECTS_MACRO_APPLY_TABLE_ACTION_BASE_HPP
CApply_table_action_Base –.
CApply_table_extra_data –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTable_match –.
Definition: Table_match.hpp:66
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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
bool IsSetFilename(void) const
Check if a value has been assigned to Filename data member.
TSkip_blanks GetSkip_blanks(void) const
Get the Skip_blanks member data.
bool CanGetMatch_type(void) const
Check if it is safe to call GetMatch_type method.
bool CanGetAlso_change_mrna(void) const
Check if it is safe to call GetAlso_change_mrna method.
CApply_table_action_Base(const CApply_table_action_Base &)
TIn_memory_table & SetIn_memory_table(void)
Assign a value to In_memory_table data member.
void ResetAlso_change_mrna(void)
Reset Also_change_mrna data member.
CApply_table_action_Base & operator=(const CApply_table_action_Base &)
void SetDefaultSkip_blanks(void)
Assign default value to Skip_blanks data member.
virtual void Reset(void)
Reset the whole object.
bool CanGetSkip_blanks(void) const
Check if it is safe to call GetSkip_blanks method.
bool IsSetSkip_blanks(void) const
Check if a value has been assigned to Skip_blanks data member.
TMatch_type & SetMatch_type(void)
Assign a value to Match_type data member.
void ResetMatch_type(void)
Reset Match_type data member.
CApply_table_extra_data TIn_memory_table
CRef< TMatch_type > m_Match_type
const TMatch_type & GetMatch_type(void) const
Get the Match_type member data.
bool IsSetAlso_change_mrna(void) const
Check if a value has been assigned to Also_change_mrna data member.
TAlso_change_mrna & SetAlso_change_mrna(void)
Assign a value to Also_change_mrna data member.
void ResetFilename(void)
Reset Filename data member.
TFilename & SetFilename(void)
Assign a value to Filename data member.
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
CRef< TIn_memory_table > m_In_memory_table
bool IsSetMatch_type(void) const
Check if a value has been assigned to Match_type data member.
const TIn_memory_table & GetIn_memory_table(void) const
Get the In_memory_table member data.
TAlso_change_mrna GetAlso_change_mrna(void) const
Get the Also_change_mrna member data.
const TFilename & GetFilename(void) const
Get the Filename member data.
void SetDefaultAlso_change_mrna(void)
Assign default value to Also_change_mrna data member.
bool CanGetIn_memory_table(void) const
Check if it is safe to call GetIn_memory_table method.
bool IsSetIn_memory_table(void) const
Check if a value has been assigned to In_memory_table data member.
void ResetIn_memory_table(void)
Reset In_memory_table data member.
TSkip_blanks & SetSkip_blanks(void)
Assign a value to Skip_blanks data member.
bool CanGetFilename(void) const
Check if it is safe to call GetFilename method.
void ResetSkip_blanks(void)
Reset Skip_blanks data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Jun 08 14:25:50 2024 by modify_doxy.py rev. 669887