summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llaccountingcostmanager.h4
-rw-r--r--indra/newview/llagentpicksinfo.h8
-rw-r--r--indra/newview/llagentwearables.h1
-rw-r--r--indra/newview/llappearancemgr.cpp1
-rw-r--r--indra/newview/llappearancemgr.h8
-rw-r--r--indra/newview/llappviewer.cpp85
-rw-r--r--indra/newview/llattachmentsmgr.h6
-rw-r--r--indra/newview/llautoreplace.h3
-rw-r--r--indra/newview/llavataractions.cpp2
-rw-r--r--indra/newview/llavatariconctrl.h11
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h7
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.h6
-rw-r--r--indra/newview/llavatarrendernotifier.h4
-rw-r--r--indra/newview/llchannelmanager.h6
-rw-r--r--indra/newview/llchicletbar.cpp2
-rw-r--r--indra/newview/llchicletbar.h5
-rw-r--r--indra/newview/llconversationlog.h3
-rw-r--r--indra/newview/lldaycyclemanager.h2
-rw-r--r--indra/newview/lldeferredsounds.h2
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.cpp3
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.h6
-rw-r--r--indra/newview/llenvmanager.h4
-rw-r--r--indra/newview/llestateinfomodel.h4
-rw-r--r--indra/newview/llexperiencelog.h3
-rw-r--r--indra/newview/llfacebookconnect.h5
-rw-r--r--indra/newview/llfavoritesbar.h12
-rw-r--r--indra/newview/llfeaturemanager.h26
-rw-r--r--indra/newview/llflickrconnect.h5
-rw-r--r--indra/newview/llfloaterbvhpreview.cpp2
-rw-r--r--indra/newview/llfloaterimcontainer.cpp2
-rw-r--r--indra/newview/llfloaternamedesc.cpp4
-rw-r--r--indra/newview/llfriendcard.h5
-rw-r--r--indra/newview/llgesturemgr.h4
-rw-r--r--indra/newview/llgroupmgr.h4
-rw-r--r--indra/newview/llhints.h1
-rw-r--r--indra/newview/llhudmanager.h4
-rw-r--r--indra/newview/llimagefiltersmanager.h5
-rw-r--r--indra/newview/llimview.h6
-rw-r--r--indra/newview/llinventoryicon.cpp3
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h4
-rw-r--r--indra/newview/lllocationhistory.h2
-rw-r--r--indra/newview/lllogchat.cpp19
-rw-r--r--indra/newview/lllogininstance.h6
-rw-r--r--indra/newview/llmainlooprepeater.h3
-rw-r--r--indra/newview/llmarketplacefunctions.h13
-rw-r--r--indra/newview/llmaterialmgr.h4
-rw-r--r--indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp3
-rw-r--r--indra/newview/llmenuoptionpathfindingrebakenavmesh.h4
-rw-r--r--indra/newview/llmutelist.cpp29
-rw-r--r--indra/newview/llmutelist.h9
-rwxr-xr-x[-rw-r--r--]indra/newview/llnavigationbar.h7
-rw-r--r--indra/newview/llnotificationmanager.h6
-rw-r--r--indra/newview/llnotificationstorage.cpp7
-rw-r--r--indra/newview/lloutfitgallery.cpp2
-rw-r--r--indra/newview/lloutfitobserver.h5
-rw-r--r--indra/newview/llpaneleditwearable.cpp3
-rw-r--r--indra/newview/llpanelmaininventory.cpp2
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp6
-rw-r--r--indra/newview/llpanelsnapshotoptions.cpp6
-rw-r--r--indra/newview/llpanelteleporthistory.cpp4
-rw-r--r--indra/newview/llpaneltopinfobar.h6
-rw-r--r--indra/newview/llpathfindingmanager.cpp3
-rw-r--r--indra/newview/llpathfindingmanager.h6
-rw-r--r--indra/newview/llpathfindingpathtool.cpp1
-rw-r--r--indra/newview/llpathfindingpathtool.h6
-rw-r--r--indra/newview/llpersistentnotificationstorage.cpp5
-rw-r--r--indra/newview/llpersistentnotificationstorage.h4
-rw-r--r--indra/newview/llpresetsmanager.h6
-rw-r--r--indra/newview/llproductinforequest.h3
-rw-r--r--indra/newview/llrecentpeople.h1
-rw-r--r--indra/newview/llregioninfomodel.h3
-rw-r--r--indra/newview/llremoteparcelrequest.h3
-rw-r--r--indra/newview/llrootview.h4
-rw-r--r--indra/newview/llscenemonitor.h4
-rw-r--r--indra/newview/llscriptfloater.h1
-rw-r--r--indra/newview/llsearchhistory.h3
-rw-r--r--indra/newview/llselectmgr.h6
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp2
-rw-r--r--indra/newview/llspeakers.h8
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp6
-rw-r--r--indra/newview/llstartup.cpp3
-rw-r--r--indra/newview/llstylemap.h1
-rw-r--r--indra/newview/llsyntaxid.h5
-rw-r--r--indra/newview/llsyswellwindow.h1
-rw-r--r--indra/newview/llteleporthistory.h5
-rw-r--r--indra/newview/llteleporthistorystorage.h5
-rw-r--r--indra/newview/lltextureatlasmanager.h5
-rw-r--r--indra/newview/lltoolbrush.h2
-rw-r--r--indra/newview/lltoolcomp.cpp2
-rw-r--r--indra/newview/lltoolcomp.h28
-rw-r--r--indra/newview/lltooldraganddrop.h5
-rw-r--r--indra/newview/lltoolface.h4
-rw-r--r--indra/newview/lltoolfocus.h4
-rw-r--r--indra/newview/lltoolgrab.cpp52
-rw-r--r--indra/newview/lltoolgrab.h21
-rw-r--r--indra/newview/lltoolindividual.h4
-rw-r--r--indra/newview/lltoolmgr.h4
-rw-r--r--indra/newview/lltoolobjpicker.h2
-rw-r--r--indra/newview/lltoolpie.h2
-rw-r--r--indra/newview/lltoolpipette.h4
-rw-r--r--indra/newview/lltoolselectland.h4
-rw-r--r--indra/newview/lltransientfloatermgr.h4
-rw-r--r--indra/newview/lltwitterconnect.h4
-rw-r--r--indra/newview/llviewerassettype.cpp3
-rw-r--r--indra/newview/llviewerassetupload.cpp2
-rw-r--r--indra/newview/llvieweraudio.h6
-rw-r--r--indra/newview/llviewercamera.h3
-rw-r--r--indra/newview/llviewerfoldertype.cpp3
-rw-r--r--indra/newview/llviewerhelp.h2
-rw-r--r--indra/newview/llviewerinventory.cpp196
-rw-r--r--indra/newview/llviewerinventory.h2
-rw-r--r--indra/newview/llviewerjoystick.h6
-rw-r--r--indra/newview/llviewerkeyboard.cpp1
-rw-r--r--indra/newview/llviewermediafocus.h6
-rw-r--r--indra/newview/llviewermenu.cpp5
-rw-r--r--indra/newview/llviewermenufile.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewermessage.h1
-rw-r--r--indra/newview/llviewernetwork.cpp7
-rw-r--r--indra/newview/llviewernetwork.h9
-rw-r--r--indra/newview/llviewerobject.cpp11
-rw-r--r--indra/newview/llviewerparcelmgr.h5
-rw-r--r--indra/newview/llviewerpartsim.h3
-rw-r--r--indra/newview/llviewerstats.h8
-rw-r--r--indra/newview/llviewerstatsrecorder.h6
-rw-r--r--indra/newview/llviewertexturelist.h1
-rw-r--r--indra/newview/llviewerwindow.cpp24
-rw-r--r--indra/newview/llvocache.h8
-rw-r--r--indra/newview/llvoicechannel.h2
-rw-r--r--indra/newview/llvoiceclient.h10
-rw-r--r--indra/newview/llvoicevivox.h13
-rw-r--r--indra/newview/llwatchdog.h4
-rw-r--r--indra/newview/llwaterparammanager.h6
-rw-r--r--indra/newview/llwearableitemslist.h2
-rw-r--r--indra/newview/llwearablelist.h4
-rw-r--r--indra/newview/llwindebug.h1
-rw-r--r--indra/newview/llwlparammanager.h6
-rw-r--r--indra/newview/llworld.h2
-rw-r--r--indra/newview/llworldmap.h4
-rw-r--r--indra/newview/llworldmapmessage.h6
-rw-r--r--indra/newview/pipeline.cpp3
-rw-r--r--indra/newview/tests/llremoteparcelrequest_test.cpp3
142 files changed, 527 insertions, 535 deletions
diff --git a/indra/newview/llaccountingcostmanager.h b/indra/newview/llaccountingcostmanager.h
index f251ceffd4..55e1d19f05 100644
--- a/indra/newview/llaccountingcostmanager.h
+++ b/indra/newview/llaccountingcostmanager.h
@@ -58,9 +58,9 @@ protected:
//===============================================================================
class LLAccountingCostManager : public LLSingleton<LLAccountingCostManager>
{
+ LLSINGLETON(LLAccountingCostManager);
+
public:
- //Ctor
- LLAccountingCostManager();
//Store an object that will be eventually fetched
void addObject( const LLUUID& objectID );
//Request quotas for object list
diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h
index abf7027ed2..f981e08ff7 100644
--- a/indra/newview/llagentpicksinfo.h
+++ b/indra/newview/llagentpicksinfo.h
@@ -36,14 +36,12 @@ struct LLAvatarPicks;
*/
class LLAgentPicksInfo : public LLSingleton<LLAgentPicksInfo>
{
+ LLSINGLETON(LLAgentPicksInfo);
+ virtual ~LLAgentPicksInfo();
+
class LLAgentPicksObserver;
public:
-
- LLAgentPicksInfo();
-
- virtual ~LLAgentPicksInfo();
-
/**
* Requests number of picks from server.
*
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index b27698fd8f..2710262910 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -38,6 +38,7 @@
#include "llviewerinventory.h"
#include "llavatarappearancedefines.h"
#include "llwearabledata.h"
+#include "llinitdestroyclass.h"
class LLInventoryItem;
class LLVOAvatarSelf;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 92e3cd0279..2d84251da0 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3942,7 +3942,6 @@ LLAppearanceMgr::LLAppearanceMgr():
mAttachmentInvLinkEnabled(false),
mOutfitIsDirty(false),
mOutfitLocked(false),
- mInFlightCounter(0),
mInFlightTimer(),
mIsInUpdateAppearanceFromCOF(false),
mOutstandingAppearanceBakeRequest(false),
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index f0d3f80f59..5948dd870c 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -42,9 +42,10 @@ class LLOutfitUnLockTimer;
class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr>
{
+ LLSINGLETON(LLAppearanceMgr);
+ ~LLAppearanceMgr();
LOG_CLASS(LLAppearanceMgr);
- friend class LLSingleton<LLAppearanceMgr>;
friend class LLOutfitUnLockTimer;
public:
@@ -241,10 +242,6 @@ private:
static void debugAppearanceUpdateCOF(const LLSD& content);
std::string mAppearanceServiceURL;
-
-protected:
- LLAppearanceMgr();
- ~LLAppearanceMgr();
private:
@@ -272,7 +269,6 @@ private:
* to avoid unsynchronized outfit state or performing duplicate operations.
*/
bool mOutfitLocked;
- S32 mInFlightCounter;
LLTimer mInFlightTimer;
static bool mActive;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9db03a7438..dac1da6ad1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -233,6 +233,7 @@
#include "llsecapi.h"
#include "llmachineid.h"
#include "llmainlooprepeater.h"
+#include "llcleanup.h"
#include "llcoproceduremanager.h"
#include "llviewereventrecorder.h"
@@ -387,6 +388,7 @@ const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
*/
class LLDeferredTaskList: public LLSingleton<LLDeferredTaskList>
{
+ LLSINGLETON_EMPTY_CTOR(LLDeferredTaskList);
LOG_CLASS(LLDeferredTaskList);
friend class LLAppViewer;
@@ -737,7 +739,7 @@ LLAppViewer::LLAppViewer()
LLAppViewer::~LLAppViewer()
{
delete mSettingsLocationList;
- LLViewerEventRecorder::instance().~LLViewerEventRecorder();
+ LLViewerEventRecorder::deleteSingleton();
LLLoginInstance::instance().setUpdaterService(0);
@@ -1743,7 +1745,7 @@ bool LLAppViewer::cleanup()
gTransferManager.cleanup();
#endif
- LLLocalBitmapMgr::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLLocalBitmapMgr);
// Note: this is where gWorldMap used to be deleted.
@@ -1852,11 +1854,11 @@ bool LLAppViewer::cleanup()
LLViewerObject::cleanupVOClasses();
- LLAvatarAppearance::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLAvatarAppearance);
- LLAvatarAppearance::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLAvatarAppearance);
- LLPostProcess::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLPostProcess);
LLTracker::cleanupInstance();
@@ -1882,12 +1884,12 @@ bool LLAppViewer::cleanup()
//end_messaging_system();
- LLFollowCamMgr::cleanupClass();
- //LLVolumeMgr::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLFollowCamMgr);
+ //SUBSYSTEM_CLEANUP(LLVolumeMgr);
LLPrimitive::cleanupVolumeManager();
- LLWorldMapView::cleanupClass();
- LLFolderViewItem::cleanupClass();
- LLUI::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLWorldMapView);
+ SUBSYSTEM_CLEANUP(LLFolderViewItem);
+ SUBSYSTEM_CLEANUP(LLUI);
//
// Shut down the VFS's AFTER the decode manager cleans up (since it cleans up vfiles).
@@ -1896,7 +1898,7 @@ bool LLAppViewer::cleanup()
//
LL_INFOS() << "Cleaning up VFS" << LL_ENDL;
- LLVFile::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLVFile);
LL_INFOS() << "Saving Data" << LL_ENDL;
@@ -1999,9 +2001,9 @@ bool LLAppViewer::cleanup()
// Non-LLCurl libcurl library
mAppCoreHttp.cleanup();
- LLFilePickerThread::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLFilePickerThread);
- //MUST happen AFTER LLCurl::cleanupClass
+ //MUST happen AFTER SUBSYSTEM_CLEANUP(LLCurl)
delete sTextureCache;
sTextureCache = NULL;
delete sTextureFetch;
@@ -2025,22 +2027,22 @@ bool LLAppViewer::cleanup()
gDirUtilp->getExpandedFilename(LL_PATH_LOGS, report_name));
}
- LLMetricPerformanceTesterBasic::cleanClass() ;
+ SUBSYSTEM_CLEANUP(LLMetricPerformanceTesterBasic) ;
LL_INFOS() << "Cleaning up Media and Textures" << LL_ENDL;
//Note:
- //LLViewerMedia::cleanupClass() has to be put before gTextureList.shutdown()
+ //SUBSYSTEM_CLEANUP(LLViewerMedia) has to be put before gTextureList.shutdown()
//because some new image might be generated during cleaning up media. --bao
- LLViewerMedia::cleanupClass();
- LLViewerParcelMedia::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLViewerMedia);
+ SUBSYSTEM_CLEANUP(LLViewerParcelMedia);
gTextureList.shutdown(); // shutdown again in case a callback added something
LLUIImageList::getInstance()->cleanUp();
// This should eventually be done in LLAppViewer
- LLImage::cleanupClass();
- LLVFSThread::cleanupClass();
- LLLFSThread::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLImage);
+ SUBSYSTEM_CLEANUP(LLVFSThread);
+ SUBSYSTEM_CLEANUP(LLLFSThread);
#ifndef LL_RELEASE_FOR_DOWNLOAD
LL_INFOS() << "Auditing VFS" << LL_ENDL;
@@ -2083,10 +2085,10 @@ bool LLAppViewer::cleanup()
LL_INFOS() << "File launched." << LL_ENDL;
}
LL_INFOS() << "Cleaning up LLProxy." << LL_ENDL;
- LLProxy::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLProxy);
LLCore::LLHttp::cleanup();
- LLWearableType::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLWearableType);
LLMainLoopRepeater::instance().stop();
@@ -2098,10 +2100,34 @@ bool LLAppViewer::cleanup()
LLError::LLCallStacks::cleanup();
removeMarkerFiles();
-
- LL_INFOS() << "Goodbye!" << LL_ENDL;
- removeDumpDir();
+ // It's not at first obvious where, in this long sequence, generic cleanup
+ // calls OUGHT to go. So let's say this: as we migrate cleanup from
+ // explicit hand-placed calls into the generic mechanism, eventually
+ // all cleanup will get subsumed into the generic calls. So the calls you
+ // still see above are calls that MUST happen before the generic cleanup
+ // kicks in.
+
+ // This calls every remaining LLSingleton's cleanupSingleton() method.
+ // This method should perform any cleanup that might take significant
+ // realtime, or might throw an exception.
+ LLSingletonBase::cleanupAll();
+
+ // This calls every remaining LLSingleton's deleteSingleton() method.
+ // No class destructor should perform any cleanup that might take
+ // significant realtime, or throw an exception.
+ // LLSingleton machinery includes a last-gasp implicit deleteAll() call,
+ // so this explicit call shouldn't strictly be necessary. However, by the
+ // time the runtime engages that implicit call, it may already have
+ // destroyed things like std::cerr -- so the implicit deleteAll() refrains
+ // from logging anything. Since both cleanupAll() and deleteAll() call
+ // their respective cleanup methods in computed dependency order, it's
+ // probably useful to be able to log that order.
+ LLSingletonBase::deleteAll();
+
+ LL_INFOS() << "Goodbye!" << LL_ENDL;
+
+ removeDumpDir();
// return 0;
return true;
@@ -5496,9 +5522,12 @@ void LLAppViewer::disconnectViewer()
}
saveNameCache();
- LLExperienceCache *expCache = LLExperienceCache::getIfExists();
- if (expCache)
- expCache->cleanup();
+ if (LLExperienceCache::instanceExists())
+ {
+ // TODO: LLExperienceCache::cleanup() logic should be moved to
+ // cleanupSingleton().
+ LLExperienceCache::instance().cleanup();
+ }
// close inventory interface, close all windows
LLFloaterInventory::cleanup();
diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h
index bb7d35edbc..a4ef762e8b 100644
--- a/indra/newview/llattachmentsmgr.h
+++ b/indra/newview/llattachmentsmgr.h
@@ -62,6 +62,9 @@ class LLViewerInventoryItem;
//--------------------------------------------------------------------------------
class LLAttachmentsMgr: public LLSingleton<LLAttachmentsMgr>
{
+ LLSINGLETON(LLAttachmentsMgr);
+ virtual ~LLAttachmentsMgr();
+
public:
// Stores info for attachments that will be requested during idle.
struct AttachmentsInfo
@@ -72,9 +75,6 @@ public:
};
typedef std::deque<AttachmentsInfo> attachments_vec_t;
- LLAttachmentsMgr();
- virtual ~LLAttachmentsMgr();
-
void addAttachmentRequest(const LLUUID& item_id,
const U8 attachment_pt,
const BOOL add);
diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h
index 9eecc2d981..23cc313646 100644
--- a/indra/newview/llautoreplace.h
+++ b/indra/newview/llautoreplace.h
@@ -191,6 +191,7 @@ class LLAutoReplaceSettings
*/
class LLAutoReplace : public LLSingleton<LLAutoReplace>
{
+ LLSINGLETON(LLAutoReplace);
public:
/// Callback that provides the hook for use in text entry methods
void autoreplaceCallback(S32& replacement_start, S32& replacement_length, LLWString& replacement_string, S32& cursor_pos, const LLWString& input_text);
@@ -202,8 +203,6 @@ public:
void setSettings(const LLAutoReplaceSettings& settings);
private:
- friend class LLSingleton<LLAutoReplace>;
- LLAutoReplace();
/*virtual*/ void initSingleton();
LLAutoReplaceSettings mSettings; ///< configuration information
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 7b8c630837..36e95c07f4 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -689,6 +689,8 @@ namespace action_give_inventory
struct LLShareInfo : public LLSingleton<LLShareInfo>
{
+ LLSINGLETON_EMPTY_CTOR(LLShareInfo);
+ public:
std::vector<LLAvatarName> mAvatarNames;
uuid_vec_t mAvatarUuids;
};
diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h
index 5b5720f4ac..a1dacd1a27 100644
--- a/indra/newview/llavatariconctrl.h
+++ b/indra/newview/llavatariconctrl.h
@@ -37,6 +37,8 @@ class LLAvatarName;
class LLAvatarIconIDCache: public LLSingleton<LLAvatarIconIDCache>
{
+ LLSINGLETON(LLAvatarIconIDCache);
+
public:
struct LLAvatarIconIDCacheItem
{
@@ -46,10 +48,6 @@ public:
bool expired();
};
- LLAvatarIconIDCache()
- : mFilename("avatar_icons_cache.txt")
- {}
-
void load ();
void save ();
@@ -64,6 +62,11 @@ protected:
std::map<LLUUID,LLAvatarIconIDCacheItem> mCache;//we cache only LLUID and time
};
+inline
+LLAvatarIconIDCache::LLAvatarIconIDCache()
+ : mFilename("avatar_icons_cache.txt")
+{}
+
namespace LLAvatarIconCtrlEnums
{
enum ESymbolPos
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index 1dcd2c9b90..d5c5c75c69 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -187,13 +187,12 @@ public:
class LLAvatarPropertiesProcessor
: public LLSingleton<LLAvatarPropertiesProcessor>
{
-public:
-
- LLAvatarPropertiesProcessor();
+ LLSINGLETON(LLAvatarPropertiesProcessor);
virtual ~LLAvatarPropertiesProcessor();
+public:
void addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer);
-
+
void removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer);
// Request various types of avatar data. Duplicate requests will be
diff --git a/indra/newview/llavatarrenderinfoaccountant.h b/indra/newview/llavatarrenderinfoaccountant.h
index 870ef4f394..6b5fa7bc35 100644
--- a/indra/newview/llavatarrenderinfoaccountant.h
+++ b/indra/newview/llavatarrenderinfoaccountant.h
@@ -38,13 +38,13 @@ class LLViewerRegion;
// that is sent to or fetched from regions.
class LLAvatarRenderInfoAccountant : public LLSingleton<LLAvatarRenderInfoAccountant>
{
+ LLSINGLETON(LLAvatarRenderInfoAccountant);
+ ~LLAvatarRenderInfoAccountant();
+
private:
LOG_CLASS(LLAvatarRenderInfoAccountant);
public:
- LLAvatarRenderInfoAccountant();
- ~LLAvatarRenderInfoAccountant();
-
void sendRenderInfoToRegion(LLViewerRegion * regionp);
void getRenderInfoFromRegion(LLViewerRegion * regionp);
diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h
index a169baef40..de65bd2e13 100644
--- a/indra/newview/llavatarrendernotifier.h
+++ b/indra/newview/llavatarrendernotifier.h
@@ -67,9 +67,9 @@ typedef std::list<LLHUDComplexity> hud_complexity_list_t;
// reported that user's agent is too 'heavy' for their settings
class LLAvatarRenderNotifier : public LLSingleton<LLAvatarRenderNotifier>
{
-public:
- LLAvatarRenderNotifier();
+ LLSINGLETON(LLAvatarRenderNotifier);
+public:
void displayNotification(bool show_over_limit);
bool isNotificationVisible();
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index a5de8a5327..8b9d0dda8b 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -43,6 +43,9 @@ namespace LLNotificationsUI
*/
class LLChannelManager : public LLSingleton<LLChannelManager>
{
+ LLSINGLETON(LLChannelManager);
+ virtual ~LLChannelManager();
+
public:
@@ -65,9 +68,6 @@ public:
}
};
- LLChannelManager();
- virtual ~LLChannelManager();
-
// On LoginCompleted - show StartUp toast
void onLoginCompleted();
// removes a channel intended for the startup toast and allows other channels to show their toasts
diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp
index 254e3f61a8..c4f959bfa9 100644
--- a/indra/newview/llchicletbar.cpp
+++ b/indra/newview/llchicletbar.cpp
@@ -38,7 +38,7 @@ namespace
const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
}
-LLChicletBar::LLChicletBar(const LLSD&)
+LLChicletBar::LLChicletBar()
: mChicletPanel(NULL),
mToolbarStack(NULL)
{
diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h
index 956c82cb77..6c521dc1d5 100644
--- a/indra/newview/llchicletbar.h
+++ b/indra/newview/llchicletbar.h
@@ -38,8 +38,9 @@ class LLChicletBar
: public LLSingleton<LLChicletBar>
, public LLPanel
{
+ LLSINGLETON(LLChicletBar);
LOG_CLASS(LLChicletBar);
- friend class LLSingleton<LLChicletBar>;
+
public:
BOOL postBuild();
@@ -82,8 +83,6 @@ private:
void fitWithTopInfoBar();
protected:
- LLChicletBar(const LLSD& key = LLSD());
-
LLChicletPanel* mChicletPanel;
LLLayoutStack* mToolbarStack;
};
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 62f08144b9..035cbcb945 100644
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -109,7 +109,7 @@ private:
class LLConversationLog : public LLSingleton<LLConversationLog>, LLIMSessionObserver
{
- friend class LLSingleton<LLConversationLog>;
+ LLSINGLETON(LLConversationLog);
public:
void removeConversation(const LLConversation& conversation);
@@ -157,7 +157,6 @@ public:
private:
- LLConversationLog();
virtual ~LLConversationLog()
{
if (mAvatarNameCacheConnection.connected())
diff --git a/indra/newview/lldaycyclemanager.h b/indra/newview/lldaycyclemanager.h
index 3d2144960d..04db9d5dac 100644
--- a/indra/newview/lldaycyclemanager.h
+++ b/indra/newview/lldaycyclemanager.h
@@ -40,6 +40,7 @@
*/
class LLDayCycleManager : public LLSingleton<LLDayCycleManager>
{
+ LLSINGLETON_EMPTY_CTOR(LLDayCycleManager);
LOG_CLASS(LLDayCycleManager);
public:
@@ -66,7 +67,6 @@ public:
boost::signals2::connection setModifyCallback(const modify_signal_t::slot_type& cb);
private:
- friend class LLSingleton<LLDayCycleManager>;
/*virtual*/ void initSingleton();
void loadAllPresets();
diff --git a/indra/newview/lldeferredsounds.h b/indra/newview/lldeferredsounds.h
index bf1eb62957..33f02b3521 100644
--- a/indra/newview/lldeferredsounds.h
+++ b/indra/newview/lldeferredsounds.h
@@ -33,7 +33,7 @@ struct SoundData;
class LLDeferredSounds : public LLSingleton<LLDeferredSounds>
{
-private:
+ LLSINGLETON_EMPTY_CTOR(LLDeferredSounds);
std::vector<SoundData> soundVector;
public:
//Add sounds to be played once progress bar is hidden (such as after teleport or loading screen)
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 7836e2cb94..7d2712eec7 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -69,8 +69,7 @@ BOOL LLDoNotDisturbNotificationStorageTimer::tick()
}
LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage()
- : LLSingleton<LLDoNotDisturbNotificationStorage>()
- , LLNotificationStorage("")
+ : LLNotificationStorage("")
, mDirty(false)
{
nameToPayloadParameterMap[toastName] = "SESSION_ID";
diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h
index 6e68b0d1be..e6cb7835e3 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.h
+++ b/indra/newview/lldonotdisturbnotificationstorage.h
@@ -47,14 +47,14 @@ public:
class LLDoNotDisturbNotificationStorage : public LLSingleton<LLDoNotDisturbNotificationStorage>, public LLNotificationStorage
{
+ LLSINGLETON(LLDoNotDisturbNotificationStorage);
+ ~LLDoNotDisturbNotificationStorage();
+
LOG_CLASS(LLDoNotDisturbNotificationStorage);
public:
static const char * toastName;
static const char * offerName;
- LLDoNotDisturbNotificationStorage();
- ~LLDoNotDisturbNotificationStorage();
-
void initialize();
bool getDirty();
void resetDirty();
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
index c7877303fc..6a0a267f4e 100644
--- a/indra/newview/llenvmanager.h
+++ b/indra/newview/llenvmanager.h
@@ -162,14 +162,13 @@ public:
*/
class LLEnvManagerNew : public LLSingleton<LLEnvManagerNew>
{
+ LLSINGLETON(LLEnvManagerNew);
LOG_CLASS(LLEnvManagerNew);
public:
typedef boost::signals2::signal<void()> prefs_change_signal_t;
typedef boost::signals2::signal<void()> region_settings_change_signal_t;
typedef boost::signals2::signal<void(bool)> region_settings_applied_signal_t;
- LLEnvManagerNew();
-
// getters to access user env. preferences
bool getUseRegionSettings() const;
bool getUseDayCycle() const;
@@ -231,7 +230,6 @@ public:
void onRegionSettingsApplyResponse(bool ok);
private:
- friend class LLSingleton<LLEnvManagerNew>;
/*virtual*/ void initSingleton();
void loadUserPrefs();
diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h
index fcfbd1ce7d..e7a6a2a725 100644
--- a/indra/newview/llestateinfomodel.h
+++ b/indra/newview/llestateinfomodel.h
@@ -38,6 +38,7 @@ class LLMessageSystem;
*/
class LLEstateInfoModel : public LLSingleton<LLEstateInfoModel>
{
+ LLSINGLETON(LLEstateInfoModel);
LOG_CLASS(LLEstateInfoModel);
public:
@@ -73,11 +74,8 @@ public:
protected:
typedef std::vector<std::string> strings_t;
- friend class LLSingleton<LLEstateInfoModel>;
friend class LLDispatchEstateUpdateInfo;
- LLEstateInfoModel();
-
/// refresh model with data from the incoming server message
void update(const strings_t& strings);
diff --git a/indra/newview/llexperiencelog.h b/indra/newview/llexperiencelog.h
index ac227db336..09e0cd8821 100644
--- a/indra/newview/llexperiencelog.h
+++ b/indra/newview/llexperiencelog.h
@@ -33,6 +33,7 @@
class LLExperienceLog : public LLSingleton<LLExperienceLog>
{
+ LLSINGLETON(LLExperienceLog);
public:
typedef boost::signals2::signal<void(LLSD&)>
callback_signal_t;
@@ -62,7 +63,6 @@ public:
void setEventsToSave(LLSD new_events){mEventsToSave = new_events; }
bool isNotExpired(std::string& date);
protected:
- LLExperienceLog();
void handleExperienceMessage(LLSD& message);
@@ -81,7 +81,6 @@ protected:
bool mNotifyNewEvent;
friend class LLExperienceLogDispatchHandler;
- friend class LLSingleton<LLExperienceLog>;
};
diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h
index 2a2cdb5499..7fd4070f54 100644
--- a/indra/newview/llfacebookconnect.h
+++ b/indra/newview/llfacebookconnect.h
@@ -43,6 +43,8 @@ class LLEventPump;
*/
class LLFacebookConnect : public LLSingleton<LLFacebookConnect>
{
+ LLSINGLETON(LLFacebookConnect);
+ ~LLFacebookConnect() {};
LOG_CLASS(LLFacebookConnect);
public:
enum EConnectionState
@@ -86,10 +88,7 @@ public:
void openFacebookWeb(std::string url);
private:
- friend class LLSingleton<LLFacebookConnect>;
- LLFacebookConnect();
- ~LLFacebookConnect() {};
std::string getFacebookConnectURL(const std::string& route = "", bool include_read_from_master = false);
EConnectionState mConnectionState;
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 2115f77cf3..cac32c7f2a 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -34,6 +34,7 @@
#include "llinventoryobserver.h"
#include "llinventorymodel.h"
#include "llviewerinventory.h"
+#include "llinitdestroyclass.h"
class LLMenuItemCallGL;
class LLToggleableMenu;
@@ -173,6 +174,7 @@ private:
class LLFavoritesOrderStorage : public LLSingleton<LLFavoritesOrderStorage>
, public LLDestroyClass<LLFavoritesOrderStorage>
{
+ LLSINGLETON(LLFavoritesOrderStorage);
LOG_CLASS(LLFavoritesOrderStorage);
public:
/**
@@ -221,10 +223,6 @@ public:
std::map<LLUUID,std::string> mFavoriteNames;
private:
- friend class LLSingleton<LLFavoritesOrderStorage>;
- LLFavoritesOrderStorage() : mIsDirty(false), mUpdateRequired(false){ load(); }
- ~LLFavoritesOrderStorage() {}
-
/**
* Removes sort indexes for items which are not in Favorites bar for now.
*/
@@ -274,4 +272,10 @@ private:
};
};
+
+inline
+LLFavoritesOrderStorage::LLFavoritesOrderStorage() :
+ mIsDirty(false), mUpdateRequired(false)
+{ load(); }
+
#endif // LL_LLFAVORITESBARCTRL_H
diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h
index c3d87cea0b..54bd07329a 100644
--- a/indra/newview/llfeaturemanager.h
+++ b/indra/newview/llfeaturemanager.h
@@ -97,20 +97,10 @@ protected:
class LLFeatureManager : public LLFeatureList, public LLSingleton<LLFeatureManager>
{
-public:
- LLFeatureManager()
- : LLFeatureList("default"),
-
- mInited(FALSE),
- mTableVersion(0),
- mSafe(FALSE),
- mGPUClass(GPU_CLASS_UNKNOWN),
- mExpectedGLVersion(0.f),
- mGPUSupported(FALSE)
- {
- }
+ LLSINGLETON(LLFeatureManager);
~LLFeatureManager() {cleanupFeatureTables();}
+public:
// initialize this by loading feature table and gpu table
void init();
@@ -181,5 +171,17 @@ protected:
BOOL mGPUSupported;
};
+inline
+LLFeatureManager::LLFeatureManager()
+: LLFeatureList("default"),
+
+ mInited(FALSE),
+ mTableVersion(0),
+ mSafe(FALSE),
+ mGPUClass(GPU_CLASS_UNKNOWN),
+ mExpectedGLVersion(0.f),
+ mGPUSupported(FALSE)
+{
+}
#endif // LL_LLFEATUREMANAGER_H
diff --git a/indra/newview/llflickrconnect.h b/indra/newview/llflickrconnect.h
index 0155804da0..43cadca708 100644
--- a/indra/newview/llflickrconnect.h
+++ b/indra/newview/llflickrconnect.h
@@ -43,6 +43,8 @@ class LLEventPump;
*/
class LLFlickrConnect : public LLSingleton<LLFlickrConnect>
{
+ LLSINGLETON(LLFlickrConnect);
+ ~LLFlickrConnect() {};
LOG_CLASS(LLFlickrConnect);
public:
enum EConnectionState
@@ -80,10 +82,7 @@ public:
void openFlickrWeb(std::string url);
private:
- friend class LLSingleton<LLFlickrConnect>;
- LLFlickrConnect();
- ~LLFlickrConnect() {};
std::string getFlickrConnectURL(const std::string& route = "", bool include_read_from_master = false);
EConnectionState mConnectionState;
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index e5df417ca9..602d2dce73 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -992,7 +992,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
{
std::string name = floaterp->getChild<LLUICtrl>("name_form")->getValue().asString();
std::string desc = floaterp->getChild<LLUICtrl>("description_form")->getValue().asString();
- S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
LLResourceUploadInfo::ptr_t assetUpdloadInfo(new LLResourceUploadInfo(
floaterp->mTransactionID, LLAssetType::AT_ANIMATION,
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 15b67b905d..7039e48e74 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -101,7 +101,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed());
gSavedPerAccountSettings.setBOOL("ConversationsParticipantListCollapsed", !isParticipantListExpanded());
- if (!LLSingleton<LLIMMgr>::destroyed())
+ if (LLIMMgr::instanceExists())
{
LLIMMgr::getInstance()->removeSessionObserver(this);
}
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index 4a5732aecf..c9a689281e 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -123,7 +123,7 @@ BOOL LLFloaterNameDesc::postBuild()
// Cancel button
getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnCancel, this));
- getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() ));
+ getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload() ));
setDefaultBtn("ok_btn");
@@ -162,7 +162,7 @@ void LLFloaterNameDesc::onBtnOK( )
getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads
LLAssetStorage::LLStoreAssetCallback callback = NULL;
- S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
+ S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
if (can_afford_transaction(expected_upload_cost))
{
diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h
index ae3800e17b..2fb912a930 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -37,9 +37,10 @@ class LLFriendCardsManager
: public LLSingleton<LLFriendCardsManager>
, public LLFriendObserver
{
+ LLSINGLETON(LLFriendCardsManager);
+ ~LLFriendCardsManager();
LOG_CLASS(LLFriendCardsManager);
- friend class LLSingleton<LLFriendCardsManager>;
friend class CreateFriendCardCallback;
public:
@@ -97,8 +98,6 @@ public:
private:
typedef boost::function<void()> callback_t;
- LLFriendCardsManager();
- ~LLFriendCardsManager();
/**
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 26a5924ec3..402bdf6039 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -51,6 +51,8 @@ public:
class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchItemsObserver
{
+ LLSINGLETON(LLGestureMgr);
+ ~LLGestureMgr();
public:
typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
@@ -58,8 +60,6 @@ public:
typedef std::map<LLUUID, LLMultiGesture*> item_map_t;
typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t;
- LLGestureMgr();
- ~LLGestureMgr();
void init();
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index e5ce768035..940ef6eea1 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -348,6 +348,8 @@ struct LLRoleActionSet
class LLGroupMgr : public LLSingleton<LLGroupMgr>
{
+ LLSINGLETON(LLGroupMgr);
+ ~LLGroupMgr();
LOG_CLASS(LLGroupMgr);
public:
@@ -369,8 +371,6 @@ public:
public:
- LLGroupMgr();
- ~LLGroupMgr();
void addObserver(LLGroupMgrObserver* observer);
void addObserver(const LLUUID& group_id, LLParticularGroupObserver* observer);
diff --git a/indra/newview/llhints.h b/indra/newview/llhints.h
index ebffe561b9..dd6195a9ce 100644
--- a/indra/newview/llhints.h
+++ b/indra/newview/llhints.h
@@ -29,6 +29,7 @@
#include "llpanel.h"
#include "llnotifications.h"
+#include "llinitdestroyclass.h"
class LLHints : public LLInitClass<LLHints>
diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h
index 9c5d49decd..7782739690 100644
--- a/indra/newview/llhudmanager.h
+++ b/indra/newview/llhudmanager.h
@@ -36,10 +36,10 @@ class LLMessageSystem;
class LLHUDManager : public LLSingleton<LLHUDManager>
{
-public:
- LLHUDManager();
+ LLSINGLETON(LLHUDManager);
~LLHUDManager();
+public:
LLHUDEffect *createViewerEffect(const U8 type, BOOL send_to_sim = TRUE, BOOL originated_here = TRUE);
void updateEffects();
diff --git a/indra/newview/llimagefiltersmanager.h b/indra/newview/llimagefiltersmanager.h
index 4751933065..f1ed3cf1c3 100644
--- a/indra/newview/llimagefiltersmanager.h
+++ b/indra/newview/llimagefiltersmanager.h
@@ -34,6 +34,8 @@
class LLImageFiltersManager : public LLSingleton<LLImageFiltersManager>
{
+ LLSINGLETON(LLImageFiltersManager);
+ ~LLImageFiltersManager();
LOG_CLASS(LLImageFiltersManager);
public:
const std::vector<std::string> getFiltersList() const;
@@ -43,10 +45,7 @@ private:
void loadAllFilters();
void loadFiltersFromDir(const std::string& dir);
- friend class LLSingleton<LLImageFiltersManager>;
/*virtual*/ void initSingleton();
- LLImageFiltersManager();
- ~LLImageFiltersManager();
// List of filters : first is the user friendly localized name, second is the xml file name
std::map<std::string,std::string> mFiltersList;
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 41a8813acb..da40ac8393 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -33,6 +33,7 @@
#include "lllogchat.h"
#include "llvoicechannel.h"
+#include "llinitdestroyclass.h"
#include "llcoros.h"
#include "lleventcoro.h"
@@ -61,6 +62,7 @@ private:
*/
class LLIMModel : public LLSingleton<LLIMModel>
{
+ LLSINGLETON(LLIMModel);
public:
struct LLIMSession : public boost::signals2::trackable
@@ -151,7 +153,6 @@ public:
};
- LLIMModel();
/** Session id to session object */
std::map<LLUUID, LLIMSession*> mId2SessionMap;
@@ -312,6 +313,7 @@ public:
class LLIMMgr : public LLSingleton<LLIMMgr>
{
+ LLSINGLETON(LLIMMgr);
friend class LLIMModel;
public:
@@ -322,8 +324,6 @@ public:
INVITATION_TYPE_IMMEDIATE = 2
};
- LLIMMgr();
- virtual ~LLIMMgr() {};
// Add a message to a session. The session can keyed to sesion id
// or agent id.
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index 013a5a7629..495180f087 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -46,8 +46,7 @@ struct IconEntry : public LLDictionaryEntry
class LLIconDictionary : public LLSingleton<LLIconDictionary>,
public LLDictionary<LLInventoryType::EIconName, IconEntry>
{
-public:
- LLIconDictionary();
+ LLSINGLETON(LLIconDictionary);
};
typedef LLPointer<LLUIImage> LLUIImagePtr;
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 19fbfc2ed3..00d2908c1b 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -43,9 +43,9 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch>
{
-public:
- LLInventoryModelBackgroundFetch();
+ LLSINGLETON(LLInventoryModelBackgroundFetch);
~LLInventoryModelBackgroundFetch();
+public:
// Start and stop background breadth-first fetching of inventory contents.
// This gets triggered when performing a filter-search.
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
index 9fef42c5df..1cecbabd3b 100644
--- a/indra/newview/lllocationhistory.h
+++ b/indra/newview/lllocationhistory.h
@@ -103,6 +103,7 @@ public:
class LLLocationHistory: public LLSingleton<LLLocationHistory>
{
+ LLSINGLETON(LLLocationHistory);
LOG_CLASS(LLLocationHistory);
public:
@@ -117,7 +118,6 @@ public:
typedef boost::function<void(EChangeType event)> history_changed_callback_t;
typedef boost::signals2::signal<void(EChangeType event)> history_changed_signal_t;
- LLLocationHistory();
void addItem(const LLLocationHistoryItem& item);
bool touchItem(const LLLocationHistoryItem& item);
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 485d4677b1..b9194c6c67 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -132,15 +132,9 @@ void append_to_last_message(std::list<LLSD>& messages, const std::string& line)
class LLLogChatTimeScanner: public LLSingleton<LLLogChatTimeScanner>
{
-public:
- LLLogChatTimeScanner()
- {
- // Note, date/time facets will be destroyed by string streams
- mDateStream.imbue(std::locale(mDateStream.getloc(), new date_input_facet(DATE_FORMAT)));
- mTimeStream.imbue(std::locale(mTimeStream.getloc(), new time_facet(TIME_FORMAT)));
- mTimeStream.imbue(std::locale(mTimeStream.getloc(), new time_input_facet(DATE_FORMAT)));
- }
+ LLSINGLETON(LLLogChatTimeScanner);
+public:
date getTodayPacificDate()
{
typedef boost::date_time::local_adjustor<ptime, -8, no_dst> pst;
@@ -205,6 +199,15 @@ private:
std::stringstream mTimeStream;
};
+inline
+LLLogChatTimeScanner::LLLogChatTimeScanner()
+{
+ // Note, date/time facets will be destroyed by string streams
+ mDateStream.imbue(std::locale(mDateStream.getloc(), new date_input_facet(DATE_FORMAT)));
+ mTimeStream.imbue(std::locale(mTimeStream.getloc(), new time_facet(TIME_FORMAT)));
+ mTimeStream.imbue(std::locale(mTimeStream.getloc(), new time_input_facet(DATE_FORMAT)));
+}
+
LLLogChat::save_history_signal_t * LLLogChat::sSaveHistorySignal = NULL;
std::map<LLUUID,LLLoadHistoryThread *> LLLogChat::sLoadHistoryThreads;
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index c6773bbf68..282ddc1cea 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -40,12 +40,12 @@ class LLUpdaterService;
// negotiate user authentication attempts.
class LLLoginInstance : public LLSingleton<LLLoginInstance>
{
+ LLSINGLETON(LLLoginInstance);
+ ~LLLoginInstance();
+
public:
class Disposable;
- LLLoginInstance();
- ~LLLoginInstance();
-
void connect(LLPointer<LLCredential> credentials); // Connect to the current grid choice.
void connect(const std::string& uri, LLPointer<LLCredential> credentials); // Connect to the given uri.
void reconnect(); // reconnect using the current credentials.
diff --git a/indra/newview/llmainlooprepeater.h b/indra/newview/llmainlooprepeater.h
index f84c0ca94c..2ec3a74e4a 100644
--- a/indra/newview/llmainlooprepeater.h
+++ b/indra/newview/llmainlooprepeater.h
@@ -43,9 +43,8 @@
class LLMainLoopRepeater:
public LLSingleton<LLMainLoopRepeater>
{
+ LLSINGLETON(LLMainLoopRepeater);
public:
- LLMainLoopRepeater(void);
-
// Start the repeater service.
void start(void);
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 9d795c6ced..ec312baca3 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -86,11 +86,10 @@ namespace MarketplaceFetchCodes
class LLMarketplaceInventoryImporter
: public LLSingleton<LLMarketplaceInventoryImporter>
{
+ LLSINGLETON(LLMarketplaceInventoryImporter);
public:
static void update();
-
- LLMarketplaceInventoryImporter();
-
+
typedef boost::signals2::signal<void (bool)> status_changed_signal_t;
typedef boost::signals2::signal<void (U32, const LLSD&)> status_report_signal_t;
@@ -181,10 +180,11 @@ class LLSLMDeleteListingsResponder;
class LLMarketplaceData
: public LLSingleton<LLMarketplaceData>
{
- friend class LLSingleton < LLMarketplaceData > ;
+ LLSINGLETON(LLMarketplaceData);
+ virtual ~LLMarketplaceData();
public:
- friend class LLSLMGetMerchantResponder;
+ friend class LLSLMGetMerchantResponder;
friend class LLSLMGetListingsResponder;
friend class LLSLMCreateListingsResponder;
friend class LLSLMGetListingResponder;
@@ -242,9 +242,6 @@ public:
void decrementValidationWaiting(const LLUUID& folder_id, S32 count = 1);
private:
- LLMarketplaceData();
- virtual ~LLMarketplaceData();
-
// Modify Marketplace data set : each method returns true if the function succeeds, false if error
// Used internally only by SLM Responders when data are received from the SLM Server
bool addListing(const LLUUID& folder_id, S32 listing_id, const LLUUID& version_id, bool is_listed, const std::string& edit_url, S32 count);
diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h
index 36dd0904b6..60b58d17de 100644
--- a/indra/newview/llmaterialmgr.h
+++ b/indra/newview/llmaterialmgr.h
@@ -38,9 +38,7 @@ class LLViewerRegion;
class LLMaterialMgr : public LLSingleton<LLMaterialMgr>
{
- friend class LLSingleton<LLMaterialMgr>;
-protected:
- LLMaterialMgr();
+ LLSINGLETON(LLMaterialMgr);
virtual ~LLMaterialMgr();
public:
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
index 8879cfd7fb..63d97f6ac2 100644
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
@@ -41,8 +41,7 @@
#include "llpathfindingnavmeshstatus.h"
#include "llviewerregion.h"
-LLMenuOptionPathfindingRebakeNavmesh::LLMenuOptionPathfindingRebakeNavmesh()
- : LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>(),
+LLMenuOptionPathfindingRebakeNavmesh::LLMenuOptionPathfindingRebakeNavmesh() :
mIsInitialized(false),
mCanRebakeRegion(false),
mRebakeNavMeshMode(kRebakeNavMesh_Default),
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
index 7b1d2873ba..649a387dd3 100644
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
@@ -37,6 +37,8 @@ class LLPathfindingNavMeshStatus;
class LLMenuOptionPathfindingRebakeNavmesh : public LLSingleton<LLMenuOptionPathfindingRebakeNavmesh>
{
+ LLSINGLETON(LLMenuOptionPathfindingRebakeNavmesh);
+ virtual ~LLMenuOptionPathfindingRebakeNavmesh();
LOG_CLASS(LLMenuOptionPathfindingRebakeNavmesh);
public:
@@ -49,8 +51,6 @@ public:
kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable
} ERebakeNavMeshMode;
- LLMenuOptionPathfindingRebakeNavmesh();
- virtual ~LLMenuOptionPathfindingRebakeNavmesh();
void initialize();
void quit();
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 84cf7d0313..0f70c9d13f 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -47,6 +47,7 @@
#include "pipeline.h"
#include <boost/tokenizer.hpp>
+#include <boost/bind.hpp>
#include "lldispatcher.h"
#include "llxfermanager.h"
@@ -147,22 +148,6 @@ std::string LLMute::getDisplayType() const
}
}
-
-/* static */
-LLMuteList* LLMuteList::getInstance()
-{
- // Register callbacks at the first time that we find that the message system has been created.
- static BOOL registered = FALSE;
- if( !registered && gMessageSystem != NULL)
- {
- registered = TRUE;
- // Register our various callbacks
- gMessageSystem->setHandlerFuncFast(_PREHASH_MuteListUpdate, processMuteListUpdate);
- gMessageSystem->setHandlerFuncFast(_PREHASH_UseCachedMuteList, processUseCachedMuteList);
- }
- return LLSingleton<LLMuteList>::getInstance(); // Call the "base" implementation.
-}
-
//-----------------------------------------------------------------------------
// LLMuteList()
//-----------------------------------------------------------------------------
@@ -170,6 +155,18 @@ LLMuteList::LLMuteList() :
mIsLoaded(FALSE)
{
gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList);
+
+ // Register our callbacks. We may be constructed before gMessageSystem, so
+ // use callWhenReady() to register them as soon as gMessageSystem becomes
+ // available.
+ // When using bind(), must be explicit about default arguments such as
+ // that last NULL.
+ gMessageSystem.callWhenReady(boost::bind(&LLMessageSystem::setHandlerFuncFast, _1,
+ _PREHASH_MuteListUpdate, processMuteListUpdate,
+ static_cast<void**>(NULL)));
+ gMessageSystem.callWhenReady(boost::bind(&LLMessageSystem::setHandlerFuncFast, _1,
+ _PREHASH_UseCachedMuteList, processUseCachedMuteList,
+ static_cast<void**>(NULL)));
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index 4e7b6ee880..4ceddc97fd 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -71,6 +71,8 @@ public:
class LLMuteList : public LLSingleton<LLMuteList>
{
+ LLSINGLETON(LLMuteList);
+ ~LLMuteList();
public:
// reasons for auto-unmuting a resident
enum EAutoReason
@@ -81,13 +83,6 @@ public:
AR_COUNT // enum count
};
- LLMuteList();
- ~LLMuteList();
-
- // Implemented locally so that we can perform some delayed initialization.
- // Callers should be careful to call this one and not LLSingleton<LLMuteList>::getInstance()
- // which would circumvent that mechanism. -MG
- static LLMuteList* getInstance();
void addObserver(LLMuteListObserver* observer);
void removeObserver(LLMuteListObserver* observer);
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 29dbaedf7a..a44c6dd699 100644..100755
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -30,6 +30,7 @@
#include "llpanel.h"
#include "llbutton.h"
#include "lllayoutstack.h"
+#include "llinitdestroyclass.h"
class LLLocationInputCtrl;
class LLMenuGL;
@@ -84,12 +85,12 @@ protected:
class LLNavigationBar
: public LLPanel, public LLSingleton<LLNavigationBar>, private LLDestroyClass<LLNavigationBar>
{
+ LLSINGLETON(LLNavigationBar);
+ virtual ~LLNavigationBar();
LOG_CLASS(LLNavigationBar);
friend class LLDestroyClass<LLNavigationBar>;
-
+
public:
- LLNavigationBar();
- virtual ~LLNavigationBar();
/*virtual*/ void draw();
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h
index f37c6b833c..52c79cc689 100644
--- a/indra/newview/llnotificationmanager.h
+++ b/indra/newview/llnotificationmanager.h
@@ -46,11 +46,11 @@ class LLToast;
*/
class LLNotificationManager : public LLSingleton<LLNotificationManager>
{
- typedef std::pair<std::string, LLEventHandler*> eventhandlers;
-public:
- LLNotificationManager();
+ LLSINGLETON(LLNotificationManager);
virtual ~LLNotificationManager();
+ typedef std::pair<std::string, LLEventHandler*> eventhandlers;
+public:
//TODO: make private
// this method initialize handlers' map for different types of notifications
void init(void);
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index 3418b33d37..35fdfa88bb 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -45,9 +45,10 @@ typedef boost::function<LLNotificationResponderInterface * (const LLSD& pParams)
class LLResponderRegistry : public LLRegistrySingleton<std::string, responder_constructor_t, LLResponderRegistry>
{
- public:
- template<typename RESPONDER_TYPE> static LLNotificationResponderInterface * create(const LLSD& pParams);
- LLNotificationResponderInterface * createResponder(const std::string& pNotificationName, const LLSD& pParams);
+ LLSINGLETON_EMPTY_CTOR(LLResponderRegistry);
+public:
+ template<typename RESPONDER_TYPE> static LLNotificationResponderInterface * create(const LLSD& pParams);
+ LLNotificationResponderInterface * createResponder(const std::string& pNotificationName, const LLSD& pParams);
};
template<typename RESPONDER_TYPE> LLNotificationResponderInterface * LLResponderRegistry::create(const LLSD& pParams)
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index bc1e2c5d59..8887a61857 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -1126,7 +1126,7 @@ void LLOutfitGallery::uploadPhoto(LLUUID outfit_id)
return;
}
- S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
+ S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
void *nruserdata = NULL;
nruserdata = (void *)&outfit_id;
diff --git a/indra/newview/lloutfitobserver.h b/indra/newview/lloutfitobserver.h
index 87d4b0c998..77041db68d 100644
--- a/indra/newview/lloutfitobserver.h
+++ b/indra/newview/lloutfitobserver.h
@@ -36,10 +36,10 @@
*/
class LLOutfitObserver: public LLInventoryObserver, public LLSingleton<LLOutfitObserver>
{
-public:
+ LLSINGLETON(LLOutfitObserver);
virtual ~LLOutfitObserver();
- friend class LLSingleton<LLOutfitObserver>;
+public:
virtual void changed(U32 mask);
@@ -58,7 +58,6 @@ public:
void addOutfitLockChangedCallback(const signal_t::slot_type& cb) { mOutfitLockChanged.connect(cb); }
protected:
- LLOutfitObserver();
/** Get a version of an inventory category specified by its UUID */
static S32 getCategoryVersion(const LLUUID& cat_id);
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index b7e1b2d3a4..f2d43a1037 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -117,8 +117,7 @@ class LLEditWearableDictionary : public LLSingleton<LLEditWearableDictionary>
//--------------------------------------------------------------------
// Constructors and Destructors
//--------------------------------------------------------------------
-public:
- LLEditWearableDictionary();
+ LLSINGLETON(LLEditWearableDictionary);
virtual ~LLEditWearableDictionary();
//--------------------------------------------------------------------
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index eb40616a9c..211cb32c01 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1309,7 +1309,7 @@ void LLPanelMainInventory::setUploadCostIfNeeded()
LLMenuItemBranchGL* upload_menu = menu->findChild<LLMenuItemBranchGL>("upload");
if(upload_menu)
{
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
std::string cost_str;
// getPriceUpload() returns -1 if no data available yet.
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index b2952834fb..21ac7604ff 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -135,7 +135,7 @@ BOOL LLPanelSnapshotInventory::postBuild()
// virtual
void LLPanelSnapshotInventory::onOpen(const LLSD& key)
{
- getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()));
+ getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload()));
LLPanelSnapshot::onOpen(key);
}
@@ -155,7 +155,7 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
void LLPanelSnapshotInventoryBase::onSend()
{
- S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
if (can_afford_transaction(expected_upload_cost))
{
if (mSnapshotFloater)
@@ -191,7 +191,7 @@ BOOL LLPanelOutfitSnapshotInventory::postBuild()
// virtual
void LLPanelOutfitSnapshotInventory::onOpen(const LLSD& key)
{
- getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()));
+ getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload()));
LLPanelSnapshot::onOpen(key);
}
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 269f16c5e4..95c14e4226 100644
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -77,12 +77,12 @@ LLPanelSnapshotOptions::LLPanelSnapshotOptions()
mCommitCallbackRegistrar.add("Snapshot.SendToFacebook", boost::bind(&LLPanelSnapshotOptions::onSendToFacebook, this));
mCommitCallbackRegistrar.add("Snapshot.SendToTwitter", boost::bind(&LLPanelSnapshotOptions::onSendToTwitter, this));
mCommitCallbackRegistrar.add("Snapshot.SendToFlickr", boost::bind(&LLPanelSnapshotOptions::onSendToFlickr, this));
- LLGlobalEconomy::Singleton::getInstance()->addObserver(this);
+ LLGlobalEconomy::getInstance()->addObserver(this);
}
LLPanelSnapshotOptions::~LLPanelSnapshotOptions()
{
- LLGlobalEconomy::Singleton::getInstance()->removeObserver(this);
+ LLGlobalEconomy::getInstance()->removeObserver(this);
}
// virtual
@@ -100,7 +100,7 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key)
void LLPanelSnapshotOptions::updateUploadCost()
{
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
}
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 3de9dc2f80..fe0608d544 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -104,7 +104,9 @@ private:
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-class LLTeleportHistoryFlatItemStorage: public LLSingleton<LLTeleportHistoryFlatItemStorage> {
+class LLTeleportHistoryFlatItemStorage: public LLSingleton<LLTeleportHistoryFlatItemStorage>
+{
+ LLSINGLETON_EMPTY_CTOR(LLTeleportHistoryFlatItemStorage);
protected:
typedef std::vector< LLHandle<LLTeleportHistoryFlatItem> > flat_item_list_t;
diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h
index f37bd9c048..78dd997029 100644
--- a/indra/newview/llpaneltopinfobar.h
+++ b/indra/newview/llpaneltopinfobar.h
@@ -28,6 +28,7 @@
#define LLPANELTOPINFOBAR_H_
#include "llpanel.h"
+#include "llinitdestroyclass.h"
class LLButton;
class LLTextBox;
@@ -36,6 +37,8 @@ class LLParcelChangeObserver;
class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>, private LLDestroyClass<LLPanelTopInfoBar>
{
+ LLSINGLETON(LLPanelTopInfoBar);
+ ~LLPanelTopInfoBar();
LOG_CLASS(LLPanelTopInfoBar);
friend class LLDestroyClass<LLPanelTopInfoBar>;
@@ -43,9 +46,6 @@ class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>,
public:
typedef boost::signals2::signal<void ()> resize_signal_t;
- LLPanelTopInfoBar();
- ~LLPanelTopInfoBar();
-
/*virtual*/ BOOL postBuild();
/*virtual*/ void draw();
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 711a869e82..cb4c07a417 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -144,8 +144,7 @@ typedef boost::shared_ptr<LinksetsResponder> LinksetsResponderPtr;
// LLPathfindingManager
//---------------------------------------------------------------------------
-LLPathfindingManager::LLPathfindingManager()
- : LLSingleton<LLPathfindingManager>(),
+LLPathfindingManager::LLPathfindingManager():
mNavMeshMap(),
mAgentStateSignal()
{
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index e8fad590ba..a44cd892da 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -48,6 +48,9 @@ class LinksetsResponder;
class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
{
+ LLSINGLETON(LLPathfindingManager);
+ virtual ~LLPathfindingManager();
+
friend class LLNavMeshSimStateChangeNode;
friend class NavMeshStatusResponder;
friend class LLAgentStateChangeNode;
@@ -60,9 +63,6 @@ public:
kRequestError
} ERequestStatus;
- LLPathfindingManager();
- virtual ~LLPathfindingManager();
-
void initSystem();
void quitSystem();
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 006755e20b..3187325101 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -46,7 +46,6 @@
LLPathfindingPathTool::LLPathfindingPathTool()
: LLTool(PATH_TOOL_NAME),
- LLSingleton<LLPathfindingPathTool>(),
mFinalPathData(),
mTempPathData(),
mPathResult(LLPathingLib::LLPL_NO_PATH),
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 97284265f1..88cb3a15f8 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -36,6 +36,9 @@
class LLPathfindingPathTool : public LLTool, public LLSingleton<LLPathfindingPathTool>
{
+ LLSINGLETON(LLPathfindingPathTool);
+ virtual ~LLPathfindingPathTool();
+
public:
typedef enum
{
@@ -59,9 +62,6 @@ public:
kCharacterTypeD
} ECharacterType;
- LLPathfindingPathTool();
- virtual ~LLPathfindingPathTool();
-
typedef boost::function<void (void)> path_event_callback_t;
typedef boost::signals2::signal<void (void)> path_event_signal_t;
typedef boost::signals2::connection path_event_slot_t;
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index 9c0222d0bc..264382ae82 100644
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -36,9 +36,8 @@
#include "llscriptfloater.h"
#include "llviewermessage.h"
#include "llviewernetwork.h"
-LLPersistentNotificationStorage::LLPersistentNotificationStorage()
- : LLSingleton<LLPersistentNotificationStorage>()
- , LLNotificationStorage("")
+LLPersistentNotificationStorage::LLPersistentNotificationStorage():
+ LLNotificationStorage("")
, mLoaded(false)
{
}
diff --git a/indra/newview/llpersistentnotificationstorage.h b/indra/newview/llpersistentnotificationstorage.h
index bf0306380e..40c9923c74 100644
--- a/indra/newview/llpersistentnotificationstorage.h
+++ b/indra/newview/llpersistentnotificationstorage.h
@@ -45,10 +45,10 @@ class LLSD;
class LLPersistentNotificationStorage : public LLSingleton<LLPersistentNotificationStorage>, public LLNotificationStorage
{
+ LLSINGLETON(LLPersistentNotificationStorage);
+ ~LLPersistentNotificationStorage();
LOG_CLASS(LLPersistentNotificationStorage);
public:
- LLPersistentNotificationStorage();
- ~LLPersistentNotificationStorage();
void saveNotifications();
void loadNotifications();
diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h
index 21f9885f27..0014e32267 100644
--- a/indra/newview/llpresetsmanager.h
+++ b/indra/newview/llpresetsmanager.h
@@ -46,6 +46,9 @@ enum EDefaultOptions
class LLPresetsManager : public LLSingleton<LLPresetsManager>
{
+ LLSINGLETON(LLPresetsManager);
+ ~LLPresetsManager();
+
public:
typedef std::list<std::string> preset_name_list_t;
@@ -67,9 +70,6 @@ public:
preset_name_list_t mPresetNames;
- LLPresetsManager();
- ~LLPresetsManager();
-
preset_list_signal_t mPresetListChangeSignal;
private:
diff --git a/indra/newview/llproductinforequest.h b/indra/newview/llproductinforequest.h
index 75dbf220d1..d1036374e8 100644
--- a/indra/newview/llproductinforequest.h
+++ b/indra/newview/llproductinforequest.h
@@ -41,12 +41,11 @@
*/
class LLProductInfoRequestManager : public LLSingleton<LLProductInfoRequestManager>
{
+ LLSINGLETON(LLProductInfoRequestManager);
public:
- LLProductInfoRequestManager();
std::string getDescriptionForSku(const std::string& sku);
private:
- friend class LLSingleton<LLProductInfoRequestManager>;
/* virtual */ void initSingleton();
void getLandDescriptionsCoro(std::string url);
diff --git a/indra/newview/llrecentpeople.h b/indra/newview/llrecentpeople.h
index d0d6376867..c7aaf604f5 100644
--- a/indra/newview/llrecentpeople.h
+++ b/indra/newview/llrecentpeople.h
@@ -50,6 +50,7 @@ class LLDate;
*/
class LLRecentPeople: public LLSingleton<LLRecentPeople>, public LLOldEvents::LLSimpleListener
{
+ LLSINGLETON_EMPTY_CTOR(LLRecentPeople);
LOG_CLASS(LLRecentPeople);
public:
typedef boost::signals2::signal<void ()> signal_t;
diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h
index d22a0de463..ea9640efda 100644
--- a/indra/newview/llregioninfomodel.h
+++ b/indra/newview/llregioninfomodel.h
@@ -36,6 +36,7 @@ class LLMessageSystem;
*/
class LLRegionInfoModel : public LLSingleton<LLRegionInfoModel>
{
+ LLSINGLETON(LLRegionInfoModel);
LOG_CLASS(LLRegionInfoModel);
public:
@@ -73,10 +74,8 @@ public:
std::string mSimType;
protected:
- friend class LLSingleton<LLRegionInfoModel>;
friend class LLViewerRegion;
- LLRegionInfoModel();
/**
* Refresh model with data from the incoming server message.
diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h
index cb5af50c5f..5b0d189137 100644
--- a/indra/newview/llremoteparcelrequest.h
+++ b/indra/newview/llremoteparcelrequest.h
@@ -74,9 +74,10 @@ protected:
class LLRemoteParcelInfoProcessor : public LLSingleton<LLRemoteParcelInfoProcessor>
{
-public:
+ LLSINGLETON_EMPTY_CTOR(LLRemoteParcelInfoProcessor);
virtual ~LLRemoteParcelInfoProcessor() {}
+public:
void addObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer);
void removeObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer);
diff --git a/indra/newview/llrootview.h b/indra/newview/llrootview.h
index 5223a314f3..2ac958e7b8 100644
--- a/indra/newview/llrootview.h
+++ b/indra/newview/llrootview.h
@@ -32,7 +32,9 @@
#include "lltooltip.h"
class LLRootViewRegistry : public LLChildRegistry<LLRootViewRegistry>
-{};
+{
+ LLSINGLETON(LLRootViewRegistry);
+};
class LLRootView : public LLView
{
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index 2b6ea57b96..7cd531bd34 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -39,10 +39,10 @@ class LLViewerTexture;
class LLSceneMonitor : public LLSingleton<LLSceneMonitor>
{
+ LLSINGLETON(LLSceneMonitor);
+ ~LLSceneMonitor();
LOG_CLASS(LLSceneMonitor);
public:
- LLSceneMonitor();
- ~LLSceneMonitor();
void freezeAvatar(LLCharacter* avatarp);
void setDebugViewerVisible(bool visible);
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index 70451194b3..c0b84abdcb 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -41,6 +41,7 @@ class LLScriptFloaterManager : public LLSingleton<LLScriptFloaterManager>
// *TODO
// LLScriptFloaterManager and LLScriptFloater will need some refactoring after we
// know how script notifications should look like.
+ LLSINGLETON_EMPTY_CTOR(LLScriptFloaterManager);
public:
typedef enum e_object_type
diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h
index 3309a8fcac..5aab5e6765 100644
--- a/indra/newview/llsearchhistory.h
+++ b/indra/newview/llsearchhistory.h
@@ -28,6 +28,7 @@
#define LL_LLSEARCHHISTORY_H
#include "llsingleton.h"
+#include "llinitdestroyclass.h"
#include "llui.h"
/**
@@ -36,6 +37,7 @@
*/
class LLSearchHistory : public LLSingleton<LLSearchHistory>, private LLDestroyClass<LLSearchHistory>
{
+ LLSINGLETON(LLSearchHistory);
friend class LLDestroyClass<LLSearchHistory>;
public:
@@ -71,7 +73,6 @@ public:
*/
void addEntry(const std::string& search_text);
- LLSearchHistory();
/**
* Class for storing data about single search request.
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index bc50e443f8..c167ecd236 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -388,6 +388,9 @@ struct LLSelectGetFirstTest;
class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr>
{
+ LLSINGLETON(LLSelectMgr);
+ ~LLSelectMgr();
+
public:
static BOOL sRectSelectInclusive; // do we need to surround an object to pick it?
static BOOL sRenderHiddenSelections; // do we show selection silhouettes that are occluded?
@@ -413,9 +416,6 @@ public:
LLCachedControl<bool> mDebugSelectMgr;
public:
- LLSelectMgr();
- ~LLSelectMgr();
-
static void cleanupGlobals();
// LLEditMenuHandler interface
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 0b5c4eb9ae..58e48480c1 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -1036,7 +1036,7 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name)
LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL);
std::string who_took_it;
LLAgentUI::buildFullname(who_took_it);
- S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string;
std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string;
LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY;
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index 5cff70f377..617bae3984 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -341,20 +341,18 @@ protected:
class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr>
{
+ LLSINGLETON(LLActiveSpeakerMgr);
LOG_CLASS(LLActiveSpeakerMgr);
-public:
- LLActiveSpeakerMgr();
protected:
virtual void updateSpeakerList();
};
class LLLocalSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLLocalSpeakerMgr>
{
- LOG_CLASS(LLLocalSpeakerMgr);
-public:
- LLLocalSpeakerMgr();
+ LLSINGLETON(LLLocalSpeakerMgr);
~LLLocalSpeakerMgr ();
+ LOG_CLASS(LLLocalSpeakerMgr);
protected:
virtual void updateSpeakerList();
};
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 78fe7863c8..5ca1d4b4a5 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -48,6 +48,8 @@
*/
class SpeakingIndicatorManager : public LLSingleton<SpeakingIndicatorManager>, LLVoiceClientParticipantObserver
{
+ LLSINGLETON(SpeakingIndicatorManager);
+ ~SpeakingIndicatorManager();
LOG_CLASS(SpeakingIndicatorManager);
public:
@@ -91,10 +93,6 @@ private:
typedef speaking_indicators_mmap_t::const_iterator indicator_const_iterator;
typedef std::pair<indicator_const_iterator, indicator_const_iterator> indicator_range_t;
- friend class LLSingleton<SpeakingIndicatorManager>;
- SpeakingIndicatorManager();
- ~SpeakingIndicatorManager();
-
/**
* Callback to determine when voice channel is changed.
*
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 4e81d78455..1bc20ccf12 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -193,6 +193,7 @@
#include "llstartuplistener.h"
#include "lltoolbarview.h"
#include "llexperiencelog.h"
+#include "llcleanup.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -2808,7 +2809,7 @@ void LLStartUp::initExperiences()
void LLStartUp::cleanupNameCache()
{
- LLAvatarNameCache::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLAvatarNameCache);
delete gCacheName;
gCacheName = NULL;
diff --git a/indra/newview/llstylemap.h b/indra/newview/llstylemap.h
index 8aa0af535c..96b3920593 100644
--- a/indra/newview/llstylemap.h
+++ b/indra/newview/llstylemap.h
@@ -39,6 +39,7 @@ typedef std::map<LLUUID, LLStyle::Params> style_map_t;
class LLStyleMap : public LLSingleton<LLStyleMap>
{
+ LLSINGLETON_EMPTY_CTOR(LLStyleMap);
public:
// Just like the [] accessor but it will add the entry in if it doesn't exist.
const LLStyle::Params &lookupAgent(const LLUUID &source);
diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h
index 0afa6dc04b..1360b3e042 100644
--- a/indra/newview/llsyntaxid.h
+++ b/indra/newview/llsyntaxid.h
@@ -38,9 +38,9 @@ class fetchKeywordsFileResponder;
class LLSyntaxIdLSL : public LLSingleton<LLSyntaxIdLSL>
{
- friend class LLSingleton<LLSyntaxIdLSL>;
+ LLSINGLETON(LLSyntaxIdLSL);
friend class fetchKeywordsFileResponder;
-
+
private:
std::set<std::string> mInflightFetches;
typedef boost::signals2::signal<void()> syntax_id_changed_signal_t;
@@ -67,7 +67,6 @@ private:
LLSD mKeywordsXml;
public:
- LLSyntaxIdLSL();
void initialize();
bool keywordFetchInProgress();
LLSD getKeywordsXML() const { return mKeywordsXml; };
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index d02293e6ff..b96a2573a1 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -32,6 +32,7 @@
#include "llscreenchannel.h"
#include "llsyswellitem.h"
#include "lltransientdockablefloater.h"
+#include "llinitdestroyclass.h"
class LLAvatarName;
class LLChiclet;
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index e9c29c39bf..db0ccdda59 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -73,6 +73,8 @@ public:
*/
class LLTeleportHistory: public LLSingleton<LLTeleportHistory>
{
+ LLSINGLETON(LLTeleportHistory);
+ ~LLTeleportHistory();
LOG_CLASS(LLTeleportHistory);
public:
@@ -81,9 +83,6 @@ public:
typedef boost::function<void()> history_callback_t;
typedef boost::signals2::signal<void()> history_signal_t;
- LLTeleportHistory();
- ~LLTeleportHistory();
-
/**
* Go back in the history.
*/
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index cf4c85a991..946ac0af1a 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -68,6 +68,8 @@ public:
*/
class LLTeleportHistoryStorage: public LLSingleton<LLTeleportHistoryStorage>
{
+ LLSINGLETON(LLTeleportHistoryStorage);
+ ~LLTeleportHistoryStorage();
LOG_CLASS(LLTeleportHistoryStorage);
public:
@@ -78,9 +80,6 @@ public:
typedef boost::function<void(S32 removed_index)> history_callback_t;
typedef boost::signals2::signal<void(S32 removed_index)> history_signal_t;
- LLTeleportHistoryStorage();
- ~LLTeleportHistoryStorage();
-
/**
* @return history items.
*/
diff --git a/indra/newview/lltextureatlasmanager.h b/indra/newview/lltextureatlasmanager.h
index b643056198..1b8df708c6 100644
--- a/indra/newview/lltextureatlasmanager.h
+++ b/indra/newview/lltextureatlasmanager.h
@@ -85,12 +85,11 @@ private:
class LLTextureAtlasManager : public LLSingleton<LLTextureAtlasManager>
{
-private:
+ LLSINGLETON(LLTextureAtlasManager);
+ ~LLTextureAtlasManager();
typedef std::list<LLPointer<LLTextureAtlas> > ll_texture_atlas_list_t ;
public:
- LLTextureAtlasManager();
- ~LLTextureAtlasManager();
LLPointer<LLTextureAtlasSlot> reserveAtlasSlot(S32 sub_texture_size, S8 ncomponents,
LLSpatialGroup* groupp, LLViewerTexture* imagep) ;
diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h
index 2ec6911de9..c108d83256 100644
--- a/indra/newview/lltoolbrush.h
+++ b/indra/newview/lltoolbrush.h
@@ -43,10 +43,10 @@ class LLViewerRegion;
class LLToolBrushLand : public LLTool, public LLEditMenuHandler, public LLSingleton<LLToolBrushLand>
{
+ LLSINGLETON(LLToolBrushLand);
typedef std::set<LLViewerRegion*> region_list_t;
public:
- LLToolBrushLand();
// x,y in window coords, 0,0 = left,bot
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp
index 2b4fa757f6..d9adec82b4 100644
--- a/indra/newview/lltoolcomp.cpp
+++ b/indra/newview/lltoolcomp.cpp
@@ -683,7 +683,7 @@ LLToolCompGun::LLToolCompGun()
: LLToolComposite(std::string("Mouselook"))
{
mGun = new LLToolGun(this);
- mGrab = new LLToolGrab(this);
+ mGrab = new LLToolGrabBase(this);
mNull = sNullTool;
setCurrentTool(mGun);
diff --git a/indra/newview/lltoolcomp.h b/indra/newview/lltoolcomp.h
index e75d3c22e2..86506f725e 100644
--- a/indra/newview/lltoolcomp.h
+++ b/indra/newview/lltoolcomp.h
@@ -103,9 +103,9 @@ public:
class LLToolCompInspect : public LLToolComposite, public LLSingleton<LLToolCompInspect>
{
-public:
- LLToolCompInspect();
+ LLSINGLETON(LLToolCompInspect);
virtual ~LLToolCompInspect();
+public:
// Overridden from LLToolComposite
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -128,9 +128,9 @@ private:
class LLToolCompTranslate : public LLToolComposite, public LLSingleton<LLToolCompTranslate>
{
-public:
- LLToolCompTranslate();
+ LLSINGLETON(LLToolCompTranslate);
virtual ~LLToolCompTranslate();
+public:
// Overridden from LLToolComposite
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -149,9 +149,9 @@ public:
class LLToolCompScale : public LLToolComposite, public LLSingleton<LLToolCompScale>
{
-public:
- LLToolCompScale();
+ LLSINGLETON(LLToolCompScale);
virtual ~LLToolCompScale();
+public:
// Overridden from LLToolComposite
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -171,9 +171,9 @@ public:
class LLToolCompRotate : public LLToolComposite, public LLSingleton<LLToolCompRotate>
{
-public:
- LLToolCompRotate();
+ LLSINGLETON(LLToolCompRotate);
virtual ~LLToolCompRotate();
+public:
// Overridden from LLToolComposite
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -194,9 +194,9 @@ protected:
class LLToolCompCreate : public LLToolComposite, public LLSingleton<LLToolCompCreate>
{
-public:
- LLToolCompCreate();
+ LLSINGLETON(LLToolCompCreate);
virtual ~LLToolCompCreate();
+public:
// Overridden from LLToolComposite
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -214,14 +214,14 @@ protected:
// LLToolCompGun
class LLToolGun;
-class LLToolGrab;
+class LLToolGrabBase;
class LLToolSelect;
class LLToolCompGun : public LLToolComposite, public LLSingleton<LLToolCompGun>
{
-public:
- LLToolCompGun();
+ LLSINGLETON(LLToolCompGun);
virtual ~LLToolCompGun();
+public:
// Overridden from LLToolComposite
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
@@ -237,7 +237,7 @@ public:
protected:
LLToolGun* mGun;
- LLToolGrab* mGrab;
+ LLToolGrabBase* mGrab;
LLTool* mNull;
};
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 63be1ef09b..766046785b 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -43,11 +43,10 @@ class LLPickInfo;
class LLToolDragAndDrop : public LLTool, public LLSingleton<LLToolDragAndDrop>
{
+ LLSINGLETON(LLToolDragAndDrop);
public:
typedef boost::signals2::signal<void ()> enddrag_signal_t;
- LLToolDragAndDrop();
-
// overridden from LLTool
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
@@ -281,8 +280,8 @@ private:
class LLDragAndDropDictionary : public LLSingleton<LLDragAndDropDictionary>,
public LLDictionary<EDragAndDropType, DragAndDropEntry>
{
+ LLSINGLETON(LLDragAndDropDictionary);
public:
- LLDragAndDropDictionary();
dragOrDrop3dImpl get(EDragAndDropType dad_type, EDropTarget drop_target);
};
};
diff --git a/indra/newview/lltoolface.h b/indra/newview/lltoolface.h
index 7eb13b0fbc..e4b8ae12b8 100644
--- a/indra/newview/lltoolface.h
+++ b/indra/newview/lltoolface.h
@@ -35,9 +35,9 @@ class LLPickInfo;
class LLToolFace
: public LLTool, public LLSingleton<LLToolFace>
{
-public:
- LLToolFace();
+ LLSINGLETON(LLToolFace);
virtual ~LLToolFace();
+public:
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltoolfocus.h b/indra/newview/lltoolfocus.h
index d23eb2cce6..cfc235b6c2 100644
--- a/indra/newview/lltoolfocus.h
+++ b/indra/newview/lltoolfocus.h
@@ -34,9 +34,9 @@ class LLPickInfo;
class LLToolCamera
: public LLTool, public LLSingleton<LLToolCamera>
{
-public:
- LLToolCamera();
+ LLSINGLETON(LLToolCamera);
virtual ~LLToolCamera();
+public:
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index c0ca4d7a9a..ed32e584a5 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -69,7 +69,7 @@ extern BOOL gDebugClicks;
//
// Methods
//
-LLToolGrab::LLToolGrab( LLToolComposite* composite )
+LLToolGrabBase::LLToolGrabBase( LLToolComposite* composite )
: LLTool( std::string("Grab"), composite ),
mMode( GRAB_INACTIVE ),
mVerticalDragging( FALSE ),
@@ -88,12 +88,12 @@ LLToolGrab::LLToolGrab( LLToolComposite* composite )
mHideBuildHighlight(FALSE)
{ }
-LLToolGrab::~LLToolGrab()
+LLToolGrabBase::~LLToolGrabBase()
{ }
// virtual
-void LLToolGrab::handleSelect()
+void LLToolGrabBase::handleSelect()
{
if(gFloaterTools)
{
@@ -106,7 +106,7 @@ void LLToolGrab::handleSelect()
gGrabBtnSpin = FALSE;
}
-void LLToolGrab::handleDeselect()
+void LLToolGrabBase::handleDeselect()
{
if( hasMouseCapture() )
{
@@ -123,7 +123,7 @@ void LLToolGrab::handleDeselect()
}
-BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask)
+BOOL LLToolGrabBase::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
@@ -133,7 +133,7 @@ BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask)
return FALSE;
}
-BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
+BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
@@ -152,7 +152,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
return TRUE;
}
-void LLToolGrab::pickCallback(const LLPickInfo& pick_info)
+void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info)
{
LLToolGrab::getInstance()->mGrabPick = pick_info;
LLViewerObject *objectp = pick_info.getObject();
@@ -182,7 +182,7 @@ void LLToolGrab::pickCallback(const LLPickInfo& pick_info)
}
}
-BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info)
+BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
{
mGrabPick = info;
LLViewerObject* objectp = mGrabPick.getObject();
@@ -315,7 +315,7 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info)
}
-void LLToolGrab::startSpin()
+void LLToolGrabBase::startSpin()
{
LLViewerObject* objectp = mGrabPick.getObject();
if (!objectp)
@@ -339,7 +339,7 @@ void LLToolGrab::startSpin()
}
-void LLToolGrab::stopSpin()
+void LLToolGrabBase::stopSpin()
{
mSpinGrabbing = FALSE;
@@ -373,7 +373,7 @@ void LLToolGrab::stopSpin()
}
-void LLToolGrab::startGrab()
+void LLToolGrabBase::startGrab()
{
// Compute grab_offset in the OBJECT's root's coordinate frame
// (sometimes root == object)
@@ -422,7 +422,7 @@ void LLToolGrab::startGrab()
}
-BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask)
+BOOL LLToolGrabBase::handleHover(S32 x, S32 y, MASK mask)
{
if (!gViewerWindow->getLeftMouseDown())
{
@@ -466,7 +466,7 @@ const F32 GRAB_SENSITIVITY_Y = 0.0075f;
// Dragging.
-void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
+void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
{
LLViewerObject* objectp = mGrabPick.getObject();
if (!objectp || !hasMouseCapture() ) return;
@@ -724,7 +724,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
}
-void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
+void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
{
LLViewerObject* objectp = mGrabPick.getObject();
if (!objectp || !hasMouseCapture() ) return;
@@ -881,7 +881,7 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
// Not dragging. Just showing affordances
-void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
+void LLToolGrabBase::handleHoverInactive(S32 x, S32 y, MASK mask)
{
// JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin
LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (inactive-not over editable object)" << LL_ENDL;
@@ -889,7 +889,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
}
// User is trying to do something that's not allowed.
-void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
+void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
{
if( GRAB_NOOBJECT == mMode )
{
@@ -930,7 +930,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
-BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask)
+BOOL LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask)
{
// call the base class to propogate info to sim
LLTool::handleMouseUp(x, y, mask);
@@ -961,7 +961,7 @@ BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask)
return TRUE;
}
-void LLToolGrab::stopEditing()
+void LLToolGrabBase::stopEditing()
{
if( hasMouseCapture() )
{
@@ -969,7 +969,7 @@ void LLToolGrab::stopEditing()
}
}
-void LLToolGrab::onMouseCaptureLost()
+void LLToolGrabBase::onMouseCaptureLost()
{
LLViewerObject* objectp = mGrabPick.getObject();
if (!objectp)
@@ -1026,7 +1026,7 @@ void LLToolGrab::onMouseCaptureLost()
}
-void LLToolGrab::stopGrab()
+void LLToolGrabBase::stopGrab()
{
LLViewerObject* objectp = mGrabPick.getObject();
if (!objectp)
@@ -1067,29 +1067,29 @@ void LLToolGrab::stopGrab()
}
-void LLToolGrab::draw()
+void LLToolGrabBase::draw()
{ }
-void LLToolGrab::render()
+void LLToolGrabBase::render()
{ }
-BOOL LLToolGrab::isEditing()
+BOOL LLToolGrabBase::isEditing()
{
return (mGrabPick.getObject().notNull());
}
-LLViewerObject* LLToolGrab::getEditingObject()
+LLViewerObject* LLToolGrabBase::getEditingObject()
{
return mGrabPick.getObject();
}
-LLVector3d LLToolGrab::getEditingPointGlobal()
+LLVector3d LLToolGrabBase::getEditingPointGlobal()
{
return getGrabPointGlobal();
}
-LLVector3d LLToolGrab::getGrabPointGlobal()
+LLVector3d LLToolGrabBase::getGrabPointGlobal()
{
switch(mMode)
{
diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h
index 5d24c8813e..02ed5c26d7 100644
--- a/indra/newview/lltoolgrab.h
+++ b/indra/newview/lltoolgrab.h
@@ -45,12 +45,17 @@ void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, co
void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick);
-
-class LLToolGrab : public LLTool, public LLSingleton<LLToolGrab>
+/**
+ * LLToolGrabBase contains most of the semantics of LLToolGrab. It's just that
+ * LLToolGrab is an LLSingleton, but we also explicitly instantiate
+ * LLToolGrabBase as part of LLToolCompGun. You can't just make an extra
+ * instance of an LLSingleton!
+ */
+class LLToolGrabBase : public LLTool
{
public:
- LLToolGrab( LLToolComposite* composite = NULL );
- ~LLToolGrab();
+ LLToolGrabBase(LLToolComposite* composite=NULL);
+ ~LLToolGrabBase();
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -140,10 +145,14 @@ private:
BOOL mClickedInMouselook;
};
+/// This is the LLSingleton instance of LLToolGrab.
+class LLToolGrab : public LLToolGrabBase, public LLSingleton<LLToolGrab>
+{
+ LLSINGLETON_EMPTY_CTOR(LLToolGrab);
+};
+
extern BOOL gGrabBtnVertical;
extern BOOL gGrabBtnSpin;
extern LLTool* gGrabTransientTool;
#endif // LL_TOOLGRAB_H
-
-
diff --git a/indra/newview/lltoolindividual.h b/indra/newview/lltoolindividual.h
index 961a6a4d93..e7c2060fba 100644
--- a/indra/newview/lltoolindividual.h
+++ b/indra/newview/lltoolindividual.h
@@ -39,9 +39,9 @@ class LLPickInfo;
class LLToolIndividual : public LLTool, public LLSingleton<LLToolIndividual>
{
-public:
- LLToolIndividual();
+ LLSINGLETON(LLToolIndividual);
virtual ~LLToolIndividual();
+public:
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h
index e5b45750d9..28465d5d2c 100644
--- a/indra/newview/lltoolmgr.h
+++ b/indra/newview/lltoolmgr.h
@@ -42,9 +42,9 @@ const MASK MASK_COPY = MASK_SHIFT;
class LLToolMgr : public LLSingleton<LLToolMgr>
{
-public:
- LLToolMgr();
+ LLSINGLETON(LLToolMgr);
~LLToolMgr();
+public:
// Must be called after gSavedSettings set up.
void initTools();
diff --git a/indra/newview/lltoolobjpicker.h b/indra/newview/lltoolobjpicker.h
index 0c37be1f92..5ad9b67e21 100644
--- a/indra/newview/lltoolobjpicker.h
+++ b/indra/newview/lltoolobjpicker.h
@@ -35,8 +35,8 @@ class LLPickInfo;
class LLToolObjPicker : public LLTool, public LLSingleton<LLToolObjPicker>
{
+ LLSINGLETON(LLToolObjPicker);
public:
- LLToolObjPicker();
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 6391e675c5..95d155a474 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -37,9 +37,9 @@ class LLObjectSelection;
class LLToolPie : public LLTool, public LLSingleton<LLToolPie>
{
+ LLSINGLETON(LLToolPie);
LOG_CLASS(LLToolPie);
public:
- LLToolPie( );
// Virtual functions inherited from LLMouseHandler
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down);
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 8a83bf31af..7575d8ad18 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -43,10 +43,10 @@ class LLPickInfo;
class LLToolPipette
: public LLTool, public LLSingleton<LLToolPipette>
{
-public:
- LLToolPipette();
+ LLSINGLETON(LLToolPipette);
virtual ~LLToolPipette();
+public:
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltoolselectland.h b/indra/newview/lltoolselectland.h
index b368a4b153..b5ba72f16d 100644
--- a/indra/newview/lltoolselectland.h
+++ b/indra/newview/lltoolselectland.h
@@ -35,10 +35,10 @@ class LLParcelSelection;
class LLToolSelectLand
: public LLTool, public LLSingleton<LLToolSelectLand>
{
-public:
- LLToolSelectLand( );
+ LLSINGLETON(LLToolSelectLand);
virtual ~LLToolSelectLand();
+public:
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index b4611c8c87..d126543f15 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -38,9 +38,7 @@ class LLTransientFloater;
*/
class LLTransientFloaterMgr: public LLSingleton<LLTransientFloaterMgr>
{
-protected:
- LLTransientFloaterMgr();
- friend class LLSingleton<LLTransientFloaterMgr>;
+ LLSINGLETON(LLTransientFloaterMgr);
public:
enum ETransientGroup
diff --git a/indra/newview/lltwitterconnect.h b/indra/newview/lltwitterconnect.h
index be481a17c1..e77048cc35 100644
--- a/indra/newview/lltwitterconnect.h
+++ b/indra/newview/lltwitterconnect.h
@@ -43,6 +43,7 @@ class LLEventPump;
*/
class LLTwitterConnect : public LLSingleton<LLTwitterConnect>
{
+ LLSINGLETON(LLTwitterConnect);
LOG_CLASS(LLTwitterConnect);
public:
enum EConnectionState
@@ -81,10 +82,7 @@ public:
void openTwitterWeb(std::string url);
private:
- friend class LLSingleton<LLTwitterConnect>;
- LLTwitterConnect();
- ~LLTwitterConnect() {};
std::string getTwitterConnectURL(const std::string& route = "", bool include_read_from_master = false);
EConnectionState mConnectionState;
diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp
index 08ba5a5f25..ad0c1734f9 100644
--- a/indra/newview/llviewerassettype.cpp
+++ b/indra/newview/llviewerassettype.cpp
@@ -48,8 +48,7 @@ struct ViewerAssetEntry : public LLDictionaryEntry
class LLViewerAssetDictionary : public LLSingleton<LLViewerAssetDictionary>,
public LLDictionary<LLViewerAssetType::EType, ViewerAssetEntry>
{
-public:
- LLViewerAssetDictionary();
+ LLSINGLETON(LLViewerAssetDictionary);
};
LLViewerAssetDictionary::LLViewerAssetDictionary()
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 94f1b09fa9..4271b20ad6 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -174,7 +174,7 @@ S32 LLResourceUploadInfo::getEconomyUploadCost()
getAssetType() == LLAssetType::AT_ANIMATION ||
getAssetType() == LLAssetType::AT_MESH)
{
- return LLGlobalEconomy::Singleton::instance().getPriceUpload();
+ return LLGlobalEconomy::instance().getPriceUpload();
}
return 0;
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index 8c302c6549..16f9b63113 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -43,6 +43,9 @@ void audio_update_wind(bool force_update = true);
class LLViewerAudio : public LLSingleton<LLViewerAudio>
{
+ LLSINGLETON(LLViewerAudio);
+ virtual ~LLViewerAudio();
+
public:
enum EFadeState
@@ -52,9 +55,6 @@ public:
FADE_OUT,
};
- LLViewerAudio();
- virtual ~LLViewerAudio();
-
void startInternetStreamWithAutoFade(std::string streamURI);
void stopInternetStreamWithAutoFade();
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index 7b2887d725..f8c973690a 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -54,6 +54,7 @@ extern template class LLViewerCamera* LLSingleton<class LLViewerCamera>::getInst
LL_ALIGN_PREFIX(16)
class LLViewerCamera : public LLCamera, public LLSingleton<LLViewerCamera>
{
+ LLSINGLETON(LLViewerCamera);
public:
void* operator new(size_t size)
{
@@ -82,8 +83,6 @@ public:
static eCameraID sCurCameraID;
- LLViewerCamera();
-
void updateCameraLocation(const LLVector3 &center,
const LLVector3 &up_direction,
const LLVector3 &point_of_interest);
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index b8ff2cc9b4..9cb2e0336a 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -103,8 +103,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
class LLViewerFolderDictionary : public LLSingleton<LLViewerFolderDictionary>,
public LLDictionary<LLFolderType::EType, ViewerFolderEntry>
{
-public:
- LLViewerFolderDictionary();
+ LLSINGLETON(LLViewerFolderDictionary);
protected:
bool initEnsemblesFromFile(); // Reads in ensemble information from foldertypes.xml
};
diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h
index a983012e2e..da50e07a43 100644
--- a/indra/newview/llviewerhelp.h
+++ b/indra/newview/llviewerhelp.h
@@ -39,7 +39,7 @@ class LLUICtrl;
class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
{
- friend class LLSingleton<LLViewerHelp>;
+ LLSINGLETON_EMPTY_CTOR(LLViewerHelp);
public:
/// display the specified help topic in the help viewer
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 434641aa25..87d8f753b8 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -94,107 +94,10 @@ void doInventoryCb(LLPointer<LLInventoryCallback> cb, LLUUID id)
///----------------------------------------------------------------------------
class LLLocalizedInventoryItemsDictionary : public LLSingleton<LLLocalizedInventoryItemsDictionary>
{
+ LLSINGLETON(LLLocalizedInventoryItemsDictionary);
public:
std::map<std::string, std::string> mInventoryItemsDict;
- LLLocalizedInventoryItemsDictionary()
- {
- mInventoryItemsDict["New Shape"] = LLTrans::getString("New Shape");
- mInventoryItemsDict["New Skin"] = LLTrans::getString("New Skin");
- mInventoryItemsDict["New Hair"] = LLTrans::getString("New Hair");
- mInventoryItemsDict["New Eyes"] = LLTrans::getString("New Eyes");
- mInventoryItemsDict["New Shirt"] = LLTrans::getString("New Shirt");
- mInventoryItemsDict["New Pants"] = LLTrans::getString("New Pants");
- mInventoryItemsDict["New Shoes"] = LLTrans::getString("New Shoes");
- mInventoryItemsDict["New Socks"] = LLTrans::getString("New Socks");
- mInventoryItemsDict["New Jacket"] = LLTrans::getString("New Jacket");
- mInventoryItemsDict["New Gloves"] = LLTrans::getString("New Gloves");
- mInventoryItemsDict["New Undershirt"] = LLTrans::getString("New Undershirt");
- mInventoryItemsDict["New Underpants"] = LLTrans::getString("New Underpants");
- mInventoryItemsDict["New Skirt"] = LLTrans::getString("New Skirt");
- mInventoryItemsDict["New Alpha"] = LLTrans::getString("New Alpha");
- mInventoryItemsDict["New Tattoo"] = LLTrans::getString("New Tattoo");
- mInventoryItemsDict["New Physics"] = LLTrans::getString("New Physics");
- mInventoryItemsDict["Invalid Wearable"] = LLTrans::getString("Invalid Wearable");
-
- mInventoryItemsDict["New Gesture"] = LLTrans::getString("New Gesture");
- mInventoryItemsDict["New Script"] = LLTrans::getString("New Script");
- mInventoryItemsDict["New Folder"] = LLTrans::getString("New Folder");
- mInventoryItemsDict["New Note"] = LLTrans::getString("New Note");
- mInventoryItemsDict["Contents"] = LLTrans::getString("Contents");
-
- mInventoryItemsDict["Gesture"] = LLTrans::getString("Gesture");
- mInventoryItemsDict["Male Gestures"] = LLTrans::getString("Male Gestures");
- mInventoryItemsDict["Female Gestures"] = LLTrans::getString("Female Gestures");
- mInventoryItemsDict["Other Gestures"] = LLTrans::getString("Other Gestures");
- mInventoryItemsDict["Speech Gestures"] = LLTrans::getString("Speech Gestures");
- mInventoryItemsDict["Common Gestures"] = LLTrans::getString("Common Gestures");
-
- //predefined gestures
-
- //male
- mInventoryItemsDict["Male - Excuse me"] = LLTrans::getString("Male - Excuse me");
- mInventoryItemsDict["Male - Get lost"] = LLTrans::getString("Male - Get lost"); // double space after Male. EXT-8319
- mInventoryItemsDict["Male - Blow kiss"] = LLTrans::getString("Male - Blow kiss");
- mInventoryItemsDict["Male - Boo"] = LLTrans::getString("Male - Boo");
- mInventoryItemsDict["Male - Bored"] = LLTrans::getString("Male - Bored");
- mInventoryItemsDict["Male - Hey"] = LLTrans::getString("Male - Hey");
- mInventoryItemsDict["Male - Laugh"] = LLTrans::getString("Male - Laugh");
- mInventoryItemsDict["Male - Repulsed"] = LLTrans::getString("Male - Repulsed");
- mInventoryItemsDict["Male - Shrug"] = LLTrans::getString("Male - Shrug");
- mInventoryItemsDict["Male - Stick tougue out"] = LLTrans::getString("Male - Stick tougue out");
- mInventoryItemsDict["Male - Wow"] = LLTrans::getString("Male - Wow");
-
- //female
- mInventoryItemsDict["Female - Chuckle"] = LLTrans::getString("Female - Chuckle");
- mInventoryItemsDict["Female - Cry"] = LLTrans::getString("Female - Cry");
- mInventoryItemsDict["Female - Embarrassed"] = LLTrans::getString("Female - Embarrassed");
- mInventoryItemsDict["Female - Excuse me"] = LLTrans::getString("Female - Excuse me");
- mInventoryItemsDict["Female - Get lost"] = LLTrans::getString("Female - Get lost"); // double space after Female. EXT-8319
- mInventoryItemsDict["Female - Blow kiss"] = LLTrans::getString("Female - Blow kiss");
- mInventoryItemsDict["Female - Boo"] = LLTrans::getString("Female - Boo");
- mInventoryItemsDict["Female - Bored"] = LLTrans::getString("Female - Bored");
- mInventoryItemsDict["Female - Hey"] = LLTrans::getString("Female - Hey");
- mInventoryItemsDict["Female - Hey baby"] = LLTrans::getString("Female - Hey baby");
- mInventoryItemsDict["Female - Laugh"] = LLTrans::getString("Female - Laugh");
- mInventoryItemsDict["Female - Looking good"] = LLTrans::getString("Female - Looking good");
- mInventoryItemsDict["Female - Over here"] = LLTrans::getString("Female - Over here");
- mInventoryItemsDict["Female - Please"] = LLTrans::getString("Female - Please");
- mInventoryItemsDict["Female - Repulsed"] = LLTrans::getString("Female - Repulsed");
- mInventoryItemsDict["Female - Shrug"] = LLTrans::getString("Female - Shrug");
- mInventoryItemsDict["Female - Stick tougue out"]= LLTrans::getString("Female - Stick tougue out");
- mInventoryItemsDict["Female - Wow"] = LLTrans::getString("Female - Wow");
-
- //common
- mInventoryItemsDict["/bow"] = LLTrans::getString("/bow");
- mInventoryItemsDict["/clap"] = LLTrans::getString("/clap");
- mInventoryItemsDict["/count"] = LLTrans::getString("/count");
- mInventoryItemsDict["/extinguish"] = LLTrans::getString("/extinguish");
- mInventoryItemsDict["/kmb"] = LLTrans::getString("/kmb");
- mInventoryItemsDict["/muscle"] = LLTrans::getString("/muscle");
- mInventoryItemsDict["/no"] = LLTrans::getString("/no");
- mInventoryItemsDict["/no!"] = LLTrans::getString("/no!");
- mInventoryItemsDict["/paper"] = LLTrans::getString("/paper");
- mInventoryItemsDict["/pointme"] = LLTrans::getString("/pointme");
- mInventoryItemsDict["/pointyou"] = LLTrans::getString("/pointyou");
- mInventoryItemsDict["/rock"] = LLTrans::getString("/rock");
- mInventoryItemsDict["/scissor"] = LLTrans::getString("/scissor");
- mInventoryItemsDict["/smoke"] = LLTrans::getString("/smoke");
- mInventoryItemsDict["/stretch"] = LLTrans::getString("/stretch");
- mInventoryItemsDict["/whistle"] = LLTrans::getString("/whistle");
- mInventoryItemsDict["/yes"] = LLTrans::getString("/yes");
- mInventoryItemsDict["/yes!"] = LLTrans::getString("/yes!");
- mInventoryItemsDict["afk"] = LLTrans::getString("afk");
- mInventoryItemsDict["dance1"] = LLTrans::getString("dance1");
- mInventoryItemsDict["dance2"] = LLTrans::getString("dance2");
- mInventoryItemsDict["dance3"] = LLTrans::getString("dance3");
- mInventoryItemsDict["dance4"] = LLTrans::getString("dance4");
- mInventoryItemsDict["dance5"] = LLTrans::getString("dance5");
- mInventoryItemsDict["dance6"] = LLTrans::getString("dance6");
- mInventoryItemsDict["dance7"] = LLTrans::getString("dance7");
- mInventoryItemsDict["dance8"] = LLTrans::getString("dance8");
- }
-
/**
* Finds passed name in dictionary and replaces it with found localized value.
*
@@ -217,6 +120,103 @@ public:
}
};
+LLLocalizedInventoryItemsDictionary::LLLocalizedInventoryItemsDictionary()
+{
+ mInventoryItemsDict["New Shape"] = LLTrans::getString("New Shape");
+ mInventoryItemsDict["New Skin"] = LLTrans::getString("New Skin");
+ mInventoryItemsDict["New Hair"] = LLTrans::getString("New Hair");
+ mInventoryItemsDict["New Eyes"] = LLTrans::getString("New Eyes");
+ mInventoryItemsDict["New Shirt"] = LLTrans::getString("New Shirt");
+ mInventoryItemsDict["New Pants"] = LLTrans::getString("New Pants");
+ mInventoryItemsDict["New Shoes"] = LLTrans::getString("New Shoes");
+ mInventoryItemsDict["New Socks"] = LLTrans::getString("New Socks");
+ mInventoryItemsDict["New Jacket"] = LLTrans::getString("New Jacket");
+ mInventoryItemsDict["New Gloves"] = LLTrans::getString("New Gloves");
+ mInventoryItemsDict["New Undershirt"] = LLTrans::getString("New Undershirt");
+ mInventoryItemsDict["New Underpants"] = LLTrans::getString("New Underpants");
+ mInventoryItemsDict["New Skirt"] = LLTrans::getString("New Skirt");
+ mInventoryItemsDict["New Alpha"] = LLTrans::getString("New Alpha");
+ mInventoryItemsDict["New Tattoo"] = LLTrans::getString("New Tattoo");
+ mInventoryItemsDict["New Physics"] = LLTrans::getString("New Physics");
+ mInventoryItemsDict["Invalid Wearable"] = LLTrans::getString("Invalid Wearable");
+
+ mInventoryItemsDict["New Gesture"] = LLTrans::getString("New Gesture");
+ mInventoryItemsDict["New Script"] = LLTrans::getString("New Script");
+ mInventoryItemsDict["New Folder"] = LLTrans::getString("New Folder");
+ mInventoryItemsDict["New Note"] = LLTrans::getString("New Note");
+ mInventoryItemsDict["Contents"] = LLTrans::getString("Contents");
+
+ mInventoryItemsDict["Gesture"] = LLTrans::getString("Gesture");
+ mInventoryItemsDict["Male Gestures"] = LLTrans::getString("Male Gestures");
+ mInventoryItemsDict["Female Gestures"] = LLTrans::getString("Female Gestures");
+ mInventoryItemsDict["Other Gestures"] = LLTrans::getString("Other Gestures");
+ mInventoryItemsDict["Speech Gestures"] = LLTrans::getString("Speech Gestures");
+ mInventoryItemsDict["Common Gestures"] = LLTrans::getString("Common Gestures");
+
+ //predefined gestures
+
+ //male
+ mInventoryItemsDict["Male - Excuse me"] = LLTrans::getString("Male - Excuse me");
+ mInventoryItemsDict["Male - Get lost"] = LLTrans::getString("Male - Get lost"); // double space after Male. EXT-8319
+ mInventoryItemsDict["Male - Blow kiss"] = LLTrans::getString("Male - Blow kiss");
+ mInventoryItemsDict["Male - Boo"] = LLTrans::getString("Male - Boo");
+ mInventoryItemsDict["Male - Bored"] = LLTrans::getString("Male - Bored");
+ mInventoryItemsDict["Male - Hey"] = LLTrans::getString("Male - Hey");
+ mInventoryItemsDict["Male - Laugh"] = LLTrans::getString("Male - Laugh");
+ mInventoryItemsDict["Male - Repulsed"] = LLTrans::getString("Male - Repulsed");
+ mInventoryItemsDict["Male - Shrug"] = LLTrans::getString("Male - Shrug");
+ mInventoryItemsDict["Male - Stick tougue out"] = LLTrans::getString("Male - Stick tougue out");
+ mInventoryItemsDict["Male - Wow"] = LLTrans::getString("Male - Wow");
+
+ //female
+ mInventoryItemsDict["Female - Chuckle"] = LLTrans::getString("Female - Chuckle");
+ mInventoryItemsDict["Female - Cry"] = LLTrans::getString("Female - Cry");
+ mInventoryItemsDict["Female - Embarrassed"] = LLTrans::getString("Female - Embarrassed");
+ mInventoryItemsDict["Female - Excuse me"] = LLTrans::getString("Female - Excuse me");
+ mInventoryItemsDict["Female - Get lost"] = LLTrans::getString("Female - Get lost"); // double space after Female. EXT-8319
+ mInventoryItemsDict["Female - Blow kiss"] = LLTrans::getString("Female - Blow kiss");
+ mInventoryItemsDict["Female - Boo"] = LLTrans::getString("Female - Boo");
+ mInventoryItemsDict["Female - Bored"] = LLTrans::getString("Female - Bored");
+ mInventoryItemsDict["Female - Hey"] = LLTrans::getString("Female - Hey");
+ mInventoryItemsDict["Female - Hey baby"] = LLTrans::getString("Female - Hey baby");
+ mInventoryItemsDict["Female - Laugh"] = LLTrans::getString("Female - Laugh");
+ mInventoryItemsDict["Female - Looking good"] = LLTrans::getString("Female - Looking good");
+ mInventoryItemsDict["Female - Over here"] = LLTrans::getString("Female - Over here");
+ mInventoryItemsDict["Female - Please"] = LLTrans::getString("Female - Please");
+ mInventoryItemsDict["Female - Repulsed"] = LLTrans::getString("Female - Repulsed");
+ mInventoryItemsDict["Female - Shrug"] = LLTrans::getString("Female - Shrug");
+ mInventoryItemsDict["Female - Stick tougue out"]= LLTrans::getString("Female - Stick tougue out");
+ mInventoryItemsDict["Female - Wow"] = LLTrans::getString("Female - Wow");
+
+ //common
+ mInventoryItemsDict["/bow"] = LLTrans::getString("/bow");
+ mInventoryItemsDict["/clap"] = LLTrans::getString("/clap");
+ mInventoryItemsDict["/count"] = LLTrans::getString("/count");
+ mInventoryItemsDict["/extinguish"] = LLTrans::getString("/extinguish");
+ mInventoryItemsDict["/kmb"] = LLTrans::getString("/kmb");
+ mInventoryItemsDict["/muscle"] = LLTrans::getString("/muscle");
+ mInventoryItemsDict["/no"] = LLTrans::getString("/no");
+ mInventoryItemsDict["/no!"] = LLTrans::getString("/no!");
+ mInventoryItemsDict["/paper"] = LLTrans::getString("/paper");
+ mInventoryItemsDict["/pointme"] = LLTrans::getString("/pointme");
+ mInventoryItemsDict["/pointyou"] = LLTrans::getString("/pointyou");
+ mInventoryItemsDict["/rock"] = LLTrans::getString("/rock");
+ mInventoryItemsDict["/scissor"] = LLTrans::getString("/scissor");
+ mInventoryItemsDict["/smoke"] = LLTrans::getString("/smoke");
+ mInventoryItemsDict["/stretch"] = LLTrans::getString("/stretch");
+ mInventoryItemsDict["/whistle"] = LLTrans::getString("/whistle");
+ mInventoryItemsDict["/yes"] = LLTrans::getString("/yes");
+ mInventoryItemsDict["/yes!"] = LLTrans::getString("/yes!");
+ mInventoryItemsDict["afk"] = LLTrans::getString("afk");
+ mInventoryItemsDict["dance1"] = LLTrans::getString("dance1");
+ mInventoryItemsDict["dance2"] = LLTrans::getString("dance2");
+ mInventoryItemsDict["dance3"] = LLTrans::getString("dance3");
+ mInventoryItemsDict["dance4"] = LLTrans::getString("dance4");
+ mInventoryItemsDict["dance5"] = LLTrans::getString("dance5");
+ mInventoryItemsDict["dance6"] = LLTrans::getString("dance6");
+ mInventoryItemsDict["dance7"] = LLTrans::getString("dance7");
+ mInventoryItemsDict["dance8"] = LLTrans::getString("dance8");
+}
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 5194679a0c..074d51b8b3 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -30,7 +30,7 @@
#include "llinventory.h"
#include "llframetimer.h"
#include "llwearable.h"
-#include "llui.h" //for LLDestroyClass
+#include "llinitdestroyclass.h" //for LLDestroyClass
#include <boost/signals2.hpp> // boost::signals2::trackable
diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h
index 80c758a5af..016b435ee8 100644
--- a/indra/newview/llviewerjoystick.h
+++ b/indra/newview/llviewerjoystick.h
@@ -45,10 +45,10 @@ typedef enum e_joystick_driver_state
class LLViewerJoystick : public LLSingleton<LLViewerJoystick>
{
-public:
- LLViewerJoystick();
+ LLSINGLETON(LLViewerJoystick);
virtual ~LLViewerJoystick();
-
+
+public:
void init(bool autoenable);
void terminate();
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 2186ed3c52..fd4315a319 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -57,6 +57,7 @@ const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
struct LLKeyboardActionRegistry
: public LLRegistrySingleton<std::string, boost::function<void (EKeystate keystate)>, LLKeyboardActionRegistry>
{
+ LLSINGLETON_EMPTY_CTOR(LLKeyboardActionRegistry);
};
LLViewerKeyboard gViewerKeyboard;
diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h
index 0b2a64868e..368c671f84 100644
--- a/indra/newview/llviewermediafocus.h
+++ b/indra/newview/llviewermediafocus.h
@@ -41,10 +41,10 @@ class LLViewerMediaFocus :
public LLFocusableElement,
public LLSingleton<LLViewerMediaFocus>
{
-public:
- LLViewerMediaFocus();
+ LLSINGLETON(LLViewerMediaFocus);
~LLViewerMediaFocus();
-
+
+public:
// Set/clear the face that has media focus (takes keyboard input and has the full set of controls)
void setFocusFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal = LLVector3::zero);
void clearFocus();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 39059fc01e..ac494b6eba 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -133,6 +133,7 @@
#include "llpathfindingmanager.h"
#include "llstartup.h"
#include "boost/unordered_map.hpp"
+#include "llcleanup.h"
using namespace LLAvatarAppearanceDefines;
@@ -8484,7 +8485,7 @@ class LLWorldPostProcess : public view_listener_t
void handle_flush_name_caches()
{
- LLAvatarNameCache::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLAvatarNameCache);
if (gCacheName) gCacheName->clear();
}
@@ -8528,7 +8529,7 @@ class LLToggleUIHints : public view_listener_t
void LLUploadCostCalculator::calculateCost()
{
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
// getPriceUpload() returns -1 if no data available yet.
if(upload_cost >= 0)
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 08d024e45c..d46bb0199b 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -84,7 +84,7 @@ class LLFileEnableUpload : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
return true;
-// bool new_value = gStatusBar && LLGlobalEconomy::Singleton::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::Singleton::getInstance()->getPriceUpload());
+// bool new_value = gStatusBar && LLGlobalEconomy::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::getInstance()->getPriceUpload());
// return new_value;
}
};
@@ -429,7 +429,7 @@ class LLFileUploadBulk : public view_listener_t
if (picker.getMultipleOpenFiles())
{
std::string filename = picker.getFirstFile();
- S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
while (!filename.empty())
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 15ecfe5dca..d81cb804e4 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6284,9 +6284,9 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data)
// do some extra stuff once we get our economy data
void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
{
- LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::Singleton::getInstance());
+ LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::getInstance());
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL;
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index d8f5c71f8d..b0eaa37541 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -210,6 +210,7 @@ void set_dad_inbox_object(const LLUUID& object_id);
class LLViewerMessage : public LLSingleton<LLViewerMessage>
{
+ LLSINGLETON_EMPTY_CTOR(LLViewerMessage);
public:
typedef boost::function<void()> teleport_started_callback_t;
typedef boost::signals2::signal<void()> teleport_started_signal_t;
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 2525886222..6937d064f9 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -95,13 +95,6 @@ LLGridManager::LLGridManager()
}
-LLGridManager::LLGridManager(const std::string& grid_file)
-{
- // initialize with an explicity grid file for testing.
- LL_DEBUGS("GridManager")<<LL_ENDL;
- initialize(grid_file);
-}
-
//
// LLGridManager - class for managing the list of known grids, and the current
// selection
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 228303d8e2..b8ff494b8b 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -58,16 +58,15 @@ protected:
**/
class LLGridManager : public LLSingleton<LLGridManager>
{
+ /// Instantiate the grid manager, load default grids, selects the default grid
+ LLSINGLETON(LLGridManager);
+ ~LLGridManager();
+
public:
/* ================================================================
* @name Initialization and Configuration
* @{
*/
- /// Instantiate the grid manager, load default grids, selects the default grid
- LLGridManager(const std::string& grid_file);
- LLGridManager();
- ~LLGridManager();
-
/// add grids from an external grids file
void initialize(const std::string& grid_file);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 7964bf1848..61dd71ab75 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -102,6 +102,7 @@
#include "llmediaentry.h"
#include "llfloaterperms.h"
#include "llvocache.h"
+#include "llcleanup.h"
//#define DEBUG_UPDATE_TYPE
@@ -530,11 +531,11 @@ void LLViewerObject::initVOClasses()
void LLViewerObject::cleanupVOClasses()
{
- LLVOGrass::cleanupClass();
- LLVOWater::cleanupClass();
- LLVOTree::cleanupClass();
- LLVOAvatar::cleanupClass();
- LLVOVolume::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLVOGrass);
+ SUBSYSTEM_CLEANUP(LLVOWater);
+ SUBSYSTEM_CLEANUP(LLVOTree);
+ SUBSYSTEM_CLEANUP(LLVOAvatar);
+ SUBSYSTEM_CLEANUP(LLVOVolume);
sObjectDataMap.clear();
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index bb6bbf3308..29219843c9 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -75,6 +75,8 @@ public:
class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
{
+ LLSINGLETON(LLViewerParcelMgr);
+ ~LLViewerParcelMgr();
public:
typedef boost::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
@@ -82,9 +84,6 @@ public:
typedef boost::function<void()> teleport_failed_callback_t;
typedef boost::signals2::signal<void()> teleport_failed_signal_t;
- LLViewerParcelMgr();
- ~LLViewerParcelMgr();
-
static void cleanupGlobals();
BOOL selectionEmpty() const;
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index 40e8e1d45d..ab1cd715ab 100644
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -135,9 +135,8 @@ protected:
class LLViewerPartSim : public LLSingleton<LLViewerPartSim>
{
+ LLSINGLETON(LLViewerPartSim);
public:
- LLViewerPartSim();
- virtual ~LLViewerPartSim(){}
void destroyClass();
typedef std::vector<LLViewerPartGroup *> group_list_t;
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 7843652589..97a060d95e 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -246,13 +246,11 @@ extern LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT
class LLViewerStats : public LLSingleton<LLViewerStats>
{
-public:
- void resetStats();
+ LLSINGLETON(LLViewerStats);
+ ~LLViewerStats();
public:
-
- LLViewerStats();
- ~LLViewerStats();
+ void resetStats();
void updateFrameStats(const F64Seconds time_diff);
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index d1744f4910..c974bea49d 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -44,11 +44,11 @@ class LLViewerObject;
class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder>
{
- public:
- LOG_CLASS(LLViewerStatsRecorder);
- LLViewerStatsRecorder();
+ LLSINGLETON(LLViewerStatsRecorder);
+ LOG_CLASS(LLViewerStatsRecorder);
~LLViewerStatsRecorder();
+ public:
void objectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size)
{
#if LL_RECORD_VIEWER_STATS
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index ba76770838..070544063a 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -237,6 +237,7 @@ private:
class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList>
{
+ LLSINGLETON_EMPTY_CTOR(LLUIImageList);
public:
// LLImageProviderInterface
/*virtual*/ LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9e68bb78e0..cce988c2fe 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -208,6 +208,7 @@
#include "llwindowlistener.h"
#include "llviewerwindowlistener.h"
#include "llpaneltopinfobar.h"
+#include "llcleanup.h"
#if LL_WINDOWS
#include <tchar.h> // For Unicode conversion methods
@@ -292,13 +293,8 @@ public:
class RecordToChatConsole : public LLSingleton<RecordToChatConsole>
{
+ LLSINGLETON(RecordToChatConsole);
public:
- RecordToChatConsole()
- : LLSingleton<RecordToChatConsole>(),
- mRecorder(new RecordToChatConsoleRecorder())
- {
- }
-
void startRecorder() { LLError::addRecorder(mRecorder); }
void stopRecorder() { LLError::removeRecorder(mRecorder); }
@@ -306,6 +302,11 @@ private:
LLError::RecorderPtr mRecorder;
};
+RecordToChatConsole::RecordToChatConsole():
+ mRecorder(new RecordToChatConsoleRecorder())
+{
+}
+
////////////////////////////////////////////////////////////////////////////
//
// LLDebugText
@@ -2176,10 +2177,7 @@ void LLViewerWindow::shutdownViews()
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
- if (LLNavigationBar::instanceExists())
- {
- delete LLNavigationBar::getInstance();
- }
+ LLNavigationBar::deleteSingleton();
LL_INFOS() << "LLNavigationBar destroyed." << LL_ENDL ;
// destroy menus after instantiating navbar above, as it needs
@@ -2215,7 +2213,7 @@ void LLViewerWindow::shutdownGL()
// Shutdown GL cleanly. Order is very important here.
//--------------------------------------------------------
LLFontGL::destroyDefaultFonts();
- LLFontManager::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLFontManager);
stop_glerror();
gSky.cleanup();
@@ -2238,7 +2236,7 @@ void LLViewerWindow::shutdownGL()
LLWorldMapView::cleanupTextures();
LLViewerTextureManager::cleanup() ;
- LLImageGL::cleanupClass() ;
+ SUBSYSTEM_CLEANUP(LLImageGL) ;
LL_INFOS() << "All textures and llimagegl images are destroyed!" << LL_ENDL ;
@@ -2251,7 +2249,7 @@ void LLViewerWindow::shutdownGL()
gGL.shutdown();
- LLVertexBuffer::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLVertexBuffer);
LL_INFOS() << "LLVertexBuffer cleaned." << LL_ENDL ;
}
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 082f5f0b1d..7aabde1b2d 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -223,6 +223,9 @@ private:
//
class LLVOCache : public LLSingleton<LLVOCache>
{
+ LLSINGLETON(LLVOCache);
+ ~LLVOCache() ;
+
private:
struct HeaderEntryInfo
{
@@ -253,13 +256,8 @@ private:
};
typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t;
typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t;
-private:
- friend class LLSingleton<LLVOCache>;
- LLVOCache() ;
public:
- ~LLVOCache() ;
-
void initCache(ELLPath location, U32 size, U32 cache_version) ;
void removeCache(ELLPath location, bool started = false) ;
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index ef15b2c79e..309c3eebdd 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -167,8 +167,8 @@ private:
class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton<LLVoiceChannelProximal>
{
+ LLSINGLETON(LLVoiceChannelProximal);
public:
- LLVoiceChannelProximal();
/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
/*virtual*/ void handleStatusChange(EStatusType status);
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index b05bcb23b7..32637dcf42 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -299,11 +299,11 @@ public:
class LLVoiceClient: public LLSingleton<LLVoiceClient>
{
+ LLSINGLETON(LLVoiceClient);
LOG_CLASS(LLVoiceClient);
-public:
- LLVoiceClient();
~LLVoiceClient();
+public:
typedef boost::signals2::signal<void(void)> micro_changed_signal_t;
micro_changed_signal_t mMicroChangedSignal;
@@ -485,6 +485,8 @@ protected:
**/
class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage>
{
+ LLSINGLETON(LLSpeakerVolumeStorage);
+ ~LLSpeakerVolumeStorage();
LOG_CLASS(LLSpeakerVolumeStorage);
public:
@@ -513,10 +515,6 @@ public:
void removeSpeakerVolume(const LLUUID& speaker_id);
private:
- friend class LLSingleton<LLSpeakerVolumeStorage>;
- LLSpeakerVolumeStorage();
- ~LLSpeakerVolumeStorage();
-
const static std::string SETTINGS_FILE_NAME;
void load();
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index f32c7c975f..81e924e438 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -56,12 +56,11 @@ class LLVivoxVoiceClient : public LLSingleton<LLVivoxVoiceClient>,
virtual public LLVoiceModuleInterface,
virtual public LLVoiceEffectInterface
{
+ LLSINGLETON(LLVivoxVoiceClient);
LOG_CLASS(LLVivoxVoiceClient);
-public:
- LLVivoxVoiceClient();
virtual ~LLVivoxVoiceClient();
-
-
+
+public:
/// @name LLVoiceModuleInterface virtual implementations
/// @see LLVoiceModuleInterface
//@{
@@ -1027,10 +1026,10 @@ protected:
class LLVivoxSecurity : public LLSingleton<LLVivoxSecurity>
{
- public:
- LLVivoxSecurity();
- virtual ~LLVivoxSecurity();
+ LLSINGLETON(LLVivoxSecurity);
+ virtual ~LLVivoxSecurity();
+ public:
std::string connectorHandle() { return mConnectorHandle; };
std::string accountHandle() { return mAccountHandle; };
diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h
index fee3ec6f20..9a6624258e 100644
--- a/indra/newview/llwatchdog.h
+++ b/indra/newview/llwatchdog.h
@@ -75,10 +75,10 @@ private:
class LLWatchdogTimerThread; // Defined in the cpp
class LLWatchdog : public LLSingleton<LLWatchdog>
{
-public:
- LLWatchdog();
+ LLSINGLETON(LLWatchdog);
~LLWatchdog();
+public:
// Add an entry to the watchdog.
void add(LLWatchdogEntry* e);
void remove(LLWatchdogEntry* e);
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
index dc7d41be2a..3f169e439a 100644
--- a/indra/newview/llwaterparammanager.h
+++ b/indra/newview/llwaterparammanager.h
@@ -214,6 +214,8 @@ struct WaterExpFloatControl
/// WindLight parameter manager class - what controls all the wind light shaders
class LLWaterParamManager : public LLSingleton<LLWaterParamManager>
{
+ LLSINGLETON(LLWaterParamManager);
+ ~LLWaterParamManager();
LOG_CLASS(LLWaterParamManager);
public:
typedef std::list<std::string> preset_name_list_t;
@@ -317,11 +319,7 @@ public:
F32 mDensitySliderValue;
private:
- friend class LLSingleton<LLWaterParamManager>;
/*virtual*/ void initSingleton();
- LLWaterParamManager();
- ~LLWaterParamManager();
-
void loadAllPresets();
void loadPresetsFromDir(const std::string& dir);
bool loadPreset(const std::string& path);
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 63e3e9dbc9..f3182ed163 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -411,8 +411,8 @@ public:
*/
class ContextMenu : public LLListContextMenu, public LLSingleton<ContextMenu>
{
+ LLSINGLETON(ContextMenu);
public:
- ContextMenu();
/*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y);
protected:
diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h
index d6f0fd09a6..782f7751e5 100644
--- a/indra/newview/llwearablelist.h
+++ b/indra/newview/llwearablelist.h
@@ -41,9 +41,9 @@
*/
class LLWearableList : public LLSingleton<LLWearableList>
{
-public:
- LLWearableList() {}
+ LLSINGLETON_EMPTY_CTOR(LLWearableList);
~LLWearableList();
+public:
void cleanup() ;
S32 getLength() const { return mList.size(); }
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index a3cbf6dc03..90882cf04a 100644
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -34,6 +34,7 @@
class LLWinDebug:
public LLSingleton<LLWinDebug>
{
+ LLSINGLETON_EMPTY_CTOR(LLWinDebug);
public:
static void init();
static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL);
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index e13aed98ed..a10102edf7 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -213,6 +213,8 @@ public:
/// WindLight parameter manager class - what controls all the wind light shaders
class LLWLParamManager : public LLSingleton<LLWLParamManager>
{
+ LLSINGLETON(LLWLParamManager);
+ ~LLWLParamManager();
LOG_CLASS(LLWLParamManager);
public:
@@ -375,11 +377,7 @@ private:
static std::string getSysDir();
static std::string getUserDir();
- friend class LLSingleton<LLWLParamManager>;
/*virtual*/ void initSingleton();
- LLWLParamManager();
- ~LLWLParamManager();
-
// list of all the parameters, listed by name
std::map<LLWLParamKey, LLWLParamSet> mParamList;
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index b2d8418064..c9ac241d5a 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -61,8 +61,8 @@ class LLVOAvatar;
class LLWorld : public LLSingleton<LLWorld>
{
+ LLSINGLETON(LLWorld);
public:
- LLWorld();
void destroyClass();
LLViewerRegion* addRegion(const U64 &region_handle, const LLHost &host);
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index 1a168e4b4d..5e5caa6a74 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -193,10 +193,10 @@ const S32 MAP_BLOCK_RES = (MAP_MAX_SIZE / MAP_BLOCK_SIZE);
class LLWorldMap : public LLSingleton<LLWorldMap>
{
-public:
- LLWorldMap();
+ LLSINGLETON(LLWorldMap);
~LLWorldMap();
+public:
// Clear all: list of region info, tiles, blocks and items
void reset();
diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h
index ac1ea1607c..65276df068 100644
--- a/indra/newview/llworldmapmessage.h
+++ b/indra/newview/llworldmapmessage.h
@@ -34,13 +34,13 @@ class LLMessageSystem;
class LLWorldMapMessage : public LLSingleton<LLWorldMapMessage>
{
+ LLSINGLETON(LLWorldMapMessage);
+ ~LLWorldMapMessage();
+
public:
typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
url_callback_t;
- LLWorldMapMessage();
- ~LLWorldMapMessage();
-
// Process incoming answers to map stuff requests
static void processMapBlockReply(LLMessageSystem*, void**);
static void processMapItemReply(LLMessageSystem*, void**);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 70989bacff..7c019dc3ea 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -114,6 +114,7 @@
#include "llpathfindingpathtool.h"
#include "llscenemonitor.h"
#include "llprogressview.h"
+#include "llcleanup.h"
#ifdef _DEBUG
// Debug indices is disabled for now for debug performance - djs 4/24/02
@@ -7385,7 +7386,7 @@ void LLPipeline::doResetVertexBuffers(bool forced)
}
LLVOPartGroup::destroyGL();
- LLVertexBuffer::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLVertexBuffer);
//delete all name pool caches
LLGLNamePool::cleanupPools();
diff --git a/indra/newview/tests/llremoteparcelrequest_test.cpp b/indra/newview/tests/llremoteparcelrequest_test.cpp
index ea5014a59c..4f7f87b6b0 100644
--- a/indra/newview/tests/llremoteparcelrequest_test.cpp
+++ b/indra/newview/tests/llremoteparcelrequest_test.cpp
@@ -34,6 +34,7 @@
#include "../llagent.h"
#include "message.h"
#include "llurlentry.h"
+#include "llpounceable.h"
namespace {
const LLUUID TEST_PARCEL_ID("11111111-1111-1111-1111-111111111111");
@@ -62,7 +63,7 @@ void LLMessageSystem::addUUID(char const *,LLUUID const &) { }
void LLMessageSystem::addUUIDFast(char const *,LLUUID const &) { }
void LLMessageSystem::nextBlockFast(char const *) { }
void LLMessageSystem::newMessage(char const *) { }
-LLMessageSystem * gMessageSystem;
+LLPounceable<LLMessageSystem*, LLPounceableStatic> gMessageSystem;
char const* const _PREHASH_AgentID = 0; // never dereferenced during this test
char const* const _PREHASH_AgentData = 0; // never dereferenced during this test
LLAgent gAgent;