Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
nsCSSValue::Array Struct Reference

#include <nsCSSValue.h>

List of all members.

Public Member Functions

nsCSSValueoperator[] (PRUint16 aIndex)
const nsCSSValueoperator[] (PRUint16 aIndex) const
nsCSSValueItem (PRUint16 aIndex)
const nsCSSValueItem (PRUint16 aIndex) const
PRUint16 Count ()
PRBool operator== (const Array &aOther)
void AddRef ()
void Release ()

Static Public Member Functions

static ArrayCreate (PRUint16 aItemCount)

Private Member Functions

voidoperator new (size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW
void operator delete (void *aPtr)
nsCSSValueFirst ()
const nsCSSValueFirst () const
 Array (PRUint16 aItemCount)
 ~Array ()
 Array (const Array &aOther)

Private Attributes

PRUint16 mRefCnt
PRUint16 mCount

Detailed Description

Definition at line 292 of file nsCSSValue.h.


Constructor & Destructor Documentation

nsCSSValue::Array::Array ( PRUint16  aItemCount) [inline, private]

Definition at line 366 of file nsCSSValue.h.

Here is the call graph for this function:

nsCSSValue::Array::~Array ( ) [inline, private]

Definition at line 376 of file nsCSSValue.h.

nsCSSValue::Array::Array ( const Array aOther) [private]

Member Function Documentation

Definition at line 324 of file nsCSSValue.h.

                  {
      if (mRefCnt == PR_UINT16_MAX) {
        NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
        return;
      }
      ++mRefCnt;
      NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
    }

Definition at line 312 of file nsCSSValue.h.

{ return mCount; }

Here is the caller graph for this function:

static Array* nsCSSValue::Array::Create ( PRUint16  aItemCount) [inline, static]

Definition at line 295 of file nsCSSValue.h.

                                              {
      return new (aItemCount) Array(aItemCount);
    }
nsCSSValue* nsCSSValue::Array::First ( ) [inline, private]

Definition at line 354 of file nsCSSValue.h.

                        {
      return (nsCSSValue*) (((char*)this) + sizeof(*this));
    }
const nsCSSValue* nsCSSValue::Array::First ( ) const [inline, private]

Definition at line 358 of file nsCSSValue.h.

                                    {
      return (const nsCSSValue*) (((const char*)this) + sizeof(*this));
    }

Definition at line 309 of file nsCSSValue.h.

{ return (*this)[aIndex]; }

Here is the caller graph for this function:

const nsCSSValue& nsCSSValue::Array::Item ( PRUint16  aIndex) const [inline]

Definition at line 310 of file nsCSSValue.h.

{ return (*this)[aIndex]; }
void nsCSSValue::Array::operator delete ( void aPtr) [inline, private]

Definition at line 352 of file nsCSSValue.h.

{ ::operator delete(aPtr); }
void* nsCSSValue::Array::operator new ( size_t  aSelfSize,
PRUint16  aItemCount 
) [inline, private]

Definition at line 348 of file nsCSSValue.h.

                                                                            {
      return ::operator new(aSelfSize + sizeof(nsCSSValue)*aItemCount);
    }

Here is the call graph for this function:

PRBool nsCSSValue::Array::operator== ( const Array aOther) [inline]

Definition at line 314 of file nsCSSValue.h.

    {
      if (mCount != aOther.mCount)
        return PR_FALSE;
      for (PRUint16 i = 0; i < mCount; ++i)
        if ((*this)[i] != aOther[i])
          return PR_FALSE;
      return PR_TRUE;
    }
nsCSSValue& nsCSSValue::Array::operator[] ( PRUint16  aIndex) [inline]

Definition at line 299 of file nsCSSValue.h.

                                            {
      NS_ASSERTION(aIndex < mCount, "out of range");
      return *(First() + aIndex);
    }
const nsCSSValue& nsCSSValue::Array::operator[] ( PRUint16  aIndex) const [inline]

Definition at line 304 of file nsCSSValue.h.

                                                        {
      NS_ASSERTION(aIndex < mCount, "out of range");
      return *(First() + aIndex);
    }

Definition at line 332 of file nsCSSValue.h.

                   {
      if (mRefCnt == PR_UINT16_MAX) {
        NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
        return;
      }
      --mRefCnt;
      NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
      if (mRefCnt == 0)
        delete this;
    }

Member Data Documentation

Definition at line 346 of file nsCSSValue.h.

Definition at line 345 of file nsCSSValue.h.


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