SHORE API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
shore::line_reader Class Reference

Read plain text files line by line (monolithic interface). More...

Inheritance diagram for shore::line_reader:
shore::monolithic< basic_line_reader > shore::buffer_chain< typename source_traits< basic_line_reader >::current_type >

Public Member Functions

 line_reader (const std::string &fn, compare_type cmp=compare_type())
 
 line_reader (std::istream *const in, compare_type cmp=compare_type())
 
line_readerset_commentchar (const char c)
 
line_readerset_skipempty (const bool s)
 
shore::signal< const
std::string & > & 
sigmetadata ()
 
const std::string & get_name () const
 
void seek (const std::streampos position)
 Seek to the next line start following a position in the file.
 
void set_blocks (const size_t blocksize, const std::set< size_t > &blocks)
 
void seek_to (const std::string &key)
 Perform line_sorter::upper_bound() on a file sorted according to cmp.
 
void seek_to_lower (const std::string &key)
 Perform line_sorter::lower_bound() on a file sorted according to cmp.
 
- Public Member Functions inherited from shore::monolithic< basic_line_reader >
 monolithic (bool(*)(const typename source_traits< basic_line_reader >::current_type &, const typename source_traits< basic_line_reader >::current_type &)cmp=bool(*)(const typename source_traits< basic_line_reader >::current_type &, const typename source_traits< basic_line_reader >::current_type &)())
 Initialize, optionally with a comparator.
 
 monolithic (Arg a1, bool(*)(const typename source_traits< basic_line_reader >::current_type &, const typename source_traits< basic_line_reader >::current_type &)cmp=bool(*)(const typename source_traits< basic_line_reader >::current_type &, const typename source_traits< basic_line_reader >::current_type &)())
 Initialize with a single argument to the wrapped type, and optionally with a comparator.
 
 monolithic (Arg1 a1, Arg2 a2, bool(*)(const typename source_traits< basic_line_reader >::current_type &, const typename source_traits< basic_line_reader >::current_type &)cmp=bool(*)(const typename source_traits< basic_line_reader >::current_type &, const typename source_traits< basic_line_reader >::current_type &)())
 Initialize with two arguments to the wrapped type, and optionally with a comparator.
 
source_typebasic ()
 Get the wrapped data source object ("basic" interface).
 
const source_typebasic () const
 Get the wrapped data source object ("basic" interface).
 
const current_type & current () const
 Get the current dataset element.
 
bool has_data ()
 Initialize / check for data availability.
 
void next ()
 Discard the current dataset element.
 
- Public Member Functions inherited from shore::buffer_chain< typename source_traits< basic_line_reader >::current_type >
 buffer_chain ()
 Constructor - initialize empty buffer chain.
 
 ~buffer_chain ()
 Destructor - free all buffers.
 
void add_plugin (plugin_type *const p)
 Add a plugin object.
 
void clear_plugins ()
 Remove all plugin objects.
 

Additional Inherited Members

- Public Types inherited from shore::monolithic< basic_line_reader >
typedef basic_line_reader source_type
 
typedef typename source_traits
< basic_line_reader >
::current_type 
current_type
 
typedef bool(*)(const typename
source_traits
< basic_line_reader >
::current_type &, const
typename source_traits
< basic_line_reader >
::current_type &) 
compare_type
 
- Protected Member Functions inherited from shore::monolithic< basic_line_reader >
bool(*)(const typename
source_traits
< basic_line_reader >
::current_type &, const
typename source_traits
< basic_line_reader >
::current_type &) 
get_comparator () const
 Get the comparator for the current ordering check.
 

Detailed Description

Read plain text files line by line (monolithic interface).


The documentation for this class was generated from the following file: