Logo Search packages:      
Sourcecode: xulrunner-1.9 version File versions

template<class KeyClass, class Interface>
PRBool nsInterfaceHashtable< KeyClass, Interface >::Get ( KeyType  aKey,
UserDataType *  pData 
) const [inline]

retrieve the value for a key.

aKey the key to retreive
pData data associated with this key will be placed at this pointer. If you only need to check if the key exists, pData may be null.
PR_TRUE if the key exists. If key does not exist, pData is not modified.
pData This is an XPCOM getter, so pData is already_addrefed. If the key doesn't exist, pData will be set to nsnull.

Definition at line 111 of file nsInterfaceHashtable.h.

Referenced by nsXULDocument::DoneWalking().

  typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =

  if (ent)
    if (pInterface)
      *pInterface = ent->mData;


    return PR_TRUE;

  // if the key doesn't exist, set *pInterface to null
  // so that it is a valid XPCOM getter
  if (pInterface)
    *pInterface = nsnull;

  return PR_FALSE;

Generated by  Doxygen 1.6.0   Back to index