SHORE API
|
Read plain text files line by line (basic interface). More...
Public Types | |
typedef std::string | current_type |
Public Member Functions | |
basic_line_reader (const std::string &fn) | |
basic_line_reader (std::istream *const in) | |
void | set_commentchar (const char c) |
Line comment char, default: '#'; line comments disabled: '\0'. | |
void | set_skipempty (const bool s) |
Skip empty lines, default: true. | |
shore::signal< const std::string & > & | sigmetadata () |
Signal supplying skipped empty and comment lines. | |
bool | next (std::string &line) |
const std::string & | get_name () const |
void | seek (const std::streampos position) |
Seek to the next line start following a position in the file. | |
template<typename Cmp > | |
void | seek_to (Cmp cmp, const std::string &key) |
Perform line_sorter::upper_bound() on a file sorted according to cmp. | |
template<typename Cmp > | |
void | seek_to_lower (Cmp cmp, const std::string &key) |
Perform line_sorter::lower_bound() on a file sorted according to cmp. | |
void | set_blocks (const size_t blocksize, const std::set< size_t > &blocks) |
Only read the lines that start inside the fixed-size blocks specified. More... | |
Read plain text files line by line (basic interface).
void shore::basic_line_reader::set_blocks | ( | const size_t | blocksize, |
const std::set< size_t > & | blocks | ||
) |
Only read the lines that start inside the fixed-size blocks specified.
Provided for indexing support (twodex).