NCBI C++ ToolKit
PC_StereoOctahedral_.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_StereoOctahedral_.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_STEREOOCTAHEDRAL_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_STEREOOCTAHEDRAL_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 /// Octahedral (OC-6) and Square Pyramid (SPY-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_StereoOctahedral_Base --
69 ///
70 
72 {
74 public:
75  // constructor
77  // destructor
78  virtual ~CPC_StereoOctahedral_Base(void);
79 
80  // type info
82 
83  // types
84  typedef int TCenter;
85  typedef int TTop;
86  typedef int TBottom;
87  typedef int TLabove;
88  typedef int TLbelow;
89  typedef int TRabove;
90  typedef int TRbelow;
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
95  e_center,
96  e_top,
97  e_bottom,
98  e_labove,
99  e_lbelow,
100  e_rabove,
101  e_rbelow
102  };
104 
105  // getters
106  // setters
107 
108  /// Atom ID of Atom Center
109  /// Note: Atom ID's must be greater than "0"
110  /// Check if a value has been assigned to Center data member.
111  ///
112  /// Data member Center is mandatory;
113  /// its type is defined as 'typedef int TCenter'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetCenter(void) const;
118 
119  /// Check if it is safe to call GetCenter method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetCenter(void) const;
125 
126  /// Reset Center data member.
127  void ResetCenter(void);
128 
129  /// Get the Center member data.
130  ///
131  /// @return
132  /// Copy of the member data.
133  TCenter GetCenter(void) const;
134 
135  /// Assign a value to Center data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetCenter(TCenter value);
140 
141  /// Assign a value to Center data member.
142  ///
143  /// @return
144  /// Reference to the data value.
145  TCenter& SetCenter(void);
146 
147  /// Atom ID of Atom In-Plane and at the Top
148  /// Note: Atom ID's must be greater than "0"
149  /// Check if a value has been assigned to Top data member.
150  ///
151  /// Data member Top is mandatory;
152  /// its type is defined as 'typedef int TTop'
153  /// @return
154  /// - true, if a value has been assigned.
155  /// - false, otherwise.
156  bool IsSetTop(void) const;
157 
158  /// Check if it is safe to call GetTop method.
159  ///
160  /// @return
161  /// - true, if the data member is getatable.
162  /// - false, otherwise.
163  bool CanGetTop(void) const;
164 
165  /// Reset Top data member.
166  void ResetTop(void);
167 
168  /// Get the Top member data.
169  ///
170  /// @return
171  /// Copy of the member data.
172  TTop GetTop(void) const;
173 
174  /// Assign a value to Top data member.
175  ///
176  /// @param value
177  /// Value to assign
178  void SetTop(TTop value);
179 
180  /// Assign a value to Top data member.
181  ///
182  /// @return
183  /// Reference to the data value.
184  TTop& SetTop(void);
185 
186  /// Atom ID of Atom In-Plane and at the Bottom
187  /// Note: Atom ID's must be greater than "0"
188  /// Check if a value has been assigned to Bottom data member.
189  ///
190  /// Data member Bottom is mandatory;
191  /// its type is defined as 'typedef int TBottom'
192  /// @return
193  /// - true, if a value has been assigned.
194  /// - false, otherwise.
195  bool IsSetBottom(void) const;
196 
197  /// Check if it is safe to call GetBottom method.
198  ///
199  /// @return
200  /// - true, if the data member is getatable.
201  /// - false, otherwise.
202  bool CanGetBottom(void) const;
203 
204  /// Reset Bottom data member.
205  void ResetBottom(void);
206 
207  /// Get the Bottom member data.
208  ///
209  /// @return
210  /// Copy of the member data.
211  TBottom GetBottom(void) const;
212 
213  /// Assign a value to Bottom data member.
214  ///
215  /// @param value
216  /// Value to assign
217  void SetBottom(TBottom value);
218 
219  /// Assign a value to Bottom data member.
220  ///
221  /// @return
222  /// Reference to the data value.
223  TBottom& SetBottom(void);
224 
225  /// Atom ID of Atom Above the Plane on the Left
226  /// Note: Atom ID's must be greater than "0"
227  /// Check if a value has been assigned to Labove data member.
228  ///
229  /// Data member Labove is mandatory;
230  /// its type is defined as 'typedef int TLabove'
231  /// @return
232  /// - true, if a value has been assigned.
233  /// - false, otherwise.
234  bool IsSetLabove(void) const;
235 
236  /// Check if it is safe to call GetLabove method.
237  ///
238  /// @return
239  /// - true, if the data member is getatable.
240  /// - false, otherwise.
241  bool CanGetLabove(void) const;
242 
243  /// Reset Labove data member.
244  void ResetLabove(void);
245 
246  /// Get the Labove member data.
247  ///
248  /// @return
249  /// Copy of the member data.
250  TLabove GetLabove(void) const;
251 
252  /// Assign a value to Labove data member.
253  ///
254  /// @param value
255  /// Value to assign
256  void SetLabove(TLabove value);
257 
258  /// Assign a value to Labove data member.
259  ///
260  /// @return
261  /// Reference to the data value.
262  TLabove& SetLabove(void);
263 
264  /// Atom ID of Atom Below the Plane on the Left
265  /// Note: Atom ID's must be greater than "0"
266  /// Check if a value has been assigned to Lbelow data member.
267  ///
268  /// Data member Lbelow is mandatory;
269  /// its type is defined as 'typedef int TLbelow'
270  /// @return
271  /// - true, if a value has been assigned.
272  /// - false, otherwise.
273  bool IsSetLbelow(void) const;
274 
275  /// Check if it is safe to call GetLbelow method.
276  ///
277  /// @return
278  /// - true, if the data member is getatable.
279  /// - false, otherwise.
280  bool CanGetLbelow(void) const;
281 
282  /// Reset Lbelow data member.
283  void ResetLbelow(void);
284 
285  /// Get the Lbelow member data.
286  ///
287  /// @return
288  /// Copy of the member data.
289  TLbelow GetLbelow(void) const;
290 
291  /// Assign a value to Lbelow data member.
292  ///
293  /// @param value
294  /// Value to assign
295  void SetLbelow(TLbelow value);
296 
297  /// Assign a value to Lbelow data member.
298  ///
299  /// @return
300  /// Reference to the data value.
301  TLbelow& SetLbelow(void);
302 
303  /// Atom ID of Atom Above the Plane on the Right
304  /// Note: Atom ID's must be greater than "0"
305  /// Check if a value has been assigned to Rabove data member.
306  ///
307  /// Data member Rabove is mandatory;
308  /// its type is defined as 'typedef int TRabove'
309  /// @return
310  /// - true, if a value has been assigned.
311  /// - false, otherwise.
312  bool IsSetRabove(void) const;
313 
314  /// Check if it is safe to call GetRabove method.
315  ///
316  /// @return
317  /// - true, if the data member is getatable.
318  /// - false, otherwise.
319  bool CanGetRabove(void) const;
320 
321  /// Reset Rabove data member.
322  void ResetRabove(void);
323 
324  /// Get the Rabove member data.
325  ///
326  /// @return
327  /// Copy of the member data.
328  TRabove GetRabove(void) const;
329 
330  /// Assign a value to Rabove data member.
331  ///
332  /// @param value
333  /// Value to assign
334  void SetRabove(TRabove value);
335 
336  /// Assign a value to Rabove data member.
337  ///
338  /// @return
339  /// Reference to the data value.
340  TRabove& SetRabove(void);
341 
342  /// Atom ID of Atom Below the Plane on the Right
343  /// Note: Atom ID's must be greater than "0"
344  /// Check if a value has been assigned to Rbelow data member.
345  ///
346  /// Data member Rbelow is mandatory;
347  /// its type is defined as 'typedef int TRbelow'
348  /// @return
349  /// - true, if a value has been assigned.
350  /// - false, otherwise.
351  bool IsSetRbelow(void) const;
352 
353  /// Check if it is safe to call GetRbelow method.
354  ///
355  /// @return
356  /// - true, if the data member is getatable.
357  /// - false, otherwise.
358  bool CanGetRbelow(void) const;
359 
360  /// Reset Rbelow data member.
361  void ResetRbelow(void);
362 
363  /// Get the Rbelow member data.
364  ///
365  /// @return
366  /// Copy of the member data.
367  TRbelow GetRbelow(void) const;
368 
369  /// Assign a value to Rbelow data member.
370  ///
371  /// @param value
372  /// Value to assign
373  void SetRbelow(TRbelow value);
374 
375  /// Assign a value to Rbelow data member.
376  ///
377  /// @return
378  /// Reference to the data value.
379  TRbelow& SetRbelow(void);
380 
381  /// Reset the whole object
382  virtual void Reset(void);
383 
384 
385 private:
386  // Prohibit copy constructor and assignment operator
389 
390  // data
391  Uint4 m_set_State[1];
392  int m_Center;
393  int m_Top;
394  int m_Bottom;
395  int m_Labove;
396  int m_Lbelow;
397  int m_Rabove;
398  int m_Rbelow;
399 };
400 
401 /* @} */
402 
403 
404 
405 
406 
407 ///////////////////////////////////////////////////////////
408 ///////////////////// inline methods //////////////////////
409 ///////////////////////////////////////////////////////////
410 inline
412 {
413  return ((m_set_State[0] & 0x3) != 0);
414 }
415 
416 inline
418 {
419  return IsSetCenter();
420 }
421 
422 inline
424 {
425  m_Center = 0;
426  m_set_State[0] &= ~0x3;
427 }
428 
429 inline
431 {
432  if (!CanGetCenter()) {
433  ThrowUnassigned(0);
434  }
435  return m_Center;
436 }
437 
438 inline
440 {
441  m_Center = value;
442  m_set_State[0] |= 0x3;
443 }
444 
445 inline
447 {
448 #ifdef _DEBUG
449  if (!IsSetCenter()) {
450  memset(&m_Center,UnassignedByte(),sizeof(m_Center));
451  }
452 #endif
453  m_set_State[0] |= 0x1;
454  return m_Center;
455 }
456 
457 inline
459 {
460  return ((m_set_State[0] & 0xc) != 0);
461 }
462 
463 inline
465 {
466  return IsSetTop();
467 }
468 
469 inline
471 {
472  m_Top = 0;
473  m_set_State[0] &= ~0xc;
474 }
475 
476 inline
478 {
479  if (!CanGetTop()) {
480  ThrowUnassigned(1);
481  }
482  return m_Top;
483 }
484 
485 inline
487 {
488  m_Top = value;
489  m_set_State[0] |= 0xc;
490 }
491 
492 inline
494 {
495 #ifdef _DEBUG
496  if (!IsSetTop()) {
497  memset(&m_Top,UnassignedByte(),sizeof(m_Top));
498  }
499 #endif
500  m_set_State[0] |= 0x4;
501  return m_Top;
502 }
503 
504 inline
506 {
507  return ((m_set_State[0] & 0x30) != 0);
508 }
509 
510 inline
512 {
513  return IsSetBottom();
514 }
515 
516 inline
518 {
519  m_Bottom = 0;
520  m_set_State[0] &= ~0x30;
521 }
522 
523 inline
525 {
526  if (!CanGetBottom()) {
527  ThrowUnassigned(2);
528  }
529  return m_Bottom;
530 }
531 
532 inline
534 {
535  m_Bottom = value;
536  m_set_State[0] |= 0x30;
537 }
538 
539 inline
541 {
542 #ifdef _DEBUG
543  if (!IsSetBottom()) {
544  memset(&m_Bottom,UnassignedByte(),sizeof(m_Bottom));
545  }
546 #endif
547  m_set_State[0] |= 0x10;
548  return m_Bottom;
549 }
550 
551 inline
553 {
554  return ((m_set_State[0] & 0xc0) != 0);
555 }
556 
557 inline
559 {
560  return IsSetLabove();
561 }
562 
563 inline
565 {
566  m_Labove = 0;
567  m_set_State[0] &= ~0xc0;
568 }
569 
570 inline
572 {
573  if (!CanGetLabove()) {
574  ThrowUnassigned(3);
575  }
576  return m_Labove;
577 }
578 
579 inline
581 {
582  m_Labove = value;
583  m_set_State[0] |= 0xc0;
584 }
585 
586 inline
588 {
589 #ifdef _DEBUG
590  if (!IsSetLabove()) {
591  memset(&m_Labove,UnassignedByte(),sizeof(m_Labove));
592  }
593 #endif
594  m_set_State[0] |= 0x40;
595  return m_Labove;
596 }
597 
598 inline
600 {
601  return ((m_set_State[0] & 0x300) != 0);
602 }
603 
604 inline
606 {
607  return IsSetLbelow();
608 }
609 
610 inline
612 {
613  m_Lbelow = 0;
614  m_set_State[0] &= ~0x300;
615 }
616 
617 inline
619 {
620  if (!CanGetLbelow()) {
621  ThrowUnassigned(4);
622  }
623  return m_Lbelow;
624 }
625 
626 inline
628 {
629  m_Lbelow = value;
630  m_set_State[0] |= 0x300;
631 }
632 
633 inline
635 {
636 #ifdef _DEBUG
637  if (!IsSetLbelow()) {
638  memset(&m_Lbelow,UnassignedByte(),sizeof(m_Lbelow));
639  }
640 #endif
641  m_set_State[0] |= 0x100;
642  return m_Lbelow;
643 }
644 
645 inline
647 {
648  return ((m_set_State[0] & 0xc00) != 0);
649 }
650 
651 inline
653 {
654  return IsSetRabove();
655 }
656 
657 inline
659 {
660  m_Rabove = 0;
661  m_set_State[0] &= ~0xc00;
662 }
663 
664 inline
666 {
667  if (!CanGetRabove()) {
668  ThrowUnassigned(5);
669  }
670  return m_Rabove;
671 }
672 
673 inline
675 {
676  m_Rabove = value;
677  m_set_State[0] |= 0xc00;
678 }
679 
680 inline
682 {
683 #ifdef _DEBUG
684  if (!IsSetRabove()) {
685  memset(&m_Rabove,UnassignedByte(),sizeof(m_Rabove));
686  }
687 #endif
688  m_set_State[0] |= 0x400;
689  return m_Rabove;
690 }
691 
692 inline
694 {
695  return ((m_set_State[0] & 0x3000) != 0);
696 }
697 
698 inline
700 {
701  return IsSetRbelow();
702 }
703 
704 inline
706 {
707  m_Rbelow = 0;
708  m_set_State[0] &= ~0x3000;
709 }
710 
711 inline
713 {
714  if (!CanGetRbelow()) {
715  ThrowUnassigned(6);
716  }
717  return m_Rbelow;
718 }
719 
720 inline
722 {
723  m_Rbelow = value;
724  m_set_State[0] |= 0x3000;
725 }
726 
727 inline
729 {
730 #ifdef _DEBUG
731  if (!IsSetRbelow()) {
732  memset(&m_Rbelow,UnassignedByte(),sizeof(m_Rbelow));
733  }
734 #endif
735  m_set_State[0] |= 0x1000;
736  return m_Rbelow;
737 }
738 
739 ///////////////////////////////////////////////////////////
740 ////////////////// end of inline methods //////////////////
741 ///////////////////////////////////////////////////////////
742 
743 
744 
745 
746 
747 END_objects_SCOPE // namespace ncbi::objects::
748 
750 
751 
752 #endif // OBJECTS_PCSUBSTANCE_PC_STEREOOCTAHEDRAL_BASE_HPP
Octahedral (OC-6) and Square Pyramid (SPY-5) StereoCenters [Using IUPAC Stereogenic Center recommenda...
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
TBottom & SetBottom(void)
Assign a value to Bottom data member.
bool IsSetLabove(void) const
Atom ID of Atom Above the Plane on the Left Note: Atom ID's must be greater than "0" Check if a value...
TRabove & SetRabove(void)
Assign a value to Rabove data member.
TTop GetTop(void) const
Get the Top member data.
void ResetLabove(void)
Reset Labove data member.
bool CanGetTop(void) const
Check if it is safe to call GetTop method.
bool IsSetLbelow(void) const
Atom ID of Atom Below the Plane on the Left Note: Atom ID's must be greater than "0" Check if a value...
bool CanGetLbelow(void) const
Check if it is safe to call GetLbelow method.
bool CanGetBottom(void) const
Check if it is safe to call GetBottom method.
TTop & SetTop(void)
Assign a value to Top data member.
TBottom GetBottom(void) const
Get the Bottom member data.
TCenter GetCenter(void) const
Get the Center member data.
void ResetRbelow(void)
Reset Rbelow data member.
TLabove & SetLabove(void)
Assign a value to Labove data member.
TLbelow GetLbelow(void) const
Get the Lbelow member data.
bool IsSetRbelow(void) const
Atom ID of Atom Below the Plane on the Right Note: Atom ID's must be greater than "0" Check if a valu...
bool CanGetLabove(void) const
Check if it is safe to call GetLabove method.
CPC_StereoOctahedral_Base & operator=(const CPC_StereoOctahedral_Base &)
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 ...
TLabove GetLabove(void) const
Get the Labove 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...
void ResetBottom(void)
Reset Bottom data member.
TRbelow GetRbelow(void) const
Get the Rbelow member data.
bool CanGetRbelow(void) const
Check if it is safe to call GetRbelow method.
bool CanGetCenter(void) const
Check if it is safe to call GetCenter method.
bool IsSetRabove(void) const
Atom ID of Atom Above the Plane on the Right Note: Atom ID's must be greater than "0" Check if a valu...
void ResetRabove(void)
Reset Rabove data member.
TCenter & SetCenter(void)
Assign a value to Center data member.
bool CanGetRabove(void) const
Check if it is safe to call GetRabove method.
TRbelow & SetRbelow(void)
Assign a value to Rbelow data member.
void ResetTop(void)
Reset Top data member.
CPC_StereoOctahedral_Base(const CPC_StereoOctahedral_Base &)
TLbelow & SetLbelow(void)
Assign a value to Lbelow data member.
Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
TRabove GetRabove(void) const
Get the Rabove member data.
void ResetCenter(void)
Reset Center data member.
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...
void ResetLbelow(void)
Reset Lbelow data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed Apr 17 13:08:39 2024 by modify_doxy.py rev. 669887