cartobase  4.5.0
carto::CounterExtractor Class Reference

Extractor counting lines. More...

#include <cartobase/stream/counter.h>

Public Member Functions

Constructors, destructor
 CounterExtractor (int line=1)
 
Extract
int operator() (std::streambuf &source)
 Get a character from the source. More...
 
Count
int line () const
 Get the current line number. More...
 
int reset (int line=1)
 Reset the line counter. More...
 

Detailed Description

Extractor counting lines.

Definition at line 58 of file counter.h.

Constructor & Destructor Documentation

carto::CounterExtractor::CounterExtractor ( int  line = 1)

Member Function Documentation

int carto::CounterExtractor::line ( ) const
inline

Get the current line number.

Returns
current line number

Definition at line 124 of file counter.h.

int carto::CounterExtractor::operator() ( std::streambuf &  source)

Get a character from the source.

Returns
next character from the source
int carto::CounterExtractor::reset ( int  line = 1)

Reset the line counter.

Parameters
linenew value of the line counter
Returns
old value

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