1
edit
Changes
→Built In Types
== Introduction ==
XPIDL stands for XP Interface Description Language. It is a specification for XPCOM which is a cross platform adapter description language. An adapter description language is used to describe an adapter which unrelated with its machine language. The description of the adapter can use specialized tools to handle automatoc automatic generation of language that is unrelated to the adapter's specifications. Typically XPIDL is frequently used to generate C++ header files and typelib information.
== Language ==
=== Interfaces ===
interface nsToolbar {
};
};
C++ get and set methods for attributes are automatically declared for attributes in the
interface. For example attribute name foo generates accessor methods GetFoo and SetFoo.
=== Compiler ===
long PRInt32
long long PRInt64
unsigned short PRUint16
unsigned long PRUint32
unsigned long long PRUint64
float float
double double char char
wchar PRUnichar
string char*
wstring PRUnichar*
native name(native_type);
Reference and pointer types can be defined by combining [ref] or [ptr] with native languages
XPIDL Code Generated C++
[ref] native nsNativeFileRef(nsFileSpec); /* starting interface: foo */
[ptr] native nsNativeFilePtr(nsFileSpec); 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);
};