NCBI C++ ToolKit
Bioseq_set.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: Bioseq_set.hpp 75358 2016-11-09 14:19:55Z bollin $
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  * Author: .......
27  *
28  * File Description:
29  * .......
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using specifications from the ASN data definition file
34  * 'seqset.asn'.
35  *
36  */
37 
38 #ifndef OBJECTS_SEQSET_BIOSEQ_SET_HPP
39 #define OBJECTS_SEQSET_BIOSEQ_SET_HPP
40 
41 
42 // generated includes
44 
45 // generated classes
46 
48 
49 BEGIN_objects_SCOPE // namespace ncbi::objects::
50 
51 class CSeq_entry;
52 class CBioseq;
53 
55 {
57 public:
58  // constructor
59  CBioseq_set(void);
60  // destructor
61  ~CBioseq_set(void);
62 
63  // Manage Seq-entry tree structure
64  // get parent Seq-entry.
65  // NULL means that either there is no parent Seq-entry,
66  // or CSeq_entry::Parentize() was never called.
67  CSeq_entry* GetParentEntry(void) const;
68 
69  // Convenience function to directly get reference to parent Bioseq-set.
70  // 0 means that either there is no parent Seq-entry or Bioseq-set,
71  // or CSeq_entry::Parentize() was never called.
72  CConstRef<CBioseq_set> GetParentSet(void) const;
73 
74  enum ELabelType {
77  eBoth
78  };
79 
80  // Append a label to label based on type or content of CBioseq_set
81  void GetLabel(string* label, ELabelType type) const;
82 
83  // Class specific methods
84  // methods will throw if called on an object with the wrong TClass value.
85  const CBioseq& GetNucFromNucProtSet(void) const;
86  const CBioseq& GetGenomicFromGenProdSet(void) const;
87  const CBioseq& GetMasterFromSegSet(void) const;
88 
89  bool NeedsDocsumTitle() const;
90  static bool NeedsDocsumTitle(EClass set_class);
91 
92 private:
93  // Prohibit copy constructor & assignment operator
96 
97  // Seq-entry containing the Bioseq
98  void SetParentEntry(CSeq_entry* entry);
100 
101  friend class CSeq_entry;
102 };
103 
104 
105 
106 /////////////////// CBioseq_set inline methods
107 
108 // constructor
109 inline
111  : m_ParentEntry(0)
112 {
113 }
114 
115 inline
117 {
118  m_ParentEntry = entry;
119 }
120 
121 inline
123 {
124  return m_ParentEntry;
125 }
126 
127 /////////////////// end of CBioseq_set inline methods
128 
129 
130 END_objects_SCOPE // namespace ncbi::objects::
131 
133 
134 #endif // OBJECTS_SEQSET_BIOSEQ_SET_HPP
Data storage class.
@ eBoth
Both preliminary and traceback stages.
Definition: blast_def.h:332
*** Sequence Collections ******************************** * just a collection
Definition: Bioseq_set_.hpp:86
CBioseq_set(const CBioseq_set &)
void SetParentEntry(CSeq_entry *entry)
Definition: Bioseq_set.hpp:116
CSeq_entry * GetParentEntry(void) const
Definition: Bioseq_set.hpp:122
CSeq_entry * m_ParentEntry
Definition: Bioseq_set.hpp:99
CBioseq_set_Base Tparent
Definition: Bioseq_set.hpp:56
CBioseq_set(void)
Definition: Bioseq_set.hpp:110
Definition: Seq_entry.hpp:56
CSeq_entry * m_ParentEntry
Definition: Seq_entry.hpp:117
string GetLabel(const CSeq_id &id)
ELabelType
For compatibility with legacy code.
Definition: feature.hpp:85
#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_SEQSET_EXPORT
Definition: ncbi_export.h:793
static const char label[]
CBioseq_set_Base & operator=(const CBioseq_set_Base &)
Definition: type.c:6
CRef< objects::CSeq_entry > GetGenomicFromGenProdSet(CRef< objects::CSeq_entry > entry)
Modified on Wed Apr 17 13:09:21 2024 by modify_doxy.py rev. 669887