NCBI C++ ToolKit
PC_Bonds_.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_Bonds_.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_BONDS_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_BONDS_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <vector>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_PCSubstance
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 /// Bond Description Information (in Parallel Arrays)
70 ///
71 /// CPC_Bonds_Base --
72 ///
73 
75 {
77 public:
78  // constructor
79  CPC_Bonds_Base(void);
80  // destructor
81  virtual ~CPC_Bonds_Base(void);
82 
83  // type info
85 
86  // types
87  typedef vector< int > TAid1;
88  typedef vector< int > TAid2;
89  typedef vector< int > TOrder;
90 
91  // member index
92  enum class E_memberIndex {
93  e__allMandatory = 0,
94  e_aid1,
95  e_aid2,
96  e_order
97  };
99 
100  // getters
101  // setters
102 
103  /// [Note: Parallel Arrays must be kept Synchronized]
104  /// Atom1 Identifier (vector)
105  /// Note: Atom ID's must be greater than "0"
106  /// Check if a value has been assigned to Aid1 data member.
107  ///
108  /// Data member Aid1 is mandatory;
109  /// its type is defined as 'typedef vector< int > TAid1'
110  /// @return
111  /// - true, if a value has been assigned.
112  /// - false, otherwise.
113  bool IsSetAid1(void) const;
114 
115  /// Check if it is safe to call GetAid1 method.
116  ///
117  /// @return
118  /// - true, if the data member is getatable.
119  /// - false, otherwise.
120  bool CanGetAid1(void) const;
121 
122  /// Reset Aid1 data member.
123  void ResetAid1(void);
124 
125  /// Get the Aid1 member data.
126  ///
127  /// @return
128  /// Reference to the member data.
129  const TAid1& GetAid1(void) const;
130 
131  /// Assign a value to Aid1 data member.
132  ///
133  /// @return
134  /// Reference to the data value.
135  TAid1& SetAid1(void);
136 
137  /// Atom2 Identifier (vector)
138  /// Note: Atom ID's must be greater than "0"
139  /// Check if a value has been assigned to Aid2 data member.
140  ///
141  /// Data member Aid2 is mandatory;
142  /// its type is defined as 'typedef vector< int > TAid2'
143  /// @return
144  /// - true, if a value has been assigned.
145  /// - false, otherwise.
146  bool IsSetAid2(void) const;
147 
148  /// Check if it is safe to call GetAid2 method.
149  ///
150  /// @return
151  /// - true, if the data member is getatable.
152  /// - false, otherwise.
153  bool CanGetAid2(void) const;
154 
155  /// Reset Aid2 data member.
156  void ResetAid2(void);
157 
158  /// Get the Aid2 member data.
159  ///
160  /// @return
161  /// Reference to the member data.
162  const TAid2& GetAid2(void) const;
163 
164  /// Assign a value to Aid2 data member.
165  ///
166  /// @return
167  /// Reference to the data value.
168  TAid2& SetAid2(void);
169 
170  /// Bond Type Information (vector)
171  /// Check if a value has been assigned to Order data member.
172  ///
173  /// Data member Order is mandatory;
174  /// its type is defined as 'typedef vector< int > TOrder'
175  /// @return
176  /// - true, if a value has been assigned.
177  /// - false, otherwise.
178  bool IsSetOrder(void) const;
179 
180  /// Check if it is safe to call GetOrder method.
181  ///
182  /// @return
183  /// - true, if the data member is getatable.
184  /// - false, otherwise.
185  bool CanGetOrder(void) const;
186 
187  /// Reset Order data member.
188  void ResetOrder(void);
189 
190  /// Get the Order member data.
191  ///
192  /// @return
193  /// Reference to the member data.
194  const TOrder& GetOrder(void) const;
195 
196  /// Assign a value to Order data member.
197  ///
198  /// @return
199  /// Reference to the data value.
200  TOrder& SetOrder(void);
201 
202  /// Reset the whole object
203  virtual void Reset(void);
204 
205 
206 private:
207  // Prohibit copy constructor and assignment operator
210 
211  // data
212  Uint4 m_set_State[1];
213  vector< int > m_Aid1;
214  vector< int > m_Aid2;
215  vector< int > m_Order;
216 };
217 
218 /* @} */
219 
220 
221 
222 
223 
224 ///////////////////////////////////////////////////////////
225 ///////////////////// inline methods //////////////////////
226 ///////////////////////////////////////////////////////////
227 inline
229 {
230  return ((m_set_State[0] & 0x3) != 0);
231 }
232 
233 inline
235 {
236  return true;
237 }
238 
239 inline
241 {
242  return m_Aid1;
243 }
244 
245 inline
247 {
248  m_set_State[0] |= 0x1;
249  return m_Aid1;
250 }
251 
252 inline
254 {
255  return ((m_set_State[0] & 0xc) != 0);
256 }
257 
258 inline
260 {
261  return true;
262 }
263 
264 inline
266 {
267  return m_Aid2;
268 }
269 
270 inline
272 {
273  m_set_State[0] |= 0x4;
274  return m_Aid2;
275 }
276 
277 inline
279 {
280  return ((m_set_State[0] & 0x30) != 0);
281 }
282 
283 inline
285 {
286  return true;
287 }
288 
289 inline
291 {
292  return m_Order;
293 }
294 
295 inline
297 {
298  m_set_State[0] |= 0x10;
299  return m_Order;
300 }
301 
302 ///////////////////////////////////////////////////////////
303 ////////////////// end of inline methods //////////////////
304 ///////////////////////////////////////////////////////////
305 
306 
307 
308 
309 
310 END_objects_SCOPE // namespace ncbi::objects::
311 
313 
314 
315 #endif // OBJECTS_PCSUBSTANCE_PC_BONDS_BASE_HPP
User-defined methods of the data storage class.
Bond Description Information (in Parallel Arrays)
Definition: PC_Bonds_.hpp:75
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
TAid2 & SetAid2(void)
Assign a value to Aid2 data member.
Definition: PC_Bonds_.hpp:271
bool IsSetAid2(void) const
Atom2 Identifier (vector) Note: Atom ID's must be greater than "0" Check if a value has been assigned...
Definition: PC_Bonds_.hpp:253
bool CanGetAid1(void) const
Check if it is safe to call GetAid1 method.
Definition: PC_Bonds_.hpp:234
bool IsSetAid1(void) const
[Note: Parallel Arrays must be kept Synchronized] Atom1 Identifier (vector) Note: Atom ID's must be g...
Definition: PC_Bonds_.hpp:228
TAid1 & SetAid1(void)
Assign a value to Aid1 data member.
Definition: PC_Bonds_.hpp:246
vector< int > TAid1
Definition: PC_Bonds_.hpp:87
Uint4 m_set_State[1]
Definition: PC_Bonds_.hpp:212
const TAid1 & GetAid1(void) const
Get the Aid1 member data.
Definition: PC_Bonds_.hpp:240
vector< int > m_Aid1
Definition: PC_Bonds_.hpp:213
bool CanGetOrder(void) const
Check if it is safe to call GetOrder method.
Definition: PC_Bonds_.hpp:284
const TAid2 & GetAid2(void) const
Get the Aid2 member data.
Definition: PC_Bonds_.hpp:265
CSerialObject Tparent
Definition: PC_Bonds_.hpp:76
TOrder & SetOrder(void)
Assign a value to Order data member.
Definition: PC_Bonds_.hpp:296
DECLARE_INTERNAL_TYPE_INFO()
bool CanGetAid2(void) const
Check if it is safe to call GetAid2 method.
Definition: PC_Bonds_.hpp:259
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
Definition: PC_Bonds_.hpp:98
bool IsSetOrder(void) const
Bond Type Information (vector) Check if a value has been assigned to Order data member.
Definition: PC_Bonds_.hpp:278
const TOrder & GetOrder(void) const
Get the Order member data.
Definition: PC_Bonds_.hpp:290
vector< int > TOrder
Definition: PC_Bonds_.hpp:89
vector< int > m_Order
Definition: PC_Bonds_.hpp:215
vector< int > m_Aid2
Definition: PC_Bonds_.hpp:214
vector< int > TAid2
Definition: PC_Bonds_.hpp:88
CPC_Bonds_Base(const CPC_Bonds_Base &)
CPC_Bonds_Base & operator=(const CPC_Bonds_Base &)
Modified on Wed Apr 17 13:08:12 2024 by modify_doxy.py rev. 669887