<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcommon/lleventapi.h, branch 26.1.1</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=26.1.1</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=26.1.1'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2024-04-29T04:56:09Z</updated>
<entry>
<title>#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed</title>
<updated>2024-04-29T04:56:09Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-04-29T04:43:28Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=1b68f71348ecf3983b76b40d7940da8377f049b7'/>
<id>urn:sha1:1b68f71348ecf3983b76b40d7940da8377f049b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-564: We don't need LLEventAPI to befriend LazyEventAPI.</title>
<updated>2022-06-21T18:46:59Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-06-21T18:46:59Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=490de3ab6e3a2b9dd8668c2093e265f36324f82e'/>
<id>urn:sha1:490de3ab6e3a2b9dd8668c2093e265f36324f82e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-564: WIP: Add LazyEventAPI and tests. Tests don't yet pass.</title>
<updated>2022-06-18T15:57:10Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-06-18T15:57:10Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=af4fbc1f8a99a3c5370cb6db45435e67f9ce92d2'/>
<id>urn:sha1:af4fbc1f8a99a3c5370cb6db45435e67f9ce92d2</id>
<content type='text'>
LazyEventAPI is a registrar that implicitly instantiates some particular
LLEventAPI subclass on demand: that is, when LLEventPumps::obtain() tries to
find an LLEventPump by the registered name.

This leverages the new LLEventPumps::registerPumpFactory() machinery. Fix
registerPumpFactory() to adapt the passed PumpFactory to accept TypeFactory
parameters (two of which it ignores). Supplement it with
unregisterPumpFactory() to support LazyEventAPI instances with lifespans
shorter than the process -- which may be mostly test programs, but still a
hole worth closing. Similarly, add unregisterTypeFactory().

A LazyEventAPI subclass takes over responsibility for specifying the
LLEventAPI's name, desc, field, plus whatever add() calls will be needed to
register the LLEventAPI's operations. This is so we can (later) enhance
LLLeapListener to consult LazyEventAPI instances for not-yet-instantiated
LLEventAPI metadata, as well as enumerating existing LLEventAPI instances.

The trickiest part of this is capturing calls to the various
LLEventDispatcher::add() overloads in such a way that, when the LLEventAPI
subclass is eventually instantiated, we can replay them in the new instance.

LLEventAPI acquires a new protected constructor specifically for use by a
subclass registered by a companion LazyEventAPI. It accepts a const reference
to LazyEventAPIParams, intended to be opaque to the LLEventAPI subclass; the
subclass must declare a constructor that accepts and forwards the parameter
block to the new LLEventAPI constructor. The implementation delegates to the
existing LLEventAPI constructor, plus it runs deferred add() calls.

LLDispatchListener now derives from LLEventStream instead of containing it as
a data member. The reason is that if LLEventPumps::obtain() implicitly
instantiates it, LLEventPumps's destructor will try to destroy it by deleting
the LLEventPump*. If the LLEventPump returned by the factory function is a
data member of an outer class, that won't work so well. But if
LLDispatchListener (and by implication, LLEventAPI and any subclass) is
derived from LLEventPump, then the virtual destructor will Do The Right Thing.

Change LLDispatchListener to *not* allow tweaking the LLEventPump name. Since
the overwhelming use case for LLDispatchListener is LLEventAPI, accepting but
silently renaming an LLEventAPI subclass would ensure nobody could reach it.

Change LLEventDispatcher's use of std::enable_if to control the set of add()
overloads available for the intended use cases. Apparently this formulation is
just as functional at the method declaration point, while avoiding the need to
restate the whole enable_if expression at the method definition point.

Add lazyeventapi_test.cpp to exercise.
</content>
</entry>
<entry>
<title>DRTVWR-558: LLEventAPI allows all LLEventDispatcher add() overloads.</title>
<updated>2022-06-16T00:04:34Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-04-07T01:49:03Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=f134eace911eca8a231a7c1d556d7d891e8b21ca'/>
<id>urn:sha1:f134eace911eca8a231a7c1d556d7d891e8b21ca</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>remove execute permission from many files that should not have it</title>
<updated>2015-11-10T14:48:56Z</updated>
<author>
<name>Oz Linden</name>
<email>oz@lindenlab.com</email>
</author>
<published>2015-11-10T14:48:56Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=c8726aba303bcf1207b730a344536e25491420bc'/>
<id>urn:sha1:c8726aba303bcf1207b730a344536e25491420bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge downstream code and viewer-beta</title>
<updated>2013-05-09T21:10:45Z</updated>
<author>
<name>simon</name>
<email>none@none</email>
</author>
<published>2013-05-09T21:10:45Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=ee2fce8790b69d61845cc32fbf7cdce8a33b0dab'/>
<id>urn:sha1:ee2fce8790b69d61845cc32fbf7cdce8a33b0dab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ï»¿diff -r 59c7bed66dfd indra/llcommon/lleventapi.h</title>
<updated>2013-04-24T16:35:38Z</updated>
<author>
<name>simon</name>
<email>none@none</email>
</author>
<published>2013-04-24T16:35:38Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=87ba85eaabbfd5fd7ad8ca8136f4783b1d932264'/>
<id>urn:sha1:87ba85eaabbfd5fd7ad8ca8136f4783b1d932264</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update Mac and Windows breakpad builds to latest</title>
<updated>2013-03-29T14:50:08Z</updated>
<author>
<name>Graham Madarasz</name>
<email>graham@lindenlab.com</email>
</author>
<published>2013-03-29T14:50:08Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=bf6182daa8b4d7cea79310547f71d7a3155e17b0'/>
<id>urn:sha1:bf6182daa8b4d7cea79310547f71d7a3155e17b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Modify LLInstanceTracker to avoid using a map of strings to find a map of foo to find some pointers</title>
<updated>2013-02-28T23:35:14Z</updated>
<author>
<name>Graham Madarasz (Graham)</name>
<email>graham@lindenlab.com</email>
</author>
<published>2013-02-28T23:35:14Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=93eaccae6fe6e8442a3c6e5a2d40a408aa44df77'/>
<id>urn:sha1:93eaccae6fe6e8442a3c6e5a2d40a408aa44df77</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add getInfo to LLView to get state information about ui elements.</title>
<updated>2011-09-08T14:46:04Z</updated>
<author>
<name>Andrew A. de Laix</name>
<email>alain@lindenlab.com</email>
</author>
<published>2011-09-08T14:46:04Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=2d19a2002501d44ce18080b6f26ceaf2dbf796e9'/>
<id>urn:sha1:2d19a2002501d44ce18080b6f26ceaf2dbf796e9</id>
<content type='text'>
</content>
</entry>
</feed>
