diff options
author | coyot@coyot-sager-PC <coyot@coyot-sager-PC> | 2017-02-28 22:56:30 +0000 |
---|---|---|
committer | coyot@coyot-sager-PC <coyot@coyot-sager-PC> | 2017-02-28 22:56:30 +0000 |
commit | 3a3da6e4a76859f32dc36491fde2992e92ae57b5 (patch) | |
tree | f61a7417ad6ffcb8488c910cfa64f14afe979071 /indra/llinventory/lleconomy.h | |
parent | 069c938eb6ebfd77f6a415207331c66f72270e5f (diff) | |
parent | f0b256b1cb6c96aed81ee456e505247fd2169c5f (diff) |
merge
Diffstat (limited to 'indra/llinventory/lleconomy.h')
-rw-r--r-- | indra/llinventory/lleconomy.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h index 47fcf688a2..cdfde171c1 100644 --- a/indra/llinventory/lleconomy.h +++ b/indra/llinventory/lleconomy.h @@ -42,18 +42,11 @@ public: virtual void onEconomyDataChange() = 0; }; -class LLGlobalEconomy +class LLBaseEconomy { public: - LLGlobalEconomy(); - virtual ~LLGlobalEconomy(); - - // This class defines its singleton internally as a typedef instead of inheriting from - // LLSingleton like most others because the LLRegionEconomy sub-class might also - // become a singleton and this pattern will more easily disambiguate them. - typedef LLSingleton<LLGlobalEconomy> Singleton; - - void initSingleton() { } + LLBaseEconomy(); + virtual ~LLBaseEconomy(); virtual void print(); @@ -61,7 +54,7 @@ public: void removeObserver(LLEconomyObserver* observer); void notifyObservers(); - static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data); + static void processEconomyData(LLMessageSystem *msg, LLBaseEconomy* econ_data); S32 calculateTeleportCost(F32 distance) const; S32 calculateLightRent(const LLVector3& object_size) const; @@ -108,8 +101,12 @@ private: std::list<LLEconomyObserver*> mObservers; }; +class LLGlobalEconomy: public LLSingleton<LLGlobalEconomy>, public LLBaseEconomy +{ + LLSINGLETON_EMPTY_CTOR(LLGlobalEconomy); +}; -class LLRegionEconomy : public LLGlobalEconomy +class LLRegionEconomy : public LLBaseEconomy { public: LLRegionEconomy(); |