summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcallstack.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-02-03 08:59:25 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-02-03 08:59:25 -0500
commitef02c9ea694a1f0ddc830a66f23555c6316afdc7 (patch)
tree4ff8417ce189bf6b2f285822daa36f4cc2f4689d /indra/llcommon/llcallstack.h
parent19de8f3993da24d906a886b58125c4954ce4c79e (diff)
SL-315 - context strings, comments, debugging. joint_test temporarily disabled.
Diffstat (limited to 'indra/llcommon/llcallstack.h')
-rw-r--r--indra/llcommon/llcallstack.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h
index 44a572838e..7196907980 100644
--- a/indra/llcommon/llcallstack.h
+++ b/indra/llcommon/llcallstack.h
@@ -24,6 +24,8 @@
* $/LicenseInfo$
*/
+#include <map>
+
class LLCallStackImpl;
class LLCallStack
@@ -38,3 +40,39 @@ private:
};
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack);
+
+class LLContextStrings
+{
+public:
+ LLContextStrings();
+ static void addContextString(const std::string& str);
+ static void removeContextString(const std::string& str);
+ static void output(std::ostream& os);
+ static LLContextStrings* getThreadLocalInstance();
+private:
+ std::map<std::string,S32> m_contextStrings;
+};
+
+class LLScopedContextString
+{
+public:
+ LLScopedContextString(const std::string& str):
+ m_str(str)
+ {
+ LLContextStrings::addContextString(m_str);
+ }
+ ~LLScopedContextString()
+ {
+ LLContextStrings::removeContextString(m_str);
+ }
+private:
+ std::string m_str;
+};
+
+// This doesn't really have any state, just acts as class to hook the
+// ostream override to.
+struct LLContextStatus
+{
+};
+
+LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);