Skip to content
Snippets Groups Projects
  1. Mar 29, 2013
  2. Feb 06, 2011
    • Nat Goodspeed's avatar
      Untested support for passing array to map-registered function. · 1a1563bb
      Nat Goodspeed authored
      An array-registered function has no param names, so you can only pass an
      array: a map would be meaningless. Initial implementation of map-registered
      functions assumed that since you CAN pass a map, you MUST pass a map. But in
      fact it's meaningful to pass an array as well -- for whatever reason -- and
      easy to implement, so there you are. Tests to follow.
      1a1563bb
  3. Feb 01, 2011
    • Nat Goodspeed's avatar
      Replace boost::ptr_map<name, etc> with std::map<name, shared_ptr>. · 6dcbbaeb
      Nat Goodspeed authored
      On Windows, unlike on Mac or Linux, boost::ptr_map<> started insisting on this
      concept of clonability. In other words, it wants to own a unique instance of
      the pointee; if you copy a value_type -- even to dereference an iterator! --
      it wants to construct a whole new instance of the mapped_type. That's nuts. A
      std::map<..., boost::shared_ptr<>> has the property I want (the mapped_type
      goes away when the entry is erased), plus it's willing to pass around the
      shared_ptr to the same instance of the mapped_type. This change also permits
      simplifying a couple awkward kludges I'd already had to make to accommodate
      ptr_map's idiosyncracies.
      6dcbbaeb
  4. Jan 31, 2011
  5. Jan 28, 2011
    • Nat Goodspeed's avatar
      Extend LLEventAPI to directly call other functions & methods. · 2bafe0dc
      Nat Goodspeed authored
      Until now, LLEventAPI has only been able to register functions specifically
      accepting(const LLSD&). Typically you add a wrapper method to your LLEventAPI
      subclass, register that, have it extract desired params from the incoming LLSD
      and then call the actual function of interest.
      With help from Alain, added new LLEventAPI::add() methods capable of
      registering functions/methods with arbitrary parameter signatures. The code
      uses boost::fusion magic to implicitly match incoming LLSD arguments to the
      function's formal parameter list, bypassing the need for an explicit helper
      method.
      New add() methods caused an ambiguity with a previous convenience overload.
      Removed that overload and fixed the one existing usage.
      Replaced LLEventDispatcher::get() with try_call() -- it's no longer easy to
      return a Callable for caller to call directly. But the one known use of that
      feature simply used it to avoid fatal LL_ERRS on unknown function-name string,
      hence the try_call() approach actually addresses that case more directly.
      Added indra/common/lleventdispatcher_test.cpp to exercise new functionality.
      2bafe0dc
  6. Oct 13, 2010
  7. Sep 21, 2010
  8. Aug 13, 2010
  9. Nov 12, 2009
    • Nat Goodspeed's avatar
      Introduce LLEventDispatcher::begin()/end() to iterate over (name, desc) pairs · 2f97829a
      Nat Goodspeed authored
      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.
      2f97829a
  10. Nov 11, 2009
    • Nat Goodspeed's avatar
      Add LLEventAPI class, formalizing the mechanism by which we wrap a C++ API · 062d0a13
      Nat Goodspeed authored
      with an event API. In addition to the LLEventPump name on which to listen,
      LLEventAPI accepts a documentation string for event API introspection.
      Give every LLEventDispatcher::add() overload a new documentation string
      parameter for event API introspection.
      Convert every existing event API to new conventions, introducing suitable
      documentation strings for the API and each of its operations.
      062d0a13
  11. Oct 09, 2009
    • Nat Goodspeed's avatar
      DEV-40930: Added ["change"] key to login-module status events. Changed · e3a4e3dc
      Nat Goodspeed authored
      existing event calls to use state as "offline" or "online", with "change"
      indicating the reason for this status event. Changed disconnect() to send
      state "offline", change "disconnect" -- instead of replaying last auth
      failure. Changed unit tests accordingly.
      Changed LLLoginInstance::handleLoginEvent() to use LLEventDispatcher to route
      calls to handleLoginFailure() et al.
      Added LLEventDispatcher::get() to allow retrieving Callable by name and
      testing for empty().
      e3a4e3dc
  12. Jun 18, 2009
Loading