NCBI C++ ToolKit
Model_space_point_.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 Model_space_point_.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/mmdb3/mmdb3.asn">mmdb3.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/mmdb3/mmdb3.def">mmdb3.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_MMDB3_MODEL_SPACE_POINT_BASE_HPP
42 #define OBJECTS_MMDB3_MODEL_SPACE_POINT_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 // generated classes
56 
57 
58 /** @addtogroup dataspec_MMDB_Features
59  *
60  * @{
61  */
62 
63 /////////////////////////////////////////////////////////////////////////////
64 ///
65 /// CModel_space_point_Base --
66 ///
67 
69 {
71 public:
72  // constructor
74  // destructor
75  virtual ~CModel_space_point_Base(void);
76 
77  // type info
79 
80  // types
81  typedef int TScale_factor;
82  typedef int TX;
83  typedef int TY;
84  typedef int TZ;
85 
86  // member index
87  enum class E_memberIndex {
88  e__allMandatory = 0,
89  e_scale_factor,
90  e_x,
91  e_y,
92  e_z
93  };
95 
96  // getters
97  // setters
98 
99  /// Check if a value has been assigned to Scale_factor data member.
100  ///
101  /// Data member Scale_factor is mandatory;
102  /// its type is defined as 'typedef int TScale_factor'
103  /// @return
104  /// - true, if a value has been assigned.
105  /// - false, otherwise.
106  bool IsSetScale_factor(void) const;
107 
108  /// Check if it is safe to call GetScale_factor method.
109  ///
110  /// @return
111  /// - true, if the data member is getatable.
112  /// - false, otherwise.
113  bool CanGetScale_factor(void) const;
114 
115  /// Reset Scale_factor data member.
116  void ResetScale_factor(void);
117 
118  /// Get the Scale_factor member data.
119  ///
120  /// @return
121  /// Copy of the member data.
122  TScale_factor GetScale_factor(void) const;
123 
124  /// Assign a value to Scale_factor data member.
125  ///
126  /// @param value
127  /// Value to assign
128  void SetScale_factor(TScale_factor value);
129 
130  /// Assign a value to Scale_factor data member.
131  ///
132  /// @return
133  /// Reference to the data value.
134  TScale_factor& SetScale_factor(void);
135 
136  /// Check if a value has been assigned to X data member.
137  ///
138  /// Data member X is mandatory;
139  /// its type is defined as 'typedef int TX'
140  /// @return
141  /// - true, if a value has been assigned.
142  /// - false, otherwise.
143  bool IsSetX(void) const;
144 
145  /// Check if it is safe to call GetX method.
146  ///
147  /// @return
148  /// - true, if the data member is getatable.
149  /// - false, otherwise.
150  bool CanGetX(void) const;
151 
152  /// Reset X data member.
153  void ResetX(void);
154 
155  /// Get the X member data.
156  ///
157  /// @return
158  /// Copy of the member data.
159  TX GetX(void) const;
160 
161  /// Assign a value to X data member.
162  ///
163  /// @param value
164  /// Value to assign
165  void SetX(TX value);
166 
167  /// Assign a value to X data member.
168  ///
169  /// @return
170  /// Reference to the data value.
171  TX& SetX(void);
172 
173  /// Check if a value has been assigned to Y data member.
174  ///
175  /// Data member Y is mandatory;
176  /// its type is defined as 'typedef int TY'
177  /// @return
178  /// - true, if a value has been assigned.
179  /// - false, otherwise.
180  bool IsSetY(void) const;
181 
182  /// Check if it is safe to call GetY method.
183  ///
184  /// @return
185  /// - true, if the data member is getatable.
186  /// - false, otherwise.
187  bool CanGetY(void) const;
188 
189  /// Reset Y data member.
190  void ResetY(void);
191 
192  /// Get the Y member data.
193  ///
194  /// @return
195  /// Copy of the member data.
196  TY GetY(void) const;
197 
198  /// Assign a value to Y data member.
199  ///
200  /// @param value
201  /// Value to assign
202  void SetY(TY value);
203 
204  /// Assign a value to Y data member.
205  ///
206  /// @return
207  /// Reference to the data value.
208  TY& SetY(void);
209 
210  /// Check if a value has been assigned to Z data member.
211  ///
212  /// Data member Z is mandatory;
213  /// its type is defined as 'typedef int TZ'
214  /// @return
215  /// - true, if a value has been assigned.
216  /// - false, otherwise.
217  bool IsSetZ(void) const;
218 
219  /// Check if it is safe to call GetZ method.
220  ///
221  /// @return
222  /// - true, if the data member is getatable.
223  /// - false, otherwise.
224  bool CanGetZ(void) const;
225 
226  /// Reset Z data member.
227  void ResetZ(void);
228 
229  /// Get the Z member data.
230  ///
231  /// @return
232  /// Copy of the member data.
233  TZ GetZ(void) const;
234 
235  /// Assign a value to Z data member.
236  ///
237  /// @param value
238  /// Value to assign
239  void SetZ(TZ value);
240 
241  /// Assign a value to Z data member.
242  ///
243  /// @return
244  /// Reference to the data value.
245  TZ& SetZ(void);
246 
247  /// Reset the whole object
248  virtual void Reset(void);
249 
250 
251 private:
252  // Prohibit copy constructor and assignment operator
255 
256  // data
257  Uint4 m_set_State[1];
259  int m_X;
260  int m_Y;
261  int m_Z;
262 };
263 
264 /* @} */
265 
266 
267 
268 
269 
270 ///////////////////////////////////////////////////////////
271 ///////////////////// inline methods //////////////////////
272 ///////////////////////////////////////////////////////////
273 inline
275 {
276  return ((m_set_State[0] & 0x3) != 0);
277 }
278 
279 inline
281 {
282  return IsSetScale_factor();
283 }
284 
285 inline
287 {
288  m_Scale_factor = 0;
289  m_set_State[0] &= ~0x3;
290 }
291 
292 inline
294 {
295  if (!CanGetScale_factor()) {
296  ThrowUnassigned(0);
297  }
298  return m_Scale_factor;
299 }
300 
301 inline
303 {
305  m_set_State[0] |= 0x3;
306 }
307 
308 inline
310 {
311 #ifdef _DEBUG
312  if (!IsSetScale_factor()) {
313  memset(&m_Scale_factor,UnassignedByte(),sizeof(m_Scale_factor));
314  }
315 #endif
316  m_set_State[0] |= 0x1;
317  return m_Scale_factor;
318 }
319 
320 inline
322 {
323  return ((m_set_State[0] & 0xc) != 0);
324 }
325 
326 inline
328 {
329  return IsSetX();
330 }
331 
332 inline
334 {
335  m_X = 0;
336  m_set_State[0] &= ~0xc;
337 }
338 
339 inline
341 {
342  if (!CanGetX()) {
343  ThrowUnassigned(1);
344  }
345  return m_X;
346 }
347 
348 inline
350 {
351  m_X = value;
352  m_set_State[0] |= 0xc;
353 }
354 
355 inline
357 {
358 #ifdef _DEBUG
359  if (!IsSetX()) {
360  memset(&m_X,UnassignedByte(),sizeof(m_X));
361  }
362 #endif
363  m_set_State[0] |= 0x4;
364  return m_X;
365 }
366 
367 inline
369 {
370  return ((m_set_State[0] & 0x30) != 0);
371 }
372 
373 inline
375 {
376  return IsSetY();
377 }
378 
379 inline
381 {
382  m_Y = 0;
383  m_set_State[0] &= ~0x30;
384 }
385 
386 inline
388 {
389  if (!CanGetY()) {
390  ThrowUnassigned(2);
391  }
392  return m_Y;
393 }
394 
395 inline
397 {
398  m_Y = value;
399  m_set_State[0] |= 0x30;
400 }
401 
402 inline
404 {
405 #ifdef _DEBUG
406  if (!IsSetY()) {
407  memset(&m_Y,UnassignedByte(),sizeof(m_Y));
408  }
409 #endif
410  m_set_State[0] |= 0x10;
411  return m_Y;
412 }
413 
414 inline
416 {
417  return ((m_set_State[0] & 0xc0) != 0);
418 }
419 
420 inline
422 {
423  return IsSetZ();
424 }
425 
426 inline
428 {
429  m_Z = 0;
430  m_set_State[0] &= ~0xc0;
431 }
432 
433 inline
435 {
436  if (!CanGetZ()) {
437  ThrowUnassigned(3);
438  }
439  return m_Z;
440 }
441 
442 inline
444 {
445  m_Z = value;
446  m_set_State[0] |= 0xc0;
447 }
448 
449 inline
451 {
452 #ifdef _DEBUG
453  if (!IsSetZ()) {
454  memset(&m_Z,UnassignedByte(),sizeof(m_Z));
455  }
456 #endif
457  m_set_State[0] |= 0x40;
458  return m_Z;
459 }
460 
461 ///////////////////////////////////////////////////////////
462 ////////////////// end of inline methods //////////////////
463 ///////////////////////////////////////////////////////////
464 
465 
466 
467 
468 
469 END_objects_SCOPE // namespace ncbi::objects::
470 
472 
473 
474 #endif // OBJECTS_MMDB3_MODEL_SPACE_POINT_BASE_HPP
CModel_space_point_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
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
#define NCBI_MMDB3_EXPORT
Definition: ncbi_export.h:640
void ResetX(void)
Reset X data member.
bool CanGetX(void) const
Check if it is safe to call GetX method.
void ResetZ(void)
Reset Z data member.
TX & SetX(void)
Assign a value to X data member.
TZ GetZ(void) const
Get the Z member data.
TX GetX(void) const
Get the X member data.
bool CanGetY(void) const
Check if it is safe to call GetY method.
CModel_space_point_Base(const CModel_space_point_Base &)
TY & SetY(void)
Assign a value to Y data member.
void ResetScale_factor(void)
Reset Scale_factor data member.
TScale_factor & SetScale_factor(void)
Assign a value to Scale_factor data member.
TZ & SetZ(void)
Assign a value to Z data member.
void ResetY(void)
Reset Y data member.
CModel_space_point_Base & operator=(const CModel_space_point_Base &)
bool IsSetZ(void) const
Check if a value has been assigned to Z data member.
TScale_factor GetScale_factor(void) const
Get the Scale_factor member data.
bool IsSetY(void) const
Check if a value has been assigned to Y data member.
TY GetY(void) const
Get the Y member data.
bool IsSetX(void) const
Check if a value has been assigned to X data member.
bool CanGetZ(void) const
Check if it is safe to call GetZ method.
bool CanGetScale_factor(void) const
Check if it is safe to call GetScale_factor method.
bool IsSetScale_factor(void) const
Check if a value has been assigned to Scale_factor data member.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Jun 29 13:52:14 2024 by modify_doxy.py rev. 669887