lllivefile.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLLIVEFILE_H
00033 #define LL_LLLIVEFILE_H
00034 
00035 const F32 configFileRefreshRate = 5.0; // seconds
00036 
00037 
00038 class LLLiveFile
00039 {
00040 public:
00041         LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f);
00042         virtual ~LLLiveFile();
00043 
00044         bool checkAndReload();
00045                 // Returns true if the file changed in any way
00046                 // Call this before using anything that was read & cached from the file
00047 
00048         std::string filename() const;
00049 
00050         void addToEventTimer();
00051                 // Normally, just calling checkAndReload() is enough.  In some cases
00052                 // though, you may need to let the live file periodically check itself.
00053 
00054 protected:
00055         virtual void loadFile() = 0; // Implement this to load your file if it changed
00056 
00057 private:
00058         class Impl;
00059         Impl& impl;
00060 };
00061 
00062 #endif //LL_LLLIVEFILE_H

Generated on Fri May 16 08:32:03 2008 for SecondLife by  doxygen 1.5.5