Moved |do_CreateInstance()| from here to nsComponentManagerUtils.h. See bugs #17364, #17448. r={travis, dp}

This commit is contained in:
scc%netscape.com 1999-11-10 00:14:10 +00:00
parent e7f8118b97
commit 6234eff725

View File

@ -30,51 +30,3 @@ interface nsIFactory : nsISupports {
void LockFactory(in PRBool lock);
};
%{C++
#ifndef nsCOMPtr_h__
#include "nsCOMPtr.h"
#endif
#ifndef class_nsCreateInstance__
#define class_nsCreateInstance__
// Have to protect this section with a #define because it gets built from
// two different IDL files (nsIComponentManager.idl #includes this file)
class NS_EXPORT nsCreateInstance : public nsCOMPtr_helper
{
public:
nsCreateInstance( nsIFactory* aFactory, nsISupports* aOuter, nsresult* error )
: mFactory(aFactory),
mOuter(aOuter),
mErrorPtr(error)
{
// nothing else to do here
}
virtual nsresult operator()( const nsIID& aIID, void** answer ) const;
private:
nsIFactory* mFactory;
nsISupports* mOuter;
nsresult* mErrorPtr;
};
inline
const nsCreateInstance
do_CreateInstance( nsIFactory* aFactory, nsresult* error = 0 )
{
return nsCreateInstance(aFactory, 0, error);
}
inline
const nsCreateInstance
do_CreateInstance( nsIFactory* aFactory, nsISupports* aOuter, nsresult* error = 0 )
{
return nsCreateInstance(aFactory, aOuter, error);
}
#endif // !defined(class_nsCreateInstance__)
%}