OKlibrary  0.2.1.6
OKlib::GeneralInputOutput::BasicCounter< Ch > Class Template Reference

Extension of the filter boost::iostreams::basic_counter with a member function for the number of characters read from the current line. More...

#include <IOStreamFilters.hpp>

List of all members.

Classes

struct  category

Public Types

typedef Ch char_type

Public Member Functions

 BasicCounter (int first_line=0, int first_char=0, int current_char=0)
int lines () const
int characters () const
int current_characters () const
std::streamsize optimal_buffer_size () const
template<typename Source >
std::streamsize read (Source &src, char_type *const s, const std::streamsize n)
template<typename Sink >
std::streamsize write (Sink &snk, const char_type *s, std::streamsize n)

Detailed Description

template<typename Ch>
class OKlib::GeneralInputOutput::BasicCounter< Ch >

Extension of the filter boost::iostreams::basic_counter with a member function for the number of characters read from the current line.

Filter for iostreams counting the number of lines read, the total number of characters read and the number of characters read from the current line.

Definition at line 39 of file IOStreamFilters.hpp.


Member Typedef Documentation

template<typename Ch >
typedef Ch OKlib::GeneralInputOutput::BasicCounter< Ch >::char_type

Definition at line 41 of file IOStreamFilters.hpp.


Constructor & Destructor Documentation

template<typename Ch >
OKlib::GeneralInputOutput::BasicCounter< Ch >::BasicCounter ( int  first_line = 0,
int  first_char = 0,
int  current_char = 0 
) [inline, explicit]

Definition at line 48 of file IOStreamFilters.hpp.


Member Function Documentation

template<typename Ch >
int OKlib::GeneralInputOutput::BasicCounter< Ch >::characters ( ) const [inline]

Definition at line 52 of file IOStreamFilters.hpp.

template<typename Ch >
int OKlib::GeneralInputOutput::BasicCounter< Ch >::current_characters ( ) const [inline]

Definition at line 53 of file IOStreamFilters.hpp.

template<typename Ch >
int OKlib::GeneralInputOutput::BasicCounter< Ch >::lines ( ) const [inline]

Definition at line 51 of file IOStreamFilters.hpp.

template<typename Ch >
std::streamsize OKlib::GeneralInputOutput::BasicCounter< Ch >::optimal_buffer_size ( ) const [inline]

Definition at line 54 of file IOStreamFilters.hpp.

template<typename Ch >
template<typename Source >
std::streamsize OKlib::GeneralInputOutput::BasicCounter< Ch >::read ( Source src,
char_type *const  s,
const std::streamsize  n 
) [inline]

Definition at line 57 of file IOStreamFilters.hpp.

References end.

template<typename Ch >
template<typename Sink >
std::streamsize OKlib::GeneralInputOutput::BasicCounter< Ch >::write ( Sink &  snk,
const char_type s,
std::streamsize  n 
) [inline]

Definition at line 79 of file IOStreamFilters.hpp.


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