CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csStringReader Class Reference

This is a convenience class that reads an input buffer line by line. More...

#include <stringreader.h>

List of all members.

Public Methods

 csStringReader ()
 Create an empty string reader.

 csStringReader (const char *input)
 Open a new string reader on the given input.

void SetInput (const char *input)
 Set input buffer.

void Reset ()
 Reset the reading offset at the start of the input.

bool GetLine (csString &line)
 Get the next line from the input and put it in the string argument.

bool HasMoreLines ()
 Returns true if there are more lines.


Detailed Description

This is a convenience class that reads an input buffer line by line.

It takes care of OS specific line endings (CR or CR/LF).

Definition at line 28 of file stringreader.h.


Constructor & Destructor Documentation

csStringReader::csStringReader (    ) 
 

Create an empty string reader.

csStringReader::csStringReader (  const char *    input ) 
 

Open a new string reader on the given input.

'input' must point to a null terminated character buffer.


Member Function Documentation

bool csStringReader::GetLine (  csString &    line ) 
 

Get the next line from the input and put it in the string argument.

Returns true on success or false if there are no more lines left (the string will be made empty in that case). Note that the returned string will not contain a newline at the end.

bool csStringReader::HasMoreLines (    ) 
 

Returns true if there are more lines.

void csStringReader::Reset (    ) 
 

Reset the reading offset at the start of the input.

void csStringReader::SetInput (  const char *    input ) 
 

Set input buffer.

'input' must point to a null terminated character buffer.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18