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

Go to the SVN repository for this file.

1 /* $Id: gff3_import_data.hpp 86362 2019-05-02 15:04:11Z ludwigf $
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: Frank Ludwig, NCBI
27 *
28 * File Description:
29 * Test application for the CFormatGuess component
30 *
31 * ===========================================================================
32 */
33 
34 #ifndef GFF3_IMPORT_DATA__HPP
35 #define GFF3_IMPORT_DATA__HPP
36 
37 #include <corelib/ncbifile.hpp>
43 
44 #include "feat_import_data.hpp"
45 
46 #include <map>
47 
49 BEGIN_objects_SCOPE
50 
51 // ============================================================================
53  public CFeatImportData
54 // ============================================================================
55 {
56 public:
57  using ATTRIBUTES = std::map<std::string, std::vector<std::string> >;
58 
60  const CIdResolver&,
62 
64  const CGff3ImportData& rhs);
65 
66  virtual ~CGff3ImportData() {};
67 
68  void
69  Initialize(
70  const std::string&,
71  const std::string&,
72  const std::string&,
73  TSeqPos,
74  TSeqPos,
75  bool, double,
76  ENa_strand,
77  const std::string&,
78  const std::vector<std::pair<std::string, std::string>>&);
79 
80  virtual void Serialize(
81  CNcbiOstream&) override;
82 
84  GetData() const;
85 
87  Id() const { return mId; };
88 
90  Parent() const { return mParent; };
91 
93  Source() const { return mSource; };
94 
95  bool
96  HasScore() const { return static_cast<bool>(mpScore); };
97 
98  double
99  Score() const { return HasScore() ? *mpScore : 0; };
100 private:
102  const std::vector<std::pair<std::string, std::string>>&);
103 
104  bool xInitializeDbxref(
105  const std::string&,
106  const std::string&);
107 
108  bool xInitializeComment(
109  const std::string&,
110  const std::string&);
111 
112  bool xInitializeDataGene(
113  const std::string&,
114  const std::string&);
115 
116  bool xInitializeDataRna(
117  const std::string&,
118  const std::string&);
119 
120  bool xInitializeDataCds(
121  const std::string&,
122  const std::string&);
123 
125  const std::string&,
126  const std::string&);
127 
129  string mId;
130  string mParent;
131  string mSource;
132  unique_ptr<double> mpScore;
133 };
134 
135 END_objects_SCOPE
137 
138 #endif
User-defined methods of the data storage class.
CRef< CSeq_feat > mpFeat
bool xInitializeDataGene(const std::string &, const std::string &)
std::map< std::string, std::vector< std::string > > ATTRIBUTES
std::string Source() const
CRef< CSeq_feat > GetData() const
double Score() const
virtual void Serialize(CNcbiOstream &) override
void xInitializeAttributes(const std::vector< std::pair< std::string, std::string >> &)
void Initialize(const std::string &, const std::string &, const std::string &, TSeqPos, TSeqPos, bool, double, ENa_strand, const std::string &, const std::vector< std::pair< std::string, std::string >> &)
bool xInitializeDataRna(const std::string &, const std::string &)
CGff3ImportData(const CIdResolver &, CImportMessageHandler &)
virtual ~CGff3ImportData()
std::string Id() const
bool xInitializeDataCds(const std::string &, const std::string &)
bool HasScore() const
unique_ptr< double > mpScore
bool xInitializeComment(const std::string &, const std::string &)
std::string Parent() const
bool xInitializeMultiValue(const std::string &, const std::string &)
bool xInitializeDbxref(const std::string &, const std::string &)
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
string
Definition: cgiapp.hpp:687
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Modified on Tue Dec 05 02:17:06 2023 by modify_doxy.py rev. 669887