NCBI C++ ToolKit
Swap_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 Swap_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_SWAP_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_SWAP_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_pair_type;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Macro
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CSwap_action_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CSwap_action_Base(void);
78  // destructor
79  virtual ~CSwap_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_fields
91  };
93 
94  // getters
95  // setters
96 
97  /// Check if a value has been assigned to Fields data member.
98  ///
99  /// Data member Fields is mandatory;
100  /// its type is defined as 'typedef CField_pair_type TFields'
101  /// @return
102  /// - true, if a value has been assigned.
103  /// - false, otherwise.
104  bool IsSetFields(void) const;
105 
106  /// Check if it is safe to call GetFields method.
107  ///
108  /// @return
109  /// - true, if the data member is getatable.
110  /// - false, otherwise.
111  bool CanGetFields(void) const;
112 
113  /// Reset Fields data member.
114  void ResetFields(void);
115 
116  /// Get the Fields member data.
117  ///
118  /// @return
119  /// Reference to the member data.
120  const TFields& GetFields(void) const;
121 
122  /// Assign a value to Fields data member.
123  ///
124  /// @param value
125  /// Reference to value.
126  void SetFields(TFields& value);
127 
128  /// Assign a value to Fields data member.
129  ///
130  /// @return
131  /// Reference to the data value.
132  TFields& SetFields(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_Fields.NotEmpty();
161 }
162 
163 inline
165 {
166  return true;
167 }
168 
169 inline
171 {
172  if ( !m_Fields ) {
173  const_cast<CSwap_action_Base*>(this)->ResetFields();
174  }
175  return (*m_Fields);
176 }
177 
178 inline
180 {
181  if ( !m_Fields ) {
182  ResetFields();
183  }
184  return (*m_Fields);
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_SWAP_ACTION_BASE_HPP
CField_pair_type –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CSwap_action_Base –.
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
CRef< TFields > m_Fields
CSwap_action_Base(const CSwap_action_Base &)
void ResetFields(void)
Reset Fields data member.
bool IsSetFields(void) const
Check if a value has been assigned to Fields data member.
TFields & SetFields(void)
Assign a value to Fields data member.
virtual ~CSwap_action_Base(void)
CSerialObject Tparent
CField_pair_type TFields
const TFields & GetFields(void) const
Get the Fields member data.
virtual void Reset(void)
Reset the whole object.
CSwap_action_Base & operator=(const CSwap_action_Base &)
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
bool CanGetFields(void) const
Check if it is safe to call GetFields method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Thu May 09 18:39:08 2024 by modify_doxy.py rev. 669887