diff -r 59c7bed66dfd indra/llcommon/lleventapi.h
parent
de34ab57cb
commit
87ba85eaab
|
|
@ -41,10 +41,10 @@
|
|||
* Deriving from LLInstanceTracker lets us enumerate instances.
|
||||
*/
|
||||
class LL_COMMON_API LLEventAPI: public LLDispatchListener,
|
||||
public INSTANCE_TRACKER_KEYED(LLEventAPI, std::string)
|
||||
public LLInstanceTracker<LLEventAPI, std::string>
|
||||
{
|
||||
typedef LLDispatchListener lbase;
|
||||
typedef INSTANCE_TRACKER_KEYED(LLEventAPI, std::string) ibase;
|
||||
typedef LLInstanceTracker<LLEventAPI, std::string> ibase;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "lltimer.h"
|
||||
|
||||
// class for scheduling a function to be called at a given frequency (approximate, inprecise)
|
||||
class LL_COMMON_API LLEventTimer : public INSTANCE_TRACKER(LLEventTimer)
|
||||
class LL_COMMON_API LLEventTimer : public LLInstanceTracker<LLEventTimer>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -107,17 +107,13 @@ class NamedTimerFactory : public LLSingleton<NamedTimerFactory>
|
|||
{
|
||||
public:
|
||||
NamedTimerFactory()
|
||||
: mTimerRoot(NULL)
|
||||
{}
|
||||
|
||||
/*virtual */ void initSingleton()
|
||||
: mTimerRoot(new LLFastTimer::NamedTimer("root"))
|
||||
{
|
||||
mTimerRoot = new LLFastTimer::NamedTimer("root");
|
||||
mRootFrameState.setNamedTimer(mTimerRoot);
|
||||
mTimerRoot->setFrameState(&mRootFrameState);
|
||||
mTimerRoot->mParent = mTimerRoot;
|
||||
mTimerRoot->setCollapsed(false);
|
||||
mRootFrameState.mParent = &mRootFrameState;
|
||||
mRootFrameState.mParent = &mRootFrameState;
|
||||
}
|
||||
|
||||
~NamedTimerFactory()
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
|
||||
// stores a "named" timer instance to be reused via multiple LLFastTimer stack instances
|
||||
class LL_COMMON_API NamedTimer
|
||||
: public LLInstanceTracker<NamedTimer, InstanceTrackType_NamedTimer >
|
||||
: public LLInstanceTracker<NamedTimer>
|
||||
{
|
||||
friend class DeclareTimer;
|
||||
public:
|
||||
|
|
@ -139,7 +139,7 @@ public:
|
|||
|
||||
// used to statically declare a new named timer
|
||||
class LL_COMMON_API DeclareTimer
|
||||
: public LLInstanceTracker< DeclareTimer, InstanceTrackType_DeclareTimer >
|
||||
: public LLInstanceTracker< DeclareTimer >
|
||||
{
|
||||
friend class LLFastTimer;
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -32,26 +32,4 @@
|
|||
// external library headers
|
||||
// other Linden headers
|
||||
|
||||
static bool sInstanceTrackerData_initialized = false;
|
||||
static void* sInstanceTrackerData[ kInstanceTrackTypeCount ];
|
||||
|
||||
|
||||
void * & LLInstanceTrackerBase::getInstances(InstanceTrackType t)
|
||||
{
|
||||
// std::map::insert() is just what we want here. You attempt to insert a
|
||||
// (key, value) pair. If the specified key doesn't yet exist, it inserts
|
||||
// the pair and returns a std::pair of (iterator, true). If the specified
|
||||
// key DOES exist, insert() simply returns (iterator, false). One lookup
|
||||
// handles both cases.
|
||||
if (!sInstanceTrackerData_initialized)
|
||||
{
|
||||
for (S32 i = 0; i < (S32) kInstanceTrackTypeCount; i++)
|
||||
{
|
||||
sInstanceTrackerData[i] = NULL;
|
||||
}
|
||||
sInstanceTrackerData_initialized = true;
|
||||
}
|
||||
|
||||
return sInstanceTrackerData[t];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,33 +38,6 @@
|
|||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/iterator/indirect_iterator.hpp>
|
||||
|
||||
enum InstanceTrackType
|
||||
{
|
||||
InstanceTrackType_LLEventAPI,
|
||||
InstanceTrackType_LLEventTimer,
|
||||
InstanceTrackType_NamedTimer,
|
||||
InstanceTrackType_DeclareTimer,
|
||||
InstanceTrackType_LLLeap,
|
||||
InstanceTrackType_LLGLNamePool,
|
||||
InstanceTrackType_LLConsole,
|
||||
InstanceTrackType_LLFloater,
|
||||
InstanceTrackType_LLFloaterWebContent,
|
||||
InstanceTrackType_LLLayoutStack,
|
||||
InstanceTrackType_LLNotificationContext,
|
||||
InstanceTrackType_LLWindow,
|
||||
InstanceTrackType_LLControlGroup,
|
||||
InstanceTrackType_LLControlCache,
|
||||
InstanceTrackType_LLMediaCtrl,
|
||||
InstanceTrackType_LLNameListCtrl,
|
||||
InstanceTrackType_LLToast,
|
||||
InstanceTrackType_Keyed, // for integ tests
|
||||
InstanceTrackType_Unkeyed, // for integ tests
|
||||
kInstanceTrackTypeCount
|
||||
};
|
||||
|
||||
#define INSTANCE_TRACKER(T) LLInstanceTracker< T, InstanceTrackType_##T >
|
||||
#define INSTANCE_TRACKER_KEYED(T,K) LLInstanceTracker< T, InstanceTrackType_##T, K >
|
||||
|
||||
/**
|
||||
* Base class manages "class-static" data that must actually have singleton
|
||||
* semantics: one instance per process, rather than one instance per module as
|
||||
|
|
@ -73,22 +46,7 @@ enum InstanceTrackType
|
|||
class LL_COMMON_API LLInstanceTrackerBase
|
||||
{
|
||||
protected:
|
||||
/// Get a process-unique void* pointer slot for the specified type_info
|
||||
//static void * & getInstances(std::type_info const & info);
|
||||
static void * & getInstances(InstanceTrackType t);
|
||||
|
||||
/// Find or create a STATICDATA instance for the specified TRACKED class.
|
||||
/// STATICDATA must be default-constructible.
|
||||
template<typename STATICDATA, class TRACKED, class INST, InstanceTrackType TRACKEDTYPE>
|
||||
static STATICDATA& getStatic()
|
||||
{
|
||||
void *& instances = getInstances(TRACKEDTYPE);
|
||||
if (! instances)
|
||||
{
|
||||
instances = new STATICDATA;
|
||||
}
|
||||
return *static_cast<STATICDATA*>(instances);
|
||||
}
|
||||
|
||||
/// It's not essential to derive your STATICDATA (for use with
|
||||
/// getStatic()) from StaticBase; it's just that both known
|
||||
|
|
@ -108,16 +66,16 @@ LL_COMMON_API void assert_main_thread();
|
|||
/// The (optional) key associates a value of type KEY with a given instance of T, for quick lookup
|
||||
/// If KEY is not provided, then instances are stored in a simple set
|
||||
/// @NOTE: see explicit specialization below for default KEY==T* case
|
||||
template<typename T, enum InstanceTrackType TRACKED, typename KEY = T*>
|
||||
template<typename T, typename KEY = T*>
|
||||
class LLInstanceTracker : public LLInstanceTrackerBase
|
||||
{
|
||||
typedef LLInstanceTracker<T, TRACKED, KEY> MyT;
|
||||
typedef LLInstanceTracker<T, KEY> self_t;
|
||||
typedef typename std::map<KEY, T*> InstanceMap;
|
||||
struct StaticData: public StaticBase
|
||||
{
|
||||
InstanceMap sMap;
|
||||
};
|
||||
static StaticData& getStatic() { return LLInstanceTrackerBase::getStatic<StaticData, MyT, T, TRACKED>(); }
|
||||
static StaticData& getStatic() { static StaticData sData; return sData;}
|
||||
static InstanceMap& getMap_()
|
||||
{
|
||||
// assert_main_thread(); fwiw this class is not thread safe, and it used by multiple threads. Bad things happen.
|
||||
|
|
@ -263,16 +221,16 @@ private:
|
|||
|
||||
/// explicit specialization for default case where KEY is T*
|
||||
/// use a simple std::set<T*>
|
||||
template<typename T, enum InstanceTrackType TRACKED>
|
||||
class LLInstanceTracker<T, TRACKED, T*> : public LLInstanceTrackerBase
|
||||
template<typename T>
|
||||
class LLInstanceTracker<T, T*> : public LLInstanceTrackerBase
|
||||
{
|
||||
typedef LLInstanceTracker<T, TRACKED, T*> MyT;
|
||||
typedef LLInstanceTracker<T, T*> self_t;
|
||||
typedef typename std::set<T*> InstanceSet;
|
||||
struct StaticData: public StaticBase
|
||||
{
|
||||
InstanceSet sSet;
|
||||
};
|
||||
static StaticData& getStatic() { return LLInstanceTrackerBase::getStatic<StaticData, MyT, T, TRACKED>(); }
|
||||
static StaticData& getStatic() { static StaticData sData; return sData; }
|
||||
static InstanceSet& getSet_() { return getStatic().sSet; }
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
* LLLeap* pointer should be validated before use by
|
||||
* LLLeap::getInstance(LLLeap*) (see LLInstanceTracker).
|
||||
*/
|
||||
class LL_COMMON_API LLLeap: public INSTANCE_TRACKER(LLLeap)
|
||||
class LL_COMMON_API LLLeap: public LLInstanceTracker<LLLeap>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -28,5 +28,4 @@
|
|||
|
||||
#include "llsingleton.h"
|
||||
|
||||
std::map<std::string, void *> * LLSingletonRegistry::sSingletonMap = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,38 +30,6 @@
|
|||
#include <typeinfo>
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
/// @brief A global registry of all singletons to prevent duplicate allocations
|
||||
/// across shared library boundaries
|
||||
class LL_COMMON_API LLSingletonRegistry {
|
||||
private:
|
||||
typedef std::map<std::string, void *> TypeMap;
|
||||
static TypeMap * sSingletonMap;
|
||||
|
||||
static void checkInit()
|
||||
{
|
||||
if(sSingletonMap == NULL)
|
||||
{
|
||||
sSingletonMap = new TypeMap();
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
template<typename T> static void * & get()
|
||||
{
|
||||
std::string name(typeid(T).name());
|
||||
|
||||
checkInit();
|
||||
|
||||
// the first entry of the pair returned by insert will be either the existing
|
||||
// iterator matching our key, or the newly inserted NULL initialized entry
|
||||
// see "Insert element" in http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html
|
||||
TypeMap::iterator result =
|
||||
sSingletonMap->insert(std::make_pair(name, (void*)NULL)).first;
|
||||
|
||||
return result->second;
|
||||
}
|
||||
};
|
||||
|
||||
// LLSingleton implements the getInstance() method part of the Singleton
|
||||
// pattern. It can't make the derived class constructors protected, though, so
|
||||
// you have to do that yourself.
|
||||
|
|
@ -93,7 +61,6 @@ class LLSingleton : private boost::noncopyable
|
|||
private:
|
||||
typedef enum e_init_state
|
||||
{
|
||||
UNINITIALIZED,
|
||||
CONSTRUCTING,
|
||||
INITIALIZING,
|
||||
INITIALIZED,
|
||||
|
|
@ -109,8 +76,11 @@ private:
|
|||
|
||||
SingletonInstanceData()
|
||||
: mSingletonInstance(NULL),
|
||||
mInitState(UNINITIALIZED)
|
||||
{}
|
||||
mInitState(CONSTRUCTING)
|
||||
{
|
||||
mSingletonInstance = new DERIVED_TYPE();
|
||||
mInitState = INITIALIZING;
|
||||
}
|
||||
|
||||
~SingletonInstanceData()
|
||||
{
|
||||
|
|
@ -159,16 +129,8 @@ public:
|
|||
static SingletonInstanceData& getData()
|
||||
{
|
||||
// this is static to cache the lookup results
|
||||
static void * & registry = LLSingletonRegistry::get<DERIVED_TYPE>();
|
||||
|
||||
// *TODO - look into making this threadsafe
|
||||
if(NULL == registry)
|
||||
{
|
||||
static SingletonInstanceData data;
|
||||
registry = &data;
|
||||
}
|
||||
|
||||
return *static_cast<SingletonInstanceData *>(registry);
|
||||
static SingletonInstanceData sData;
|
||||
return sData;
|
||||
}
|
||||
|
||||
static DERIVED_TYPE* getInstance()
|
||||
|
|
@ -185,13 +147,11 @@ public:
|
|||
llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl;
|
||||
}
|
||||
|
||||
if (!data.mSingletonInstance)
|
||||
if (data.mInitState == INITIALIZING)
|
||||
{
|
||||
data.mInitState = CONSTRUCTING;
|
||||
data.mSingletonInstance = new DERIVED_TYPE();
|
||||
data.mInitState = INITIALIZING;
|
||||
// go ahead and flag ourselves as initialized so we can be reentrant during initialization
|
||||
data.mInitState = INITIALIZED;
|
||||
data.mSingletonInstance->initSingleton();
|
||||
data.mInitState = INITIALIZED;
|
||||
}
|
||||
|
||||
return data.mSingletonInstance;
|
||||
|
|
|
|||
|
|
@ -48,16 +48,16 @@ struct Badness: public std::runtime_error
|
|||
Badness(const std::string& what): std::runtime_error(what) {}
|
||||
};
|
||||
|
||||
struct Keyed: public INSTANCE_TRACKER_KEYED(Keyed, std::string)
|
||||
struct Keyed: public LLInstanceTracker<Keyed, std::string>
|
||||
{
|
||||
Keyed(const std::string& name):
|
||||
INSTANCE_TRACKER_KEYED(Keyed, std::string)(name),
|
||||
LLInstanceTracker<Keyed, std::string>(name),
|
||||
mName(name)
|
||||
{}
|
||||
std::string mName;
|
||||
};
|
||||
|
||||
struct Unkeyed: public INSTANCE_TRACKER(Unkeyed)
|
||||
struct Unkeyed: public LLInstanceTracker<Unkeyed>
|
||||
{
|
||||
Unkeyed(const std::string& thrw="")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -350,10 +350,10 @@ public:
|
|||
Generic pooling scheme for things which use GL names (used for occlusion queries and vertex buffer objects).
|
||||
Prevents thrashing of GL name caches by avoiding calls to glGenFoo and glDeleteFoo.
|
||||
*/
|
||||
class LLGLNamePool : public INSTANCE_TRACKER(LLGLNamePool)
|
||||
class LLGLNamePool : public LLInstanceTracker<LLGLNamePool>
|
||||
{
|
||||
public:
|
||||
typedef INSTANCE_TRACKER(LLGLNamePool) tracker_t;
|
||||
typedef LLInstanceTracker<LLGLNamePool> tracker_t;
|
||||
|
||||
struct NameEntry
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
class LLSD;
|
||||
|
||||
class LLConsole : public LLFixedBuffer, public LLUICtrl, public INSTANCE_TRACKER(LLConsole)
|
||||
class LLConsole : public LLFixedBuffer, public LLUICtrl, public LLInstanceTracker<LLConsole>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ struct LLCoordFloater : LLCoord<LL_COORD_FLOATER>
|
|||
|
||||
};
|
||||
|
||||
class LLFloater : public LLPanel, public INSTANCE_TRACKER(LLFloater)
|
||||
class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
|
||||
{
|
||||
friend class LLFloaterView;
|
||||
friend class LLFloaterReg;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
class LLLayoutPanel;
|
||||
|
||||
|
||||
class LLLayoutStack : public LLView, public INSTANCE_TRACKER(LLLayoutStack)
|
||||
class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -1121,7 +1121,7 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt
|
|||
|
||||
LLNotificationChannel::LLNotificationChannel(const Params& p)
|
||||
: LLNotificationChannelBase(p.filter()),
|
||||
LLInstanceTracker<LLNotificationChannel, InstanceTrackType_LLNotificationContext, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()),
|
||||
LLInstanceTracker<LLNotificationChannel, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()),
|
||||
mName(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString())
|
||||
{
|
||||
BOOST_FOREACH(const std::string& source, p.sources)
|
||||
|
|
@ -1135,7 +1135,7 @@ LLNotificationChannel::LLNotificationChannel(const std::string& name,
|
|||
const std::string& parent,
|
||||
LLNotificationFilter filter)
|
||||
: LLNotificationChannelBase(filter),
|
||||
LLInstanceTracker<LLNotificationChannel, InstanceTrackType_LLNotificationContext, std::string>(name),
|
||||
LLInstanceTracker<LLNotificationChannel, std::string>(name),
|
||||
mName(name)
|
||||
{
|
||||
// bind to notification broadcast
|
||||
|
|
|
|||
|
|
@ -135,11 +135,11 @@ typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegi
|
|||
|
||||
// context data that can be looked up via a notification's payload by the display logic
|
||||
// derive from this class to implement specific contexts
|
||||
class LLNotificationContext : public INSTANCE_TRACKER_KEYED(LLNotificationContext, LLUUID)
|
||||
class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
|
||||
{
|
||||
public:
|
||||
|
||||
LLNotificationContext() : INSTANCE_TRACKER_KEYED(LLNotificationContext, LLUUID)(LLUUID::generateNewID())
|
||||
LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -815,7 +815,7 @@ typedef boost::intrusive_ptr<LLNotificationChannel> LLNotificationChannelPtr;
|
|||
class LLNotificationChannel :
|
||||
boost::noncopyable,
|
||||
public LLNotificationChannelBase,
|
||||
public LLInstanceTracker<LLNotificationChannel, InstanceTrackType_LLNotificationContext, std::string>
|
||||
public LLInstanceTracker<LLNotificationChannel, std::string>
|
||||
{
|
||||
LOG_CLASS(LLNotificationChannel);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class LLWindowCallbacks;
|
|||
|
||||
// Refer to llwindow_test in test/common/llwindow for usage example
|
||||
|
||||
class LLWindow : public INSTANCE_TRACKER(LLWindow)
|
||||
class LLWindow : public LLInstanceTracker<LLWindow>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
|
|||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name)
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name)
|
||||
{
|
||||
mTypeString[TYPE_U32] = "U32";
|
||||
mTypeString[TYPE_S32] = "S32";
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ T convert_from_llsd(const LLSD& sd, eControlType type, const std::string& contro
|
|||
}
|
||||
|
||||
//const U32 STRING_CACHE_SIZE = 10000;
|
||||
class LLControlGroup : public INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)
|
||||
class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string>
|
||||
{
|
||||
LOG_CLASS(LLControlGroup);
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ public:
|
|||
~LLControlGroup();
|
||||
void cleanup();
|
||||
|
||||
typedef INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)::instance_iter instance_iter;
|
||||
typedef LLInstanceTracker<LLControlGroup, std::string>::instance_iter instance_iter;
|
||||
|
||||
LLControlVariablePtr getControl(const std::string& name);
|
||||
|
||||
|
|
@ -306,7 +306,7 @@ public:
|
|||
//! without have to manually create and bind a listener to a local
|
||||
//! object.
|
||||
template <class T>
|
||||
class LLControlCache : public LLRefCount, public LLInstanceTracker<LLControlCache<T>, InstanceTrackType_LLControlCache, std::string>
|
||||
class LLControlCache : public LLRefCount, public LLInstanceTracker<LLControlCache<T>, std::string>
|
||||
{
|
||||
public:
|
||||
// This constructor will declare a control if it doesn't exist in the contol group
|
||||
|
|
@ -314,7 +314,7 @@ public:
|
|||
const std::string& name,
|
||||
const T& default_value,
|
||||
const std::string& comment)
|
||||
: LLInstanceTracker<LLControlCache<T>, InstanceTrackType_LLControlCache, std::string >(name)
|
||||
: LLInstanceTracker<LLControlCache<T>, std::string >(name)
|
||||
{
|
||||
if(!group.controlExists(name))
|
||||
{
|
||||
|
|
@ -329,7 +329,7 @@ public:
|
|||
|
||||
LLControlCache(LLControlGroup& group,
|
||||
const std::string& name)
|
||||
: LLInstanceTracker<LLControlCache<T>, InstanceTrackType_LLControlCache, std::string >(name)
|
||||
: LLInstanceTracker<LLControlCache<T>, std::string >(name)
|
||||
{
|
||||
if(!group.controlExists(name))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ LLFloaterWebContent::_Params::_Params()
|
|||
|
||||
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
|
||||
: LLFloater( params ),
|
||||
INSTANCE_TRACKER_KEYED(LLFloaterWebContent, std::string)(params.id()),
|
||||
LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
|
||||
mWebBrowser(NULL),
|
||||
mAddressCombo(NULL),
|
||||
mSecureLockIcon(NULL),
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ class LLIconCtrl;
|
|||
class LLFloaterWebContent :
|
||||
public LLFloater,
|
||||
public LLViewerMediaObserver,
|
||||
public INSTANCE_TRACKER_KEYED(LLFloaterWebContent, std::string)
|
||||
public LLInstanceTracker<LLFloaterWebContent, std::string>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef INSTANCE_TRACKER_KEYED(LLFloaterWebContent, std::string) instance_tracker_t;
|
||||
typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
|
||||
LOG_CLASS(LLFloaterWebContent);
|
||||
|
||||
struct _Params : public LLInitParam::Block<_Params>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ LLMediaCtrl::Params::Params()
|
|||
|
||||
LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
||||
LLPanel( p ),
|
||||
INSTANCE_TRACKER_KEYED(LLMediaCtrl, LLUUID)(LLUUID::generateNewID()),
|
||||
LLInstanceTracker<LLMediaCtrl, LLUUID>(LLUUID::generateNewID()),
|
||||
mTextureDepthBytes( 4 ),
|
||||
mBorder(NULL),
|
||||
mFrequentUpdates( true ),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class LLMediaCtrl :
|
|||
public LLPanel,
|
||||
public LLViewerMediaObserver,
|
||||
public LLViewerMediaEventEmitter,
|
||||
public INSTANCE_TRACKER_KEYED(LLMediaCtrl, LLUUID)
|
||||
public LLInstanceTracker<LLMediaCtrl, LLUUID>
|
||||
{
|
||||
LOG_CLASS(LLMediaCtrl);
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ private:
|
|||
|
||||
|
||||
class LLNameListCtrl
|
||||
: public LLScrollListCtrl, public INSTANCE_TRACKER(LLNameListCtrl)
|
||||
: public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -572,7 +572,8 @@ S32 LLToast::notifyParent(const LLSD& info)
|
|||
//static
|
||||
void LLToast::updateClass()
|
||||
{
|
||||
for (INSTANCE_TRACKER(LLToast)::instance_iter iter = INSTANCE_TRACKER(LLToast)::beginInstances(); iter != INSTANCE_TRACKER(LLToast)::endInstances(); )
|
||||
for (LLInstanceTracker<LLToast>::instance_iter iter = LLInstanceTracker<LLToast>::beginInstances();
|
||||
iter != LLInstanceTracker<LLToast>::endInstances(); )
|
||||
{
|
||||
LLToast& toast = *iter++;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ private :
|
|||
* Represents toast pop-up.
|
||||
* This is a parent view for all toast panels.
|
||||
*/
|
||||
class LLToast : public LLModalDialog, public INSTANCE_TRACKER(LLToast)
|
||||
class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
|
||||
{
|
||||
friend class LLToastLifeTimer;
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal
|
|||
|
||||
LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images)
|
||||
: LLToastPanel(notification),
|
||||
LLInstanceTracker<LLToastNotifyPanel, InstanceTrackType_LLToast, LLUUID>(notification->getID())
|
||||
LLInstanceTracker<LLToastNotifyPanel, LLUUID>(notification->getID())
|
||||
{
|
||||
init(rect, show_images);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class LLNotificationForm;
|
|||
* @deprecated this class will be removed after all toast panel types are
|
||||
* implemented in separate classes.
|
||||
*/
|
||||
class LLToastNotifyPanel: public LLToastPanel, public LLInstanceTracker<LLToastNotifyPanel, InstanceTrackType_LLToast, LLUUID>
|
||||
class LLToastNotifyPanel: public LLToastPanel, public LLInstanceTracker<LLToastNotifyPanel, LLUUID>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
class LLObjectSelection;
|
||||
|
||||
class LLToolSelect : public LLTool, public LLSingleton<LLToolSelect>
|
||||
class LLToolSelect : public LLTool
|
||||
{
|
||||
public:
|
||||
LLToolSelect( LLToolComposite* composite );
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
static U32 test_preferred_maturity = SIM_ACCESS_PG;
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name)
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid_name)
|
|||
LLControlGroup gSavedSettings("Global");
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name) :
|
||||
INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name){}
|
||||
LLInstanceTracker<LLControlGroup, std::string>(name){}
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
void LLControlGroup::setBOOL(const std::string& name, BOOL val) {}
|
||||
BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ void LLAgent::sendReliableMessage(void) { }
|
|||
LLUUID gAgentSessionID;
|
||||
LLUUID gAgentID;
|
||||
LLUIColor::LLUIColor(void) { }
|
||||
LLControlGroup::LLControlGroup(std::string const & name) : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) { }
|
||||
LLControlGroup::LLControlGroup(std::string const & name) : LLInstanceTracker<LLControlGroup, std::string>(name) { }
|
||||
LLControlGroup::~LLControlGroup(void) { }
|
||||
void LLUrlEntryParcel::processParcelInfo(const LLUrlEntryParcel::LLParcelData& parcel_data) { }
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
// Mock objects for the dependencies of the code we're testing
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
BOOL LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ extern bool _cert_hostname_wildcard_match(const std::string& hostname, const std
|
|||
std::string gFirstName;
|
||||
std::string gLastName;
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
BOOL LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
// Mock objects for the dependencies of the code we're testing
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
BOOL LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ LLControlGroup gSavedSettings("test");
|
|||
std::string LLUI::getLanguage() { return "en"; }
|
||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) { return "dummy"; }
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name) : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
|
||||
LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) {}
|
||||
std::string LLControlGroup::getString(const std::string& name) { return "dummy"; }
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ static std::string gOS;
|
|||
// Mock objects for the dependencies of the code we're testing
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
BOOL LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
// Mock objects for the dependencies of the code we're testing
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name)
|
||||
: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
|
||||
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
|
||||
LLControlGroup::~LLControlGroup() {}
|
||||
BOOL LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void LLGLTexture::setBoostLevel(S32 ) { }
|
|||
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, FTType, BOOL, LLGLTexture::EBoostLevel, S8,
|
||||
LLGLint, LLGLenum, const LLUUID& ) { return NULL; }
|
||||
|
||||
LLControlGroup::LLControlGroup(const std::string& name) : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) { }
|
||||
LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) { }
|
||||
LLControlGroup::~LLControlGroup() { }
|
||||
std::string LLControlGroup::getString(const std::string& ) { return std::string("test_url"); }
|
||||
LLControlGroup gSavedSettings("test_settings");
|
||||
|
|
|
|||
Loading…
Reference in New Issue