From 2f97829aab549a4d65daead298361a0c25399be2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 12 Nov 2009 20:11:53 -0500 Subject: Introduce LLEventDispatcher::begin()/end() to iterate over (name, desc) pairs for all registered operations. (untested) Introduce LLEventDispatcher::getMetadata(name) query so you can discover, for a given named operation, its query string and required parameters. (untested) Introduce LLEventDispatcher::add() convenience methods allowing you to omit description strings. Fix LLLoginInstance (which uses a non-LLEventAPI LLEventDispatcher) back to description-less add() calls. However, filter LLEventDispatcher::add() methods inherited by LLEventAPI so that an LLEventAPI subclass *must* provide a description string. --- indra/llcommon/lleventapi.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/llcommon/lleventapi.h') diff --git a/indra/llcommon/lleventapi.h b/indra/llcommon/lleventapi.h index fef12988cb..b45be6802b 100644 --- a/indra/llcommon/lleventapi.h +++ b/indra/llcommon/lleventapi.h @@ -46,6 +46,19 @@ public: /// Get the documentation string std::string getDesc() const { return mDesc; } + /** + * Publish only selected add() methods from LLEventDispatcher. + * Every LLEventAPI add() @em must have a description string. + */ + template + void add(const std::string& name, + const std::string& desc, + CALLABLE callable, + const LLSD& required=LLSD()) + { + LLEventDispatcher::add(name, desc, callable, required); + } + private: std::string mDesc; }; -- cgit v1.2.3