Lines Matching defs:nsCOMPtr
47 http://www.mozilla.org/projects/xpcom/nsCOMPtr.html
50 nsCOMPtr
115 // optimizations that break nsCOMPtr.
139 In fact, if you want |nsCOMPtr| to participate in the standard logging facility, you
158 // the |nsCOMPtr|.
177 nsDerivedSafe < nsCOMPtr
178 already_AddRefed < nsCOMPtr
179 nsCOMPtr < nsGetterAddRefs
191 on a |nsCOMPtr|. DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE.
193 See |nsCOMPtr::operator->|, |nsCOMPtr::operator*|, et al.
195 This type should be a nested class inside |nsCOMPtr<T>|.
213 // you may not call |operator=()| through a dereferenced |nsCOMPtr|, because you'd get the wrong one
252 ...cooperates with |nsCOMPtr| to allow you to assign in a pointer _without_
258 This type should be a nested class inside |nsCOMPtr<T>|.
261 avoid adding specialized machinery to |nsCOMPtr| ... but this is the simplest
319 that are more convenient to call, and more efficient to use with |nsCOMPtr|s.
339 avoid adding specialized machinery in |nsCOMPtr|, But |do_QueryInterface|
414 ...factors implementation for all template versions of |nsCOMPtr|.
416 This should really be an |nsCOMPtr<nsISupports>|, but this wouldn't work
468 class nsCOMPtr
505 ~nsCOMPtr()
519 nsCOMPtr<T> query_result( do_QueryInterface(mRawPtr) );
532 nsCOMPtr()
539 nsCOMPtr( const nsCOMPtr<T>& aSmartPtr )
548 nsCOMPtr( T* aRawPtr )
558 nsCOMPtr( const already_AddRefed<T>& aSmartPtr )
566 nsCOMPtr( const nsQueryInterface qi )
574 nsCOMPtr( const nsQueryInterfaceWithError& qi )
582 nsCOMPtr( const nsCOMPtr_helper& helper )
595 nsCOMPtr<T>&
596 operator=( const nsCOMPtr<T>& rhs )
603 nsCOMPtr<T>&
612 nsCOMPtr<T>&
621 nsCOMPtr<T>&
629 nsCOMPtr<T>&
637 nsCOMPtr<T>&
648 swap( nsCOMPtr<T>& rhs )
698 ...makes an |nsCOMPtr| act like its underlying raw pointer type (except against |AddRef()|, |Release()|,
700 that makes an |nsCOMPtr| substitutable for a raw pointer.
711 NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->().");
718 nsCOMPtr<T>*
723 return NS_CONST_CAST(nsCOMPtr<T>*, this);
728 nsCOMPtr<T>*
736 const nsCOMPtr<T>*
750 NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*().");
774 Specializing |nsCOMPtr| for |nsISupports| allows us to use |nsCOMPtr<nsISupports>| the
776 to any valid [XP]COM interface. Otherwise, an |nsCOMPtr<nsISupports>| would only be able
783 class nsCOMPtr<nsISupports>
791 nsCOMPtr()
798 nsCOMPtr( const nsCOMPtr<nsISupports>& aSmartPtr )
807 nsCOMPtr( nsISupports* aRawPtr )
816 nsCOMPtr( const already_AddRefed<nsISupports>& aSmartPtr )
823 nsCOMPtr( const nsQueryInterface qi )
831 nsCOMPtr( const nsQueryInterfaceWithError& qi )
839 nsCOMPtr( const nsCOMPtr_helper& helper )
851 nsCOMPtr<nsISupports>&
852 operator=( const nsCOMPtr<nsISupports>& rhs )
859 nsCOMPtr<nsISupports>&
867 nsCOMPtr<nsISupports>&
875 nsCOMPtr<nsISupports>&
883 nsCOMPtr<nsISupports>&
891 nsCOMPtr<nsISupports>&
901 swap( nsCOMPtr<nsISupports>& rhs )
941 ...makes an |nsCOMPtr| act like its underlying raw pointer type (except against |AddRef()|, |Release()|,
943 that makes an |nsCOMPtr| substitutable for a raw pointer.
954 NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->().");
961 nsCOMPtr<nsISupports>*
966 return NS_CONST_CAST(nsCOMPtr<nsISupports>*, this);
971 nsCOMPtr<nsISupports>*
979 const nsCOMPtr<nsISupports>*
994 NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*().");
1018 nsCOMPtr<T>::assign_with_AddRef( nsISupports* rawPtr )
1027 nsCOMPtr<T>::assign_from_qi( const nsQueryInterface qi, const nsIID& aIID )
1037 nsCOMPtr<T>::assign_from_qi_with_error( const nsQueryInterfaceWithError& qi, const nsIID& aIID )
1047 nsCOMPtr<T>::assign_from_helper( const nsCOMPtr_helper& helper, const nsIID& aIID )
1057 nsCOMPtr<T>::begin_assignment()
1070 nsCOMPtr<T>*
1071 address_of( const nsCOMPtr<T>& aPtr )
1080 nsCOMPtr<T>*
1081 address_of( nsCOMPtr<T>& aPtr )
1088 const nsCOMPtr<T>*
1089 address_of( const nsCOMPtr<T>& aPtr )
1104 nsCOMPtr<IFoo> fooP;
1109 When initialized with a |nsCOMPtr|, as in the example above, it returns
1113 This type should be a nested class inside |nsCOMPtr<T>|.
1118 nsGetterAddRefs( nsCOMPtr<T>& aSmartPtr )
1159 nsCOMPtr<T>& mTargetSmartPtr;
1168 nsGetterAddRefs( nsCOMPtr<nsISupports>& aSmartPtr )
1198 nsCOMPtr<nsISupports>& mTargetSmartPtr;
1205 getter_AddRefs( nsCOMPtr<T>& aSmartPtr )
1207 Used around a |nsCOMPtr| when
1216 // Comparing two |nsCOMPtr|s
1221 operator==( const nsCOMPtr<T>& lhs, const nsCOMPtr<U>& rhs )
1230 operator!=( const nsCOMPtr<T>& lhs, const nsCOMPtr<U>& rhs )
1236 // Comparing an |nsCOMPtr| to a raw pointer
1241 operator==( const nsCOMPtr<T>& lhs, const U* rhs )
1249 operator==( const U* lhs, const nsCOMPtr<T>& rhs )
1257 operator!=( const nsCOMPtr<T>& lhs, const U* rhs )
1265 operator!=( const U* lhs, const nsCOMPtr<T>& rhs )
1288 operator==( const nsCOMPtr<T>& lhs, U* rhs )
1296 operator==( U* lhs, const nsCOMPtr<T>& rhs )
1304 operator!=( const nsCOMPtr<T>& lhs, U* rhs )
1312 operator!=( U* lhs, const nsCOMPtr<T>& rhs )
1320 // Comparing an |nsCOMPtr| to |0|
1327 operator==( const nsCOMPtr<T>& lhs, NSCAP_Zero* rhs )
1336 operator==( NSCAP_Zero* lhs, const nsCOMPtr<T>& rhs )
1345 operator!=( const nsCOMPtr<T>& lhs, NSCAP_Zero* rhs )
1354 operator!=( NSCAP_Zero* lhs, const nsCOMPtr<T>& rhs )
1369 operator==( const nsCOMPtr<T>& lhs, int rhs )
1378 operator==( int lhs, const nsCOMPtr<T>& rhs )
1392 return nsCOMPtr<nsISupports>( do_QueryInterface(lhs) ) == nsCOMPtr<nsISupports>( do_QueryInterface(rhs) );
1400 CallQueryInterface( nsCOMPtr<SourceType>& aSourcePtr, DestinationType** aDestPtr )