NCBI C++ ToolKit
PC_Coordinates_.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_Coordinates_.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_COORDINATES_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_COORDINATES_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <vector>
51 
53 
54 #ifndef BEGIN_objects_SCOPE
55 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
56 # define END_objects_SCOPE END_SCOPE(objects)
57 #endif
58 BEGIN_objects_SCOPE // namespace ncbi::objects::
59 
60 
61 // forward declarations
62 class CPC_AtomString;
63 class CPC_Conformer;
64 class CPC_InfoData;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_PCSubstance
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 /// Coordinates for the Compound of a given type
77 ///
78 /// CPC_Coordinates_Base --
79 ///
80 
82 {
84 public:
85  // constructor
87  // destructor
88  virtual ~CPC_Coordinates_Base(void);
89 
90  // type info
92 
93  // types
94  typedef vector< int > TType;
95  typedef vector< int > TAid;
96  typedef list< CRef< CPC_Conformer > > TConformers;
97  typedef list< CRef< CPC_AtomString > > TAtomlabels;
98  typedef list< CRef< CPC_InfoData > > TData;
99 
100  // member index
101  enum class E_memberIndex {
102  e__allMandatory = 0,
103  e_type,
104  e_aid,
105  e_conformers,
106  e_atomlabels,
107  e_data
108  };
110 
111  // getters
112  // setters
113 
114  /// Coordinate Type Information (vector)
115  /// Check if a value has been assigned to Type data member.
116  ///
117  /// Data member Type is mandatory;
118  /// its type is defined as 'typedef vector< int > TType'
119  /// @return
120  /// - true, if a value has been assigned.
121  /// - false, otherwise.
122  bool IsSetType(void) const;
123 
124  /// Check if it is safe to call GetType method.
125  ///
126  /// @return
127  /// - true, if the data member is getatable.
128  /// - false, otherwise.
129  bool CanGetType(void) const;
130 
131  /// Reset Type data member.
132  void ResetType(void);
133 
134  /// Get the Type member data.
135  ///
136  /// @return
137  /// Reference to the member data.
138  const TType& GetType(void) const;
139 
140  /// Assign a value to Type data member.
141  ///
142  /// @return
143  /// Reference to the data value.
144  TType& SetType(void);
145 
146  /// Conformer Atom IDs (vector)
147  /// (to be kept synchronized with Conformers)
148  /// Note: Atom ID's must be greater than "0"
149  /// Check if a value has been assigned to Aid data member.
150  ///
151  /// Data member Aid is mandatory;
152  /// its type is defined as 'typedef vector< int > TAid'
153  /// @return
154  /// - true, if a value has been assigned.
155  /// - false, otherwise.
156  bool IsSetAid(void) const;
157 
158  /// Check if it is safe to call GetAid method.
159  ///
160  /// @return
161  /// - true, if the data member is getatable.
162  /// - false, otherwise.
163  bool CanGetAid(void) const;
164 
165  /// Reset Aid data member.
166  void ResetAid(void);
167 
168  /// Get the Aid member data.
169  ///
170  /// @return
171  /// Reference to the member data.
172  const TAid& GetAid(void) const;
173 
174  /// Assign a value to Aid data member.
175  ///
176  /// @return
177  /// Reference to the data value.
178  TAid& SetAid(void);
179 
180  /// Conformers for this Coordinate Set
181  /// Check if a value has been assigned to Conformers data member.
182  ///
183  /// Data member Conformers is optional;
184  /// its type is defined as 'typedef list< CRef< CPC_Conformer > > TConformers'
185  /// @return
186  /// - true, if a value has been assigned.
187  /// - false, otherwise.
188  bool IsSetConformers(void) const;
189 
190  /// Check if it is safe to call GetConformers method.
191  ///
192  /// @return
193  /// - true, if the data member is getatable.
194  /// - false, otherwise.
195  bool CanGetConformers(void) const;
196 
197  /// Reset Conformers data member.
198  void ResetConformers(void);
199 
200  /// Get the Conformers member data.
201  ///
202  /// @return
203  /// Reference to the member data.
204  const TConformers& GetConformers(void) const;
205 
206  /// Assign a value to Conformers data member.
207  ///
208  /// @return
209  /// Reference to the data value.
210  TConformers& SetConformers(void);
211 
212  /// Atom labels for Conformer Set
213  /// Check if a value has been assigned to Atomlabels data member.
214  ///
215  /// Data member Atomlabels is optional;
216  /// its type is defined as 'typedef list< CRef< CPC_AtomString > > TAtomlabels'
217  /// @return
218  /// - true, if a value has been assigned.
219  /// - false, otherwise.
220  bool IsSetAtomlabels(void) const;
221 
222  /// Check if it is safe to call GetAtomlabels method.
223  ///
224  /// @return
225  /// - true, if the data member is getatable.
226  /// - false, otherwise.
227  bool CanGetAtomlabels(void) const;
228 
229  /// Reset Atomlabels data member.
230  void ResetAtomlabels(void);
231 
232  /// Get the Atomlabels member data.
233  ///
234  /// @return
235  /// Reference to the member data.
236  const TAtomlabels& GetAtomlabels(void) const;
237 
238  /// Assign a value to Atomlabels data member.
239  ///
240  /// @return
241  /// Reference to the data value.
242  TAtomlabels& SetAtomlabels(void);
243 
244  /// Data Associated with these Coordinates
245  /// Check if a value has been assigned to Data data member.
246  ///
247  /// Data member Data is optional;
248  /// its type is defined as 'typedef list< CRef< CPC_InfoData > > TData'
249  /// @return
250  /// - true, if a value has been assigned.
251  /// - false, otherwise.
252  bool IsSetData(void) const;
253 
254  /// Check if it is safe to call GetData method.
255  ///
256  /// @return
257  /// - true, if the data member is getatable.
258  /// - false, otherwise.
259  bool CanGetData(void) const;
260 
261  /// Reset Data data member.
262  void ResetData(void);
263 
264  /// Get the Data member data.
265  ///
266  /// @return
267  /// Reference to the member data.
268  const TData& GetData(void) const;
269 
270  /// Assign a value to Data data member.
271  ///
272  /// @return
273  /// Reference to the data value.
274  TData& SetData(void);
275 
276  /// Reset the whole object
277  virtual void Reset(void);
278 
279 
280 private:
281  // Prohibit copy constructor and assignment operator
284 
285  // data
286  Uint4 m_set_State[1];
287  vector< int > m_Type;
288  vector< int > m_Aid;
289  list< CRef< CPC_Conformer > > m_Conformers;
290  list< CRef< CPC_AtomString > > m_Atomlabels;
291  list< CRef< CPC_InfoData > > m_Data;
292 };
293 
294 /* @} */
295 
296 
297 
298 
299 
300 ///////////////////////////////////////////////////////////
301 ///////////////////// inline methods //////////////////////
302 ///////////////////////////////////////////////////////////
303 inline
305 {
306  return ((m_set_State[0] & 0x3) != 0);
307 }
308 
309 inline
311 {
312  return true;
313 }
314 
315 inline
317 {
318  return m_Type;
319 }
320 
321 inline
323 {
324  m_set_State[0] |= 0x1;
325  return m_Type;
326 }
327 
328 inline
330 {
331  return ((m_set_State[0] & 0xc) != 0);
332 }
333 
334 inline
336 {
337  return true;
338 }
339 
340 inline
342 {
343  return m_Aid;
344 }
345 
346 inline
348 {
349  m_set_State[0] |= 0x4;
350  return m_Aid;
351 }
352 
353 inline
355 {
356  return ((m_set_State[0] & 0x30) != 0);
357 }
358 
359 inline
361 {
362  return true;
363 }
364 
365 inline
367 {
368  return m_Conformers;
369 }
370 
371 inline
373 {
374  m_set_State[0] |= 0x10;
375  return m_Conformers;
376 }
377 
378 inline
380 {
381  return ((m_set_State[0] & 0xc0) != 0);
382 }
383 
384 inline
386 {
387  return true;
388 }
389 
390 inline
392 {
393  return m_Atomlabels;
394 }
395 
396 inline
398 {
399  m_set_State[0] |= 0x40;
400  return m_Atomlabels;
401 }
402 
403 inline
405 {
406  return ((m_set_State[0] & 0x300) != 0);
407 }
408 
409 inline
411 {
412  return true;
413 }
414 
415 inline
417 {
418  return m_Data;
419 }
420 
421 inline
423 {
424  m_set_State[0] |= 0x100;
425  return m_Data;
426 }
427 
428 ///////////////////////////////////////////////////////////
429 ////////////////// end of inline methods //////////////////
430 ///////////////////////////////////////////////////////////
431 
432 
433 
434 
435 
436 END_objects_SCOPE // namespace ncbi::objects::
437 
439 
440 
441 #endif // OBJECTS_PCSUBSTANCE_PC_COORDINATES_BASE_HPP
User-defined methods of the data storage class.
CPC_AtomString –.
CPC_Conformer –.
Coordinates for the Compound of a given type.
CPC_InfoData –.
Definition: PC_InfoData.hpp:66
Base class for all serializable objects.
Definition: serialbase.hpp:150
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 IsSetConformers(void) const
Conformers for this Coordinate Set Check if a value has been assigned to Conformers data member.
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
const TAtomlabels & GetAtomlabels(void) const
Get the Atomlabels member data.
TType & SetType(void)
Assign a value to Type data member.
bool CanGetData(void) const
Check if it is safe to call GetData method.
list< CRef< CPC_AtomString > > TAtomlabels
bool IsSetAid(void) const
Conformer Atom IDs (vector) (to be kept synchronized with Conformers) Note: Atom ID's must be greater...
TConformers & SetConformers(void)
Assign a value to Conformers data member.
list< CRef< CPC_InfoData > > m_Data
bool CanGetAid(void) const
Check if it is safe to call GetAid method.
bool IsSetData(void) const
Data Associated with these Coordinates Check if a value has been assigned to Data data member.
bool CanGetType(void) const
Check if it is safe to call GetType method.
bool IsSetType(void) const
Coordinate Type Information (vector) Check if a value has been assigned to Type data member.
CPC_Coordinates_Base & operator=(const CPC_Coordinates_Base &)
list< CRef< CPC_Conformer > > TConformers
const TConformers & GetConformers(void) const
Get the Conformers member data.
const TData & GetData(void) const
Get the Data member data.
TAtomlabels & SetAtomlabels(void)
Assign a value to Atomlabels data member.
list< CRef< CPC_AtomString > > m_Atomlabels
const TAid & GetAid(void) const
Get the Aid member data.
const TType & GetType(void) const
Get the Type member data.
TAid & SetAid(void)
Assign a value to Aid data member.
TData & SetData(void)
Assign a value to Data data member.
bool CanGetAtomlabels(void) const
Check if it is safe to call GetAtomlabels method.
bool IsSetAtomlabels(void) const
Atom labels for Conformer Set Check if a value has been assigned to Atomlabels data member.
bool CanGetConformers(void) const
Check if it is safe to call GetConformers method.
list< CRef< CPC_Conformer > > m_Conformers
CPC_Coordinates_Base(const CPC_Coordinates_Base &)
list< CRef< CPC_InfoData > > TData
Modified on Wed Apr 17 13:09:37 2024 by modify_doxy.py rev. 669887