Back to index

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

#include <nsPrefBranch.h>

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

List of all members.

Public Member Functions

 nsPrefLocalizedString ()
virtual ~nsPrefLocalizedString ()
NS_DECL_ISUPPORTS nsresult Init ()
wstring toString ()
 Used to retrieve the contents of this object into a wide string.
void setDataWithLength (in unsigned long length,[size_is(length)] in wstring data)
 Used to set the contents of this object.
wstring toString ()

Public Attributes

attribute wstring data
 Provides access to string data stored in this property.
attribute AString data
const unsigned short TYPE_ID = 1
const unsigned short TYPE_CSTRING = 2
const unsigned short TYPE_STRING = 3
const unsigned short TYPE_PRBOOL = 4
const unsigned short TYPE_PRUINT8 = 5
const unsigned short TYPE_PRUINT16 = 6
const unsigned short TYPE_PRUINT32 = 7
const unsigned short TYPE_PRUINT64 = 8
const unsigned short TYPE_PRTIME = 9
const unsigned short TYPE_CHAR = 10
const unsigned short TYPE_PRINT16 = 11
const unsigned short TYPE_PRINT32 = 12
const unsigned short TYPE_PRINT64 = 13
const unsigned short TYPE_FLOAT = 14
const unsigned short TYPE_DOUBLE = 15
const unsigned short TYPE_VOID = 16
const unsigned short TYPE_INTERFACE_POINTER = 17
readonly attribute unsigned short type

Private Member Functions

NS_IMETHOD GetData (PRUnichar **)
NS_IMETHOD SetData (const PRUnichar *aData)
NS_IMETHOD SetDataWithLength (PRUint32 aLength, const PRUnichar *aData)

Private Attributes

nsCOMPtr< nsISupportsStringmUnicodeString

Detailed Description

Definition at line 92 of file nsPrefBranch.h.


Constructor & Destructor Documentation

Definition at line 933 of file nsPrefBranch.cpp.

{
}

Definition at line 937 of file nsPrefBranch.cpp.

{
}

Member Function Documentation

Definition at line 964 of file nsPrefBranch.cpp.

{
  nsAutoString data;

  nsresult rv = GetData(data);
  if (NS_FAILED(rv))
    return rv;
  
  *_retval = ToNewUnicode(data);
  if (!*_retval)
    return NS_ERROR_OUT_OF_MEMORY;

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 955 of file nsPrefBranch.cpp.

Here is the call graph for this function:

Definition at line 980 of file nsPrefBranch.cpp.

{
  if (!aData)
    return SetData(EmptyString());
  return SetData(nsDependentString(aData));
}

Here is the caller graph for this function:

void nsIPrefLocalizedString::setDataWithLength ( in unsigned long  length,
[size_is(length)] in wstring  data 
) [inherited]

Used to set the contents of this object.

Parameters:
lengthThe length of the string. This value should not include space for the null terminator, nor should it account for the size of a character. It should only be the number of characters for which there is space in the string.
dataThe string data to be stored.
Note:
This makes a copy of the string argument passed in.
Returns:
NS_OK The data was successfully stored.

Definition at line 988 of file nsPrefBranch.cpp.

{
  if (!aData)
    return SetData(EmptyString());
  return SetData(Substring(aData, aData + aLength));
}

Here is the call graph for this function:

wstring nsIPrefLocalizedString::toString ( ) [inherited]

Used to retrieve the contents of this object into a wide string.

Returns:
wstring The string containing the data stored within this object.
wstring nsISupportsString::toString ( ) [inherited]

Member Data Documentation

Provides access to string data stored in this property.

Returns:
NS_OK The operation succeeded.
Other An error occured.

Definition at line 64 of file nsIPrefLocalizedString.idl.

attribute AString nsISupportsString::data [inherited]

Definition at line 111 of file nsISupportsPrimitives.idl.

Definition at line 110 of file nsPrefBranch.h.

readonly attribute unsigned short nsISupportsPrimitive::type [inherited]

Definition at line 73 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_CHAR = 10 [inherited]

Definition at line 64 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_CSTRING = 2 [inherited]

Definition at line 56 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_DOUBLE = 15 [inherited]

Definition at line 69 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_FLOAT = 14 [inherited]

Definition at line 68 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_ID = 1 [inherited]

Definition at line 55 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_INTERFACE_POINTER = 17 [inherited]

Definition at line 71 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRBOOL = 4 [inherited]

Definition at line 58 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRINT16 = 11 [inherited]

Definition at line 65 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRINT32 = 12 [inherited]

Definition at line 66 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRINT64 = 13 [inherited]

Definition at line 67 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRTIME = 9 [inherited]

Definition at line 63 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRUINT16 = 6 [inherited]

Definition at line 60 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRUINT32 = 7 [inherited]

Definition at line 61 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRUINT64 = 8 [inherited]

Definition at line 62 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_PRUINT8 = 5 [inherited]

Definition at line 59 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_STRING = 3 [inherited]

Definition at line 57 of file nsISupportsPrimitives.idl.

const unsigned short nsISupportsPrimitive::TYPE_VOID = 16 [inherited]

Definition at line 70 of file nsISupportsPrimitives.idl.


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