In UPF, the interface between plugins (and any object or types used by them) must be well-defined and descriped in IDL (IDL is CORBA's interface definition language). All interfaces must be derived from upf::IObject (defined in <upf/IObject.idl>)
.
Once you have IDL description of your interfaces, you have to generate language bindings for programming language(s) you use. UPF comes with several IDL-related utitities, the one we are interested in now is called upf-idl2any
. Here's an example of how to use it:
$ upf-idl2any -oMyInterface.h -Lcxx MyInterface.idl
This command will generate C++ header from IDL definition. -o
specifies output file and -L
is used to choose output language. A simple wrapper around upf-idl2any
for C++ is called upf-idl2cxx
and the only difference is that it doesn't require -Lcxx
:
$ upf-idl2cxx -oMyInterface.h MyInterface.idl