From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/newview/llwearablelist.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'indra/newview/llwearablelist.h') diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h index cda0cb11f9..f844c0f443 100644 --- a/indra/newview/llwearablelist.h +++ b/indra/newview/llwearablelist.h @@ -33,37 +33,37 @@ #ifndef LL_LLWEARABLELIST_H #define LL_LLWEARABLELIST_H +#include "llmemory.h" #include "llwearable.h" #include "lluuid.h" #include "llassetstorage.h" -class LLWearableList +// Globally constructed; be careful that there's no dependency with gAgent. +class LLWearableList : public LLSingleton { public: LLWearableList() {} ~LLWearableList(); - S32 getLength() { return mList.size(); } + S32 getLength() const { return mList.size(); } - void getAsset( - const LLAssetID& assetID, - const std::string& wearable_name, - LLAssetType::EType asset_type, - void(*asset_arrived_callback)(LLWearable*, void* userdata), - void* userdata ); + void getAsset(const LLAssetID& assetID, + const std::string& wearable_name, + LLAssetType::EType asset_type, + void(*asset_arrived_callback)(LLWearable*, void* userdata), + void* userdata); - LLWearable* createWearableMatchedToInventoryItem( LLWearable* old_wearable, LLViewerInventoryItem* item ); - LLWearable* createCopyFromAvatar( LLWearable* old_wearable, const std::string& new_name = std::string() ); - LLWearable* createCopy( LLWearable* old_wearable ); - LLWearable* createNewWearable( EWearableType type ); + LLWearable* createCopyFromAvatar(const LLWearable* old_wearable, const std::string& new_name = std::string()); + LLWearable* createCopy(const LLWearable* old_wearable); + LLWearable* createNewWearable(EWearableType type); // Callback static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status); protected: - std::map< LLUUID, LLWearable* > mList; + LLWearable* generateNewWearable(); // used for the create... functions +private: + std::map mList; }; -extern LLWearableList gWearableList; - #endif // LL_LLWEARABLELIST_H -- cgit v1.2.3