PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 4ms RepoModel.GetById 1ms 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
 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
27#ifndef LLLIVEAPPCONFIG_H
28#define LLLIVEAPPCONFIG_H
29
30#include "llapp.h"
31#include "lllivefile.h"
32
33
34/**
35 * @class LLLiveAppConfig
36 * @see LLLiveFile
37 *
38 * To use this, instantiate a LLLiveAppConfig object inside your main
39 * loop.  The traditional name for it is live_config.  Be sure to call
40 * <code>live_config.checkAndReload()</code> periodically.
41 */
42class LL_COMMON_API LLLiveAppConfig : public LLLiveFile
43{
44public:
45
46	/**
47	 * @brief Constructor
48	 *
49	 * @param filename. The name of the file for periodically checking
50	 * configuration.
51	 * @param refresh_period How often the internal timer should
52	 * bother checking the filesystem.
53	 * @param The application priority level of that configuration file.
54	 */
55	LLLiveAppConfig(
56		const std::string& filename,
57		F32 refresh_period,
58		LLApp::OptionPriority priority);
59
60	~LLLiveAppConfig(); ///< Destructor
61
62protected:
63	/*virtual*/ bool loadFile();
64
65private:
66	LLApp::OptionPriority mPriority;
67};
68
69#endif