diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llcommon/lllivefile.h | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/llcommon/lllivefile.h')
-rw-r--r-- | linden/indra/llcommon/lllivefile.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/linden/indra/llcommon/lllivefile.h b/linden/indra/llcommon/lllivefile.h index b305531..fbf2bdf 100644 --- a/linden/indra/llcommon/lllivefile.h +++ b/linden/indra/llcommon/lllivefile.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #ifndef LL_LLLIVEFILE_H | 28 | #ifndef LL_LLLIVEFILE_H |
29 | #define LL_LLLIVEFILE_H | 29 | #define LL_LLLIVEFILE_H |
30 | 30 | ||
31 | #include "llframetimer.h" | ||
32 | 31 | ||
33 | class LLLiveFile | 32 | class LLLiveFile |
34 | { | 33 | { |
@@ -36,18 +35,22 @@ public: | |||
36 | LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f); | 35 | LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f); |
37 | virtual ~LLLiveFile(); | 36 | virtual ~LLLiveFile(); |
38 | 37 | ||
39 | bool checkAndReload(); // Returns true if the file changed in any way | 38 | bool checkAndReload(); |
39 | // Returns true if the file changed in any way | ||
40 | // Call this before using anything that was read & cached from the file | ||
41 | |||
42 | std::string filename() const; | ||
43 | |||
44 | void addToEventTimer(); | ||
45 | // Normally, just calling checkAndReload() is enough. In some cases | ||
46 | // though, you may need to let the live file periodically check itself. | ||
40 | 47 | ||
41 | protected: | 48 | protected: |
42 | virtual void loadFile() = 0; // Implement this to load your file if it changed | 49 | virtual void loadFile() = 0; // Implement this to load your file if it changed |
43 | 50 | ||
44 | bool mForceCheck; | 51 | private: |
45 | F32 mRefreshPeriod; | 52 | class Impl; |
46 | LLFrameTimer mRefreshTimer; | 53 | Impl& impl; |
47 | |||
48 | std::string mFilename; | ||
49 | time_t mLastModTime; | ||
50 | bool mLastExists; | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | #endif //LL_LLLIVEFILE_H | 56 | #endif //LL_LLLIVEFILE_H |