Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsIAtom.idl File Reference
import "nsISupports.idl";
#include "nsAString.h"
#include "nsCOMPtr.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  nsIAtom

Functions

NS_COM nsIAtomNS_NewAtom (const char *aUTF8String)
 Find an atom that matches the given UTF-8 string.
NS_COM nsIAtomNS_NewPermanentAtom (const char *aUTF8String)
already_AddRefed< nsIAtomdo_GetAtom (const char *aUTF8String)
already_AddRefed< nsIAtomdo_GetPermanentAtom (const char *aUTF8String)
NS_COM nsIAtomNS_NewAtom (const nsACString &aUTF8String)
 Find an atom that matches the given UTF-8 string.
NS_COM nsIAtomNS_NewPermanentAtom (const nsACString &aUTF8String)
already_AddRefed< nsIAtomdo_GetAtom (const nsACString &aUTF8String)
already_AddRefed< nsIAtomdo_GetPermanentAtom (const nsACString &aUTF8String)
NS_COM nsIAtomNS_NewAtom (const PRUnichar *aUTF16String)
 Find an atom that matches the given UTF-16 string.
NS_COM nsIAtomNS_NewPermanentAtom (const PRUnichar *aUTF16String)
already_AddRefed< nsIAtomdo_GetAtom (const PRUnichar *aUTF16String)
already_AddRefed< nsIAtomdo_GetPermanentAtom (const PRUnichar *aUTF16String)
NS_COM nsIAtomNS_NewAtom (const nsAString &aUTF16String)
 Find an atom that matches the given UTF-16 string.
NS_COM nsIAtomNS_NewPermanentAtom (const nsAString &aUTF16String)
already_AddRefed< nsIAtomdo_GetAtom (const nsAString &aUTF16String)
already_AddRefed< nsIAtomdo_GetPermanentAtom (const nsAString &aUTF16String)
NS_COM nsrefcnt NS_GetNumberOfAtoms (void)
 Return a count of the total number of atoms currently alive in the system.

Function Documentation

already_AddRefed<nsIAtom> do_GetAtom ( const char *  aUTF8String) [inline]

Definition at line 116 of file nsIAtom.idl.

    { return NS_NewAtom(aUTF8String); }

Here is the call graph for this function:

already_AddRefed<nsIAtom> do_GetAtom ( const nsACString &  aUTF8String) [inline]

Definition at line 127 of file nsIAtom.idl.

    { return NS_NewAtom(aUTF8String); }

Here is the call graph for this function:

already_AddRefed<nsIAtom> do_GetAtom ( const PRUnichar aUTF16String) [inline]

Definition at line 139 of file nsIAtom.idl.

    { return NS_NewAtom(aUTF16String); }

Here is the call graph for this function:

already_AddRefed<nsIAtom> do_GetAtom ( const nsAString &  aUTF16String) [inline]

Definition at line 150 of file nsIAtom.idl.

    { return NS_NewAtom(aUTF16String); }

Here is the call graph for this function:

already_AddRefed<nsIAtom> do_GetPermanentAtom ( const char *  aUTF8String) [inline]

Definition at line 118 of file nsIAtom.idl.

    { return NS_NewPermanentAtom(aUTF8String); }

Here is the call graph for this function:

Here is the caller graph for this function:

already_AddRefed<nsIAtom> do_GetPermanentAtom ( const nsACString &  aUTF8String) [inline]

Definition at line 129 of file nsIAtom.idl.

    { return NS_NewPermanentAtom(aUTF8String); }

Here is the call graph for this function:

Definition at line 141 of file nsIAtom.idl.

    { return NS_NewPermanentAtom(aUTF16String); }

Here is the call graph for this function:

already_AddRefed<nsIAtom> do_GetPermanentAtom ( const nsAString &  aUTF16String) [inline]

Definition at line 152 of file nsIAtom.idl.

    { return NS_NewPermanentAtom(aUTF16String); }

Here is the call graph for this function:

Return a count of the total number of atoms currently alive in the system.

Definition at line 623 of file nsAtomTable.cpp.

{
  return gAtomTable.entryCount;
}

Here is the caller graph for this function:

NS_COM nsIAtom* NS_NewAtom ( const char *  aUTF8String)

Find an atom that matches the given UTF-8 string.

The string is assumed to be zero terminated.

Definition at line 464 of file nsAtomTable.cpp.

{
  return NS_NewAtom(nsDependentCString(isolatin1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsIAtom* NS_NewAtom ( const nsACString &  aUTF8String)

Find an atom that matches the given UTF-8 string.

Definition at line 559 of file nsAtomTable.cpp.

{
  AtomTableEntry *he = GetAtomHashEntry(PromiseFlatCString(aString).get());

  if (he->HasValue())
    return he->GetAtom();

  AtomImpl* atom = new (aString) AtomImpl();
  he->SetAtomImpl(atom);
  if (!atom) {
    PL_DHashTableRawRemove(&gAtomTable, he);
    return nsnull;
  }

  NS_ADDREF(atom);
  return atom;
}

Here is the call graph for this function:

NS_COM nsIAtom* NS_NewAtom ( const PRUnichar aUTF16String)

Find an atom that matches the given UTF-16 string.

The string is assumed to be zero terminated.

Definition at line 613 of file nsAtomTable.cpp.

Here is the call graph for this function:

NS_COM nsIAtom* NS_NewAtom ( const nsAString &  aUTF16String)

Find an atom that matches the given UTF-16 string.

Definition at line 550 of file nsAtomTable.cpp.

{
  NS_ConvertUCS2toUTF8 utf8String(aString);

  return NS_NewAtom(utf8String);
}

Here is the call graph for this function:

NS_COM nsIAtom* NS_NewPermanentAtom ( const char *  aUTF8String)

Definition at line 469 of file nsAtomTable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsIAtom* NS_NewPermanentAtom ( const nsACString &  aUTF8String)

Definition at line 583 of file nsAtomTable.cpp.

{
  AtomTableEntry *he = GetAtomHashEntry(PromiseFlatCString(aString).get());

  if (he->HasValue() && he->IsStaticAtom())
    return he->GetStaticAtomWrapper();
  
  // either there is no atom and we'll create an AtomImpl,
  // or there is an existing AtomImpl
  AtomImpl* atom = he->GetAtomImpl();
  
  if (atom) {
    // ensure that it's permanent
    if (!atom->IsPermanent()) {
      PromoteToPermanent(atom);
    }
  } else {
    // otherwise, make a new atom
    atom = new (aString) PermanentAtomImpl();
    he->SetAtomImpl(atom);
    if ( !atom ) {
      PL_DHashTableRawRemove(&gAtomTable, he);
      return nsnull;
    }
  }

  NS_ADDREF(atom);
  return atom;
}

Here is the call graph for this function:

Definition at line 618 of file nsAtomTable.cpp.

Here is the call graph for this function:

NS_COM nsIAtom* NS_NewPermanentAtom ( const nsAString &  aUTF16String)

Definition at line 577 of file nsAtomTable.cpp.

Here is the call graph for this function: