Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

IDL local interfaces in C++

Interfaces that are not remotable can be declared local. By definition, remoting code cannot be generated for such interfaces. However, header files can and will be generated for local interfaces. Because local interfaces are not remotable, it is not legal for a non-local interface to inherit from a local one.

Local interfaces allow the use of the native keyword, to designate that a given type has meaning in the target language. Types declared as native are passed through untouched in C++. For example, int is not an IDL type–it only has meaning when mapped to C++.

// 'int' is not an IDL type; it only has meaning when mapped to C++
native int; 
local interface IFoo
{
    void process(in int z);
};

is mapped as:

class IFoo
{
public:
    virtual void process(int z) = 0;
};