renamed to QueryReferent, do_QueryReferent, etc.

This commit is contained in:
scc%netscape.com 1999-08-13 23:00:58 +00:00
Родитель a15b0b4b19
Коммит 944678da9d
10 изменённых файлов: 40 добавлений и 40 удалений

Просмотреть файл

@ -54,12 +54,12 @@ nsCOMPtr_base::assign_with_QueryInterface( nsISupports* rawPtr, const nsIID& iid
}
void
nsCOMPtr_base::assign_with_QueryReference( nsIWeakReference* weakPtr, const nsIID& iid, nsresult* result )
nsCOMPtr_base::assign_with_QueryReferent( nsIWeakReference* weakPtr, const nsIID& iid, nsresult* result )
{
nsresult status = NS_ERROR_NULL_POINTER;
nsISupports* rawPtr;
if ( !weakPtr || !NS_SUCCEEDED( status = weakPtr->QueryReference(iid, NSCAP_REINTERPRET_CAST(void**, &rawPtr)) ) )
if ( !weakPtr || !NS_SUCCEEDED( status = weakPtr->QueryReferent(iid, NSCAP_REINTERPRET_CAST(void**, &rawPtr)) ) )
rawPtr = 0;
if ( mRawPtr )

Просмотреть файл

@ -299,7 +299,7 @@ dont_QueryInterface( T* aRawPtr )
};
typedef nsCOMPtrQueryRequest<nsISupports> nsQueryInterface;
typedef nsCOMPtrQueryRequest<nsIWeakReference> nsQueryReference;
typedef nsCOMPtrQueryRequest<nsIWeakReference> nsQueryReferent;
#else
@ -322,10 +322,10 @@ dont_QueryInterface( T* aRawPtr )
nsresult* mErrorPtr;
};
struct nsQueryReference
struct nsQueryReferent
{
explicit
nsQueryReference( nsIWeakReference* aRawPtr, nsresult* error = 0 )
nsQueryReferent( nsIWeakReference* aRawPtr, nsresult* error = 0 )
: mRawPtr(aRawPtr),
mErrorPtr(error)
{
@ -346,10 +346,10 @@ do_QueryInterface( nsISupports* aRawPtr, nsresult* error = 0 )
}
inline
const nsQueryReference
do_QueryReference( nsIWeakReference* aRawPtr, nsresult* error = 0 )
const nsQueryReferent
do_QueryReferent( nsIWeakReference* aRawPtr, nsresult* error = 0 )
{
return nsQueryReference(aRawPtr, error);
return nsQueryReferent(aRawPtr, error);
}
@ -433,7 +433,7 @@ class nsCOMPtr_base
NS_EXPORT void assign_with_AddRef( nsISupports* );
NS_EXPORT void assign_with_QueryInterface( nsISupports*, const nsIID&, nsresult* );
NS_EXPORT void assign_with_QueryReference( nsIWeakReference*, const nsIID&, nsresult* );
NS_EXPORT void assign_with_QueryReferent( nsIWeakReference*, const nsIID&, nsresult* );
NS_EXPORT void** begin_assignment();
protected:
@ -452,7 +452,7 @@ class nsCOMPtr
private:
void assign_with_AddRef( nsISupports* );
void assign_with_QueryInterface( nsISupports*, const nsIID&, nsresult* );
void assign_with_QueryReference( nsIWeakReference*, const nsIID&, nsresult* );
void assign_with_QueryReferent( nsIWeakReference*, const nsIID&, nsresult* );
void** begin_assignment();
private:
@ -486,10 +486,10 @@ class nsCOMPtr
assign_with_QueryInterface(aSmartPtr.mRawPtr, nsCOMTypeInfo<T>::GetIID(), aSmartPtr.mErrorPtr);
}
nsCOMPtr( const nsQueryReference& aSmartPtr )
nsCOMPtr( const nsQueryReferent& aSmartPtr )
: NSCAP_CTOR_BASE(0)
{
assign_with_QueryReference(aSmartPtr.mRawPtr, nsCOMTypeInfo<T>::GetIID(), aSmartPtr.mErrorPtr);
assign_with_QueryReferent(aSmartPtr.mRawPtr, nsCOMTypeInfo<T>::GetIID(), aSmartPtr.mErrorPtr);
}
#ifdef NSCAP_FEATURE_TEST_DONTQUERY_CASES
@ -558,9 +558,9 @@ class nsCOMPtr
}
nsCOMPtr<T>&
operator=( const nsQueryReference& rhs )
operator=( const nsQueryReferent& rhs )
{
assign_with_QueryReference(rhs.mRawPtr, nsCOMTypeInfo<T>::GetIID(), rhs.mErrorPtr);
assign_with_QueryReferent(rhs.mRawPtr, nsCOMTypeInfo<T>::GetIID(), rhs.mErrorPtr);
return *this;
}
@ -669,11 +669,11 @@ nsCOMPtr<T>::assign_with_QueryInterface( nsISupports* rawPtr, const nsIID& iid,
template <class T>
void
nsCOMPtr<T>::assign_with_QueryReference( nsIWeakReference* rawPtr, const nsIID& iid, nsresult* result )
nsCOMPtr<T>::assign_with_QueryReferent( nsIWeakReference* rawPtr, const nsIID& iid, nsresult* result )
{
nsresult status = NS_ERROR_NULL_POINTER;
T* newPtr;
if ( !rawPtr || !NS_SUCCEEDED( status = rawPtr->QueryReference(iid, NSCAP_REINTERPRET_CAST(void**, &newPtr)) ) )
if ( !rawPtr || !NS_SUCCEEDED( status = rawPtr->QueryReferent(iid, NSCAP_REINTERPRET_CAST(void**, &newPtr)) ) )
newPtr = 0;
if ( mRawPtr )

Просмотреть файл

@ -5,7 +5,7 @@
[scriptable, uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf)]
interface nsIWeakReference : nsISupports
{
void QueryReference( in nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result );
void QueryReferent( in nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result );
};
[scriptable, uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf)]
@ -26,12 +26,12 @@ NS_GetWeakReference( nsISupports* , nsresult* aResult = 0);
template <class T>
inline
nsresult
CallQueryReference( nsIWeakReference* aSource, T** aDestination )
CallQueryReferent( nsIWeakReference* aSource, T** aDestination )
{
NS_PRECONDITION(aSource, "null parameter");
NS_PRECONDITION(aDestination, "null parameter");
return aSource->QueryReference(nsCOMTypeInfo<T>::GetIID(), (void**)aDestination);
return aSource->QueryReferent(nsCOMTypeInfo<T>::GetIID(), (void**)aDestination);
}
%}

