diff options
Diffstat (limited to 'indra/llappearance/llwearabletype.h')
-rw-r--r-- | indra/llappearance/llwearabletype.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index 17ff3a22a8..b87866286d 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -33,8 +33,12 @@ #include "llsingleton.h" #include "llinvtranslationbrdg.h" -class LLWearableType +class LLWearableType : public LLParamSingleton<LLWearableType> { + LLSINGLETON(LLWearableType, LLTranslationBridge* trans); + ~LLWearableType(); + friend struct WearableEntry; + void initSingleton(); public: enum EType { @@ -61,9 +65,8 @@ public: WT_NONE = -1, }; - static void initClass(LLTranslationBridge::ptr_t &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); @@ -72,11 +75,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 |