lllivefile.h

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

Generated on Thu Jul 1 06:08:49 2010 for Second Life Viewer by  doxygen 1.4.7