diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2009-06-04 16:24:21 +0000 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2009-06-04 16:24:21 +0000 |
commit | 087bd265534b8e3086ae1af441a9cf0eb7c684df (patch) | |
tree | a0c911515476d4ac4aac9bd984de28eb7573a478 /indra/newview/llviewerregion.cpp | |
parent | f9b9372027a41900ad572afcd7ea0d2cc5489b8f (diff) |
Merge of QAR-1383 event-system-7 into trunk.
svn merge -r 121797:121853 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge-event-system-7
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 12d9c1a992..d4ee7a7e50 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -65,6 +65,11 @@ #include "llvoclouds.h" #include "llworld.h" #include "llspatialpartition.h" +#include "stringize.h" + +#ifdef LL_WINDOWS + #pragma warning(disable:4355) +#endif // Viewer object cache version, change if object update // format changes. JC @@ -172,7 +177,18 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mCacheEntriesCount(0), mCacheID(), mEventPoll(NULL), - mReleaseNotesRequested(FALSE) + mReleaseNotesRequested(FALSE), + // I'd prefer to set the LLCapabilityListener name to match the region + // name -- it's disappointing that's not available at construction time. + // We could instead store an LLCapabilityListener*, making + // setRegionNameAndZone() replace the instance. Would that pose + // consistency problems? Can we even request a capability before calling + // setRegionNameAndZone()? + // For testability -- the new Michael Feathers paradigm -- + // LLCapabilityListener binds all the globals it expects to need at + // construction time. + mCapabilityListener(host.getString(), gMessageSystem, *this, + gAgent.getID(), gAgent.getSessionID()) { mWidth = region_width_meters; mOriginGlobal = from_region_handle(handle); @@ -223,7 +239,6 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE mObjectPartition.push_back(NULL); //PARTITION_NONE - } @@ -774,6 +789,15 @@ std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) s << "{ "; s << region.mHost; s << " mOriginGlobal = " << region.getOriginGlobal()<< "\n"; + std::string name(region.getName()), zone(region.getZoning()); + if (! name.empty()) + { + s << " mName = " << name << '\n'; + } + if (! zone.empty()) + { + s << " mZoning = " << zone << '\n'; + } s << "}"; return s; } @@ -1518,3 +1542,8 @@ void LLViewerRegion::showReleaseNotes() LLWeb::loadURL(url); mReleaseNotesRequested = FALSE; } + +std::string LLViewerRegion::getDescription() const +{ + return stringize(*this); +} |