summaryrefslogtreecommitdiff
path: root/indra/newview/llwearablelist.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llwearablelist.h
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llwearablelist.h')
-rw-r--r--indra/newview/llwearablelist.h30
1 files changed, 15 insertions, 15 deletions
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<LLWearableList>
{
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<LLUUID, LLWearable*> mList;
};
-extern LLWearableList gWearableList;
-
#endif // LL_LLWEARABLELIST_H