summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-12 15:10:06 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-12 15:10:06 -0500
commit0b104e2a418dc794ce7230ab30f472d1787cd9c4 (patch)
treec7b12e83f7be49a323b8483f809e5090a9a5d95b /indra/newview/llappearancemgr.h
parent7a45dec2d540581ef080386e4a967befd22b6adb (diff)
LLAppearanceManager cleanup - turning into proper singleton
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llappearancemgr.h')
-rw-r--r--indra/newview/llappearancemgr.h74
1 files changed, 41 insertions, 33 deletions
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 7dea16b6cf..b0ecb2e23e 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -42,66 +42,74 @@ struct LLWearableHoldingPattern;
class LLAppearanceManager: public LLSingleton<LLAppearanceManager>
{
+ friend class LLSingleton<LLAppearanceManager>;
+
public:
- static void updateAppearanceFromCOF();
- static bool needToSaveCOF();
- static void changeOutfit(bool proceed, const LLUUID& category, bool append);
- static void updateCOF(const LLUUID& category, bool append = false);
- static void updateCOFFromCategory(const LLUUID& category, bool append);
- static void rebuildCOFFromOutfit(const LLUUID& category);
- static void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append);
- static void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append);
- static void wearOutfitByName(const std::string& name);
- static void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,
+ void updateAppearanceFromCOF();
+ bool needToSaveCOF();
+ void updateCOF(const LLUUID& category, bool append = false);
+ void updateCOFFromCategory(const LLUUID& category, bool append);
+ void rebuildCOFFromOutfit(const LLUUID& category);
+ void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append);
+ void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append);
+ void wearOutfitByName(const std::string& name);
+ void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb);
// Add COF link to individual item.
- static void wearItem(LLInventoryItem* item, bool do_update = true);
+ void wearItem(LLInventoryItem* item, bool do_update = true);
// Add COF link to ensemble folder.
- static void wearEnsemble(LLInventoryCategory* item, bool do_update = true);
- static LLUUID getCOF();
+ void wearEnsemble(LLInventoryCategory* item, bool do_update = true);
+ LLUUID getCOF();
// Remove COF entries
- static void removeItemLinks(const LLUUID& item_id, bool do_update = true);
+ void removeItemLinks(const LLUUID& item_id, bool do_update = true);
// For debugging - could be moved elsewhere.
- static void dumpCat(const LLUUID& cat_id, const std::string& msg);
- static void dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg);
- static void unregisterAttachment(const LLUUID& item_id);
- static void registerAttachment(const LLUUID& item_id);
- static void setAttachmentInvLinkEnable(bool val);
- static void linkRegisteredAttachments();
+ void dumpCat(const LLUUID& cat_id, const std::string& msg);
+ void dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg);
+ void unregisterAttachment(const LLUUID& item_id);
+ void registerAttachment(const LLUUID& item_id);
+ void setAttachmentInvLinkEnable(bool val);
+ void linkRegisteredAttachments();
+
+protected:
+ LLAppearanceManager();
+ ~LLAppearanceManager();
private:
- static void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type);
- static void linkAll(const LLUUID& category,
+
+ void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type);
+ void linkAll(const LLUUID& category,
LLInventoryModel::item_array_t& items,
LLPointer<LLInventoryCallback> cb);
- static void getDescendentsOfAssetType(const LLUUID& category,
+ void getDescendentsOfAssetType(const LLUUID& category,
LLInventoryModel::item_array_t& items,
LLAssetType::EType type,
bool follow_folder_links);
- static void getCOFValidDescendents(const LLUUID& category,
+ void getCOFValidDescendents(const LLUUID& category,
LLInventoryModel::item_array_t& items);
- static void getUserDescendents(const LLUUID& category,
+ void getUserDescendents(const LLUUID& category,
LLInventoryModel::item_array_t& wear_items,
LLInventoryModel::item_array_t& obj_items,
LLInventoryModel::item_array_t& gest_items,
bool follow_folder_links);
- static void onWearableAssetFetch(LLWearable* wearable, void* data);
- static void updateAgentWearables(LLWearableHoldingPattern* holder, bool append);
- static bool isMandatoryWearableType(EWearableType type);
- static void checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found);
- static void purgeCOFBeforeRebuild(const LLUUID& category);
- static void purgeCategory(const LLUUID& category, bool keep_outfit_links);
+ void updateAgentWearables(LLWearableHoldingPattern* holder, bool append);
+ bool isMandatoryWearableType(EWearableType type);
+ void checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found);
+ void purgeCOFBeforeRebuild(const LLUUID& category);
+ void purgeCategory(const LLUUID& category, bool keep_outfit_links);
- static std::set<LLUUID> sRegisteredAttachments;
- static bool sAttachmentInvLinkEnabled;
+ std::set<LLUUID> mRegisteredAttachments;
+ bool mAttachmentInvLinkEnabled;
+ // Static callbacks
+ static void onWearableAssetFetch(LLWearable* wearable, void* data);
+ static void changeOutfit(bool proceed, const LLUUID& category, bool append);
};
#define SUPPORT_ENSEMBLES 0