summaryrefslogtreecommitdiff
path: root/indra/llcommon/lleventapi.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-04-06 21:49:03 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-06-15 20:04:34 -0400
commitf134eace911eca8a231a7c1d556d7d891e8b21ca (patch)
tree0ef5a9c14f9854fe0720cbc0f518a7494e706e49 /indra/llcommon/lleventapi.h
parentb26e516d2b93a442d09f5c3b1b4d8d60139c42f5 (diff)
DRTVWR-558: LLEventAPI allows all LLEventDispatcher add() overloads.
Previously, LLEventAPI intentionally hid all but one of the many add() overloads supported by its LLEventDispatcher base class. The reason was that certain of the add() methods take an optional fourth parameter that's an LLSD::Map describing the expected parameter structure, while others take a fourth templated parameter that's an instance getter callable. This led to ambiguity, especially when passed an LLSDMap instance that's convertible to LLSD but isn't literally LLSD. At the time, it was simpler to constrain the add() methods inherited from LLEventDispatcher. But by adding new std::enable_if constraints to certain LLEventDispatcher add() methods, we've resolved the ambiguities, so LLEventAPI subclasses can now use any add() overload (as claimed on the relevant Confluence page). LLEventDispatcher comments have always loftily claimed that an instance getter callable may return either a pointer or a reference, doesn't matter. But it does when trying to pass the getter's result to boost::fusion::push_back(): a reference must be wrapped with std::ref() while a pointer cannot be. std::ref(pointer) produces errors. Introduce LLEventDispatcher::invoker:: bindable() overloads to Do The Right Thing whether passed a pointer or a reference. (cherry picked from commit 743f487c2e123171c9fc6d5b84d768f1d856d569)
Diffstat (limited to 'indra/llcommon/lleventapi.h')
-rw-r--r--indra/llcommon/lleventapi.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/indra/llcommon/lleventapi.h b/indra/llcommon/lleventapi.h
index 5991fe8fd5..ed62fa064a 100644
--- a/indra/llcommon/lleventapi.h
+++ b/indra/llcommon/lleventapi.h
@@ -65,19 +65,6 @@ public:
std::string getDesc() const { return mDesc; }
/**
- * Publish only selected add() methods from LLEventDispatcher.
- * Every LLEventAPI add() @em must have a description string.
- */
- template <typename CALLABLE>
- void add(const std::string& name,
- const std::string& desc,
- CALLABLE callable,
- const LLSD& required=LLSD())
- {
- LLEventDispatcher::add(name, desc, callable, required);
- }
-
- /**
* Instantiate a Response object in any LLEventAPI subclass method that
* wants to guarantee a reply (if requested) will be sent on exit from the
* method. The reply will be sent if request.has(@a replyKey), default