diff options
author | Mark Lentczner <markl@lindenlab.com> | 2007-02-06 00:57:33 +0000 |
---|---|---|
committer | Mark Lentczner <markl@lindenlab.com> | 2007-02-06 00:57:33 +0000 |
commit | d0d4670f4941dcf7430fb1269c6613140ecf3ff7 (patch) | |
tree | e3d6b59c19cac6bc172ec5fb0131ffc8f4923b75 /indra/llcommon/lllivefile.h | |
parent | 77f04c74eb1603bf2fadc30127d05378bfc7a48a (diff) |
merge in of error-refactor-3
concludes (fixes) SL-31187
pair programmed and reviewed by markl and karen
Diffstat (limited to 'indra/llcommon/lllivefile.h')
-rw-r--r-- | indra/llcommon/lllivefile.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/llcommon/lllivefile.h b/indra/llcommon/lllivefile.h index 97c88a5c5c..a71844e5a9 100644 --- a/indra/llcommon/lllivefile.h +++ b/indra/llcommon/lllivefile.h @@ -9,7 +9,6 @@ #ifndef LL_LLLIVEFILE_H #define LL_LLLIVEFILE_H -#include "llframetimer.h" class LLLiveFile { @@ -17,18 +16,22 @@ public: LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f); virtual ~LLLiveFile(); - bool checkAndReload(); // Returns true if the file changed in any way + bool checkAndReload(); + // Returns true if the file changed in any way + // Call this before using anything that was read & cached from the file + + std::string filename() const; + + void addToEventTimer(); + // Normally, just calling checkAndReload() is enough. In some cases + // though, you may need to let the live file periodically check itself. protected: virtual void loadFile() = 0; // Implement this to load your file if it changed - bool mForceCheck; - F32 mRefreshPeriod; - LLFrameTimer mRefreshTimer; - - std::string mFilename; - time_t mLastModTime; - bool mLastExists; +private: + class Impl; + Impl& impl; }; #endif //LL_LLLIVEFILE_H |