VoiceMan
Public Member Functions
TextQueue< TStr > Class Template Reference

Splits string object to the set of lines. More...

List of all members.

Public Member Functions

TStr chain () const
 Returns accessible part of incomplete line.
bool next (TStr &line)
 Reads next line from string object.
 TextQueue ()
 The default constructor.
 TextQueue (const TStr &initialValue)
 The constructor with initial string specification.

Detailed Description

template<class TStr>
class TextQueue< TStr >

This class gets set of lines (possibly incomplete) saved in one string object and splits it the separate strings until it is possible. This process can be easily continued later when complete data is received. This class is very useful to read strings from pipe.


Constructor & Destructor Documentation

template<class TStr >
TextQueue< TStr >::TextQueue ( const TStr &  initialValue) [inline]
Parameters:
[in]initialValueThe string to split onto lines

Member Function Documentation

template<class TStr >
TStr TextQueue< TStr >::chain ( ) const [inline]

Use this method to get accessible part of of incomplete line.

Returns:
Accessible part of incomplete line
template<class TStr >
bool TextQueue< TStr >::next ( TStr &  line) [inline]

This method checks if new line is accessible to read from string object. If it is accessible it returns next line.

Parameters:
[out]lineThe next line from string
Returns:
Non-zero if next line is accessible or zero otherwise