Hello,
interface A(T) {
value @0 () -> (val :T);
}
is there a way to get from a capnp::Capability::Client to a
capnp::AnyPointer?
I'm struggling with some generic schema where I'm implementing "A::Server"
which holds an AnyPointer member field to store a value of some type T. An
instance of A will later be returned to a client which can then get the
value via calling the "value" method. The value to be stored in A can for
instance either be a list of Capability::Client or a just a
Capability::Client. So when I want to instantiate A I got (e.g. as a
parameter to the method) a Capability::Client not an AnyPointer.
So my problem is, that I can easily get a Capabilty::Client from an
AnyPointer via AnyPointer::getAs<some Interface>(), but I find no way to
get from a Capabilty::Client to an AnyPointer which I need in order to
create an instance of A (in my C++ code). I have the feeling that I'm
missing something very obvious.
Can somebody help?
Thank you and best regards
Michael
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/capnproto/708e920e-09bd-4343-a4bd-3c82bf6238e9%40googlegroups.com.