Feature #2186

method-based LocalServer interface

Added by R. Haschke about 9 years ago. Updated about 9 years ago.

Status:ResolvedStart date:02/24/2015
Priority:NormalDue 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

Revision 75715f7a
Added by J. Wienke about 9 years ago

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

Revision 07133ef8
Added by J. Wienke about 9 years ago

Mention new callback implementations in C++

refs #2186

History

#1 Updated by J. Wienke about 9 years ago

  • Status changed from New to In Progress
  • Target version set to rsb-0.12

#2 Updated by J. Wienke about 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF