NCBI C++ ToolKit
PC_StereoTrigonalBiPyramid_.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 PC_StereoTrigonalBiPyramid_.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/pcsubstance/pcsubstance.asn">pcsubstance.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/pcsubstance/pcsubstance.def">pcsubstance.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_PCSUBSTANCE_PC_STEREOTRIGONALBIPYRAMID_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_STEREOTRIGONALBIPYRAMID_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_NCBI_PCSubstance
59  *
60  * @{
61  */
62 
63 /////////////////////////////////////////////////////////////////////////////
64 /// Trigonal BiPyramid (TBPY-4 and TBPY-5) StereoCenters
65 /// [Using IUPAC Stereogenic Center recommendations and terminology]
66 /// [Note: "-1" can be used for the Atom Identifier to represent a lone-pair or implicit hydrogen]
67 ///
68 /// CPC_StereoTrigonalBiPyramid_Base --
69 ///
70 
72 {
74 public:
75  // constructor
77  // destructor
78  virtual ~CPC_StereoTrigonalBiPyramid_Base(void);
79 
80  // type info
82 
83  // types
84  typedef int TCenter;
85  typedef int TAbove;
86  typedef int TBelow;
87  typedef int TTop;
88  typedef int TBottom;
89  typedef int TRight;
90 
91  // member index
92  enum class E_memberIndex {
93  e__allMandatory = 0,
94  e_center,
95  e_above,
96  e_below,
97  e_top,
98  e_bottom,
99  e_right
100  };
102 
103  // getters
104  // setters
105 
106  /// Atom ID of Atom Center
107  /// Note: Atom ID's must be greater than "0"
108  /// Check if a value has been assigned to Center data member.
109  ///
110  /// Data member Center is mandatory;
111  /// its type is defined as 'typedef int TCenter'
112  /// @return
113  /// - true, if a value has been assigned.
114  /// - false, otherwise.
115  bool IsSetCenter(void) const;
116 
117  /// Check if it is safe to call GetCenter method.
118  ///
119  /// @return
120  /// - true, if the data member is getatable.
121  /// - false, otherwise.
122  bool CanGetCenter(void) const;
123 
124  /// Reset Center data member.
125  void ResetCenter(void);
126 
127  /// Get the Center member data.
128  ///
129  /// @return
130  /// Copy of the member data.
131  TCenter GetCenter(void) const;
132 
133  /// Assign a value to Center data member.
134  ///
135  /// @param value
136  /// Value to assign
137  void SetCenter(TCenter value);
138 
139  /// Assign a value to Center data member.
140  ///
141  /// @return
142  /// Reference to the data value.
143  TCenter& SetCenter(void);
144 
145  /// Atom ID of Atom Above the Plane
146  /// Note: Atom ID's must be greater than "0"
147  /// Check if a value has been assigned to Above data member.
148  ///
149  /// Data member Above is mandatory;
150  /// its type is defined as 'typedef int TAbove'
151  /// @return
152  /// - true, if a value has been assigned.
153  /// - false, otherwise.
154  bool IsSetAbove(void) const;
155 
156  /// Check if it is safe to call GetAbove method.
157  ///
158  /// @return
159  /// - true, if the data member is getatable.
160  /// - false, otherwise.
161  bool CanGetAbove(void) const;
162 
163  /// Reset Above data member.
164  void ResetAbove(void);
165 
166  /// Get the Above member data.
167  ///
168  /// @return
169  /// Copy of the member data.
170  TAbove GetAbove(void) const;
171 
172  /// Assign a value to Above data member.
173  ///
174  /// @param value
175  /// Value to assign
176  void SetAbove(TAbove value);
177 
178  /// Assign a value to Above data member.
179  ///
180  /// @return
181  /// Reference to the data value.
182  TAbove& SetAbove(void);
183 
184  /// Atom ID of Atom Below the Plane
185  /// Note: Atom ID's must be greater than "0"
186  /// Check if a value has been assigned to Below data member.
187  ///
188  /// Data member Below is mandatory;
189  /// its type is defined as 'typedef int TBelow'
190  /// @return
191  /// - true, if a value has been assigned.
192  /// - false, otherwise.
193  bool IsSetBelow(void) const;
194 
195  /// Check if it is safe to call GetBelow method.
196  ///
197  /// @return
198  /// - true, if the data member is getatable.
199  /// - false, otherwise.
200  bool CanGetBelow(void) const;
201 
202  /// Reset Below data member.
203  void ResetBelow(void);
204 
205  /// Get the Below member data.
206  ///
207  /// @return
208  /// Copy of the member data.
209  TBelow GetBelow(void) const;
210 
211  /// Assign a value to Below data member.
212  ///
213  /// @param value
214  /// Value to assign
215  void SetBelow(TBelow value);
216 
217  /// Assign a value to Below data member.
218  ///
219  /// @return
220  /// Reference to the data value.
221  TBelow& SetBelow(void);
222 
223  /// Atom ID of Atom In-Plane and at the Top
224  /// Note: Atom ID's must be greater than "0"
225  /// Check if a value has been assigned to Top data member.
226  ///
227  /// Data member Top is mandatory;
228  /// its type is defined as 'typedef int TTop'
229  /// @return
230  /// - true, if a value has been assigned.
231  /// - false, otherwise.
232  bool IsSetTop(void) const;
233 
234  /// Check if it is safe to call GetTop method.
235  ///
236  /// @return
237  /// - true, if the data member is getatable.
238  /// - false, otherwise.
239  bool CanGetTop(void) const;
240 
241  /// Reset Top data member.
242  void ResetTop(void);
243 
244  /// Get the Top member data.
245  ///
246  /// @return
247  /// Copy of the member data.
248  TTop GetTop(void) const;
249 
250  /// Assign a value to Top data member.
251  ///
252  /// @param value
253  /// Value to assign
254  void SetTop(TTop value);
255 
256  /// Assign a value to Top data member.
257  ///
258  /// @return
259  /// Reference to the data value.
260  TTop& SetTop(void);
261 
262  /// Atom ID of Atom In-Plane and at the Bottom
263  /// Note: Atom ID's must be greater than "0"
264  /// Check if a value has been assigned to Bottom data member.
265  ///
266  /// Data member Bottom is mandatory;
267  /// its type is defined as 'typedef int TBottom'
268  /// @return
269  /// - true, if a value has been assigned.
270  /// - false, otherwise.
271  bool IsSetBottom(void) const;
272 
273  /// Check if it is safe to call GetBottom method.
274  ///
275  /// @return
276  /// - true, if the data member is getatable.
277  /// - false, otherwise.
278  bool CanGetBottom(void) const;
279 
280  /// Reset Bottom data member.
281  void ResetBottom(void);
282 
283  /// Get the Bottom member data.
284  ///
285  /// @return
286  /// Copy of the member data.
287  TBottom GetBottom(void) const;
288 
289  /// Assign a value to Bottom data member.
290  ///
291  /// @param value
292  /// Value to assign
293  void SetBottom(TBottom value);
294 
295  /// Assign a value to Bottom data member.
296  ///
297  /// @return
298  /// Reference to the data value.
299  TBottom& SetBottom(void);
300 
301  /// Atom ID of Atom In-Plane and to the Right
302  /// Note: Atom ID's must be greater than "0"
303  /// Check if a value has been assigned to Right data member.
304  ///
305  /// Data member Right is mandatory;
306  /// its type is defined as 'typedef int TRight'
307  /// @return
308  /// - true, if a value has been assigned.
309  /// - false, otherwise.
310  bool IsSetRight(void) const;
311 
312  /// Check if it is safe to call GetRight method.
313  ///
314  /// @return
315  /// - true, if the data member is getatable.
316  /// - false, otherwise.
317  bool CanGetRight(void) const;
318 
319  /// Reset Right data member.
320  void ResetRight(void);
321 
322  /// Get the Right member data.
323  ///
324  /// @return
325  /// Copy of the member data.
326  TRight GetRight(void) const;
327 
328  /// Assign a value to Right data member.
329  ///
330  /// @param value
331  /// Value to assign
332  void SetRight(TRight value);
333 
334  /// Assign a value to Right data member.
335  ///
336  /// @return
337  /// Reference to the data value.
338  TRight& SetRight(void);
339 
340  /// Reset the whole object
341  virtual void Reset(void);
342 
343 
344 private:
345  // Prohibit copy constructor and assignment operator
348 
349  // data
350  Uint4 m_set_State[1];
351  int m_Center;
352  int m_Above;
353  int m_Below;
354  int m_Top;
355  int m_Bottom;
356  int m_Right;
357 };
358 
359 /* @} */
360 
361 
362 
363 
364 
365 ///////////////////////////////////////////////////////////
366 ///////////////////// inline methods //////////////////////
367 ///////////////////////////////////////////////////////////
368 inline
370 {
371  return ((m_set_State[0] & 0x3) != 0);
372 }
373 
374 inline
376 {
377  return IsSetCenter();
378 }
379 
380 inline
382 {
383  m_Center = 0;
384  m_set_State[0] &= ~0x3;
385 }
386 
387 inline
389 {
390  if (!CanGetCenter()) {
391  ThrowUnassigned(0);
392  }
393  return m_Center;
394 }
395 
396 inline
398 {
399  m_Center = value;
400  m_set_State[0] |= 0x3;
401 }
402 
403 inline
405 {
406 #ifdef _DEBUG
407  if (!IsSetCenter()) {
408  memset(&m_Center,UnassignedByte(),sizeof(m_Center));
409  }
410 #endif
411  m_set_State[0] |= 0x1;
412  return m_Center;
413 }
414 
415 inline
417 {
418  return ((m_set_State[0] & 0xc) != 0);
419 }
420 
421 inline
423 {
424  return IsSetAbove();
425 }
426 
427 inline
429 {
430  m_Above = 0;
431  m_set_State[0] &= ~0xc;
432 }
433 
434 inline
436 {
437  if (!CanGetAbove()) {
438  ThrowUnassigned(1);
439  }
440  return m_Above;
441 }
442 
443 inline
445 {
446  m_Above = value;
447  m_set_State[0] |= 0xc;
448 }
449 
450 inline
452 {
453 #ifdef _DEBUG
454  if (!IsSetAbove()) {
455  memset(&m_Above,UnassignedByte(),sizeof(m_Above));
456  }
457 #endif
458  m_set_State[0] |= 0x4;
459  return m_Above;
460 }
461 
462 inline
464 {
465  return ((m_set_State[0] & 0x30) != 0);
466 }
467 
468 inline
470 {
471  return IsSetBelow();
472 }
473 
474 inline
476 {
477  m_Below = 0;
478  m_set_State[0] &= ~0x30;
479 }
480 
481 inline
483 {
484  if (!CanGetBelow()) {
485  ThrowUnassigned(2);
486  }
487  return m_Below;
488 }
489 
490 inline
492 {
493  m_Below = value;
494  m_set_State[0] |= 0x30;
495 }
496 
497 inline
499 {
500 #ifdef _DEBUG
501  if (!IsSetBelow()) {
502  memset(&m_Below,UnassignedByte(),sizeof(m_Below));
503  }
504 #endif
505  m_set_State[0] |= 0x10;
506  return m_Below;
507 }
508 
509 inline
511 {
512  return ((m_set_State[0] & 0xc0) != 0);
513 }
514 
515 inline
517 {
518  return IsSetTop();
519 }
520 
521 inline
523 {
524  m_Top = 0;
525  m_set_State[0] &= ~0xc0;
526 }
527 
528 inline
530 {
531  if (!CanGetTop()) {
532  ThrowUnassigned(3);
533  }
534  return m_Top;
535 }
536 
537 inline
539 {
540  m_Top = value;
541  m_set_State[0] |= 0xc0;
542 }
543 
544 inline
546 {
547 #ifdef _DEBUG
548  if (!IsSetTop()) {
549  memset(&m_Top,UnassignedByte(),sizeof(m_Top));
550  }
551 #endif
552  m_set_State[0] |= 0x40;
553  return m_Top;
554 }
555 
556 inline
558 {
559  return ((m_set_State[0] & 0x300) != 0);
560 }
561 
562 inline
564 {
565  return IsSetBottom();
566 }
567 
568 inline
570 {
571  m_Bottom = 0;
572  m_set_State[0] &= ~0x300;
573 }
574 
575 inline
577 {
578  if (!CanGetBottom()) {
579  ThrowUnassigned(4);
580  }
581  return m_Bottom;
582 }
583 
584 inline
586 {
587  m_Bottom = value;
588  m_set_State[0] |= 0x300;
589 }
590 
591 inline
593 {
594 #ifdef _DEBUG
595  if (!IsSetBottom()) {
596  memset(&m_Bottom,UnassignedByte(),sizeof(m_Bottom));
597  }
598 #endif
599  m_set_State[0] |= 0x100;
600  return m_Bottom;
601 }
602 
603 inline
605 {
606  return ((m_set_State[0] & 0xc00) != 0);
607 }
608 
609 inline
611 {
612  return IsSetRight();
613 }
614 
615 inline
617 {
618  m_Right = 0;
619  m_set_State[0] &= ~0xc00;
620 }
621 
622 inline
624 {
625  if (!CanGetRight()) {
626  ThrowUnassigned(5);
627  }
628  return m_Right;
629 }
630 
631 inline
633 {
634  m_Right = value;
635  m_set_State[0] |= 0xc00;
636 }
637 
638 inline
640 {
641 #ifdef _DEBUG
642  if (!IsSetRight()) {
643  memset(&m_Right,UnassignedByte(),sizeof(m_Right));
644  }
645 #endif
646  m_set_State[0] |= 0x400;
647  return m_Right;
648 }
649 
650 ///////////////////////////////////////////////////////////
651 ////////////////// end of inline methods //////////////////
652 ///////////////////////////////////////////////////////////
653 
654 
655 
656 
657 
658 END_objects_SCOPE // namespace ncbi::objects::
659 
661 
662 
663 #endif // OBJECTS_PCSUBSTANCE_PC_STEREOTRIGONALBIPYRAMID_BASE_HPP
Trigonal BiPyramid (TBPY-4 and TBPY-5) StereoCenters [Using IUPAC Stereogenic Center recommendations ...
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_PCSUBSTANCE_EXPORT
Definition: ncbi_export.h:688
bool CanGetTop(void) const
Check if it is safe to call GetTop method.
TBelow GetBelow(void) const
Get the Below member data.
void ResetBelow(void)
Reset Below data member.
void ResetTop(void)
Reset Top data member.
TRight GetRight(void) const
Get the Right member data.
bool CanGetRight(void) const
Check if it is safe to call GetRight method.
void ResetCenter(void)
Reset Center data member.
bool IsSetBottom(void) const
Atom ID of Atom In-Plane and at the Bottom Note: Atom ID's must be greater than "0" Check if a value ...
bool CanGetBelow(void) const
Check if it is safe to call GetBelow method.
void ResetRight(void)
Reset Right data member.
TAbove & SetAbove(void)
Assign a value to Above data member.
Tparent::CMemberIndex< E_memberIndex, 7 > TmemberIndex
TCenter GetCenter(void) const
Get the Center member data.
TAbove GetAbove(void) const
Get the Above member data.
bool IsSetBelow(void) const
Atom ID of Atom Below the Plane Note: Atom ID's must be greater than "0" Check if a value has been as...
TBelow & SetBelow(void)
Assign a value to Below data member.
void ResetAbove(void)
Reset Above data member.
CPC_StereoTrigonalBiPyramid_Base & operator=(const CPC_StereoTrigonalBiPyramid_Base &)
TTop GetTop(void) const
Get the Top member data.
TBottom & SetBottom(void)
Assign a value to Bottom data member.
TBottom GetBottom(void) const
Get the Bottom member data.
bool IsSetTop(void) const
Atom ID of Atom In-Plane and at the Top Note: Atom ID's must be greater than "0" Check if a value has...
bool IsSetAbove(void) const
Atom ID of Atom Above the Plane Note: Atom ID's must be greater than "0" Check if a value has been as...
void ResetBottom(void)
Reset Bottom data member.
bool CanGetBottom(void) const
Check if it is safe to call GetBottom method.
bool IsSetRight(void) const
Atom ID of Atom In-Plane and to the Right Note: Atom ID's must be greater than "0" Check if a value h...
bool CanGetCenter(void) const
Check if it is safe to call GetCenter method.
TCenter & SetCenter(void)
Assign a value to Center data member.
CPC_StereoTrigonalBiPyramid_Base(const CPC_StereoTrigonalBiPyramid_Base &)
TRight & SetRight(void)
Assign a value to Right data member.
TTop & SetTop(void)
Assign a value to Top data member.
bool CanGetAbove(void) const
Check if it is safe to call GetAbove method.
bool IsSetCenter(void) const
Atom ID of Atom Center Note: Atom ID's must be greater than "0" Check if a value has been assigned to...
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Tue May 07 08:15:05 2024 by modify_doxy.py rev. 669887