Back to index

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

Go to the source code of this file.

Classes

struct  nsSVGEnumMapping

Functions

nsresult NS_NewSVGEnum (nsISVGEnum **result, PRUint16 value, struct nsSVGEnumMapping *mapping)
nsresult NS_NewSVGEnum (nsISVGEnum **result, const nsAString &value, struct nsSVGEnumMapping *mapping)

Class Documentation

struct nsSVGEnumMapping

Definition at line 46 of file nsSVGEnum.h.

Collaboration diagram for nsSVGEnumMapping:
Class Members
nsIAtom ** key
PRUint16 val

Function Documentation

nsresult NS_NewSVGEnum ( nsISVGEnum **  result,
PRUint16  value,
struct nsSVGEnumMapping mapping 
)

Definition at line 104 of file nsSVGEnum.cpp.

{
  NS_ASSERTION(mapping, "no mapping");
  nsSVGEnum *pe = new nsSVGEnum(value, mapping);
  if (!pe) return NS_ERROR_OUT_OF_MEMORY;
  NS_ADDREF(pe);
  *result = pe;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewSVGEnum ( nsISVGEnum **  result,
const nsAString &  value,
struct nsSVGEnumMapping mapping 
)

Definition at line 117 of file nsSVGEnum.cpp.

{
  NS_ASSERTION(mapping, "no mapping");
  *result = nsnull;
  nsSVGEnum *pe = new nsSVGEnum(0, mapping);
  if (!pe) return NS_ERROR_OUT_OF_MEMORY;
  NS_ADDREF(pe);
  if (NS_FAILED(pe->SetValueString(value))) {
    NS_RELEASE(pe);
    return NS_ERROR_FAILURE;
  }
  *result = pe;
  return NS_OK;
}  

Here is the call graph for this function: