NCBI C++ ToolKit
Biostruc_seqs_.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_seqs_.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/ncbimime/ncbimime.asn">ncbimime.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/ncbimime/ncbimime.def">ncbimime.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_NCBIMIME_BIOSTRUC_SEQS_BASE_HPP
42 #define OBJECTS_NCBIMIME_BIOSTRUC_SEQS_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;
63 class CSeq_annot;
64 class CSeq_entry;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_Mime
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 /// display blast alignment along with neighbor's structure added by yanli
77 ///
78 /// CBiostruc_seqs_Base --
79 ///
80 
82 {
84 public:
85  // constructor
86  CBiostruc_seqs_Base(void);
87  // destructor
88  virtual ~CBiostruc_seqs_Base(void);
89 
90  // type info
92 
93  // types
95  typedef list< CRef< CSeq_entry > > TSequences;
96  typedef list< CRef< CSeq_annot > > TSeqalign;
99 
100  // member index
101  enum class E_memberIndex {
102  e__allMandatory = 0,
103  e_structure,
104  e_sequences,
105  e_seqalign,
106  e_style_dictionary,
107  e_user_annotations
108  };
110 
111  // getters
112  // setters
113 
114  /// Check if a value has been assigned to Structure data member.
115  ///
116  /// Data member Structure is mandatory;
117  /// its type is defined as 'typedef CBiostruc TStructure'
118  /// @return
119  /// - true, if a value has been assigned.
120  /// - false, otherwise.
121  bool IsSetStructure(void) const;
122 
123  /// Check if it is safe to call GetStructure method.
124  ///
125  /// @return
126  /// - true, if the data member is getatable.
127  /// - false, otherwise.
128  bool CanGetStructure(void) const;
129 
130  /// Reset Structure data member.
131  void ResetStructure(void);
132 
133  /// Get the Structure member data.
134  ///
135  /// @return
136  /// Reference to the member data.
137  const TStructure& GetStructure(void) const;
138 
139  /// Assign a value to Structure data member.
140  ///
141  /// @param value
142  /// Reference to value.
143  void SetStructure(TStructure& value);
144 
145  /// Assign a value to Structure data member.
146  ///
147  /// @return
148  /// Reference to the data value.
149  TStructure& SetStructure(void);
150 
151  /// sequences
152  /// Check if a value has been assigned to Sequences data member.
153  ///
154  /// Data member Sequences is mandatory;
155  /// its type is defined as 'typedef list< CRef< CSeq_entry > > TSequences'
156  /// @return
157  /// - true, if a value has been assigned.
158  /// - false, otherwise.
159  bool IsSetSequences(void) const;
160 
161  /// Check if it is safe to call GetSequences method.
162  ///
163  /// @return
164  /// - true, if the data member is getatable.
165  /// - false, otherwise.
166  bool CanGetSequences(void) const;
167 
168  /// Reset Sequences data member.
169  void ResetSequences(void);
170 
171  /// Get the Sequences member data.
172  ///
173  /// @return
174  /// Reference to the member data.
175  const TSequences& GetSequences(void) const;
176 
177  /// Assign a value to Sequences data member.
178  ///
179  /// @return
180  /// Reference to the data value.
181  TSequences& SetSequences(void);
182 
183  /// Check if a value has been assigned to Seqalign data member.
184  ///
185  /// Data member Seqalign is mandatory;
186  /// its type is defined as 'typedef list< CRef< CSeq_annot > > TSeqalign'
187  /// @return
188  /// - true, if a value has been assigned.
189  /// - false, otherwise.
190  bool IsSetSeqalign(void) const;
191 
192  /// Check if it is safe to call GetSeqalign method.
193  ///
194  /// @return
195  /// - true, if the data member is getatable.
196  /// - false, otherwise.
197  bool CanGetSeqalign(void) const;
198 
199  /// Reset Seqalign data member.
200  void ResetSeqalign(void);
201 
202  /// Get the Seqalign member data.
203  ///
204  /// @return
205  /// Reference to the member data.
206  const TSeqalign& GetSeqalign(void) const;
207 
208  /// Assign a value to Seqalign data member.
209  ///
210  /// @return
211  /// Reference to the data value.
212  TSeqalign& SetSeqalign(void);
213 
214  /// Check if a value has been assigned to Style_dictionary data member.
215  ///
216  /// Data member Style_dictionary is optional;
217  /// its type is defined as 'typedef CCn3d_style_dictionary TStyle_dictionary'
218  /// @return
219  /// - true, if a value has been assigned.
220  /// - false, otherwise.
221  bool IsSetStyle_dictionary(void) const;
222 
223  /// Check if it is safe to call GetStyle_dictionary method.
224  ///
225  /// @return
226  /// - true, if the data member is getatable.
227  /// - false, otherwise.
228  bool CanGetStyle_dictionary(void) const;
229 
230  /// Reset Style_dictionary data member.
231  void ResetStyle_dictionary(void);
232 
233  /// Get the Style_dictionary member data.
234  ///
235  /// @return
236  /// Reference to the member data.
237  const TStyle_dictionary& GetStyle_dictionary(void) const;
238 
239  /// Assign a value to Style_dictionary data member.
240  ///
241  /// @param value
242  /// Reference to value.
243  void SetStyle_dictionary(TStyle_dictionary& value);
244 
245  /// Assign a value to Style_dictionary data member.
246  ///
247  /// @return
248  /// Reference to the data value.
249  TStyle_dictionary& SetStyle_dictionary(void);
250 
251  /// Check if a value has been assigned to User_annotations data member.
252  ///
253  /// Data member User_annotations is optional;
254  /// its type is defined as 'typedef CCn3d_user_annotations TUser_annotations'
255  /// @return
256  /// - true, if a value has been assigned.
257  /// - false, otherwise.
258  bool IsSetUser_annotations(void) const;
259 
260  /// Check if it is safe to call GetUser_annotations method.
261  ///
262  /// @return
263  /// - true, if the data member is getatable.
264  /// - false, otherwise.
265  bool CanGetUser_annotations(void) const;
266 
267  /// Reset User_annotations data member.
268  void ResetUser_annotations(void);
269 
270  /// Get the User_annotations member data.
271  ///
272  /// @return
273  /// Reference to the member data.
274  const TUser_annotations& GetUser_annotations(void) const;
275 
276  /// Assign a value to User_annotations data member.
277  ///
278  /// @param value
279  /// Reference to value.
280  void SetUser_annotations(TUser_annotations& value);
281 
282  /// Assign a value to User_annotations data member.
283  ///
284  /// @return
285  /// Reference to the data value.
286  TUser_annotations& SetUser_annotations(void);
287 
288  /// Reset the whole object
289  virtual void Reset(void);
290 
291 
292 private:
293  // Prohibit copy constructor and assignment operator
296 
297  // data
298  Uint4 m_set_State[1];
300  list< CRef< CSeq_entry > > m_Sequences;
301  list< CRef< CSeq_annot > > m_Seqalign;
304 };
305 
306 /* @} */
307 
308 
309 
310 
311 
312 ///////////////////////////////////////////////////////////
313 ///////////////////// inline methods //////////////////////
314 ///////////////////////////////////////////////////////////
315 inline
317 {
318  return m_Structure.NotEmpty();
319 }
320 
321 inline
323 {
324  return true;
325 }
326 
327 inline
329 {
330  if ( !m_Structure ) {
331  const_cast<CBiostruc_seqs_Base*>(this)->ResetStructure();
332  }
333  return (*m_Structure);
334 }
335 
336 inline
338 {
339  if ( !m_Structure ) {
340  ResetStructure();
341  }
342  return (*m_Structure);
343 }
344 
345 inline
347 {
348  return ((m_set_State[0] & 0xc) != 0);
349 }
350 
351 inline
353 {
354  return true;
355 }
356 
357 inline
359 {
360  return m_Sequences;
361 }
362 
363 inline
365 {
366  m_set_State[0] |= 0x4;
367  return m_Sequences;
368 }
369 
370 inline
372 {
373  return ((m_set_State[0] & 0x30) != 0);
374 }
375 
376 inline
378 {
379  return true;
380 }
381 
382 inline
384 {
385  return m_Seqalign;
386 }
387 
388 inline
390 {
391  m_set_State[0] |= 0x10;
392  return m_Seqalign;
393 }
394 
395 inline
397 {
398  return m_Style_dictionary.NotEmpty();
399 }
400 
401 inline
403 {
404  return IsSetStyle_dictionary();
405 }
406 
407 inline
409 {
410  if (!CanGetStyle_dictionary()) {
411  ThrowUnassigned(3);
412  }
413  return (*m_Style_dictionary);
414 }
415 
416 inline
418 {
419  return m_User_annotations.NotEmpty();
420 }
421 
422 inline
424 {
425  return IsSetUser_annotations();
426 }
427 
428 inline
430 {
431  if (!CanGetUser_annotations()) {
432  ThrowUnassigned(4);
433  }
434  return (*m_User_annotations);
435 }
436 
437 ///////////////////////////////////////////////////////////
438 ////////////////// end of inline methods //////////////////
439 ///////////////////////////////////////////////////////////
440 
441 
442 
443 
444 
445 END_objects_SCOPE // namespace ncbi::objects::
446 
448 
449 
450 #endif // OBJECTS_NCBIMIME_BIOSTRUC_SEQS_BASE_HPP
display blast alignment along with neighbor's structure added by yanli
CCn3d_style_dictionary –.
CCn3d_user_annotations –.
CRef –.
Definition: ncbiobj.hpp:618
Definition: Seq_entry.hpp:56
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_NCBIMIME_EXPORT
Definition: ncbi_export.h:648
TStructure & SetStructure(void)
Assign a value to Structure data member.
list< CRef< CSeq_annot > > m_Seqalign
list< CRef< CSeq_entry > > m_Sequences
TSequences & SetSequences(void)
Assign a value to Sequences data member.
const TSequences & GetSequences(void) const
Get the Sequences member data.
CCn3d_user_annotations TUser_annotations
bool IsSetUser_annotations(void) const
Check if a value has been assigned to User_annotations data member.
void ResetStructure(void)
Reset Structure data member.
CBiostruc_seqs_Base & operator=(const CBiostruc_seqs_Base &)
bool IsSetSeqalign(void) const
Check if a value has been assigned to Seqalign data member.
CSerialObject Tparent
CRef< TStyle_dictionary > m_Style_dictionary
CRef< TUser_annotations > m_User_annotations
bool CanGetSeqalign(void) const
Check if it is safe to call GetSeqalign method.
TSeqalign & SetSeqalign(void)
Assign a value to Seqalign data member.
CRef< TStructure > m_Structure
bool IsSetStructure(void) const
Check if a value has been assigned to Structure data member.
const TStyle_dictionary & GetStyle_dictionary(void) const
Get the Style_dictionary member data.
list< CRef< CSeq_entry > > TSequences
bool CanGetUser_annotations(void) const
Check if it is safe to call GetUser_annotations method.
bool CanGetStructure(void) const
Check if it is safe to call GetStructure method.
CCn3d_style_dictionary TStyle_dictionary
const TSeqalign & GetSeqalign(void) const
Get the Seqalign member data.
bool CanGetStyle_dictionary(void) const
Check if it is safe to call GetStyle_dictionary method.
const TUser_annotations & GetUser_annotations(void) const
Get the User_annotations member data.
bool IsSetSequences(void) const
sequences Check if a value has been assigned to Sequences data member.
const TStructure & GetStructure(void) const
Get the Structure member data.
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
bool IsSetStyle_dictionary(void) const
Check if a value has been assigned to Style_dictionary data member.
list< CRef< CSeq_annot > > TSeqalign
CBiostruc_seqs_Base(const CBiostruc_seqs_Base &)
bool CanGetSequences(void) const
Check if it is safe to call GetSequences method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri May 24 14:53:32 2024 by modify_doxy.py rev. 669887