DRTVWR-564: Allow LLLeapListener to report LazyEventAPIs too.
One important factor in the design of LazyEventAPI was the desire to allow LLLeapListener to query metadata for an LLEventAPI even if it hasn't yet been instantiated by LazyEventAPI. That's why LazyEventAPI requires the same metadata required by a classic LLEventAPI. Instead of just publicly exposing its data members, give LazyEventAPI a query API mimicking LLEventAPI / LLEventDispatcher. Protect data members and private methods. Adapt lazyeventapi_test.cpp accordingly. Extend LLLeapListener::getAPIs() and getAPI() to look through LazyEventAPIBase instances after first checking existing LLEventAPI instances. Because the query API for LazyEventAPIBase mimics LLEventAPI's, extract getAPI()'s actual metadata reporting to a new internal template function reportAPI(). While we're touching LLLeapListener, we no longer need BOOST_FOREACH().
Showing
- indra/llcommon/lazyeventapi.cpp 19 additions, 0 deletionsindra/llcommon/lazyeventapi.cpp
- indra/llcommon/lazyeventapi.h 30 additions, 6 deletionsindra/llcommon/lazyeventapi.h
- indra/llcommon/llleaplistener.cpp 53 additions, 17 deletionsindra/llcommon/llleaplistener.cpp
- indra/llcommon/tests/lazyeventapi_test.cpp 18 additions, 6 deletionsindra/llcommon/tests/lazyeventapi_test.cpp
Please register or sign in to comment