#include <RefreshingFileReader.h>

Public Member Functions | |
| RefreshingFileReader () | |
| void | setFileName (const UtlString *fileName) |
| Set the file name, or clear it with NULL or "". | |
| virtual | ~RefreshingFileReader () |
| Destructor. | |
| virtual OsStatus | refresh () |
| Check to see if the file has changed, and if so, call initialize(). | |
Static Public Attributes | |
| static const unsigned long | sTimeCheckInvalid = 0 |
| This value has the type of mFileLastModTimeCheck, and can never be returned by OsDateTime::getSecsSinceEpoch(). | |
| static const OsTime | sModTimeInvalid |
| These values have the type of mFileModTime, and can never be returnd by OsFileInfo::getModifiedTime(). | |
| static const OsTime | sModTimeNoFileName |
| static const OsTime | sModTimeFileNotExist |
Protected Member Functions | |
| void | reinitialize_state () |
| Reset the state variables to force the file to be re-read. | |
| virtual OsStatus | initialize ()=0 |
| (Re-)read the file and (re)initialize the object. | |
Protected Attributes | |
| UtlString | mFileName |
| unsigned long | mFileLastModTimeCheck |
| OsTime | mFileModTime |
Private Member Functions | |
| RefreshingFileReader (const RefreshingFileReader &rRefreshingFileReader) | |
| RefreshingFileReader & | operator= (const RefreshingFileReader &rRefreshingFileReader) |
| ~RefreshingFileReader | ( | ) | [virtual] |
Destructor.
| RefreshingFileReader | ( | const RefreshingFileReader & | rRefreshingFileReader | ) | [private] |
| void setFileName | ( | const UtlString * | fileName | ) |
Set the file name, or clear it with NULL or "".
| OsStatus refresh | ( | ) | [virtual] |
Check to see if the file has changed, and if so, call initialize().
| void reinitialize_state | ( | ) | [protected] |
Reset the state variables to force the file to be re-read.
| virtual OsStatus initialize | ( | ) | [protected, pure virtual] |
| RefreshingFileReader& operator= | ( | const RefreshingFileReader & | rRefreshingFileReader | ) | [private] |
const unsigned long sTimeCheckInvalid = 0 [static] |
This value has the type of mFileLastModTimeCheck, and can never be returned by OsDateTime::getSecsSinceEpoch().
const OsTime sModTimeInvalid [static] |
These values have the type of mFileModTime, and can never be returnd by OsFileInfo::getModifiedTime().
They must all be distinct, because we must re-process the file any time there is a transition between the states they represent.
const OsTime sModTimeNoFileName [static] |
const OsTime sModTimeFileNotExist [static] |
unsigned long mFileLastModTimeCheck [protected] |
OsTime mFileModTime [protected] |