NCBI C++ ToolKit
Remove_outside_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 Remove_outside_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_REMOVE_OUTSIDE_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_REMOVE_OUTSIDE_ACTION_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 CField_type;
57 class CText_portion;
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_Macro
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CRemove_outside_action_Base --
71 ///
72 
74 {
76 public:
77  // constructor
79  // destructor
80  virtual ~CRemove_outside_action_Base(void);
81 
82  // type info
84 
85  // types
88  typedef bool TRemove_if_not_found;
89 
90  // member index
91  enum class E_memberIndex {
92  e__allMandatory = 0,
93  e_portion,
94  e_field,
96  };
98 
99  // getters
100  // setters
101 
102  /// Check if a value has been assigned to Portion data member.
103  ///
104  /// Data member Portion is mandatory;
105  /// its type is defined as 'typedef CText_portion TPortion'
106  /// @return
107  /// - true, if a value has been assigned.
108  /// - false, otherwise.
109  bool IsSetPortion(void) const;
110 
111  /// Check if it is safe to call GetPortion method.
112  ///
113  /// @return
114  /// - true, if the data member is getatable.
115  /// - false, otherwise.
116  bool CanGetPortion(void) const;
117 
118  /// Reset Portion data member.
119  void ResetPortion(void);
120 
121  /// Get the Portion member data.
122  ///
123  /// @return
124  /// Reference to the member data.
125  const TPortion& GetPortion(void) const;
126 
127  /// Assign a value to Portion data member.
128  ///
129  /// @param value
130  /// Reference to value.
131  void SetPortion(TPortion& value);
132 
133  /// Assign a value to Portion data member.
134  ///
135  /// @return
136  /// Reference to the data value.
137  TPortion& SetPortion(void);
138 
139  /// Check if a value has been assigned to Field data member.
140  ///
141  /// Data member Field is mandatory;
142  /// its type is defined as 'typedef CField_type TField'
143  /// @return
144  /// - true, if a value has been assigned.
145  /// - false, otherwise.
146  bool IsSetField(void) const;
147 
148  /// Check if it is safe to call GetField method.
149  ///
150  /// @return
151  /// - true, if the data member is getatable.
152  /// - false, otherwise.
153  bool CanGetField(void) const;
154 
155  /// Reset Field data member.
156  void ResetField(void);
157 
158  /// Get the Field member data.
159  ///
160  /// @return
161  /// Reference to the member data.
162  const TField& GetField(void) const;
163 
164  /// Assign a value to Field data member.
165  ///
166  /// @param value
167  /// Reference to value.
168  void SetField(TField& value);
169 
170  /// Assign a value to Field data member.
171  ///
172  /// @return
173  /// Reference to the data value.
174  TField& SetField(void);
175 
176  /// Check if a value has been assigned to Remove_if_not_found data member.
177  ///
178  /// Data member Remove_if_not_found is optional with default false;
179  /// its type is defined as 'typedef bool TRemove_if_not_found'
180  /// @return
181  /// - true, if a value has been assigned.
182  /// - false, otherwise.
183  bool IsSetRemove_if_not_found(void) const;
184 
185  /// Check if it is safe to call GetRemove_if_not_found method.
186  ///
187  /// @return
188  /// - true, if the data member is getatable.
189  /// - false, otherwise.
190  bool CanGetRemove_if_not_found(void) const;
191 
192  /// Reset Remove_if_not_found data member.
193  void ResetRemove_if_not_found(void);
194 
195  /// Assign default value to Remove_if_not_found data member.
197 
198  /// Get the Remove_if_not_found member data.
199  ///
200  /// @return
201  /// Copy of the member data.
203 
204  /// Assign a value to Remove_if_not_found data member.
205  ///
206  /// @param value
207  /// Value to assign
209 
210  /// Assign a value to Remove_if_not_found data member.
211  ///
212  /// @return
213  /// Reference to the data value.
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
230 };
231 
232 /* @} */
233 
234 
235 
236 
237 
238 ///////////////////////////////////////////////////////////
239 ///////////////////// inline methods //////////////////////
240 ///////////////////////////////////////////////////////////
241 inline
243 {
244  return m_Portion.NotEmpty();
245 }
246 
247 inline
249 {
250  return true;
251 }
252 
253 inline
255 {
256  if ( !m_Portion ) {
257  const_cast<CRemove_outside_action_Base*>(this)->ResetPortion();
258  }
259  return (*m_Portion);
260 }
261 
262 inline
264 {
265  if ( !m_Portion ) {
266  ResetPortion();
267  }
268  return (*m_Portion);
269 }
270 
271 inline
273 {
274  return m_Field.NotEmpty();
275 }
276 
277 inline
279 {
280  return true;
281 }
282 
283 inline
285 {
286  if ( !m_Field ) {
287  const_cast<CRemove_outside_action_Base*>(this)->ResetField();
288  }
289  return (*m_Field);
290 }
291 
292 inline
294 {
295  if ( !m_Field ) {
296  ResetField();
297  }
298  return (*m_Field);
299 }
300 
301 inline
303 {
304  return ((m_set_State[0] & 0x30) != 0);
305 }
306 
307 inline
309 {
310  return true;
311 }
312 
313 inline
315 {
316  m_Remove_if_not_found = false;
317  m_set_State[0] &= ~0x30;
318 }
319 
320 inline
322 {
324 }
325 
326 inline
328 {
329  return m_Remove_if_not_found;
330 }
331 
332 inline
334 {
336  m_set_State[0] |= 0x30;
337 }
338 
339 inline
341 {
342 #ifdef _DEBUG
343  if (!IsSetRemove_if_not_found()) {
345  }
346 #endif
347  m_set_State[0] |= 0x10;
348  return m_Remove_if_not_found;
349 }
350 
351 ///////////////////////////////////////////////////////////
352 ////////////////// end of inline methods //////////////////
353 ///////////////////////////////////////////////////////////
354 
355 
356 
357 
358 
359 END_objects_SCOPE // namespace ncbi::objects::
360 
362 
363 
364 #endif // OBJECTS_MACRO_REMOVE_OUTSIDE_ACTION_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
CRemove_outside_action_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
CText_portion –.
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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 CanGetField(void) const
Check if it is safe to call GetField method.
const TField & GetField(void) const
Get the Field member data.
TField & SetField(void)
Assign a value to Field data member.
CRemove_outside_action_Base(const CRemove_outside_action_Base &)
bool IsSetField(void) const
Check if a value has been assigned to Field data member.
void SetDefaultRemove_if_not_found(void)
Assign default value to Remove_if_not_found data member.
bool CanGetRemove_if_not_found(void) const
Check if it is safe to call GetRemove_if_not_found method.
void ResetField(void)
Reset Field data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
CRemove_outside_action_Base & operator=(const CRemove_outside_action_Base &)
void ResetPortion(void)
Reset Portion data member.
TRemove_if_not_found & SetRemove_if_not_found(void)
Assign a value to Remove_if_not_found data member.
const TPortion & GetPortion(void) const
Get the Portion member data.
TRemove_if_not_found GetRemove_if_not_found(void) const
Get the Remove_if_not_found member data.
void ResetRemove_if_not_found(void)
Reset Remove_if_not_found data member.
TPortion & SetPortion(void)
Assign a value to Portion data member.
bool IsSetPortion(void) const
Check if a value has been assigned to Portion data member.
bool CanGetPortion(void) const
Check if it is safe to call GetPortion method.
bool IsSetRemove_if_not_found(void) const
Check if a value has been assigned to Remove_if_not_found data member.
virtual void Reset(void)
Reset the whole object.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Jun 08 14:20:06 2024 by modify_doxy.py rev. 669887