Changes

Jump to: navigation, search

Researching XPIDL and IDL Technologies

287 bytes added, 17:11, 5 October 2006
Native Types
native name(native_type);
Reference and pointer types can be defined by combining [ref] or [ptr] with native languages
  XPIDL code Code Generated C++  [ref] native nsNativeFileRef(nsFileSpec); /* starting interface: foo */ [ptr] native nsNativeFilePtr(nsFileSpec);  interface foo { void openByRef(in nsNativeFileRef aFileSpecRef); void openByPtr(in nsNativeFilePtr aFileSpecPtr); };     /* starting interface: foo */ class foo { public:  /* void openByRef (in nsNativeFileRef aFileSpecRef); */ NS_IMETHOD OpenByRef(nsFileSpec & aFileSpecRef) = 0;  /* void openByPtr (in nsNativeFilePtr aFileSpecPtr); */ NS_IMETHOD OpenByPtr(nsFileSpec * aFileSpecPtr) = 0; }; interface foo { void openByRef(in nsNativeFileRef aFileSpecRef); void openByPtr(in nsNativeFilePtr aFileSpecPtr); };
Native types in your code can be a good way to migrate existing interfaces. However, using
native types in a method will mean that method is not scriptable.
 
=== Include Terminology ===
#include
1
edit

Navigation menu