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

Go to the SVN repository for this file.

1 /* $Id: Textseq_id.hpp 54995 2012-07-02 14:29:27Z ucko $
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_TEXTSEQ_ID_HPP
38 #define OBJECTS_SEQLOC_TEXTSEQ_ID_HPP
39 
40 
41 // generated includes
43 
44 // generated classes
45 
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
51 {
53 
54 public:
55  // 'ctors
56  CTextseq_id(void);
57  virtual ~CTextseq_id(void);
58 
59  /// Set all fields with a single call. Fields not specified will
60  /// be reset.
61  /// @param acc
62  /// New value of accession field (may end with a dot and a
63  /// version unless allow_dot_version is false).
64  /// @param name
65  /// New value of name (locus) field.
66  /// @param version
67  /// New value of version field. If acc also specifies a
68  /// non-zero version, the two values must agree.
69  /// @param release
70  /// New value of release field.
71  /// @param allow_dot_version
72  /// Whether to parse an optional dot-delimited version off the
73  /// end of acc.
74  CTextseq_id& Set(const CTempString& acc_in,
75  const CTempString& name_in = kEmptyStr,
76  int version = 0,
77  const CTempString& release_in = kEmptyStr,
78  bool allow_dot_version = true);
79 
80  /// Comparison functions.
81  bool Match(const CTextseq_id& tsip2) const;
82  int Compare(const CTextseq_id& tsip2) const;
83  bool operator<(const CTextseq_id& tsip2) const;
84 
85  /// Format the contents FASTA string style
86  ostream& AsFastaString(ostream& s, bool allow_version = true) const;
87 
88 private:
89  // Prohibit copy constructor & assignment operator.
92 };
93 
94 
95 
96 /////////////////// CTextseq_id inline methods
97 
98 // constructor
99 inline
101 {
102 }
103 
104 
105 inline
106 bool CTextseq_id::operator<(const CTextseq_id& tsip2) const
107 {
108  return Compare(tsip2) < 0;
109 }
110 
111 
112 /////////////////// end of CTextseq_id inline methods
113 
114 END_objects_SCOPE // namespace ncbi::objects::
115 
117 
118 #endif // OBJECTS_SEQLOC_TEXTSEQ_ID_HPP
119 /* Original file checksum: lines: 85, chars: 2258, CRC32: fc9c35de */
Data storage class.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
CTextseq_id_Base –.
Definition: Textseq_id_.hpp:73
CTextseq_id(void)
Definition: Textseq_id.hpp:100
int Compare(const CTextseq_id &tsip2) const
Definition: Textseq_id.cpp:178
CTextseq_id(const CTextseq_id &)
bool operator<(const CTextseq_id &tsip2) const
Definition: Textseq_id.hpp:106
CTextseq_id_Base Tparent
Definition: Textseq_id.hpp:52
bool operator<(const CEquivRange &A, const CEquivRange &B)
sequence::ECompare Compare(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope)
Returns the sequence::ECompare containment relationship between CSeq_locs.
#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 kEmptyStr
Definition: ncbistr.hpp:123
#define NCBI_SEQLOC_EXPORT
Definition: ncbi_export.h:776
CTextseq_id_Base & operator=(const CTextseq_id_Base &)
static int version
Definition: mdb_load.c:29
Modified on Tue Jun 25 13:30:42 2024 by modify_doxy.py rev. 669887