diff options
author | Adam Moss <moss@lindenlab.com> | 2009-05-04 17:43:26 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-05-04 17:43:26 +0000 |
commit | cc92525b0df952659102d2e5adcc4140fea7f371 (patch) | |
tree | ee1a9b63decb3667fb740a8c9b70bcfdbf9a054b /indra/llui/llnotifications.h | |
parent | 4bcbf3342284b19ff5fbda5a16a43a8cafb3baad (diff) |
QAR-1476 Combo-merge to trunk: Viewer 1.23 RC0 and Simulator 1.26.3
svn merge -r118927:118939
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.0-merge-2-combo-QAR-1476
this is a composite of...
svn merge -r115088:118182
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer_1-23
conflicts resolved:
C doc/contributions.txt
C indra/llaudio/audioengine.cpp
C indra/newview/CMakeLists.txt
C indra/newview/llfloaterlandholdings.cpp
C indra/newview/llpaneldirbrowser.cpp
C indra/newview/llpanelgrouplandmoney.cpp
C indra/newview/llpreviewscript.cpp
C indra/newview/llviewermenu.cpp
C indra/newview/skins/default/xui/en-us/notifications.xml
and...
svn merge -r116937:118673
svn+ssh://svn.lindenlab.com/svn/linden/branches/server/server-1.26
minor-to-trivial conflicts resolved:
C indra/llcommon/llversionserver.h
C indra/newsim/llrezdata.cpp
C indra/newsim/llstate.cpp
C indra/upgrade/schema_version/sequence/3/index_log_paypal.sql
Diffstat (limited to 'indra/llui/llnotifications.h')
-rw-r--r-- | indra/llui/llnotifications.h | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index cb5d2f6f34..bb379121cc 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -735,6 +735,13 @@ protected: LLNotificationFilter mFilter; }; +// The type of the pointers that we're going to manage in the NotificationQueue system +// Because LLNotifications is a singleton, we don't actually expect to ever +// destroy it, but if it becomes necessary to do so, the shared_ptr model +// will ensure that we don't leak resources. +class LLNotificationChannel; +typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr; + // manages a list of notifications // Note that if this is ever copied around, we might find ourselves with multiple copies // of a queue with notifications being added to different nonequivalent copies. So we @@ -742,8 +749,9 @@ protected: // // NOTE: LLNotificationChannel is self-registering. The *correct* way to create one is to // do something like: -// new LLNotificationChannel("name", "parent"...); -// You can then retrieve the channel by using the registry: +// LLNotificationChannel::buildChannel("name", "parent"...); +// This returns an LLNotificationChannelPtr, which you can store, or +// you can then retrieve the channel by using the registry: // LLNotifications::instance().getChannel("name")... // class LLNotificationChannel : @@ -754,13 +762,6 @@ class LLNotificationChannel : public: virtual ~LLNotificationChannel() {} - // Notification Channels have a filter, which determines which notifications - // will be added to this channel. - // Channel filters cannot change. - LLNotificationChannel(const std::string& name, const std::string& parent, - LLNotificationFilter filter=LLNotificationFilters::includeEverything, - LLNotificationComparator comparator=LLNotificationComparators::orderByUUID()); - typedef LLNotificationSet::iterator Iterator; std::string getName() const { return mName; } @@ -777,6 +778,21 @@ public: std::string summarize(); + // factory method for constructing these channels; since they're self-registering, + // we want to make sure that you can't use new to make them + static LLNotificationChannelPtr buildChannel(const std::string& name, const std::string& parent, + LLNotificationFilter filter=LLNotificationFilters::includeEverything, + LLNotificationComparator comparator=LLNotificationComparators::orderByUUID()); + +protected: + // Notification Channels have a filter, which determines which notifications + // will be added to this channel. + // Channel filters cannot change. + // Channels have a protected constructor so you can't make smart pointers that don't + // come from our internal reference; call NotificationChannel::build(args) + LLNotificationChannel(const std::string& name, const std::string& parent, + LLNotificationFilter filter, LLNotificationComparator comparator); + private: std::string mName; std::string mParent; @@ -785,12 +801,6 @@ private: -// The type of the pointers that we're going to manage in the NotificationQueue system -// Because LLNotifications is a singleton, we don't actually expect to ever -// destroy it, but if it becomes necessary to do so, the shared_ptr model -// will ensure that we don't leak resources. -typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr; - class LLNotifications : public LLSingleton<LLNotifications>, public LLNotificationChannelBase |