PageRenderTime 41ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llcommon/llliveappconfig.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 69 lines | 18 code | 9 blank | 42 comment | 0 complexity | fc4a434ec01b10d4b2e3666c02720498 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llliveappconfig.h
  3. * @brief Configuration information for an LLApp that overrides indra.xml
  4. *
  5. * $LicenseInfo:firstyear=2003&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LLLIVEAPPCONFIG_H
  27. #define LLLIVEAPPCONFIG_H
  28. #include "llapp.h"
  29. #include "lllivefile.h"
  30. /**
  31. * @class LLLiveAppConfig
  32. * @see LLLiveFile
  33. *
  34. * To use this, instantiate a LLLiveAppConfig object inside your main
  35. * loop. The traditional name for it is live_config. Be sure to call
  36. * <code>live_config.checkAndReload()</code> periodically.
  37. */
  38. class LL_COMMON_API LLLiveAppConfig : public LLLiveFile
  39. {
  40. public:
  41. /**
  42. * @brief Constructor
  43. *
  44. * @param filename. The name of the file for periodically checking
  45. * configuration.
  46. * @param refresh_period How often the internal timer should
  47. * bother checking the filesystem.
  48. * @param The application priority level of that configuration file.
  49. */
  50. LLLiveAppConfig(
  51. const std::string& filename,
  52. F32 refresh_period,
  53. LLApp::OptionPriority priority);
  54. ~LLLiveAppConfig(); ///< Destructor
  55. protected:
  56. /*virtual*/ bool loadFile();
  57. private:
  58. LLApp::OptionPriority mPriority;
  59. };
  60. #endif