7 #ifndef PARSER_LINE_HPP_ 8 #define PARSER_LINE_HPP_ 12 #include "boost/assert.hpp" 13 #include "boost/foreach.hpp" 19 namespace vdj_pipe{
namespace detail{
27 typedef boost::error_info<struct errinfo_line_n_, int>
line_t;
37 if( !
fis_.
good() ) BOOST_THROW_EXCEPTION(
47 if( !
fis_.
good() ) BOOST_THROW_EXCEPTION(
54 fis_.
istream().ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
63 const boost::string_ref
get_id(
const char tag) {
67 return boost::string_ref(
str_.data(),
n);
95 BOOST_FOREACH(
const char c,
str_) {
96 if( std::isalpha(c) ) seq.push_back(c);
108 if( ! fis_.
good() ) BOOST_THROW_EXCEPTION(
bool has_next() const
Definition: parser_line.hpp:31
Definition: file_stream.hpp:82
void seek_line(const char tag)
Definition: parser_line.hpp:59
File_istream fis_
Definition: parser_line.hpp:103
std::string str_
Definition: parser_line.hpp:104
Compression
File compression types.
Definition: file_properties.hpp:19
Definition: parser_line.hpp:26
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
Parser_line(File_input const &fi)
Definition: parser_line.hpp:34
std::string const & path() const
Definition: file.hpp:74
boost::error_info< struct errinfo_str1_, std::string > str1_t
Definition: exception.hpp:25
void set_meta(Seq_meta &sm, const char tag)
Definition: parser_line.hpp:70
bool good() const
Definition: file_stream.hpp:103
const std::size_t n
Definition: vector_set_test.cpp:26
int line_num() const
Definition: parser_line.hpp:30
const boost::string_ref get_id(const char tag)
Definition: parser_line.hpp:63
Definition: exception.hpp:23
boost::error_info< struct errinfo_message_, std::string > msg_t
Definition: exception.hpp:24
void check() const
Definition: parser_line.hpp:107
std::string sanitize(const char c)
Definition: sanitize_string.cpp:53
std::string get_sequence(const char tag)
Definition: parser_line.hpp:91
Basic line-based parser; use to derive other parsers.
Definition: parser_line.hpp:23
std::istream & istream()
Definition: file_stream.hpp:102
boost::error_info< struct errinfo_line_n_, int > line_t
Definition: parser_line.hpp:27
Parser_line(std::istream &is, const compression::Compression compr)
Definition: parser_line.hpp:44
const boost::string_ref get_defstr(const char tag)
Definition: parser_line.hpp:79
int line_
Definition: parser_line.hpp:105
void skip_line()
Definition: parser_line.hpp:53