Input and output from text files. Note that for input, no single line may be more than CTEXTSTREAM_MAX_CHARACTERS
1.0.1 Added read with in place string array
1.0.2 Added stream of counted objects
1.0.3 Added eof checking
1.0.4 Made it a CCountedObject
Definition at line 47 of file CTextStream.hpp.
Exponent::IO::CTextStream::CTextStream | ( | const CSystemString & | path, | |
const EStreamMode | mode | |||
) |
Construction
path | The path to the file to read / write | |
mode | The streaming mode to use |
Exponent::IO::CTextStream::CTextStream | ( | ) |
Default construction
virtual Exponent::IO::CTextStream::~CTextStream | ( | ) | [virtual] |
Destruction
void Exponent::IO::CTextStream::closeStream | ( | ) |
Close the stream
void Exponent::IO::CTextStream::flushToDisk | ( | ) |
Flush to disk
bool Exponent::IO::CTextStream::hasReachedEOF | ( | ) |
Has reached eof
bool | True if reached EOF or not open, false otherwise |
bool Exponent::IO::CTextStream::isStreamOpen | ( | ) | const [inline] |
Is the stream open
bool | True if stream open, false otherwise |
Definition at line 110 of file CTextStream.hpp.
References m_streamIsOpen.
bool Exponent::IO::CTextStream::openStream | ( | const CSystemString & | path, | |
const EStreamMode | mode | |||
) |
Open the stream
path | The path to the file to read / write | |
mode | The streaming mode to use |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const bool | value | ) |
Output operators
value | The value to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const float | value | ) |
Output operators
value | The value to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const double | value | ) |
Output operators
value | The value to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const int | value | ) |
Output operators
value | The value to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const long | value | ) |
Output operators
value | The value to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const CCountedObject & | object | ) |
Output operators
object | The object to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const CSystemString & | string | ) |
Output operators
string | The string to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const CString & | string | ) |
Output operators
string | The string to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator<< | ( | const char * | string | ) |
Output operators
string | The string to write |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | bool & | value | ) |
Input operators
value | The value to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | float & | value | ) |
Input operators
value | The value to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | double & | value | ) |
Input operators
value | The value to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | int & | value | ) |
Input operators
value | The value to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | long & | value | ) |
Input operators
value | The value to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | CSystemString & | string | ) |
Input operators
string | The string to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | CString & | string | ) |
Input operators
string | The string to read in to |
CTextStream& | A reference to this |
CTextStream& Exponent::IO::CTextStream::operator>> | ( | char * | string | ) |
Input operators
string | The string to read in to |
CTextStream& | A reference to this |
bool Exponent::IO::CTextStream::validForInput | ( | ) |
Valid for output
bool | True if file is open for input, false otherwise |
bool Exponent::IO::CTextStream::validForOutput | ( | ) |
Valid for output
bool | True if file is open for output, false otherwise |
const long Exponent::IO::CTextStream::CTEXTSTREAM_MAX_CHARACTERS = 1024 [static] |
Max characters for an input stream
Definition at line 71 of file CTextStream.hpp.
char Exponent::IO::CTextStream::m_buffer[CTEXTSTREAM_MAX_CHARACTERS] [protected] |
Reading buffer
Definition at line 269 of file CTextStream.hpp.
CSystemString Exponent::IO::CTextStream::m_filePath [protected] |
the path to write to
Definition at line 266 of file CTextStream.hpp.
ifstream Exponent::IO::CTextStream::m_inputFile [protected] |
the input file reader
Definition at line 268 of file CTextStream.hpp.
EStreamMode Exponent::IO::CTextStream::m_mode [protected] |
Type of streaming
Definition at line 265 of file CTextStream.hpp.
ofstream Exponent::IO::CTextStream::m_outFile [protected] |
the output file writer
Definition at line 267 of file CTextStream.hpp.
bool Exponent::IO::CTextStream::m_streamIsOpen [protected] |