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

Developer

resources

IDL module in C

Due to the lack of a namespace-like construct in C, IDL modules are mapped by prepending each enclosed identifier with the module name, with an underscore separating the name of the module and the original identifier. Modules can nest, but interface methods, structure members, and union members do not change, since their names are local to that interface, struct, or union. For example:

module foo 
{
  module bar
  {
   typedef long int32;
  };
  interface INothing
  {
   void nop();
  };
};

is mapped as:

typedef int foo_bar_int32;
typedef struct foo_INothing
{
  void (*nop)(); /* methods do not change */
} foo_INothing;