Home » Developing U++ » UppHub » NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more) [message #27267] |
Fri, 09 July 2010 13:24 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
hi guys,
introducing here is the Dispatcher class, a templateable dispatcher with easy / simple / small interface (it a dispatcher, period).
template <class T>
class Dispatcher;
imagine cases where you need to pass object of information around, and have multiple destinations, maybe spread on various sheets of GUI, use Dispatcher to link them together and to forward stuff.
a class can have multiple
class MyCtrl
: EditInt
, public Dispatchable<Value>
, public Dispatchable<int>
interfaces, needs to implement a
virtual void Dispatch(const T & o, unsigned param);
while param is just forwarded, Dispatcher does not care about it.
so the Dispatcher has got the same interface and just calls the same thing on each and every registered recepient.
it can use VectorMap internally, to help you access your stuff.
there is also a
a generic dispatcher, that can accept all types of Dispatchable<T> and dispatches only to supported instances.. it makes use of Any<> functionality, a genious class in Upp, just like One<> (not used here:)
the contained test applications demonstarete the use. there is not much to add as of documentations, it's a simple small class.
maybe you like it and add it to Bazaar.
cheers
|
|
|
|
|
NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: koldo on Mon, 12 July 2010 09:02
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: koldo on Mon, 12 July 2010 11:37
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: mrjt on Mon, 12 July 2010 18:19
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: mrjt on Wed, 14 July 2010 16:38
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: mrjt on Thu, 15 July 2010 12:24
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: mrjt on Thu, 15 July 2010 15:19
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: mrjt on Thu, 15 July 2010 15:24
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: mrjt on Thu, 15 July 2010 16:15
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
|
|
|
Re: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
By: kohait00 on Thu, 05 August 2010 10:19
|
|
|
new stuff
By: kohait00 on Thu, 05 August 2010 13:39
|
Goto Forum:
Current Time: Mon Apr 29 16:07:21 CEST 2024
Total time taken to generate the page: 0.02104 seconds
|