Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsLWBreakerFImp Class Reference

#include <nsLWBreakerFImp.h>

Inheritance diagram for nsLWBreakerFImp:
Inheritance graph
[legend]
Collaboration diagram for nsLWBreakerFImp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsLWBreakerFImp ()
virtual ~nsLWBreakerFImp ()
NS_IMETHOD GetBreaker (const nsAString &aParam, nsILineBreaker **breaker)
NS_IMETHOD GetBreaker (const nsAString &aParam, nsIWordBreaker **breaker)

Detailed Description

Definition at line 51 of file nsLWBreakerFImp.h.


Constructor & Destructor Documentation

Definition at line 45 of file nsLWBreakerFImp.cpp.

{
}

Definition at line 48 of file nsLWBreakerFImp.cpp.

{
}

Member Function Documentation

nsresult nsLWBreakerFImp::GetBreaker ( const nsAString &  aParam,
nsILineBreaker **  breaker 
) [virtual]

Implements nsILineBreakerFactory.

Definition at line 90 of file nsLWBreakerFImp.cpp.

{
  nsJISx4051LineBreaker *result;
  if( aParam.EqualsLiteral("ja") ) 
  {
     result = new nsJISx4051LineBreaker (
           gJaNoBegin, sizeof(gJaNoBegin)/sizeof(PRUnichar), 
           gJaNoEnd, sizeof(gJaNoEnd)/sizeof(PRUnichar));
  } 
  else if(aParam.EqualsLiteral("ko")) 
  {
     result = new nsJISx4051LineBreaker (
           gKoNoBegin, sizeof(gKoNoBegin)/sizeof(PRUnichar), 
           gKoNoEnd, sizeof(gKoNoEnd)/sizeof(PRUnichar));
  } 
  else if(aParam.EqualsLiteral("tw")) 
  {
     result = new nsJISx4051LineBreaker (
           gTwNoBegin, sizeof(gTwNoBegin)/sizeof(PRUnichar), 
           gTwNoEnd, sizeof(gTwNoEnd)/sizeof(PRUnichar));
  } 
  else if(aParam.EqualsLiteral("cn")) 
  {
     result = new nsJISx4051LineBreaker (
           gCnNoBegin, sizeof(gCnNoBegin)/sizeof(PRUnichar), 
           gCnNoEnd, sizeof(gCnNoEnd)/sizeof(PRUnichar));
  } 
  else 
  {
     result = new nsJISx4051LineBreaker (nsnull, 0, nsnull, 0);
  }

  if (!result)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(result);
  *oResult = result;

  return NS_OK;
}

Here is the call graph for this function:

nsresult nsLWBreakerFImp::GetBreaker ( const nsAString &  aParam,
nsIWordBreaker **  breaker 
) [virtual]

Implements nsIWordBreakerFactory.

Definition at line 132 of file nsLWBreakerFImp.cpp.

{
  nsSampleWordBreaker *result = new nsSampleWordBreaker ();
  if (!result)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(result);
  *oResult = result;

  return NS_OK;
}

Here is the call graph for this function:


The documentation for this class was generated from the following files: