summaryrefslogtreecommitdiff
path: root/indra/llappearance/llwearabletype.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llappearance/llwearabletype.h')
-rw-r--r--indra/llappearance/llwearabletype.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index ac81376538..80bb9a10b4 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -42,8 +42,12 @@ public:
};
-class LLWearableType
+class LLWearableType : public LLParamSingleton<LLWearableType>
{
+ LLSINGLETON(LLWearableType, LLTranslationBridge* trans);
+ ~LLWearableType();
+ friend struct WearableEntry;
+ void initSingleton();
public:
enum EType
{
@@ -70,9 +74,8 @@ public:
WT_NONE = -1,
};
- static void initClass(LLTranslationBridge* trans); // initializes static members
- static void cleanupClass(); // initializes static members
-
+ // Most methods are wrappers for dictionary, but if LLWearableType is not initialized,
+ // they will crash. Whole LLWearableType is just wrapper for convinient calls.
static const std::string& getTypeName(EType type);
static const std::string& getTypeDefaultNewName(EType type);
static const std::string& getTypeLabel(EType type);
@@ -81,11 +84,12 @@ public:
static LLInventoryType::EIconName getIconName(EType type);
static BOOL getDisableCameraSwitch(EType type);
static BOOL getAllowMultiwear(EType type);
- static EType inventoryFlagsToWearableType(U32 flags);
+
+ static EType inventoryFlagsToWearableType(U32 flags);
protected:
- LLWearableType() {}
- ~LLWearableType() {}
+
+ LLTranslationBridge* mTrans;
};
#endif // LL_LLWEARABLETYPE_H