diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llxml/llcontrol.h | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-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 'linden/indra/llxml/llcontrol.h')
-rw-r--r-- | linden/indra/llxml/llcontrol.h | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/linden/indra/llxml/llcontrol.h b/linden/indra/llxml/llcontrol.h index 2500ae0..6205964 100644 --- a/linden/indra/llxml/llcontrol.h +++ b/linden/indra/llxml/llcontrol.h | |||
@@ -89,8 +89,8 @@ class LLControlVariable : public LLRefCount | |||
89 | typedef boost::signal<void(const LLSD&)> signal_t; | 89 | typedef boost::signal<void(const LLSD&)> signal_t; |
90 | 90 | ||
91 | private: | 91 | private: |
92 | LLString mName; | 92 | std::string mName; |
93 | LLString mComment; | 93 | std::string mComment; |
94 | eControlType mType; | 94 | eControlType mType; |
95 | bool mPersist; | 95 | bool mPersist; |
96 | std::vector<LLSD> mValues; | 96 | std::vector<LLSD> mValues; |
@@ -98,14 +98,14 @@ private: | |||
98 | signal_t mSignal; | 98 | signal_t mSignal; |
99 | 99 | ||
100 | public: | 100 | public: |
101 | LLControlVariable(const LLString& name, eControlType type, | 101 | LLControlVariable(const std::string& name, eControlType type, |
102 | LLSD initial, const LLString& comment, | 102 | LLSD initial, const std::string& comment, |
103 | bool persist = true); | 103 | bool persist = true); |
104 | 104 | ||
105 | virtual ~LLControlVariable(); | 105 | virtual ~LLControlVariable(); |
106 | 106 | ||
107 | const LLString& getName() const { return mName; } | 107 | const std::string& getName() const { return mName; } |
108 | const LLString& getComment() const { return mComment; } | 108 | const std::string& getComment() const { return mComment; } |
109 | 109 | ||
110 | eControlType type() { return mType; } | 110 | eControlType type() { return mType; } |
111 | bool isType(eControlType tp) { return tp == mType; } | 111 | bool isType(eControlType tp) { return tp == mType; } |
@@ -142,95 +142,95 @@ private: | |||
142 | class LLControlGroup | 142 | class LLControlGroup |
143 | { | 143 | { |
144 | protected: | 144 | protected: |
145 | typedef std::map<LLString, LLPointer<LLControlVariable> > ctrl_name_table_t; | 145 | typedef std::map<std::string, LLPointer<LLControlVariable> > ctrl_name_table_t; |
146 | ctrl_name_table_t mNameTable; | 146 | ctrl_name_table_t mNameTable; |
147 | std::set<LLString> mWarnings; | 147 | std::set<std::string> mWarnings; |
148 | LLString mTypeString[TYPE_COUNT]; | 148 | std::string mTypeString[TYPE_COUNT]; |
149 | 149 | ||
150 | eControlType typeStringToEnum(const LLString& typestr); | 150 | eControlType typeStringToEnum(const std::string& typestr); |
151 | LLString typeEnumToString(eControlType typeenum); | 151 | std::string typeEnumToString(eControlType typeenum); |
152 | public: | 152 | public: |
153 | LLControlGroup(); | 153 | LLControlGroup(); |
154 | ~LLControlGroup(); | 154 | ~LLControlGroup(); |
155 | void cleanup(); | 155 | void cleanup(); |
156 | 156 | ||
157 | LLPointer<LLControlVariable> getControl(const LLString& name); | 157 | LLPointer<LLControlVariable> getControl(const std::string& name); |
158 | 158 | ||
159 | struct ApplyFunctor | 159 | struct ApplyFunctor |
160 | { | 160 | { |
161 | virtual ~ApplyFunctor() {}; | 161 | virtual ~ApplyFunctor() {}; |
162 | virtual void apply(const LLString& name, LLControlVariable* control) = 0; | 162 | virtual void apply(const std::string& name, LLControlVariable* control) = 0; |
163 | }; | 163 | }; |
164 | void applyToAll(ApplyFunctor* func); | 164 | void applyToAll(ApplyFunctor* func); |
165 | 165 | ||
166 | BOOL declareControl(const LLString& name, eControlType type, const LLSD initial_val, const LLString& comment, BOOL persist); | 166 | BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist); |
167 | BOOL declareU32(const LLString& name, U32 initial_val, const LLString& comment, BOOL persist = TRUE); | 167 | BOOL declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE); |
168 | BOOL declareS32(const LLString& name, S32 initial_val, const LLString& comment, BOOL persist = TRUE); | 168 | BOOL declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE); |
169 | BOOL declareF32(const LLString& name, F32 initial_val, const LLString& comment, BOOL persist = TRUE); | 169 | BOOL declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE); |
170 | BOOL declareBOOL(const LLString& name, BOOL initial_val, const LLString& comment, BOOL persist = TRUE); | 170 | BOOL declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist = TRUE); |
171 | BOOL declareString(const LLString& name, const LLString &initial_val, const LLString& comment, BOOL persist = TRUE); | 171 | BOOL declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist = TRUE); |
172 | BOOL declareVec3(const LLString& name, const LLVector3 &initial_val,const LLString& comment, BOOL persist = TRUE); | 172 | BOOL declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment, BOOL persist = TRUE); |
173 | BOOL declareVec3d(const LLString& name, const LLVector3d &initial_val, const LLString& comment, BOOL persist = TRUE); | 173 | BOOL declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist = TRUE); |
174 | BOOL declareRect(const LLString& name, const LLRect &initial_val, const LLString& comment, BOOL persist = TRUE); | 174 | BOOL declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, BOOL persist = TRUE); |
175 | BOOL declareColor4U(const LLString& name, const LLColor4U &initial_val, const LLString& comment, BOOL persist = TRUE); | 175 | BOOL declareColor4U(const std::string& name, const LLColor4U &initial_val, const std::string& comment, BOOL persist = TRUE); |
176 | BOOL declareColor4(const LLString& name, const LLColor4 &initial_val, const LLString& comment, BOOL persist = TRUE); | 176 | BOOL declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist = TRUE); |
177 | BOOL declareColor3(const LLString& name, const LLColor3 &initial_val, const LLString& comment, BOOL persist = TRUE); | 177 | BOOL declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist = TRUE); |
178 | BOOL declareLLSD(const LLString& name, const LLSD &initial_val, const LLString& comment, BOOL persist = TRUE); | 178 | BOOL declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, BOOL persist = TRUE); |
179 | 179 | ||
180 | LLString findString(const LLString& name); | 180 | std::string findString(const std::string& name); |
181 | 181 | ||
182 | LLString getString(const LLString& name); | 182 | std::string getString(const std::string& name); |
183 | LLWString getWString(const LLString& name); | 183 | LLWString getWString(const std::string& name); |
184 | LLString getText(const LLString& name); | 184 | std::string getText(const std::string& name); |
185 | LLVector3 getVector3(const LLString& name); | 185 | LLVector3 getVector3(const std::string& name); |
186 | LLVector3d getVector3d(const LLString& name); | 186 | LLVector3d getVector3d(const std::string& name); |
187 | LLRect getRect(const LLString& name); | 187 | LLRect getRect(const std::string& name); |
188 | BOOL getBOOL(const LLString& name); | 188 | BOOL getBOOL(const std::string& name); |
189 | S32 getS32(const LLString& name); | 189 | S32 getS32(const std::string& name); |
190 | F32 getF32(const LLString& name); | 190 | F32 getF32(const std::string& name); |
191 | U32 getU32(const LLString& name); | 191 | U32 getU32(const std::string& name); |
192 | LLSD getLLSD(const LLString& name); | 192 | LLSD getLLSD(const std::string& name); |
193 | 193 | ||
194 | 194 | ||
195 | // Note: If an LLColor4U control exists, it will cast it to the correct | 195 | // Note: If an LLColor4U control exists, it will cast it to the correct |
196 | // LLColor4 for you. | 196 | // LLColor4 for you. |
197 | LLColor4 getColor(const LLString& name); | 197 | LLColor4 getColor(const std::string& name); |
198 | LLColor4U getColor4U(const LLString& name); | 198 | LLColor4U getColor4U(const std::string& name); |
199 | LLColor4 getColor4(const LLString& name); | 199 | LLColor4 getColor4(const std::string& name); |
200 | LLColor3 getColor3(const LLString& name); | 200 | LLColor3 getColor3(const std::string& name); |
201 | 201 | ||
202 | void setBOOL(const LLString& name, BOOL val); | 202 | void setBOOL(const std::string& name, BOOL val); |
203 | void setS32(const LLString& name, S32 val); | 203 | void setS32(const std::string& name, S32 val); |
204 | void setF32(const LLString& name, F32 val); | 204 | void setF32(const std::string& name, F32 val); |
205 | void setU32(const LLString& name, U32 val); | 205 | void setU32(const std::string& name, U32 val); |
206 | void setString(const LLString& name, const LLString& val); | 206 | void setString(const std::string& name, const std::string& val); |
207 | void setVector3(const LLString& name, const LLVector3 &val); | 207 | void setVector3(const std::string& name, const LLVector3 &val); |
208 | void setVector3d(const LLString& name, const LLVector3d &val); | 208 | void setVector3d(const std::string& name, const LLVector3d &val); |
209 | void setRect(const LLString& name, const LLRect &val); | 209 | void setRect(const std::string& name, const LLRect &val); |
210 | void setColor4U(const LLString& name, const LLColor4U &val); | 210 | void setColor4U(const std::string& name, const LLColor4U &val); |
211 | void setColor4(const LLString& name, const LLColor4 &val); | 211 | void setColor4(const std::string& name, const LLColor4 &val); |
212 | void setColor3(const LLString& name, const LLColor3 &val); | 212 | void setColor3(const std::string& name, const LLColor3 &val); |
213 | void setLLSD(const LLString& name, const LLSD& val); | 213 | void setLLSD(const std::string& name, const LLSD& val); |
214 | void setValue(const LLString& name, const LLSD& val); | 214 | void setValue(const std::string& name, const LLSD& val); |
215 | 215 | ||
216 | 216 | ||
217 | BOOL controlExists(const LLString& name); | 217 | BOOL controlExists(const std::string& name); |
218 | 218 | ||
219 | // Returns number of controls loaded, 0 if failed | 219 | // Returns number of controls loaded, 0 if failed |
220 | // If require_declaration is false, will auto-declare controls it finds | 220 | // If require_declaration is false, will auto-declare controls it finds |
221 | // as the given type. | 221 | // as the given type. |
222 | U32 loadFromFileLegacy(const LLString& filename, BOOL require_declaration = TRUE, eControlType declare_as = TYPE_STRING); | 222 | U32 loadFromFileLegacy(const std::string& filename, BOOL require_declaration = TRUE, eControlType declare_as = TYPE_STRING); |
223 | U32 saveToFile(const LLString& filename, BOOL nondefault_only); | 223 | U32 saveToFile(const std::string& filename, BOOL nondefault_only); |
224 | U32 loadFromFile(const LLString& filename, bool default_values = false); | 224 | U32 loadFromFile(const std::string& filename, bool default_values = false); |
225 | void resetToDefaults(); | 225 | void resetToDefaults(); |
226 | 226 | ||
227 | 227 | ||
228 | // Ignorable Warnings | 228 | // Ignorable Warnings |
229 | 229 | ||
230 | // Add a config variable to be reset on resetWarnings() | 230 | // Add a config variable to be reset on resetWarnings() |
231 | void addWarning(const LLString& name); | 231 | void addWarning(const std::string& name); |
232 | BOOL getWarning(const LLString& name); | 232 | BOOL getWarning(const std::string& name); |
233 | void setWarning(const LLString& name, BOOL val); | 233 | void setWarning(const std::string& name, BOOL val); |
234 | 234 | ||
235 | // Resets all ignorables | 235 | // Resets all ignorables |
236 | void resetWarnings(); | 236 | void resetWarnings(); |