Hi,
first of all, thanks to Kenton for all the great work and the new release candidate (which works for me, but I am just playing around currently so my coverage is below that of the various tests and that's why I didn't answer your request).
My question is regarding RPC interface implementation with inheritance in C++:
Given some legacy classes A and B like
class A {
// some A features
};
class B : public A {
// some B features on top of A
}
I'd like to make the A and B classes' features available via Capnproto RPC interfaces like
interface AA {
aFunc @0 () -> (foo :Foo);
}
interface BB(AA) {
bFunc @0 () -> (bar :Bar);
}
Implementation of the AA interface is straightforward like
class A : public AA::Server {
// aFunc impl. for access of A's functionality
}
but when I now want to implement class B to inherit both from A (and thus indirectly from AA) and from BB::Server, I get a conflict on the ::Server classes' dispatch methods which I have no Idea how to resolve.
class B : public A, public BB::Server {
// bFunc impl. for access of B's additional functionality
This in turn also raises a related question: How to implement multiple RPC interfaces on one legacy class (say I want to have different capabilities for different operations of my class' data)? My original hope was that I can just inherit from all the interfaces. But since they are no "pure virtual" interfaces, again the dispatch methods will collide.
Still hoping I just didn't get it - thanks in advance for any advice!
Regards
Henning