NCBI C++ ToolKit
Biostruc_molecule_pntr_.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 Biostruc_molecule_pntr_.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_BIOSTRUC_MOLECULE_PNTR_BASE_HPP
42 #define OBJECTS_MMDB3_BIOSTRUC_MOLECULE_PNTR_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 CBiostruc_id;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_MMDB_Features
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 /// Atom, residue or molecule motifs describe a substructure defined by a set
73 /// of nodes from the chemical graph. PDB secondary structure features are
74 /// described as a residue motif, since they are not associated with any one of
75 /// the multiple models that may be provided in a PDB file. NCBI-assigned
76 /// secondary structure is represented in the same way, even though it is
77 /// model specific, since this allows for simple mapping of the structural
78 /// feature onto a sequence-only representation. This addressing mode may also
79 /// be used to describe features to be associated with particular atoms,
80 /// as, for example, the chemical shift observed in an NMR experiment.
81 ///
82 /// CBiostruc_molecule_pntr_Base --
83 ///
84 
86 {
88 public:
89  // constructor
91  // destructor
92  virtual ~CBiostruc_molecule_pntr_Base(void);
93 
94  // type info
96 
97  // types
100 
101  // member index
102  enum class E_memberIndex {
103  e__allMandatory = 0,
104  e_biostruc_id,
105  e_molecule_id
106  };
108 
109  // getters
110  // setters
111 
112  /// Check if a value has been assigned to Biostruc_id data member.
113  ///
114  /// Data member Biostruc_id is mandatory;
115  /// its type is defined as 'typedef CBiostruc_id TBiostruc_id'
116  /// @return
117  /// - true, if a value has been assigned.
118  /// - false, otherwise.
119  bool IsSetBiostruc_id(void) const;
120 
121  /// Check if it is safe to call GetBiostruc_id method.
122  ///
123  /// @return
124  /// - true, if the data member is getatable.
125  /// - false, otherwise.
126  bool CanGetBiostruc_id(void) const;
127 
128  /// Reset Biostruc_id data member.
129  void ResetBiostruc_id(void);
130 
131  /// Get the Biostruc_id member data.
132  ///
133  /// @return
134  /// Reference to the member data.
135  const TBiostruc_id& GetBiostruc_id(void) const;
136 
137  /// Assign a value to Biostruc_id data member.
138  ///
139  /// @param value
140  /// Reference to value.
141  void SetBiostruc_id(TBiostruc_id& value);
142 
143  /// Assign a value to Biostruc_id data member.
144  ///
145  /// @return
146  /// Reference to the data value.
147  TBiostruc_id& SetBiostruc_id(void);
148 
149  /// Check if a value has been assigned to Molecule_id data member.
150  ///
151  /// Data member Molecule_id is mandatory;
152  /// its type is defined as 'typedef CMolecule_id TMolecule_id'
153  /// @return
154  /// - true, if a value has been assigned.
155  /// - false, otherwise.
156  bool IsSetMolecule_id(void) const;
157 
158  /// Check if it is safe to call GetMolecule_id method.
159  ///
160  /// @return
161  /// - true, if the data member is getatable.
162  /// - false, otherwise.
163  bool CanGetMolecule_id(void) const;
164 
165  /// Reset Molecule_id data member.
166  void ResetMolecule_id(void);
167 
168  /// Get the Molecule_id member data.
169  ///
170  /// @return
171  /// Reference to the member data.
172  const TMolecule_id& GetMolecule_id(void) const;
173 
174  /// Assign a value to Molecule_id data member.
175  ///
176  /// @param value
177  /// Value to assign
178  void SetMolecule_id(const TMolecule_id& value);
179 
180  /// Assign a value to Molecule_id data member.
181  ///
182  /// @return
183  /// Reference to the data value.
184  TMolecule_id& SetMolecule_id(void);
185 
186  /// Reset the whole object
187  virtual void Reset(void);
188 
189 
190 private:
191  // Prohibit copy constructor and assignment operator
194 
195  // data
196  Uint4 m_set_State[1];
199 };
200 
201 /* @} */
202 
203 
204 
205 
206 
207 ///////////////////////////////////////////////////////////
208 ///////////////////// inline methods //////////////////////
209 ///////////////////////////////////////////////////////////
210 inline
212 {
213  return m_Biostruc_id.NotEmpty();
214 }
215 
216 inline
218 {
219  return true;
220 }
221 
222 inline
224 {
225  if ( !m_Biostruc_id ) {
226  const_cast<CBiostruc_molecule_pntr_Base*>(this)->ResetBiostruc_id();
227  }
228  return (*m_Biostruc_id);
229 }
230 
231 inline
233 {
234  if ( !m_Biostruc_id ) {
236  }
237  return (*m_Biostruc_id);
238 }
239 
240 inline
242 {
243  return ((m_set_State[0] & 0xc) != 0);
244 }
245 
246 inline
248 {
249  return IsSetMolecule_id();
250 }
251 
252 inline
254 {
256  m_set_State[0] &= ~0xc;
257 }
258 
259 inline
261 {
262  if (!CanGetMolecule_id()) {
263  ThrowUnassigned(1);
264  }
265  return m_Molecule_id;
266 }
267 
268 inline
270 {
272  m_set_State[0] |= 0xc;
273 }
274 
275 inline
277 {
278  m_set_State[0] |= 0x4;
279  return m_Molecule_id;
280 }
281 
282 ///////////////////////////////////////////////////////////
283 ////////////////// end of inline methods //////////////////
284 ///////////////////////////////////////////////////////////
285 
286 
287 
288 
289 
290 END_objects_SCOPE // namespace ncbi::objects::
291 
293 
294 
295 #endif // OBJECTS_MMDB3_BIOSTRUC_MOLECULE_PNTR_BASE_HPP
User-defined methods of the data storage class.
CBiostruc_id –.
Definition: Biostruc_id.hpp:66
Atom, residue or molecule motifs describe a substructure defined by a set of nodes from the chemical ...
CMolecule_id –.
Definition: Molecule_id.hpp:66
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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 ResetMolecule_id(void)
Reset Molecule_id data member.
CBiostruc_molecule_pntr_Base & operator=(const CBiostruc_molecule_pntr_Base &)
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetMolecule_id(void) const
Check if a value has been assigned to Molecule_id data member.
TBiostruc_id & SetBiostruc_id(void)
Assign a value to Biostruc_id data member.
CBiostruc_molecule_pntr_Base(const CBiostruc_molecule_pntr_Base &)
bool IsSetBiostruc_id(void) const
Check if a value has been assigned to Biostruc_id data member.
const TBiostruc_id & GetBiostruc_id(void) const
Get the Biostruc_id member data.
bool CanGetBiostruc_id(void) const
Check if it is safe to call GetBiostruc_id method.
void ResetBiostruc_id(void)
Reset Biostruc_id data member.
bool CanGetMolecule_id(void) const
Check if it is safe to call GetMolecule_id method.
TMolecule_id & SetMolecule_id(void)
Assign a value to Molecule_id data member.
const TMolecule_id & GetMolecule_id(void) const
Get the Molecule_id member data.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon May 06 04:52:42 2024 by modify_doxy.py rev. 669887