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

Go to the SVN repository for this file.

1 #ifndef _BED_AUTOSQL_HPP_
2 #define _BED_AUTOSQL_HPP_
3 
4 /*
5  * $Id: bed_autosql.hpp 99841 2023-05-16 16:14:25Z foleyjp $
6  *
7  * ===========================================================================
8  *
9  * PUBLIC DOMAIN NOTICE
10  * National Center for Biotechnology Information
11  *
12  * This software/database is a "United States Government Work" under the
13  * terms of the United States Copyright Act. It was written as part of
14  * the author's official duties as a United States Government employee and
15  * thus cannot be copyrighted. This software/database is freely available
16  * to the public for use. The National Library of Medicine and the U.S.
17  * Government have not placed any restriction on its use or reproduction.
18  *
19  * Although all reasonable efforts have been taken to ensure the accuracy
20  * and reliability of the software and data, the NLM and the U.S.
21  * Government do not and cannot warrant the performance or results that
22  * may be obtained by using this software or data. The NLM and the U.S.
23  * Government disclaim all warranties, express or implied, including
24  * warranties of performance, merchantability or fitness for any particular
25  * purpose.
26  *
27  * Please cite the author in any work or product based on this material.
28  *
29  * ===========================================================================
30  *
31  * Authors: Frank Ludwig
32  *
33  */
34 
35 #include <corelib/ncbistd.hpp>
39 #include "bed_autosql_standard.hpp"
40 #include "bed_autosql_custom.hpp"
41 #include "bed_column_data.hpp"
42 
45 
46 // ============================================================================
48 // ============================================================================
49 {
50 public:
51  using ValueParser = void (*)(const string&, CUser_object&);
52 
53 public:
54  CBedAutoSql(int);
55  ~CBedAutoSql();
56 
57  bool Load(
58  CNcbiIstream&,
60 
61  bool Validate(
62  CReaderMessageHandler&) const;
63 
64  size_t
65  ColumnCount() const;
66 
67  bool
69  const CBedColumnData&,
70  CSeq_feat& feat,
71  CReaderMessageHandler&) const;
72 
73 private:
74  void xProcessLine(const string& line,
75  bool& readingTable,
76  size_t& autoSqlColCounter);
77 
78 protected:
79  int mBedFlags;
83  size_t mColumnCount;
84 
85  string
86  xReadLine(
87  CNcbiIstream&);
88 
89  static void
91  const string&,
92  CUser_field&);
93 
94  static bool
96  const string&,
97  string&,
98  string&,
99  string&);
100 };
101 
104 
105 #endif // _BED_AUTOSQL_HPP_
CAutoSqlStandardFields mWellKnownFields
Definition: bed_autosql.hpp:81
size_t ColumnCount() const
CBedAutoSql(int)
Definition: bed_autosql.cpp:49
bool ReadSeqFeat(const CBedColumnData &, CSeq_feat &feat, CReaderMessageHandler &) const
static bool xParseAutoSqlColumnDef(const string &, string &, string &, string &)
Definition: bed_autosql.cpp:64
CAutoSqlCustomFields mCustomFields
Definition: bed_autosql.hpp:82
void(*)(const string &, CUser_object &) ValueParser
Definition: bed_autosql.hpp:51
string xReadLine(CNcbiIstream &)
map< string, string > mParameters
Definition: bed_autosql.hpp:80
bool Validate(CReaderMessageHandler &) const
size_t mColumnCount
Definition: bed_autosql.hpp:83
static void mParseString(const string &, CUser_field &)
void xProcessLine(const string &line, bool &readingTable, size_t &autoSqlColCounter)
Definition: bed_autosql.cpp:82
bool Load(CNcbiIstream &, CReaderMessageHandler &)
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Definition: ncbistre.hpp:146
Modified on Sun Apr 14 05:28:37 2024 by modify_doxy.py rev. 669887