NCBI C++ ToolKit
Remove_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_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_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_REMOVE_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 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Macro
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CRemove_action_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CRemove_action_Base(void);
78  // destructor
79  virtual ~CRemove_action_Base(void);
80 
81  // type info
83 
84  // types
86 
87  // member index
88  enum class E_memberIndex {
89  e__allMandatory = 0,
90  e_field
91  };
93 
94  // getters
95  // setters
96 
97  /// Check if a value has been assigned to Field data member.
98  ///
99  /// Data member Field is mandatory;
100  /// its type is defined as 'typedef CField_type TField'
101  /// @return
102  /// - true, if a value has been assigned.
103  /// - false, otherwise.
104  bool IsSetField(void) const;
105 
106  /// Check if it is safe to call GetField method.
107  ///
108  /// @return
109  /// - true, if the data member is getatable.
110  /// - false, otherwise.
111  bool CanGetField(void) const;
112 
113  /// Reset Field data member.
114  void ResetField(void);
115 
116  /// Get the Field member data.
117  ///
118  /// @return
119  /// Reference to the member data.
120  const TField& GetField(void) const;
121 
122  /// Assign a value to Field data member.
123  ///
124  /// @param value
125  /// Reference to value.
126  void SetField(TField& value);
127 
128  /// Assign a value to Field data member.
129  ///
130  /// @return
131  /// Reference to the data value.
132  TField& SetField(void);
133 
134  /// Reset the whole object
135  virtual void Reset(void);
136 
137 
138 private:
139  // Prohibit copy constructor and assignment operator
142 
143  // data
146 };
147 
148 /* @} */
149 
150 
151 
152 
153 
154 ///////////////////////////////////////////////////////////
155 ///////////////////// inline methods //////////////////////
156 ///////////////////////////////////////////////////////////
157 inline
159 {
160  return m_Field.NotEmpty();
161 }
162 
163 inline
165 {
166  return true;
167 }
168 
169 inline
171 {
172  if ( !m_Field ) {
173  const_cast<CRemove_action_Base*>(this)->ResetField();
174  }
175  return (*m_Field);
176 }
177 
178 inline
180 {
181  if ( !m_Field ) {
182  ResetField();
183  }
184  return (*m_Field);
185 }
186 
187 ///////////////////////////////////////////////////////////
188 ////////////////// end of inline methods //////////////////
189 ///////////////////////////////////////////////////////////
190 
191 
192 
193 
194 
195 END_objects_SCOPE // namespace ncbi::objects::
196 
198 
199 
200 #endif // OBJECTS_MACRO_REMOVE_ACTION_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
CRemove_action_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
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.
CRemove_action_Base(const CRemove_action_Base &)
CRef< TField > m_Field
TField & SetField(void)
Assign a value to Field data member.
void ResetField(void)
Reset Field data member.
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
virtual ~CRemove_action_Base(void)
CSerialObject Tparent
virtual void Reset(void)
Reset the whole object.
bool IsSetField(void) const
Check if a value has been assigned to Field data member.
CRemove_action_Base & operator=(const CRemove_action_Base &)
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:21 2024 by modify_doxy.py rev. 669887