Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Private Member Functions
NS_LossyConvertUTF16toASCII Class Reference

A helper class that converts a UTF-16 string to ASCII in a lossy manner. More...

#include <nsString.h>

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

List of all members.

Public Types

typedef NS_LossyConvertUTF16toASCII self_type
typedef nsACString abstract_string_type
typedef char char_type
typedef PRUint32 size_type
typedef PRUint32 index_type

Public Member Functions

 NS_LossyConvertUTF16toASCII (const PRUnichar *aString)
 NS_LossyConvertUTF16toASCII (const PRUnichar *aString, PRUint32 aLength)
 NS_LossyConvertUTF16toASCII (const nsAString &aString)
 NS_LossyConvertUTF16toASCII (const nsAString &aStr)
 NS_LossyConvertUTF16toASCII (const PRUnichar *aData, PRUint32 aLength=PR_UINT32_MAX)
const char_typeget () const
void Adopt (const char_type *aData, size_type aLength=PR_UINT32_MAX)
 NS_HIDDEN_ (const char_type *) BeginReading() const
 NS_HIDDEN_ (const char_type *) EndReading() const
 NS_HIDDEN_ (char_type *) BeginWriting()
 NS_HIDDEN_ (PRBool) SetLength(PRUint32 aLen)
 NS_HIDDEN_ (size_type) Length() const
 NS_HIDDEN_ (PRBool) IsEmpty() const
 NS_HIDDEN_ (void) Assign(const self_type &aString)
 NS_HIDDEN_ (void) Assign(const char_type *aData

Public Attributes

size_type aLength

Private Member Functions

 NS_LossyConvertUTF16toASCII (char)
self_typeoperator= (const self_type &aString)

Detailed Description

A helper class that converts a UTF-16 string to ASCII in a lossy manner.

Definition at line 86 of file nsString.h.


Member Typedef Documentation

typedef nsACString nsCString::abstract_string_type [inherited]

Definition at line 1192 of file nsStringAPI.h.

typedef char nsACString_external::char_type [inherited]

Reimplemented in NS_COM, NS_COM, and NS_COM.

Definition at line 953 of file nsStringAPI.h.

Definition at line 956 of file nsStringAPI.h.

Reimplemented from nsCString.

Definition at line 1376 of file nsStringAPI.h.

Definition at line 955 of file nsStringAPI.h.


Constructor & Destructor Documentation

Definition at line 90 of file nsString.h.

        {
          LossyAppendUTF16toASCII(aString, *this);
        }

Here is the call graph for this function:

Definition at line 95 of file nsString.h.

        {
          LossyAppendUTF16toASCII(Substring(aString, aString + aLength), *this);
        }

Here is the call graph for this function:

NS_LossyConvertUTF16toASCII::NS_LossyConvertUTF16toASCII ( const nsAString &  aString) [inline, explicit]

Definition at line 101 of file nsString.h.

        {
          LossyAppendUTF16toASCII(aString, *this);
        }

Here is the call graph for this function:

NS_LossyConvertUTF16toASCII::NS_LossyConvertUTF16toASCII ( const nsAString &  aStr) [inline, explicit]

Definition at line 1379 of file nsStringAPI.h.

  {
    NS_UTF16ToCString(aStr, NS_CSTRING_ENCODING_ASCII, *this);
  }

Here is the call graph for this function:

Definition at line 1385 of file nsStringAPI.h.

  {
    NS_UTF16ToCString(nsDependentString(aData, aLength),
                      NS_CSTRING_ENCODING_ASCII, *this);
  }

Here is the call graph for this function:


Member Function Documentation

void nsCString::Adopt ( const char_type aData,
size_type  aLength = PR_UINT32_MAX 
) [inline, inherited]

Definition at line 1236 of file nsStringAPI.h.

Here is the call graph for this function:

const char_type* nsCString::get ( ) const [inline, inherited]

Definition at line 1224 of file nsStringAPI.h.

  {
    const char_type* data;
    NS_CStringGetData(*this, &data);
    return data;
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( const char_type ) const [inline, inherited]

Definition at line 958 of file nsStringAPI.h.

  {
    const char_type *data;
    NS_CStringGetData(*this, &data);
    return data;
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( const char_type ) const [inline, inherited]

Definition at line 965 of file nsStringAPI.h.

  {
    const char_type *data;
    PRUint32 len = NS_CStringGetData(*this, &data);
    return data + len;
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( char_type ) [inline, inherited]

Definition at line 972 of file nsStringAPI.h.

  {
    char_type *data;
    NS_CStringGetMutableData(*this, PR_UINT32_MAX, &data);
    return data;
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( PRBool  ) [inline, inherited]

Definition at line 979 of file nsStringAPI.h.

  {
    char_type *data;
    NS_CStringGetMutableData(*this, aLen, &data);
    return data != nsnull;
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( size_type  ) const [inline, inherited]

Definition at line 986 of file nsStringAPI.h.

  {
    const char_type* data;
    return NS_CStringGetData(*this, &data);
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( PRBool  ) const [inline, inherited]

Definition at line 992 of file nsStringAPI.h.

  {
    return Length() == 0;
  }
nsACString_external::NS_HIDDEN_ ( void  ) const [inline, inherited]

Definition at line 997 of file nsStringAPI.h.

  {
    NS_CStringCopy(*this, aString);
  }

Here is the call graph for this function:

nsACString_external::NS_HIDDEN_ ( void  ) const [inherited]
self_type& NS_LossyConvertUTF16toASCII::operator= ( const self_type aString) [private]

Reimplemented from nsCString.


Member Data Documentation

Definition at line 1001 of file nsStringAPI.h.


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