Expand description
An IDL interface, as the C++ language binding DDS-RPC 1.0 §7.11.1
specifies.
adapter::interface reads the interface; this writes the C++. The
split is the one every column in this crate keeps — one reading of
the IDL clause, one spelling per language — and here it earns itself
twice over, because §7.11.2.3 makes the Java function-call binding
the same entities as C++ and emit::interface_java therefore walks
the same Service values.
§What comes out
Per interface I, in the namespace its module names:
- the topic types of §7.5.1.1.4-7 —
I_<op>_In,I_<op>_Out,I_Call,I_Return,I_Request,I_Reply— whose names come fromadapter::interfaceand whose shape iscrates/rpc/src/codegen.rs’s; ISupport, so §7.11.1.1.2 rule 3’sSupportTypetypedef names something that exists;IandIAsync, the two abstract classes of rules 1-7;IRequesterandIReplier, the typed aliases of §7.11.1.1.1 over the genericdds::rpc::Requester/dds::rpc::Repliertemplates;IClientandIService, the function-call entities of §7.11.1.5.
§Reserved words
§7.11.1.1.2 rule 8 prefixes an identifier that is a C++ reserved word
with cxx_. This binding does that for every identifier it introduces:
the interface, its operations, its parameters. The type declarations
come from adapter::cpp, which gives a struct, an enumeration, an
exception or a module named by a reserved word the same prefix
(adapter::cpp::cxx_name); this binding refers to them by that spelling.
§What this does not do
It does not implement dds::rpc. §7.11.1.4 lists some twenty class
templates — Requester, Replier, future, LoanedSamples and the
rest — which are the C++ PSM’s runtime and not a per-service
artefact. What is generated here uses them: IClient’s operations
call through a Requester, IService::dispatch answers through a
Replier, and the topic types have the codec the two ask for
(mod codec, mod calls).
Functions§
- cpp_
interface_ items - The C++ declarations every interface of
astproduces. - cpp_
interface_ items_ with cpp_interface_itemsfor the given service mapping.- cpp_
service_ items - The C++ declarations one interface produces.
- cxx_
escape - DDS-RPC 1.0 §7.11.1.1.2 rule 8.
- remote_
member_ types - The types the operations of the remote interfaces of
astcarry (the parameters, the return values and the members of the exceptions they raise), each once: the types whose codecs a binding of the interfaces calls, in any language.