NCBI C++ ToolKit
PC_StereoTetrahedral_.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_StereoTetrahedral_.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_STEREOTETRAHEDRAL_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_STEREOTETRAHEDRAL_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 /// SP3 Tetrahedral StereoCenter, Trigonal Pyramid Stereogenic Center,
65 /// Cumulenic StereoCenter (Linear systems of an even number of double bonds),
66 /// or Hindered biaryl stereocenter (All biaryls have hindered rotation that
67 /// to some extent the ortho-hydrogens prevent coplanarity)
68 /// [Using IUPAC Stereogenic Center recommendations and terminology]
69 /// [Note: "-1" can be used for the Atom Identifier to represent a lone-pair or implicit hydrogen]
70 ///
71 /// CPC_StereoTetrahedral_Base --
72 ///
73 
75 {
77 public:
78  // constructor
80  // destructor
81  virtual ~CPC_StereoTetrahedral_Base(void);
82 
83  // type info
85 
86  /// StereoCenter Designation
87  enum EParity {
88  eParity_clockwise = 1,
89  eParity_counterclockwise = 2,
90  eParity_any = 3,
91  eParity_unknown = 255
92  };
93 
94  /// Access to EParity's attributes (values, names) as defined in spec
95  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EParity)(void);
96 
97  /// Type of StereoCenter, Tetrahedral, if not specified
98  enum EType {
99  eType_tetrahedral = 1, ///< Tetrahedral StereoCenter
100  eType_cumulenic = 2, ///< Cumulenic StereoCenter
101  eType_biaryl = 3 ///< Biaryl StereoCenter
102  };
103 
104  /// Access to EType's attributes (values, names) as defined in spec
105  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EType)(void);
106 
107  // types
108  typedef int TCenter;
109  typedef int TAbove;
110  typedef int TTop;
111  typedef int TBottom;
112  typedef int TBelow;
113  typedef int TParity;
114  typedef int TType;
115 
116  // member index
117  enum class E_memberIndex {
118  e__allMandatory = 0,
119  e_center,
120  e_above,
121  e_top,
122  e_bottom,
123  e_below,
124  e_parity,
125  e_type
126  };
128 
129  // getters
130  // setters
131 
132  /// Atom Identifier of Atom Center
133  /// Note: Atom ID's must be greater than "0"
134  /// Check if a value has been assigned to Center data member.
135  ///
136  /// Data member Center is mandatory;
137  /// its type is defined as 'typedef int TCenter'
138  /// @return
139  /// - true, if a value has been assigned.
140  /// - false, otherwise.
141  bool IsSetCenter(void) const;
142 
143  /// Check if it is safe to call GetCenter method.
144  ///
145  /// @return
146  /// - true, if the data member is getatable.
147  /// - false, otherwise.
148  bool CanGetCenter(void) const;
149 
150  /// Reset Center data member.
151  void ResetCenter(void);
152 
153  /// Get the Center member data.
154  ///
155  /// @return
156  /// Copy of the member data.
157  TCenter GetCenter(void) const;
158 
159  /// Assign a value to Center data member.
160  ///
161  /// @param value
162  /// Value to assign
163  void SetCenter(TCenter value);
164 
165  /// Assign a value to Center data member.
166  ///
167  /// @return
168  /// Reference to the data value.
169  TCenter& SetCenter(void);
170 
171  /// Atom Identifier of Atom Above the Plane
172  /// Note: Atom ID's must be greater than "0"
173  /// Check if a value has been assigned to Above data member.
174  ///
175  /// Data member Above is mandatory;
176  /// its type is defined as 'typedef int TAbove'
177  /// @return
178  /// - true, if a value has been assigned.
179  /// - false, otherwise.
180  bool IsSetAbove(void) const;
181 
182  /// Check if it is safe to call GetAbove method.
183  ///
184  /// @return
185  /// - true, if the data member is getatable.
186  /// - false, otherwise.
187  bool CanGetAbove(void) const;
188 
189  /// Reset Above data member.
190  void ResetAbove(void);
191 
192  /// Get the Above member data.
193  ///
194  /// @return
195  /// Copy of the member data.
196  TAbove GetAbove(void) const;
197 
198  /// Assign a value to Above data member.
199  ///
200  /// @param value
201  /// Value to assign
202  void SetAbove(TAbove value);
203 
204  /// Assign a value to Above data member.
205  ///
206  /// @return
207  /// Reference to the data value.
208  TAbove& SetAbove(void);
209 
210  /// Atom Identifier of Atom In-Plane and at the Top
211  /// Note: Atom ID's must be greater than "0"
212  /// Check if a value has been assigned to Top data member.
213  ///
214  /// Data member Top is mandatory;
215  /// its type is defined as 'typedef int TTop'
216  /// @return
217  /// - true, if a value has been assigned.
218  /// - false, otherwise.
219  bool IsSetTop(void) const;
220 
221  /// Check if it is safe to call GetTop method.
222  ///
223  /// @return
224  /// - true, if the data member is getatable.
225  /// - false, otherwise.
226  bool CanGetTop(void) const;
227 
228  /// Reset Top data member.
229  void ResetTop(void);
230 
231  /// Get the Top member data.
232  ///
233  /// @return
234  /// Copy of the member data.
235  TTop GetTop(void) const;
236 
237  /// Assign a value to Top data member.
238  ///
239  /// @param value
240  /// Value to assign
241  void SetTop(TTop value);
242 
243  /// Assign a value to Top data member.
244  ///
245  /// @return
246  /// Reference to the data value.
247  TTop& SetTop(void);
248 
249  /// Atom Identifier of Atom In-Plane and at the Bottom
250  /// Note: Atom ID's must be greater than "0"
251  /// Check if a value has been assigned to Bottom data member.
252  ///
253  /// Data member Bottom is mandatory;
254  /// its type is defined as 'typedef int TBottom'
255  /// @return
256  /// - true, if a value has been assigned.
257  /// - false, otherwise.
258  bool IsSetBottom(void) const;
259 
260  /// Check if it is safe to call GetBottom method.
261  ///
262  /// @return
263  /// - true, if the data member is getatable.
264  /// - false, otherwise.
265  bool CanGetBottom(void) const;
266 
267  /// Reset Bottom data member.
268  void ResetBottom(void);
269 
270  /// Get the Bottom member data.
271  ///
272  /// @return
273  /// Copy of the member data.
274  TBottom GetBottom(void) const;
275 
276  /// Assign a value to Bottom data member.
277  ///
278  /// @param value
279  /// Value to assign
280  void SetBottom(TBottom value);
281 
282  /// Assign a value to Bottom data member.
283  ///
284  /// @return
285  /// Reference to the data value.
286  TBottom& SetBottom(void);
287 
288  /// Atom Identifier of Atom Below the Plane
289  /// Note: Atom ID's must be greater than "0"
290  /// Check if a value has been assigned to Below data member.
291  ///
292  /// Data member Below is mandatory;
293  /// its type is defined as 'typedef int TBelow'
294  /// @return
295  /// - true, if a value has been assigned.
296  /// - false, otherwise.
297  bool IsSetBelow(void) const;
298 
299  /// Check if it is safe to call GetBelow method.
300  ///
301  /// @return
302  /// - true, if the data member is getatable.
303  /// - false, otherwise.
304  bool CanGetBelow(void) const;
305 
306  /// Reset Below data member.
307  void ResetBelow(void);
308 
309  /// Get the Below member data.
310  ///
311  /// @return
312  /// Copy of the member data.
313  TBelow GetBelow(void) const;
314 
315  /// Assign a value to Below data member.
316  ///
317  /// @param value
318  /// Value to assign
319  void SetBelow(TBelow value);
320 
321  /// Assign a value to Below data member.
322  ///
323  /// @return
324  /// Reference to the data value.
325  TBelow& SetBelow(void);
326 
327  /// Check if a value has been assigned to Parity data member.
328  ///
329  /// Data member Parity is optional;
330  /// its type is defined as 'typedef int TParity'
331  /// @return
332  /// - true, if a value has been assigned.
333  /// - false, otherwise.
334  bool IsSetParity(void) const;
335 
336  /// Check if it is safe to call GetParity method.
337  ///
338  /// @return
339  /// - true, if the data member is getatable.
340  /// - false, otherwise.
341  bool CanGetParity(void) const;
342 
343  /// Reset Parity data member.
344  void ResetParity(void);
345 
346  /// Get the Parity member data.
347  ///
348  /// @return
349  /// Copy of the member data.
350  TParity GetParity(void) const;
351 
352  /// Assign a value to Parity data member.
353  ///
354  /// @param value
355  /// Value to assign
356  void SetParity(TParity value);
357 
358  /// Assign a value to Parity data member.
359  ///
360  /// @return
361  /// Reference to the data value.
362  TParity& SetParity(void);
363 
364  /// Check if a value has been assigned to Type data member.
365  ///
366  /// Data member Type is optional;
367  /// its type is defined as 'typedef int TType'
368  /// @return
369  /// - true, if a value has been assigned.
370  /// - false, otherwise.
371  bool IsSetType(void) const;
372 
373  /// Check if it is safe to call GetType method.
374  ///
375  /// @return
376  /// - true, if the data member is getatable.
377  /// - false, otherwise.
378  bool CanGetType(void) const;
379 
380  /// Reset Type data member.
381  void ResetType(void);
382 
383  /// Get the Type member data.
384  ///
385  /// @return
386  /// Copy of the member data.
387  TType GetType(void) const;
388 
389  /// Assign a value to Type data member.
390  ///
391  /// @param value
392  /// Value to assign
393  void SetType(TType value);
394 
395  /// Assign a value to Type data member.
396  ///
397  /// @return
398  /// Reference to the data value.
399  TType& SetType(void);
400 
401  /// Reset the whole object
402  virtual void Reset(void);
403 
404 
405 private:
406  // Prohibit copy constructor and assignment operator
409 
410  // data
411  Uint4 m_set_State[1];
412  int m_Center;
413  int m_Above;
414  int m_Top;
415  int m_Bottom;
416  int m_Below;
417  int m_Parity;
418  int m_Type;
419 };
420 
421 /* @} */
422 
423 
424 
425 
426 
427 ///////////////////////////////////////////////////////////
428 ///////////////////// inline methods //////////////////////
429 ///////////////////////////////////////////////////////////
430 inline
432 {
433  return ((m_set_State[0] & 0x3) != 0);
434 }
435 
436 inline
438 {
439  return IsSetCenter();
440 }
441 
442 inline
444 {
445  m_Center = 0;
446  m_set_State[0] &= ~0x3;
447 }
448 
449 inline
451 {
452  if (!CanGetCenter()) {
453  ThrowUnassigned(0);
454  }
455  return m_Center;
456 }
457 
458 inline
460 {
461  m_Center = value;
462  m_set_State[0] |= 0x3;
463 }
464 
465 inline
467 {
468 #ifdef _DEBUG
469  if (!IsSetCenter()) {
470  memset(&m_Center,UnassignedByte(),sizeof(m_Center));
471  }
472 #endif
473  m_set_State[0] |= 0x1;
474  return m_Center;
475 }
476 
477 inline
479 {
480  return ((m_set_State[0] & 0xc) != 0);
481 }
482 
483 inline
485 {
486  return IsSetAbove();
487 }
488 
489 inline
491 {
492  m_Above = 0;
493  m_set_State[0] &= ~0xc;
494 }
495 
496 inline
498 {
499  if (!CanGetAbove()) {
500  ThrowUnassigned(1);
501  }
502  return m_Above;
503 }
504 
505 inline
507 {
508  m_Above = value;
509  m_set_State[0] |= 0xc;
510 }
511 
512 inline
514 {
515 #ifdef _DEBUG
516  if (!IsSetAbove()) {
517  memset(&m_Above,UnassignedByte(),sizeof(m_Above));
518  }
519 #endif
520  m_set_State[0] |= 0x4;
521  return m_Above;
522 }
523 
524 inline
526 {
527  return ((m_set_State[0] & 0x30) != 0);
528 }
529 
530 inline
532 {
533  return IsSetTop();
534 }
535 
536 inline
538 {
539  m_Top = 0;
540  m_set_State[0] &= ~0x30;
541 }
542 
543 inline
545 {
546  if (!CanGetTop()) {
547  ThrowUnassigned(2);
548  }
549  return m_Top;
550 }
551 
552 inline
554 {
555  m_Top = value;
556  m_set_State[0] |= 0x30;
557 }
558 
559 inline
561 {
562 #ifdef _DEBUG
563  if (!IsSetTop()) {
564  memset(&m_Top,UnassignedByte(),sizeof(m_Top));
565  }
566 #endif
567  m_set_State[0] |= 0x10;
568  return m_Top;
569 }
570 
571 inline
573 {
574  return ((m_set_State[0] & 0xc0) != 0);
575 }
576 
577 inline
579 {
580  return IsSetBottom();
581 }
582 
583 inline
585 {
586  m_Bottom = 0;
587  m_set_State[0] &= ~0xc0;
588 }
589 
590 inline
592 {
593  if (!CanGetBottom()) {
594  ThrowUnassigned(3);
595  }
596  return m_Bottom;
597 }
598 
599 inline
601 {
602  m_Bottom = value;
603  m_set_State[0] |= 0xc0;
604 }
605 
606 inline
608 {
609 #ifdef _DEBUG
610  if (!IsSetBottom()) {
611  memset(&m_Bottom,UnassignedByte(),sizeof(m_Bottom));
612  }
613 #endif
614  m_set_State[0] |= 0x40;
615  return m_Bottom;
616 }
617 
618 inline
620 {
621  return ((m_set_State[0] & 0x300) != 0);
622 }
623 
624 inline
626 {
627  return IsSetBelow();
628 }
629 
630 inline
632 {
633  m_Below = 0;
634  m_set_State[0] &= ~0x300;
635 }
636 
637 inline
639 {
640  if (!CanGetBelow()) {
641  ThrowUnassigned(4);
642  }
643  return m_Below;
644 }
645 
646 inline
648 {
649  m_Below = value;
650  m_set_State[0] |= 0x300;
651 }
652 
653 inline
655 {
656 #ifdef _DEBUG
657  if (!IsSetBelow()) {
658  memset(&m_Below,UnassignedByte(),sizeof(m_Below));
659  }
660 #endif
661  m_set_State[0] |= 0x100;
662  return m_Below;
663 }
664 
665 inline
667 {
668  return ((m_set_State[0] & 0xc00) != 0);
669 }
670 
671 inline
673 {
674  return IsSetParity();
675 }
676 
677 inline
679 {
680  m_Parity = (EParity)(0);
681  m_set_State[0] &= ~0xc00;
682 }
683 
684 inline
686 {
687  if (!CanGetParity()) {
688  ThrowUnassigned(5);
689  }
690  return m_Parity;
691 }
692 
693 inline
695 {
696  m_Parity = value;
697  m_set_State[0] |= 0xc00;
698 }
699 
700 inline
702 {
703 #ifdef _DEBUG
704  if (!IsSetParity()) {
705  memset(&m_Parity,UnassignedByte(),sizeof(m_Parity));
706  }
707 #endif
708  m_set_State[0] |= 0x400;
709  return m_Parity;
710 }
711 
712 inline
714 {
715  return ((m_set_State[0] & 0x3000) != 0);
716 }
717 
718 inline
720 {
721  return IsSetType();
722 }
723 
724 inline
726 {
727  m_Type = (EType)(0);
728  m_set_State[0] &= ~0x3000;
729 }
730 
731 inline
733 {
734  if (!CanGetType()) {
735  ThrowUnassigned(6);
736  }
737  return m_Type;
738 }
739 
740 inline
742 {
743  m_Type = value;
744  m_set_State[0] |= 0x3000;
745 }
746 
747 inline
749 {
750 #ifdef _DEBUG
751  if (!IsSetType()) {
752  memset(&m_Type,UnassignedByte(),sizeof(m_Type));
753  }
754 #endif
755  m_set_State[0] |= 0x1000;
756  return m_Type;
757 }
758 
759 ///////////////////////////////////////////////////////////
760 ////////////////// end of inline methods //////////////////
761 ///////////////////////////////////////////////////////////
762 
763 
764 
765 
766 
767 END_objects_SCOPE // namespace ncbi::objects::
768 
770 
771 
772 #endif // OBJECTS_PCSUBSTANCE_PC_STEREOTETRAHEDRAL_BASE_HPP
SP3 Tetrahedral StereoCenter, Trigonal Pyramid Stereogenic Center, Cumulenic StereoCenter (Linear sys...
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
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
TType & SetType(void)
Assign a value to Type data member.
bool CanGetParity(void) const
Check if it is safe to call GetParity method.
bool IsSetParity(void) const
Check if a value has been assigned to Parity data member.
bool CanGetBottom(void) const
Check if it is safe to call GetBottom method.
TBottom & SetBottom(void)
Assign a value to Bottom data member.
TAbove GetAbove(void) const
Get the Above member data.
void ResetTop(void)
Reset Top data member.
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
void ResetBottom(void)
Reset Bottom data member.
TCenter & SetCenter(void)
Assign a value to Center data member.
bool IsSetAbove(void) const
Atom Identifier of Atom Above the Plane Note: Atom ID's must be greater than "0" Check if a value has...
TBelow & SetBelow(void)
Assign a value to Below data member.
CPC_StereoTetrahedral_Base(const CPC_StereoTetrahedral_Base &)
TCenter GetCenter(void) const
Get the Center member data.
bool IsSetTop(void) const
Atom Identifier of Atom In-Plane and at the Top Note: Atom ID's must be greater than "0" Check if a v...
TParity & SetParity(void)
Assign a value to Parity data member.
TParity GetParity(void) const
Get the Parity member data.
void ResetCenter(void)
Reset Center data member.
TType GetType(void) const
Get the Type member data.
TTop GetTop(void) const
Get the Top member data.
void ResetType(void)
Reset Type data member.
void ResetAbove(void)
Reset Above data member.
bool IsSetBottom(void) const
Atom Identifier of Atom In-Plane and at the Bottom Note: Atom ID's must be greater than "0" Check if ...
bool CanGetAbove(void) const
Check if it is safe to call GetAbove method.
TAbove & SetAbove(void)
Assign a value to Above data member.
TBottom GetBottom(void) const
Get the Bottom member data.
void ResetParity(void)
Reset Parity data member.
EParity
StereoCenter Designation.
EType
Type of StereoCenter, Tetrahedral, if not specified.
CPC_StereoTetrahedral_Base & operator=(const CPC_StereoTetrahedral_Base &)
bool CanGetType(void) const
Check if it is safe to call GetType method.
Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
bool CanGetTop(void) const
Check if it is safe to call GetTop method.
bool CanGetBelow(void) const
Check if it is safe to call GetBelow method.
bool IsSetBelow(void) const
Atom Identifier of Atom Below the Plane Note: Atom ID's must be greater than "0" Check if a value has...
bool CanGetCenter(void) const
Check if it is safe to call GetCenter method.
bool IsSetCenter(void) const
Atom Identifier of Atom Center Note: Atom ID's must be greater than "0" Check if a value has been ass...
TTop & SetTop(void)
Assign a value to Top data member.
void ResetBelow(void)
Reset Below data member.
TBelow GetBelow(void) const
Get the Below member data.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Tue Apr 16 20:14:18 2024 by modify_doxy.py rev. 669887