Просмотреть файл

@ -81,7 +81,7 @@ nsWeakReference::QueryInterface( const nsIID& aIID, void** aInstancePtr )
}
NS_IMETHODIMP
nsWeakReference::QueryReference( const nsIID& aIID, void** aInstancePtr )
nsWeakReference::QueryReferent( const nsIID& aIID, void** aInstancePtr )
{
return mReferent ? mReferent->QueryInterface(aIID, aInstancePtr) : NS_ERROR_NULL_POINTER;
}

Просмотреть файл

@ -40,7 +40,7 @@ class NS_COM nsWeakReference : public nsIWeakReference
NS_IMETHOD QueryInterface( const nsIID&, void** );
// nsIWeakReference...
NS_IMETHOD QueryReference( const nsIID&, void** );
NS_IMETHOD QueryReferent( const nsIID&, void** );
private:

Просмотреть файл

@ -54,12 +54,12 @@ nsCOMPtr_base::assign_with_QueryInterface( nsISupports* rawPtr, const nsIID& iid
}
void
nsCOMPtr_base::assign_with_QueryReference( nsIWeakReference* weakPtr, const nsIID& iid, nsresult* result )
nsCOMPtr_base::assign_with_QueryReferent( nsIWeakReference* weakPtr, const nsIID& iid, nsresult* result )
{
nsresult status = NS_ERROR_NULL_POINTER;
nsISupports* rawPtr;
if ( !weakPtr || !NS_SUCCEEDED( status = weakPtr->QueryReference(iid, NSCAP_REINTERPRET_CAST(void**, &rawPtr)) ) )
if ( !weakPtr || !NS_SUCCEEDED( status = weakPtr->QueryReferent(iid, NSCAP_REINTERPRET_CAST(void**, &rawPtr)) ) )
rawPtr = 0;
if ( mRawPtr )

Просмотреть файл

@ -299,7 +299,7 @@ dont_QueryInterface( T* aRawPtr )
};
typedef nsCOMPtrQueryRequest<nsISupports> nsQueryInterface;
typedef nsCOMPtrQueryRequest<nsIWeakReference> nsQueryReference;
typedef nsCOMPtrQueryRequest<nsIWeakReference> nsQueryReferent;
#else
@ -322,10 +322,10 @@ dont_QueryInterface( T* aRawPtr )
nsresult* mErrorPtr;
};
struct nsQueryReference
struct nsQueryReferent
{
explicit
nsQueryReference( nsIWeakReference* aRawPtr, nsresult* error = 0 )
nsQueryReferent( nsIWeakReference* aRawPtr, nsresult* error = 0 )
: mRawPtr(aRawPtr),
mErrorPtr(error)
{
@ -346,10 +346,10 @@ do_QueryInterface( nsISupports* aRawPtr, nsresult* error = 0 )
}
inline
const nsQueryReference
do_QueryReference( nsIWeakReference* aRawPtr, nsresult* error = 0 )
const nsQueryReferent
do_QueryReferent( nsIWeakReference* aRawPtr, nsresult* error = 0 )
{
return nsQueryReference(aRawPtr, error);
return nsQueryReferent(aRawPtr, error);
}
@ -433,7 +433,7 @@ class nsCOMPtr_base
NS_EXPORT void assign_with_AddRef( nsISupports* );
NS_EXPORT void assign_with_QueryInterface( nsISupports*, const nsIID&, nsresult* );
NS_EXPORT void assign_with_QueryReference( nsIWeakReference*, const nsIID&, nsresult* );
NS_EXPORT void assign_with_QueryReferent( nsIWeakReference*, const nsIID&, nsresult* );
NS_EXPORT void** begin_assignment();
protected:
@ -452,7 +452,7 @@ class nsCOMPtr
private:
void assign_with_AddRef( nsISupports* );
void assign_with_QueryInterface( nsISupports*, const nsIID&, nsresult* );
void assign_with_QueryReference( nsIWeakReference*, const nsIID&, nsresult* );
void assign_with_QueryReferent( nsIWeakReference*, const nsIID&, nsresult* );
void** begin_assignment();
private:
@ -486,10 +486,10 @@ class nsCOMPtr
assign_with_QueryInterface(aSmartPtr.mRawPtr, nsCOMTypeInfo<T>::GetIID(), aSmartPtr.mErrorPtr);
}
nsCOMPtr( const nsQueryReference& aSmartPtr )
nsCOMPtr( const nsQueryReferent& aSmartPtr )
: NSCAP_CTOR_BASE(0)
{
assign_with_QueryReference(aSmartPtr.mRawPtr, nsCOMTypeInfo<T>::GetIID(), aSmartPtr.mErrorPtr);
assign_with_QueryReferent(aSmartPtr.mRawPtr, nsCOMTypeInfo<T>::GetIID(), aSmartPtr.mErrorPtr);
}
#ifdef NSCAP_FEATURE_TEST_DONTQUERY_CASES
@ -558,9 +558,9 @@ class nsCOMPtr
}
nsCOMPtr<T>&
operator=( const nsQueryReference& rhs )
operator=( const nsQueryReferent& rhs )
{
assign_with_QueryReference(rhs.mRawPtr, nsCOMTypeInfo<T>::GetIID(), rhs.mErrorPtr);
assign_with_QueryReferent(rhs.mRawPtr, nsCOMTypeInfo<T>::GetIID(), rhs.mErrorPtr);
return *this;
}
@ -669,11 +669,11 @@ nsCOMPtr<T>::assign_with_QueryInterface( nsISupports* rawPtr, const nsIID& iid,
template <class T>
void
nsCOMPtr<T>::assign_with_QueryReference( nsIWeakReference* rawPtr, const nsIID& iid, nsresult* result )
nsCOMPtr<T>::assign_with_QueryReferent( nsIWeakReference* rawPtr, const nsIID& iid, nsresult* result )
{
nsresult status = NS_ERROR_NULL_POINTER;
T* newPtr;
if ( !rawPtr || !NS_SUCCEEDED( status = rawPtr->QueryReference(iid, NSCAP_REINTERPRET_CAST(void**, &newPtr)) ) )
if ( !rawPtr || !NS_SUCCEEDED( status = rawPtr->QueryReferent(iid, NSCAP_REINTERPRET_CAST(void**, &newPtr)) ) )
newPtr = 0;
if ( mRawPtr )

Просмотреть файл

@ -81,7 +81,7 @@ nsWeakReference::QueryInterface( const nsIID& aIID, void** aInstancePtr )
}
NS_IMETHODIMP
nsWeakReference::QueryReference( const nsIID& aIID, void** aInstancePtr )
nsWeakReference::QueryReferent( const nsIID& aIID, void** aInstancePtr )
{
return mReferent ? mReferent->QueryInterface(aIID, aInstancePtr) : NS_ERROR_NULL_POINTER;
}

Просмотреть файл

@ -40,7 +40,7 @@ class NS_COM nsWeakReference : public nsIWeakReference
NS_IMETHOD QueryInterface( const nsIID&, void** );
// nsIWeakReference...
NS_IMETHOD QueryReference( const nsIID&, void** );
NS_IMETHOD QueryReferent( const nsIID&, void** );
private:

Просмотреть файл

@ -1739,7 +1739,7 @@ nsWebShellWindow::ShowModally(PRBool aPrepare)
if (aPrepare && NS_FAILED(appShell->PushThreadEventQueue()))
aPrepare = PR_FALSE;
parentWidget = do_QueryReference(mParentWindow);
parentWidget = do_QueryReferent(mParentWindow);
if (parentWidget)
parentWidget->Enable(PR_FALSE);
rv = ShowModal();