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

Go to the SVN repository for this file.

1 /* $Id: Packed_seqpnt.hpp 33815 2007-05-04 17:18:18Z kazimird $
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  * 'seqloc.asn'.
35  */
36 
37 #ifndef OBJECTS_SEQLOC_PACKED_SEQPNT_HPP
38 #define OBJECTS_SEQLOC_PACKED_SEQPNT_HPP
39 
40 
41 // generated includes
43 
44 // generated classes
45 
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
51 {
53 public:
54  //
55  // See CPacked_seqpnt related function in util/sequence.hpp:
56  //
57  // bool IsValid(const CPacked_seqpnt&, CScope*);
58  //
59 
60  // constructor
61  CPacked_seqpnt(void);
62  CPacked_seqpnt(TId& id, const TPoints& points, TStrand strand = eNa_strand_unknown);
63 
64  // destructor
65  ~CPacked_seqpnt(void);
66 
67  // check start or stop end of location for e_Lim fuzz
68  bool IsPartialStart(ESeqLocExtremes ext) const;
69  bool IsPartialStop (ESeqLocExtremes ext) const;
70 
71  // set / remove e_Lim fuzz on start or stop end
72  void SetPartialStart(bool val, ESeqLocExtremes ext);
73  void SetPartialStop (bool val, ESeqLocExtremes ext);
74 
75  /// check if parts of the seq-loc are missing
76  bool IsTruncatedStart(ESeqLocExtremes ext) const;
77  bool IsTruncatedStop (ESeqLocExtremes ext) const;
78 
79  /// set / remove e_Lim fuzz on start or stop
80  /// (tl/tr - indicating removed parts of the seq-loc)
81  void SetTruncatedStart(bool val, ESeqLocExtremes ext);
82  void SetTruncatedStop (bool val, ESeqLocExtremes ext);
83 
84  // Add a point to the collection.
85  void AddPoint(TSeqPos point);
86  void AddPoints(const TPoints& points);
87 
88  TSeqPos GetStart(ESeqLocExtremes ext) const;
89  TSeqPos GetStop (ESeqLocExtremes ext) const;
90 
91  // Flip the strand (e.g. plus to minus)
92  void FlipStrand(void);
93 
94 private:
95  // Prohibit copy constructor and assignment operator
98 
99  bool x_IsMinusStrand(void) const;
100 };
101 
102 
103 
104 /////////////////// CPacked_seqpnt inline methods
105 
106 // constructor
107 inline
109 {
110 }
111 
112 
113 inline
115 {
116  SetId(id);
117  copy(points.begin(), points.end(), back_inserter(SetPoints()));
118  if ( strand != eNa_strand_unknown ) {
119  SetStrand(strand);
120  }
121 }
122 
123 
124 inline
126 {
127  SetPoints().push_back(point);
128 }
129 
130 
131 inline
133 {
134  copy(points.begin(), points.end(), back_inserter(SetPoints()));
135 }
136 
137 
138 /////////////////// end of CPacked_seqpnt inline methods
139 
140 
141 END_objects_SCOPE // namespace ncbi::objects::
142 
144 
145 
146 #endif // OBJECTS_SEQLOC_PACKED_SEQPNT_HPP
147 /* Original file checksum: lines: 90, chars: 2468, CRC32: e995f3e6 */
ESeqLocExtremes
Used to determine the meaning of a location's Start/Stop positions.
Definition: Na_strand.hpp:61
Data storage class.
CPacked_seqpnt_Base –.
CPacked_seqpnt & operator=(const CPacked_seqpnt &value)
CPacked_seqpnt(const CPacked_seqpnt &value)
void AddPoint(TSeqPos point)
void AddPoints(const TPoints &points)
CPacked_seqpnt_Base Tparent
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
TSeqPos GetStop(const CSeq_loc &loc, CScope *scope, ESeqLocExtremes ext=eExtreme_Positional)
If only one CBioseq is represented by CSeq_loc, returns the position at the stop of the location.
TSeqPos GetStart(const CSeq_loc &loc, CScope *scope, ESeqLocExtremes ext=eExtreme_Positional)
If only one CBioseq is represented by CSeq_loc, returns the position at the start of the location.
#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_SEQLOC_EXPORT
Definition: ncbi_export.h:776
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
TId & SetId(void)
Assign a value to Id data member.
TStrand & SetStrand(void)
Assign a value to Strand data member.
TPoints & SetPoints(void)
Assign a value to Points data member.
vector< TSeqPos > TPoints
@ eNa_strand_unknown
Definition: Na_strand_.hpp:65
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Definition: njn_matrix.hpp:613
Modified on Tue Apr 16 20:15:30 2024 by modify_doxy.py rev. 669887