aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfeaturemanager.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfeaturemanager.h
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfeaturemanager.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/linden/indra/newview/llfeaturemanager.h b/linden/indra/newview/llfeaturemanager.h
index 79ea958..1eeddfa 100644
--- a/linden/indra/newview/llfeaturemanager.h
+++ b/linden/indra/newview/llfeaturemanager.h
@@ -50,13 +50,13 @@ class LLFeatureInfo
50{ 50{
51public: 51public:
52 LLFeatureInfo() : mValid(FALSE), mAvailable(FALSE), mRecommendedLevel(-1) {} 52 LLFeatureInfo() : mValid(FALSE), mAvailable(FALSE), mRecommendedLevel(-1) {}
53 LLFeatureInfo(const char *name, const BOOL available, const F32 level); 53 LLFeatureInfo(const std::string& name, const BOOL available, const F32 level);
54 54
55 BOOL isValid() const { return mValid; }; 55 BOOL isValid() const { return mValid; };
56 56
57public: 57public:
58 BOOL mValid; 58 BOOL mValid;
59 LLString mName; 59 std::string mName;
60 BOOL mAvailable; 60 BOOL mAvailable;
61 F32 mRecommendedLevel; 61 F32 mRecommendedLevel;
62}; 62};
@@ -65,22 +65,22 @@ public:
65class LLFeatureList 65class LLFeatureList
66{ 66{
67public: 67public:
68 typedef std::map<LLString, LLFeatureInfo> feature_map_t; 68 typedef std::map<std::string, LLFeatureInfo> feature_map_t;
69 69
70 LLFeatureList(const char *name = "default"); 70 LLFeatureList(const std::string& name);
71 virtual ~LLFeatureList(); 71 virtual ~LLFeatureList();
72 72
73 BOOL isFeatureAvailable(const char *name); 73 BOOL isFeatureAvailable(const std::string& name);
74 F32 getRecommendedValue(const char *name); 74 F32 getRecommendedValue(const std::string& name);
75 75
76 void setFeatureAvailable(const char *name, const BOOL available); 76 void setFeatureAvailable(const std::string& name, const BOOL available);
77 void setRecommendedLevel(const char *name, const F32 level); 77 void setRecommendedLevel(const std::string& name, const F32 level);
78 78
79 BOOL loadFeatureList(LLFILE *fp); 79 BOOL loadFeatureList(LLFILE *fp);
80 80
81 BOOL maskList(LLFeatureList &mask); 81 BOOL maskList(LLFeatureList &mask);
82 82
83 void addFeature(const char *name, const BOOL available, const F32 level); 83 void addFeature(const std::string& name, const BOOL available, const F32 level);
84 84
85 feature_map_t& getFeatures() 85 feature_map_t& getFeatures()
86 { 86 {
@@ -89,7 +89,7 @@ public:
89 89
90 void dump(); 90 void dump();
91protected: 91protected:
92 LLString mName; 92 std::string mName;
93 feature_map_t mFeatures; 93 feature_map_t mFeatures;
94}; 94};
95 95
@@ -97,13 +97,16 @@ protected:
97class LLFeatureManager : public LLFeatureList, public LLSingleton<LLFeatureManager> 97class LLFeatureManager : public LLFeatureList, public LLSingleton<LLFeatureManager>
98{ 98{
99public: 99public:
100 LLFeatureManager() : mInited(FALSE), mTableVersion(0), mSafe(FALSE), mGPUClass(GPU_CLASS_UNKNOWN) {} 100 LLFeatureManager() :
101 LLFeatureList("default"), mInited(FALSE), mTableVersion(0), mSafe(FALSE), mGPUClass(GPU_CLASS_UNKNOWN)
102 {
103 }
101 ~LLFeatureManager() {cleanupFeatureTables();} 104 ~LLFeatureManager() {cleanupFeatureTables();}
102 105
103 // initialize this by loading feature table and gpu table 106 // initialize this by loading feature table and gpu table
104 void init(); 107 void init();
105 108
106 void maskCurrentList(const char *name); // Mask the current feature list with the named list 109 void maskCurrentList(const std::string& name); // Mask the current feature list with the named list
107 110
108 BOOL loadFeatureTables(); 111 BOOL loadFeatureTables();
109 112
@@ -117,8 +120,8 @@ public:
117 void setSafe(const BOOL safe) { mSafe = safe; } 120 void setSafe(const BOOL safe) { mSafe = safe; }
118 BOOL isSafe() const { return mSafe; } 121 BOOL isSafe() const { return mSafe; }
119 122
120 LLFeatureList *findMask(const char *name); 123 LLFeatureList *findMask(const std::string& name);
121 BOOL maskFeatures(const char *name); 124 BOOL maskFeatures(const std::string& name);
122 125
123 // set the graphics to low, medium, high, or ultra. 126 // set the graphics to low, medium, high, or ultra.
124 // skipFeatures forces skipping of mostly hardware settings 127 // skipFeatures forces skipping of mostly hardware settings
@@ -138,8 +141,8 @@ protected:
138 void initBaseMask(); 141 void initBaseMask();
139 142
140 143
141 std::map<LLString, LLFeatureList *> mMaskList; 144 std::map<std::string, LLFeatureList *> mMaskList;
142 std::set<LLString> mSkippedFeatures; 145 std::set<std::string> mSkippedFeatures;
143 BOOL mInited; 146 BOOL mInited;
144 S32 mTableVersion; 147 S32 mTableVersion;
145 BOOL mSafe; // Reinitialize everything to the "safe" mask 148 BOOL mSafe; // Reinitialize everything to the "safe" mask