NCBI C++ ToolKit
Table_match_.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 Table_match_.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_TABLE_MATCH_BASE_HPP
42 #define OBJECTS_MACRO_TABLE_MATCH_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
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
60 class CTable_match_type;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_Macro
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///
73 /// CTable_match_Base --
74 ///
75 
77 {
79 public:
80  // constructor
81  CTable_match_Base(void);
82  // destructor
83  virtual ~CTable_match_Base(void);
84 
85  // type info
87 
88  // types
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
97  };
99 
100  // getters
101  // setters
102 
103  /// Check if a value has been assigned to Match_type data member.
104  ///
105  /// Data member Match_type is mandatory;
106  /// its type is defined as 'typedef CTable_match_type TMatch_type'
107  /// @return
108  /// - true, if a value has been assigned.
109  /// - false, otherwise.
110  bool IsSetMatch_type(void) const;
111 
112  /// Check if it is safe to call GetMatch_type method.
113  ///
114  /// @return
115  /// - true, if the data member is getatable.
116  /// - false, otherwise.
117  bool CanGetMatch_type(void) const;
118 
119  /// Reset Match_type data member.
120  void ResetMatch_type(void);
121 
122  /// Get the Match_type member data.
123  ///
124  /// @return
125  /// Reference to the member data.
126  const TMatch_type& GetMatch_type(void) const;
127 
128  /// Assign a value to Match_type data member.
129  ///
130  /// @param value
131  /// Reference to value.
133 
134  /// Assign a value to Match_type data member.
135  ///
136  /// @return
137  /// Reference to the data value.
138  TMatch_type& SetMatch_type(void);
139 
140  /// Check if a value has been assigned to Match_location data member.
141  ///
142  /// Data member Match_location is optional with default eString_location_equals;
143  /// its type is defined as 'typedef EString_location TMatch_location'
144  /// @return
145  /// - true, if a value has been assigned.
146  /// - false, otherwise.
147  bool IsSetMatch_location(void) const;
148 
149  /// Check if it is safe to call GetMatch_location method.
150  ///
151  /// @return
152  /// - true, if the data member is getatable.
153  /// - false, otherwise.
154  bool CanGetMatch_location(void) const;
155 
156  /// Reset Match_location data member.
157  void ResetMatch_location(void);
158 
159  /// Assign default value to Match_location data member.
160  void SetDefaultMatch_location(void);
161 
162  /// Get the Match_location member data.
163  ///
164  /// @return
165  /// Copy of the member data.
167 
168  /// Assign a value to Match_location data member.
169  ///
170  /// @param value
171  /// Value to assign
173 
174  /// Assign a value to Match_location data member.
175  ///
176  /// @return
177  /// Reference to the data value.
179 
180  /// Reset the whole object
181  virtual void Reset(void);
182 
183 
184 private:
185  // Prohibit copy constructor and assignment operator
188 
189  // data
193 };
194 
195 /* @} */
196 
197 
198 
199 
200 
201 ///////////////////////////////////////////////////////////
202 ///////////////////// inline methods //////////////////////
203 ///////////////////////////////////////////////////////////
204 inline
206 {
207  return m_Match_type.NotEmpty();
208 }
209 
210 inline
212 {
213  return true;
214 }
215 
216 inline
218 {
219  if ( !m_Match_type ) {
220  const_cast<CTable_match_Base*>(this)->ResetMatch_type();
221  }
222  return (*m_Match_type);
223 }
224 
225 inline
227 {
228  if ( !m_Match_type ) {
229  ResetMatch_type();
230  }
231  return (*m_Match_type);
232 }
233 
234 inline
236 {
237  return ((m_set_State[0] & 0xc) != 0);
238 }
239 
240 inline
242 {
243  return true;
244 }
245 
246 inline
248 {
250  m_set_State[0] &= ~0xc;
251 }
252 
253 inline
255 {
257 }
258 
259 inline
261 {
262  return m_Match_location;
263 }
264 
265 inline
267 {
269  m_set_State[0] |= 0xc;
270 }
271 
272 inline
274 {
275 #ifdef _DEBUG
276  if (!IsSetMatch_location()) {
278  }
279 #endif
280  m_set_State[0] |= 0x4;
281  return m_Match_location;
282 }
283 
284 ///////////////////////////////////////////////////////////
285 ////////////////// end of inline methods //////////////////
286 ///////////////////////////////////////////////////////////
287 
288 
289 
290 
291 
292 END_objects_SCOPE // namespace ncbi::objects::
293 
295 
296 
297 #endif // OBJECTS_MACRO_TABLE_MATCH_BASE_HPP
User-defined methods of the data storage class.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTable_match_Base –.
CTable_match_type –.
char value[7]
Definition: config.c:431
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
CSerialObject Tparent
CTable_match_Base(const CTable_match_Base &)
TMatch_location & SetMatch_location(void)
Assign a value to Match_location data member.
bool IsSetMatch_location(void) const
Check if a value has been assigned to Match_location data member.
void SetDefaultMatch_location(void)
Assign default value to Match_location data member.
const TMatch_type & GetMatch_type(void) const
Get the Match_type member data.
bool CanGetMatch_type(void) const
Check if it is safe to call GetMatch_type method.
void ResetMatch_location(void)
Reset Match_location data member.
bool CanGetMatch_location(void) const
Check if it is safe to call GetMatch_location method.
TMatch_location GetMatch_location(void) const
Get the Match_location member data.
virtual void Reset(void)
Reset the whole object.
EString_location
simple constraints
TMatch_type & SetMatch_type(void)
Assign a value to Match_type data member.
EString_location m_Match_location
void ResetMatch_type(void)
Reset Match_type data member.
CTable_match_Base & operator=(const CTable_match_Base &)
EString_location TMatch_location
CTable_match_type TMatch_type
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
CRef< TMatch_type > m_Match_type
bool IsSetMatch_type(void) const
Check if a value has been assigned to Match_type data member.
virtual ~CTable_match_Base(void)
@ eString_location_equals
Modified on Mon Feb 26 04:04:40 2024 by modify_doxy.py rev. 669887