Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsSVGEnum.cpp File Reference
#include "nsSVGEnum.h"
#include "nsSVGValue.h"
#include "nsISVGValueUtils.h"
#include "nsWeakReference.h"
#include "nsIAtom.h"

Go to the source code of this file.

Classes

class  nsSVGEnum

Functions

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

Function Documentation

nsresult NS_NewSVGEnum ( nsISVGEnum **  result,
PRUint16  value,
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,
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: