NCBI C++ ToolKit
Biostruc_annot_set_.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_annot_set_.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/mmdb1/mmdb1.asn">mmdb1.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/mmdb1/mmdb1.def">mmdb1.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_MMDB1_BIOSTRUC_ANNOT_SET_BASE_HPP
42 #define OBJECTS_MMDB1_BIOSTRUC_ANNOT_SET_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
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_descr;
62 class CBiostruc_id;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_MMDB
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 /// A biostruc annotation set is a means to collect ASN.1 data for biostruc
75 /// features into one file. The object type is intended as a means to store
76 /// feature annotation of similar type, such as "core" definitions for a
77 /// threading program, or structure-structure alignments for a structure-
78 /// similarity browser.
79 ///
80 /// CBiostruc_annot_set_Base --
81 ///
82 
84 {
86 public:
87  // constructor
89  // destructor
90  virtual ~CBiostruc_annot_set_Base(void);
91 
92  // type info
94 
95  // types
96  typedef list< CRef< CBiostruc_id > > TId;
97  typedef list< CRef< CBiostruc_descr > > TDescr;
98  typedef list< CRef< CBiostruc_feature_set > > TFeatures;
99 
100  // member index
101  enum class E_memberIndex {
102  e__allMandatory = 0,
103  e_id,
104  e_descr,
105  e_features
106  };
108 
109  // getters
110  // setters
111 
112  /// Check if a value has been assigned to Id data member.
113  ///
114  /// Data member Id is optional;
115  /// its type is defined as 'typedef list< CRef< CBiostruc_id > > TId'
116  /// @return
117  /// - true, if a value has been assigned.
118  /// - false, otherwise.
119  bool IsSetId(void) const;
120 
121  /// Check if it is safe to call GetId method.
122  ///
123  /// @return
124  /// - true, if the data member is getatable.
125  /// - false, otherwise.
126  bool CanGetId(void) const;
127 
128  /// Reset Id data member.
129  void ResetId(void);
130 
131  /// Get the Id member data.
132  ///
133  /// @return
134  /// Reference to the member data.
135  const TId& GetId(void) const;
136 
137  /// Assign a value to Id data member.
138  ///
139  /// @return
140  /// Reference to the data value.
141  TId& SetId(void);
142 
143  /// Check if a value has been assigned to Descr data member.
144  ///
145  /// Data member Descr is optional;
146  /// its type is defined as 'typedef list< CRef< CBiostruc_descr > > TDescr'
147  /// @return
148  /// - true, if a value has been assigned.
149  /// - false, otherwise.
150  bool IsSetDescr(void) const;
151 
152  /// Check if it is safe to call GetDescr method.
153  ///
154  /// @return
155  /// - true, if the data member is getatable.
156  /// - false, otherwise.
157  bool CanGetDescr(void) const;
158 
159  /// Reset Descr data member.
160  void ResetDescr(void);
161 
162  /// Get the Descr member data.
163  ///
164  /// @return
165  /// Reference to the member data.
166  const TDescr& GetDescr(void) const;
167 
168  /// Assign a value to Descr data member.
169  ///
170  /// @return
171  /// Reference to the data value.
172  TDescr& SetDescr(void);
173 
174  /// Check if a value has been assigned to Features data member.
175  ///
176  /// Data member Features is mandatory;
177  /// its type is defined as 'typedef list< CRef< CBiostruc_feature_set > > TFeatures'
178  /// @return
179  /// - true, if a value has been assigned.
180  /// - false, otherwise.
181  bool IsSetFeatures(void) const;
182 
183  /// Check if it is safe to call GetFeatures method.
184  ///
185  /// @return
186  /// - true, if the data member is getatable.
187  /// - false, otherwise.
188  bool CanGetFeatures(void) const;
189 
190  /// Reset Features data member.
191  void ResetFeatures(void);
192 
193  /// Get the Features member data.
194  ///
195  /// @return
196  /// Reference to the member data.
197  const TFeatures& GetFeatures(void) const;
198 
199  /// Assign a value to Features data member.
200  ///
201  /// @return
202  /// Reference to the data value.
203  TFeatures& SetFeatures(void);
204 
205  /// Reset the whole object
206  virtual void Reset(void);
207 
208 
209 private:
210  // Prohibit copy constructor and assignment operator
213 
214  // data
215  Uint4 m_set_State[1];
216  list< CRef< CBiostruc_id > > m_Id;
217  list< CRef< CBiostruc_descr > > m_Descr;
218  list< CRef< CBiostruc_feature_set > > m_Features;
219 };
220 
221 /* @} */
222 
223 
224 
225 
226 
227 ///////////////////////////////////////////////////////////
228 ///////////////////// inline methods //////////////////////
229 ///////////////////////////////////////////////////////////
230 inline
232 {
233  return ((m_set_State[0] & 0x3) != 0);
234 }
235 
236 inline
238 {
239  return true;
240 }
241 
242 inline
244 {
245  return m_Id;
246 }
247 
248 inline
250 {
251  m_set_State[0] |= 0x1;
252  return m_Id;
253 }
254 
255 inline
257 {
258  return ((m_set_State[0] & 0xc) != 0);
259 }
260 
261 inline
263 {
264  return true;
265 }
266 
267 inline
269 {
270  return m_Descr;
271 }
272 
273 inline
275 {
276  m_set_State[0] |= 0x4;
277  return m_Descr;
278 }
279 
280 inline
282 {
283  return ((m_set_State[0] & 0x30) != 0);
284 }
285 
286 inline
288 {
289  return true;
290 }
291 
292 inline
294 {
295  return m_Features;
296 }
297 
298 inline
300 {
301  m_set_State[0] |= 0x10;
302  return m_Features;
303 }
304 
305 ///////////////////////////////////////////////////////////
306 ////////////////// end of inline methods //////////////////
307 ///////////////////////////////////////////////////////////
308 
309 
310 
311 
312 
313 END_objects_SCOPE // namespace ncbi::objects::
314 
316 
317 
318 #endif // OBJECTS_MMDB1_BIOSTRUC_ANNOT_SET_BASE_HPP
A biostruc annotation set is a means to collect ASN.1 data for biostruc features into one file.
CBiostruc_descr –.
CBiostruc_feature_set –.
CBiostruc_id –.
Definition: Biostruc_id.hpp:66
Base class for all serializable objects.
Definition: serialbase.hpp:150
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
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_MMDB1_EXPORT
Definition: ncbi_export.h:624
list< CRef< CBiostruc_descr > > TDescr
TDescr & SetDescr(void)
Assign a value to Descr data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool IsSetFeatures(void) const
Check if a value has been assigned to Features data member.
TId & SetId(void)
Assign a value to Id data member.
TFeatures & SetFeatures(void)
Assign a value to Features data member.
const TFeatures & GetFeatures(void) const
Get the Features member data.
bool CanGetDescr(void) const
Check if it is safe to call GetDescr method.
list< CRef< CBiostruc_descr > > m_Descr
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
bool CanGetFeatures(void) const
Check if it is safe to call GetFeatures method.
list< CRef< CBiostruc_id > > m_Id
CBiostruc_annot_set_Base(const CBiostruc_annot_set_Base &)
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
list< CRef< CBiostruc_feature_set > > TFeatures
const TDescr & GetDescr(void) const
Get the Descr member data.
list< CRef< CBiostruc_feature_set > > m_Features
const TId & GetId(void) const
Get the Id member data.
list< CRef< CBiostruc_id > > TId
CBiostruc_annot_set_Base & operator=(const CBiostruc_annot_set_Base &)
Modified on Thu May 23 12:25:09 2024 by modify_doxy.py rev. 669887