diff options
author | Monroe Williams <monroe@lindenlab.com> | 2009-10-01 02:35:53 +0000 |
---|---|---|
committer | Monroe Williams <monroe@lindenlab.com> | 2009-10-01 02:35:53 +0000 |
commit | cf9239cabcf7999a2d2393bd4bdb6fc08e27c09c (patch) | |
tree | b366355f955b7bf55197ef6caa105881da88df32 /indra/llplugin/llpluginmessage.cpp | |
parent | 8135ddac021d3ea1aba2100f862bdb58eff33d07 (diff) |
svn merge -r 134922:134973 svn+ssh://svn.lindenlab.com/svn/linden/branches/media-on-a-prim/moap-7
Merging branches/media-on-a-prim/moap-7 down to viewer-2.0.
Diffstat (limited to 'indra/llplugin/llpluginmessage.cpp')
-rw-r--r-- | indra/llplugin/llpluginmessage.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/llplugin/llpluginmessage.cpp b/indra/llplugin/llpluginmessage.cpp index bfabc5b7ca..e7412a1d8f 100644 --- a/indra/llplugin/llpluginmessage.cpp +++ b/indra/llplugin/llpluginmessage.cpp @@ -33,6 +33,7 @@ #include "llpluginmessage.h" #include "llsdserialize.h" +#include "u64.h" LLPluginMessage::LLPluginMessage() { @@ -93,6 +94,14 @@ void LLPluginMessage::setValueReal(const std::string &key, F64 value) mMessage["params"][key] = value; } +void LLPluginMessage::setValuePointer(const std::string &key, void* value) +{ + std::stringstream temp; + // iostreams should output pointer values in hex with an initial 0x by default. + temp << value; + setValue(key, temp.str()); +} + std::string LLPluginMessage::getClass(void) const { return mMessage["class"]; @@ -189,6 +198,20 @@ F64 LLPluginMessage::getValueReal(const std::string &key) const return result; } +void* LLPluginMessage::getValuePointer(const std::string &key) const +{ + void* result = NULL; + + if(mMessage["params"].has(key)) + { + std::string value = mMessage["params"][key].asString(); + + result = (void*)llstrtou64(value.c_str(), NULL, 16); + } + + return result; +} + std::string LLPluginMessage::generate(void) const { std::ostringstream result; |