Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsUCConstructors.cpp File Reference
#include "nsUCSupport.h"
#include "nsUCConstructors.h"

Go to the source code of this file.

Functions

template<class T >
NS_METHOD StabilizedQueryInterface (T *aNewObject, REFNSIID aIID, void **aResult)
NS_METHOD CreateMultiTableDecoder (PRInt32 aTableCount, const uRange *aRangeArray, uShiftTable **aShiftTable, uMappingTable **aMappingTable, PRUint32 aMaxLengthFactor, nsISupports *aOuter, REFNSIID aIID, void **aResult)
NS_METHOD CreateMultiTableEncoder (PRInt32 aTableCount, uShiftTable **aShiftTable, uMappingTable **aMappingTable, PRUint32 aMaxLengthFactor, nsISupports *aOuter, REFNSIID aIID, void **aResult)
NS_METHOD CreateTableEncoder (uShiftTable *aShiftTable, uMappingTable *aMappingTable, PRUint32 aMaxLengthFactor, nsISupports *aOuter, REFNSIID aIID, void **aResult)
NS_METHOD CreateTableDecoder (uShiftTable *aShiftTable, uMappingTable *aMappingTable, PRUint32 aMaxLengthFactor, nsISupports *aOuter, REFNSIID aIID, void **aResult)
NS_METHOD CreateOneByteDecoder (uShiftTable *aShiftTable, uMappingTable *aMappingTable, nsISupports *aOuter, REFNSIID aIID, void **aResult)

Function Documentation

NS_METHOD CreateMultiTableDecoder ( PRInt32  aTableCount,
const uRange aRangeArray,
uShiftTable **  aShiftTable,
uMappingTable **  aMappingTable,
PRUint32  aMaxLengthFactor,
nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 55 of file nsUCConstructors.cpp.

{

  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;
  
  nsMultiTableDecoderSupport* decoder =
    new nsMultiTableDecoderSupport(aTableCount, aRangeArray,
                                   aShiftTable, aMappingTable,
                                   aMaxLengthFactor);
  if (!decoder)
    return NS_ERROR_OUT_OF_MEMORY;

  return StabilizedQueryInterface(decoder, aIID, aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_METHOD CreateMultiTableEncoder ( PRInt32  aTableCount,
uShiftTable **  aShiftTable,
uMappingTable **  aMappingTable,
PRUint32  aMaxLengthFactor,
nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 78 of file nsUCConstructors.cpp.

{

  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;
  
  nsMultiTableEncoderSupport* encoder =
    new nsMultiTableEncoderSupport(aTableCount,
                                   aShiftTable, aMappingTable,
                                   aMaxLengthFactor);
  if (!encoder)
    return NS_ERROR_OUT_OF_MEMORY;

  return StabilizedQueryInterface(encoder, aIID, aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_METHOD CreateOneByteDecoder ( uShiftTable aShiftTable,
uMappingTable aMappingTable,
nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 141 of file nsUCConstructors.cpp.

{
    if (aOuter) return NS_ERROR_NO_AGGREGATION;
    
    nsOneByteDecoderSupport* decoder =
        new nsOneByteDecoderSupport(aShiftTable, aMappingTable);

    if (!decoder)
        return NS_ERROR_OUT_OF_MEMORY;
    
    return StabilizedQueryInterface(decoder, aIID, aResult);
}

Here is the call graph for this function:

NS_METHOD CreateTableDecoder ( uShiftTable aShiftTable,
uMappingTable aMappingTable,
PRUint32  aMaxLengthFactor,
nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 121 of file nsUCConstructors.cpp.

{
  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;
  
  nsTableDecoderSupport* decoder =
      new nsTableDecoderSupport(aShiftTable, aMappingTable,
                                aMaxLengthFactor);
  if (!decoder)
    return NS_ERROR_OUT_OF_MEMORY;

  return StabilizedQueryInterface(decoder, aIID, aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_METHOD CreateTableEncoder ( uShiftTable aShiftTable,
uMappingTable aMappingTable,
PRUint32  aMaxLengthFactor,
nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
)

Definition at line 101 of file nsUCConstructors.cpp.

{
  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;
  
  nsTableEncoderSupport* encoder =
      new nsTableEncoderSupport(aShiftTable, aMappingTable,
                                aMaxLengthFactor);
  if (!encoder)
    return NS_ERROR_OUT_OF_MEMORY;

  return StabilizedQueryInterface(encoder, aIID, aResult);
}

Here is the call graph for this function:

template<class T >
NS_METHOD StabilizedQueryInterface ( T aNewObject,
REFNSIID  aIID,
void **  aResult 
) [inline]

Definition at line 44 of file nsUCConstructors.cpp.

{
    NS_ADDREF(aNewObject);
    nsresult rv = aNewObject->QueryInterface(aIID, aResult);
    NS_RELEASE(aNewObject);
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function: