NCBI C++ ToolKit
Replace_rule_.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 Replace_rule_.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_REPLACE_RULE_BASE_HPP
42 #define OBJECTS_MACRO_REPLACE_RULE_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 CReplace_func;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Macro
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CReplace_rule_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CReplace_rule_Base(void);
78  // destructor
79  virtual ~CReplace_rule_Base(void);
80 
81  // type info
83 
84  // types
86  typedef bool TMove_to_note;
87 
88  // member index
89  enum class E_memberIndex {
90  e__allMandatory = 0,
93  };
95 
96  // getters
97  // setters
98 
99  /// Check if a value has been assigned to Replace_func data member.
100  ///
101  /// Data member Replace_func is mandatory;
102  /// its type is defined as 'typedef CReplace_func TReplace_func'
103  /// @return
104  /// - true, if a value has been assigned.
105  /// - false, otherwise.
106  bool IsSetReplace_func(void) const;
107 
108  /// Check if it is safe to call GetReplace_func method.
109  ///
110  /// @return
111  /// - true, if the data member is getatable.
112  /// - false, otherwise.
113  bool CanGetReplace_func(void) const;
114 
115  /// Reset Replace_func data member.
116  void ResetReplace_func(void);
117 
118  /// Get the Replace_func member data.
119  ///
120  /// @return
121  /// Reference to the member data.
122  const TReplace_func& GetReplace_func(void) const;
123 
124  /// Assign a value to Replace_func data member.
125  ///
126  /// @param value
127  /// Reference to value.
129 
130  /// Assign a value to Replace_func data member.
131  ///
132  /// @return
133  /// Reference to the data value.
135 
136  /// Check if a value has been assigned to Move_to_note data member.
137  ///
138  /// Data member Move_to_note is optional with default false;
139  /// its type is defined as 'typedef bool TMove_to_note'
140  /// @return
141  /// - true, if a value has been assigned.
142  /// - false, otherwise.
143  bool IsSetMove_to_note(void) const;
144 
145  /// Check if it is safe to call GetMove_to_note method.
146  ///
147  /// @return
148  /// - true, if the data member is getatable.
149  /// - false, otherwise.
150  bool CanGetMove_to_note(void) const;
151 
152  /// Reset Move_to_note data member.
153  void ResetMove_to_note(void);
154 
155  /// Assign default value to Move_to_note data member.
156  void SetDefaultMove_to_note(void);
157 
158  /// Get the Move_to_note member data.
159  ///
160  /// @return
161  /// Copy of the member data.
162  TMove_to_note GetMove_to_note(void) const;
163 
164  /// Assign a value to Move_to_note data member.
165  ///
166  /// @param value
167  /// Value to assign
169 
170  /// Assign a value to Move_to_note data member.
171  ///
172  /// @return
173  /// Reference to the data value.
175 
176  /// Reset the whole object
177  virtual void Reset(void);
178 
179 
180 private:
181  // Prohibit copy constructor and assignment operator
184 
185  // data
189 };
190 
191 /* @} */
192 
193 
194 
195 
196 
197 ///////////////////////////////////////////////////////////
198 ///////////////////// inline methods //////////////////////
199 ///////////////////////////////////////////////////////////
200 inline
202 {
203  return m_Replace_func.NotEmpty();
204 }
205 
206 inline
208 {
209  return true;
210 }
211 
212 inline
214 {
215  if ( !m_Replace_func ) {
216  const_cast<CReplace_rule_Base*>(this)->ResetReplace_func();
217  }
218  return (*m_Replace_func);
219 }
220 
221 inline
223 {
224  if ( !m_Replace_func ) {
226  }
227  return (*m_Replace_func);
228 }
229 
230 inline
232 {
233  return ((m_set_State[0] & 0xc) != 0);
234 }
235 
236 inline
238 {
239  return true;
240 }
241 
242 inline
244 {
245  m_Move_to_note = false;
246  m_set_State[0] &= ~0xc;
247 }
248 
249 inline
251 {
253 }
254 
255 inline
257 {
258  return m_Move_to_note;
259 }
260 
261 inline
263 {
265  m_set_State[0] |= 0xc;
266 }
267 
268 inline
270 {
271 #ifdef _DEBUG
272  if (!IsSetMove_to_note()) {
273  memset(&m_Move_to_note,UnassignedByte(),sizeof(m_Move_to_note));
274  }
275 #endif
276  m_set_State[0] |= 0x4;
277  return m_Move_to_note;
278 }
279 
280 ///////////////////////////////////////////////////////////
281 ////////////////// end of inline methods //////////////////
282 ///////////////////////////////////////////////////////////
283 
284 
285 
286 
287 
288 END_objects_SCOPE // namespace ncbi::objects::
289 
291 
292 
293 #endif // OBJECTS_MACRO_REPLACE_RULE_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
CReplace_rule_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
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 IsSetReplace_func(void) const
Check if a value has been assigned to Replace_func data member.
CReplace_rule_Base & operator=(const CReplace_rule_Base &)
TReplace_func & SetReplace_func(void)
Assign a value to Replace_func data member.
CSerialObject Tparent
void ResetMove_to_note(void)
Reset Move_to_note data member.
TMove_to_note & SetMove_to_note(void)
Assign a value to Move_to_note data member.
CRef< TReplace_func > m_Replace_func
TMove_to_note GetMove_to_note(void) const
Get the Move_to_note member data.
bool CanGetReplace_func(void) const
Check if it is safe to call GetReplace_func method.
CReplace_rule_Base(const CReplace_rule_Base &)
virtual ~CReplace_rule_Base(void)
void ResetReplace_func(void)
Reset Replace_func data member.
CReplace_func TReplace_func
bool IsSetMove_to_note(void) const
Check if a value has been assigned to Move_to_note data member.
void SetDefaultMove_to_note(void)
Assign default value to Move_to_note data member.
virtual void Reset(void)
Reset the whole object.
const TReplace_func & GetReplace_func(void) const
Get the Replace_func member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool CanGetMove_to_note(void) const
Check if it is safe to call GetMove_to_note method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Tue Apr 23 07:39:17 2024 by modify_doxy.py rev. 669887