|
LRAUV
revA
|
Wraps around another LogReader to read LogEntries to a file. More...
#include <FileLogReader.h>


Public Member Functions | |
| FileLogReader (const Str &filebase, LogReader *logReader) | |
| Constructor. More... | |
| virtual | ~FileLogReader () |
| Destructor, closes file if open. More... | |
| virtual bool | valid (void) |
| Is the LogReader valid? More... | |
| virtual unsigned int | read () |
| Read. More... | |
| unsigned int | getEntriesRead (void) |
| Accessors. More... | |
| Str | nextFilename () |
| Uses nextFilenum_ to determine the next filename. More... | |
| bool | isReadable (void) |
| Keep track of whether the stream is open. More... | |
Public Member Functions inherited from LogReader | |
| virtual | ~LogReader () |
| Destructor. More... | |
| virtual void | setInStream (InStream &inStream) |
| Sets the InStream. More... | |
| virtual bool | isValid () |
| Return true if logStream_ is available. More... | |
Static Public Member Functions | |
| static void | SetPriorityList (FlexArray< const char * > *priorityList) |
Private Member Functions | |
| FileLogReader (const FileLogReader &old) | |
| Str | matchAndOpen (const Str &filename) |
Private Attributes | |
| Str | filebase_ |
| Name of the file being read. More... | |
| FILE * | file_ |
| The input file handle. More... | |
| FileInStream | fileStream_ |
| The input file stream. More... | |
| unsigned int | entriesRead_ |
| Total entries read. More... | |
| LogReader * | logReader_ |
| The LogReader that does the actual writing. More... | |
| unsigned int | nextFilenum_ |
| Number of the next split file. More... | |
Static Private Attributes | |
| static FlexArray< const char * > * | PriorityList_ |
Additional Inherited Members | |
Protected Member Functions inherited from LogReader | |
| LogReader () | |
| Protected constructor for pure virtual class. More... | |
| LogReader (InStream &inStream) | |
| Protected constructor for pure virtual class. More... | |
Protected Attributes inherited from LogReader | |
| InStream * | logStream_ |
| Stores an InStream. More... | |
Wraps around another LogReader to read LogEntries to a file.
Designed around assumption that it always has a log file open, though it does keep track of whether the stream is open or close, which it uses to determine if it's valid.
Constructor.
| filebase | Base of name of file to read to |
| logReader | logReader that provides input for file logging |
References Str::cStr(), file_, filebase_, fileStream_, logReader_, matchAndOpen(), nextFilename(), FileInStream::setFile(), and LogReader::setInStream().
|
virtual |
|
private |
|
inline |
Accessors.
References entriesRead_.
|
inline |
Keep track of whether the stream is open.
References fileStream_, and FileInStream::isReadable().
Referenced by valid().
References Str::cStr(), file_, Str::find(), Str::findLastOf(), FlexArray< T >::get(), Str::length(), Str::NO_POS, PriorityList_, FlexArrayBase::size(), and Str::substr().
Referenced by FileLogReader(), and read().
| Str FileLogReader::nextFilename | ( | ) |
Uses nextFilenum_ to determine the next filename.
References Str::cStr(), filebase_, and nextFilenum_.
Referenced by FileLogReader(), and read().
|
virtual |
Read.
Implements LogReader.
References Str::cStr(), entriesRead_, FileInStream::eof(), file_, fileStream_, logReader_, matchAndOpen(), nextFilename(), nextFilenum_, LogReader::read(), and FileInStream::setFile().
Referenced by Slate::ReadDirectory(), and Unserialize::Run().
|
inlinestatic |
References PriorityList_.
Referenced by Unserialize::Run().
|
inlinevirtual |
Is the LogReader valid?
References isReadable().
|
private |
Total entries read.
Referenced by getEntriesRead(), and read().
|
private |
The input file handle.
Referenced by FileLogReader(), matchAndOpen(), read(), and ~FileLogReader().
|
private |
Name of the file being read.
Referenced by FileLogReader(), and nextFilename().
|
private |
The input file stream.
Referenced by FileLogReader(), isReadable(), and read().
|
private |
The LogReader that does the actual writing.
Referenced by FileLogReader(), read(), and ~FileLogReader().
|
private |
Number of the next split file.
Referenced by nextFilename(), and read().
|
staticprivate |
Referenced by matchAndOpen(), and SetPriorityList().