SetDestructor
git-svn-id: svn://10.0.0.236/trunk@22403 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -18,12 +18,17 @@
|
||||
|
||||
#include "nsGenericFactory.h"
|
||||
|
||||
nsGenericFactory::nsGenericFactory(ConstructorProcPtr constructor) : mConstructor(constructor)
|
||||
nsGenericFactory::nsGenericFactory(ConstructorProcPtr constructor)
|
||||
: mConstructor(constructor), mDestructor(NULL)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsGenericFactory::~nsGenericFactory() {}
|
||||
nsGenericFactory::~nsGenericFactory()
|
||||
{
|
||||
if (mDestructor != NULL)
|
||||
(*mDestructor) ();
|
||||
}
|
||||
|
||||
NS_METHOD nsGenericFactory::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
@@ -59,6 +64,12 @@ NS_IMETHODIMP nsGenericFactory::SetConstructor(ConstructorProcPtr constructor)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsGenericFactory::SetDestructor(DestructorProcPtr destructor)
|
||||
{
|
||||
mDestructor = destructor;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsGenericFactory::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr)
|
||||
{
|
||||
// sorry, aggregation not spoken here.
|
||||
|
||||
Reference in New Issue
Block a user