add FunctionPointerWithContext.h and CallChainOfFunctionPointersWithCont...

...ext.h

These will help me chain BLE callbacks with take some context.
Does this need to be in the official api? There are lots of other libraries
on that combine linked lists and function pointers. Maybe the
FunctionPointer class needs to be extended to take an optional parameter.
Some of this code just looks like a copy from that class.

https://mbed.org/users/sam_grove/code/FP/
https://mbed.org/users/Blaze513/code/GenericFunctionHandler/
https://mbed.org/users/AjK/code/FPointer/

https://mbed.org/users/sam_grove/code/LinkedList/
https://mbed.org/users/lucoby/code/list/

Just saying maybe we should put some milage on API code before pushing
directly to the official API directory

Also - whats the reason for changing the type such getNext and get_function?

The API just seems confusing.

On Tue, Sep 16, 2014 at 7:29 AM, Bogdan Marinescu <notifications@github.com>
wrote:

> In libraries/mbed/api/CallChainOfFunctionPointersWithContext.h:
>
> > + *     }
> > + * };
> > + *
> > + * int main() {
> > + *     Test test;
> > + *
> > + *     chain.add(second);
> > + *     chain.add_front(first);
> > + *     chain.add(&test, &Test::f);
> > + *     chain.call();
> > + * }
> > + * @endcode
> > + */
> > +
> > +template <typename ContextType>
> > +class CallChainOfFunctionPointersWithContext {
>
> Could we please have a shorter name ? :)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mbedmicro/mbed/pull/493/files#r17597535>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "mbed-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mbed-devel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>