NCBI C++ ToolKit
PC_DrawAnnotations_.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_DrawAnnotations_.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_DRAWANNOTATIONS_BASE_HPP
42 #define OBJECTS_PCSUBSTANCE_PC_DRAWANNOTATIONS_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 /// Drawing Annotations (in Parallel Arrays)
70 /// [Note: A pair of atoms can have multiple annotations]
71 ///
72 /// CPC_DrawAnnotations_Base --
73 ///
74 
76 {
78 public:
79  // constructor
81  // destructor
82  virtual ~CPC_DrawAnnotations_Base(void);
83 
84  // type info
86 
87  // types
88  typedef vector< int > TAnnotation;
89  typedef vector< int > TAid1;
90  typedef vector< int > TAid2;
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
95  e_annotation,
96  e_aid1,
97  e_aid2
98  };
100 
101  // getters
102  // setters
103 
104  /// [Note: Parallel Arrays must be kept Synchronized]
105  /// Bond Annotations (vector)
106  /// Check if a value has been assigned to Annotation data member.
107  ///
108  /// Data member Annotation is mandatory;
109  /// its type is defined as 'typedef vector< int > TAnnotation'
110  /// @return
111  /// - true, if a value has been assigned.
112  /// - false, otherwise.
113  bool IsSetAnnotation(void) const;
114 
115  /// Check if it is safe to call GetAnnotation method.
116  ///
117  /// @return
118  /// - true, if the data member is getatable.
119  /// - false, otherwise.
120  bool CanGetAnnotation(void) const;
121 
122  /// Reset Annotation data member.
123  void ResetAnnotation(void);
124 
125  /// Get the Annotation member data.
126  ///
127  /// @return
128  /// Reference to the member data.
129  const TAnnotation& GetAnnotation(void) const;
130 
131  /// Assign a value to Annotation data member.
132  ///
133  /// @return
134  /// Reference to the data value.
135  TAnnotation& SetAnnotation(void);
136 
137  /// Atom1 Identifier (vector)
138  /// Note: Atom ID's must be greater than "0"
139  /// Check if a value has been assigned to Aid1 data member.
140  ///
141  /// Data member Aid1 is mandatory;
142  /// its type is defined as 'typedef vector< int > TAid1'
143  /// @return
144  /// - true, if a value has been assigned.
145  /// - false, otherwise.
146  bool IsSetAid1(void) const;
147 
148  /// Check if it is safe to call GetAid1 method.
149  ///
150  /// @return
151  /// - true, if the data member is getatable.
152  /// - false, otherwise.
153  bool CanGetAid1(void) const;
154 
155  /// Reset Aid1 data member.
156  void ResetAid1(void);
157 
158  /// Get the Aid1 member data.
159  ///
160  /// @return
161  /// Reference to the member data.
162  const TAid1& GetAid1(void) const;
163 
164  /// Assign a value to Aid1 data member.
165  ///
166  /// @return
167  /// Reference to the data value.
168  TAid1& SetAid1(void);
169 
170  /// Atom2 Identifier (vector)
171  /// Note: Atom ID's must be greater than "0"
172  /// Check if a value has been assigned to Aid2 data member.
173  ///
174  /// Data member Aid2 is mandatory;
175  /// its type is defined as 'typedef vector< int > TAid2'
176  /// @return
177  /// - true, if a value has been assigned.
178  /// - false, otherwise.
179  bool IsSetAid2(void) const;
180 
181  /// Check if it is safe to call GetAid2 method.
182  ///
183  /// @return
184  /// - true, if the data member is getatable.
185  /// - false, otherwise.
186  bool CanGetAid2(void) const;
187 
188  /// Reset Aid2 data member.
189  void ResetAid2(void);
190 
191  /// Get the Aid2 member data.
192  ///
193  /// @return
194  /// Reference to the member data.
195  const TAid2& GetAid2(void) const;
196 
197  /// Assign a value to Aid2 data member.
198  ///
199  /// @return
200  /// Reference to the data value.
201  TAid2& SetAid2(void);
202 
203  /// Reset the whole object
204  virtual void Reset(void);
205 
206 
207 private:
208  // Prohibit copy constructor and assignment operator
211 
212  // data
213  Uint4 m_set_State[1];
214  vector< int > m_Annotation;
215  vector< int > m_Aid1;
216  vector< int > m_Aid2;
217 };
218 
219 /* @} */
220 
221 
222 
223 
224 
225 ///////////////////////////////////////////////////////////
226 ///////////////////// inline methods //////////////////////
227 ///////////////////////////////////////////////////////////
228 inline
230 {
231  return ((m_set_State[0] & 0x3) != 0);
232 }
233 
234 inline
236 {
237  return true;
238 }
239 
240 inline
242 {
243  return m_Annotation;
244 }
245 
246 inline
248 {
249  m_set_State[0] |= 0x1;
250  return m_Annotation;
251 }
252 
253 inline
255 {
256  return ((m_set_State[0] & 0xc) != 0);
257 }
258 
259 inline
261 {
262  return true;
263 }
264 
265 inline
267 {
268  return m_Aid1;
269 }
270 
271 inline
273 {
274  m_set_State[0] |= 0x4;
275  return m_Aid1;
276 }
277 
278 inline
280 {
281  return ((m_set_State[0] & 0x30) != 0);
282 }
283 
284 inline
286 {
287  return true;
288 }
289 
290 inline
292 {
293  return m_Aid2;
294 }
295 
296 inline
298 {
299  m_set_State[0] |= 0x10;
300  return m_Aid2;
301 }
302 
303 ///////////////////////////////////////////////////////////
304 ////////////////// end of inline methods //////////////////
305 ///////////////////////////////////////////////////////////
306 
307 
308 
309 
310 
311 END_objects_SCOPE // namespace ncbi::objects::
312 
314 
315 
316 #endif // OBJECTS_PCSUBSTANCE_PC_DRAWANNOTATIONS_BASE_HPP
User-defined methods of the data storage class.
Drawing Annotations (in Parallel Arrays) [Note: A pair of atoms can have multiple annotations].
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 CanGetAid1(void) const
Check if it is safe to call GetAid1 method.
CPC_DrawAnnotations_Base & operator=(const CPC_DrawAnnotations_Base &)
bool CanGetAnnotation(void) const
Check if it is safe to call GetAnnotation method.
bool IsSetAnnotation(void) const
[Note: Parallel Arrays must be kept Synchronized] Bond Annotations (vector) Check if a value has been...
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
const TAid1 & GetAid1(void) const
Get the Aid1 member data.
const TAid2 & GetAid2(void) const
Get the Aid2 member data.
bool CanGetAid2(void) const
Check if it is safe to call GetAid2 method.
TAid2 & SetAid2(void)
Assign a value to Aid2 data member.
bool IsSetAid1(void) const
Atom1 Identifier (vector) Note: Atom ID's must be greater than "0" Check if a value has been assigned...
const TAnnotation & GetAnnotation(void) const
Get the Annotation member data.
TAnnotation & SetAnnotation(void)
Assign a value to Annotation data member.
bool IsSetAid2(void) const
Atom2 Identifier (vector) Note: Atom ID's must be greater than "0" Check if a value has been assigned...
CPC_DrawAnnotations_Base(const CPC_DrawAnnotations_Base &)
TAid1 & SetAid1(void)
Assign a value to Aid1 data member.
Modified on Tue Apr 23 07:40:43 2024 by modify_doxy.py rev. 669887