Feature #2186
method-based LocalServer interface
Status: | Resolved | Start date: | 02/24/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | R. Haschke | % Done: | 100% | |
Category: | C++ | |||
Target version: | rsb-0.12 |
Description
Registering methods to a LocalServer requires to instantiate a Callback class.
This is a rather clumsy use pattern, as normally one extends an existing server class with RSB connectivity.
If one wants to provide several methods this is not easily possible right now, because every method needs its own Callback class.
It would be much easier if one could simpy register a method (with boost::bind).
Associated revisions
A Callback implementations to bind existing functions
Adds callback implementations to use existing function via boost
functions and boost bind as targets for local server calls.
- src/rsb/patterns/Localserver.h: add Callback implementations using
boost functions as targets. - examples/server/server.cpp: show how to use new callbacks adapters
- examples/server/client.cpp: call new methods
fixes #2186
Mention new callback implementations in C++
refs #2186
History
#1 Updated by J. Wienke about 8 years ago
- Status changed from New to In Progress
- Target version set to rsb-0.12
#2 Updated by J. Wienke about 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset rsb-cpp|75715f7ad14a8e994d53ab475227c45708bc67f9.