|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
l |
A
simple C++ module:
|
|
|
//
declare nsSampleConstructor:
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSample)
|
|
|
//
declare list of classes
|
|
static
const nsModuleComponentInfo components[] =
|
|
{
|
|
{ “The sample class”, // user-readable description
|
sample_cid, // 128-bit UUID
|
|
“@mozilla.org/sample;1”, // Contract
ID
|
|
nsSampleConstructor, // pointer to
function
|
|
},
|
|
// list more objects here..
|
|
};
|
|
|
//
declare NSGetModule()
|
|
NS_IMPL_NSGETMODULE(“sample
module”, components)
|
|