Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Protected Member Functions
nsString Class Reference

basic strings More...

#include <nsStringAPI.h>

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

List of all members.

Public Types

typedef nsString self_type
typedef nsAString abstract_string_type
typedef PRUnichar char_type
typedef PRUint32 size_type
typedef PRUint32 index_type

Public Member Functions

 nsString ()
 nsString (const self_type &aString)
 nsString (const abstract_string_type &aReadable)
 nsString (const char_type *aData, size_type aLength=PR_UINT32_MAX)
 ~nsString ()
const char_typeget () const
self_typeoperator= (const self_type &aString)
self_typeoperator= (const abstract_string_type &aReadable)
self_typeoperator= (const char_type *aPtr)
self_typeoperator= (char_type aChar)
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

Protected Member Functions

 nsString (const char_type *aData, size_type aLength, PRUint32 aFlags)

Detailed Description

basic strings

Definition at line 1126 of file nsStringAPI.h.


Member Typedef Documentation

typedef nsAString nsString::abstract_string_type

Definition at line 1130 of file nsStringAPI.h.

Definition at line 836 of file nsStringAPI.h.

Definition at line 839 of file nsStringAPI.h.

Reimplemented from nsAString_external.

Reimplemented in NS_ConvertUTF8toUTF16, NS_ConvertASCIItoUTF16, and nsDependentString.

Definition at line 1129 of file nsStringAPI.h.

Definition at line 838 of file nsStringAPI.h.


Constructor & Destructor Documentation

nsString::nsString ( ) [inline]

Definition at line 1132 of file nsStringAPI.h.

Here is the call graph for this function:

nsString::nsString ( const self_type aString) [inline]

Definition at line 1137 of file nsStringAPI.h.

  {
    NS_StringContainerInit(*this);
    NS_StringCopy(*this, aString);
  }

Here is the call graph for this function:

nsString::nsString ( const abstract_string_type aReadable) [inline, explicit]

Definition at line 1144 of file nsStringAPI.h.

  {
    NS_StringContainerInit(*this);
    NS_StringCopy(*this, aReadable);
  }

Here is the call graph for this function:

nsString::nsString ( const char_type aData,
size_type  aLength = PR_UINT32_MAX 
) [inline, explicit]

Definition at line 1151 of file nsStringAPI.h.

Here is the call graph for this function:

nsString::~nsString ( ) [inline]

Definition at line 1156 of file nsStringAPI.h.

Here is the call graph for this function:

Here is the caller graph for this function:

nsString::nsString ( const char_type aData,
size_type  aLength,
PRUint32  aFlags 
) [inline, protected]

Definition at line 1182 of file nsStringAPI.h.

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 1173 of file nsStringAPI.h.

Here is the call graph for this function:

Here is the caller graph for this function:

const char_type* nsString::get ( ) const [inline]

Definition at line 1161 of file nsStringAPI.h.

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

Here is the call graph for this function:

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

Definition at line 841 of file nsStringAPI.h.

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

Here is the call graph for this function:

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

Definition at line 848 of file nsStringAPI.h.

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

Here is the call graph for this function:

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

Definition at line 855 of file nsStringAPI.h.

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

Here is the call graph for this function:

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

Definition at line 862 of file nsStringAPI.h.

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

Here is the call graph for this function:

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

Definition at line 869 of file nsStringAPI.h.

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

Here is the call graph for this function:

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

Definition at line 875 of file nsStringAPI.h.

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

Definition at line 880 of file nsStringAPI.h.

  {
    NS_StringCopy(*this, aString);
  }

Here is the call graph for this function:

nsAString_external::NS_HIDDEN_ ( void  ) const [inherited]
self_type& nsString::operator= ( const self_type aString) [inline]

Reimplemented in NS_ConvertUTF8toUTF16, NS_ConvertASCIItoUTF16, and nsDependentString.

Definition at line 1168 of file nsStringAPI.h.

{ Assign(aString);   return *this; }
self_type& nsString::operator= ( const abstract_string_type aReadable) [inline]

Definition at line 1169 of file nsStringAPI.h.

{ Assign(aReadable); return *this; }
self_type& nsString::operator= ( const char_type aPtr) [inline]

Definition at line 1170 of file nsStringAPI.h.

{ Assign(aPtr);      return *this; }
self_type& nsString::operator= ( char_type  aChar) [inline]

Definition at line 1171 of file nsStringAPI.h.

{ Assign(aChar);     return *this; }

Member Data Documentation

Definition at line 884 of file nsStringAPI.h.


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