An implementation collection gathers one or more interface implementations in a DLL. It provides necessary information to the plug-in framework to use them. The collection must export a single function that provides an array. This array maps the UID of each implementation it contains with a pointer to its factory instantiation function (NewL() in our example).
// Define the interface UIDs
const TImplementationProxy ImplementationTable[] =
{
{{0x10009DC3}, CImplementationClassOne::NewL();},
{{0x10009DC4}, CImplementationClassTwo::NewL();}
};
}
const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount);
TImplementationProxy objects.
TImplementationProxy contains a UID and a function
pointer.
aTableCount should be set to the number of items in
the array.
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
{
aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
return ImplementationTable;
}