diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-11-13 12:22:40 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-11-13 12:22:40 -0500 |
commit | 8dda668fc43a1e13904f2d28f5d69b06e5985b9f (patch) | |
tree | 57a2ebec68315e9d40828841cd19f844ae3299ce /indra/llcommon/lleventdispatcher.cpp | |
parent | 230f28080cfcb6785c248340aaa42cfb29703b23 (diff) | |
parent | 2f97829aab549a4d65daead298361a0c25399be2 (diff) |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/llcommon/lleventdispatcher.cpp')
-rw-r--r-- | indra/llcommon/lleventdispatcher.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llcommon/lleventdispatcher.cpp b/indra/llcommon/lleventdispatcher.cpp index 017bf3a521..5fa6059718 100644 --- a/indra/llcommon/lleventdispatcher.cpp +++ b/indra/llcommon/lleventdispatcher.cpp @@ -121,6 +121,20 @@ LLEventDispatcher::Callable LLEventDispatcher::get(const std::string& name) cons return found->second.mFunc; } +LLSD LLEventDispatcher::getMetadata(const std::string& name) const +{ + DispatchMap::const_iterator found = mDispatch.find(name); + if (found == mDispatch.end()) + { + return LLSD(); + } + LLSD meta; + meta["name"] = name; + meta["desc"] = found->second.mDesc; + meta["required"] = found->second.mRequired; + return meta; +} + LLDispatchListener::LLDispatchListener(const std::string& pumpname, const std::string& key): LLEventDispatcher(pumpname, key), mPump(pumpname, true), // allow tweaking for uniqueness |