Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes
TestRefObject Class Reference
Inheritance diagram for TestRefObject:
Inheritance graph
[legend]
Collaboration diagram for TestRefObject:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestRefObject ()
 ~TestRefObject ()
nsrefcnt AddRef ()
nsrefcnt Release ()

Public Attributes

int fooA
int fooB

Protected Attributes

PRUint32 mRefCount

Detailed Description

Definition at line 89 of file TestAutoPtr.cpp.


Constructor & Destructor Documentation

Definition at line 91 of file TestAutoPtr.cpp.

            : mRefCount(0)
        {
            printf("  Creating TestRefObject %p.\n",
                   NS_STATIC_CAST(void*, this));
        }

Definition at line 98 of file TestAutoPtr.cpp.

        {
            printf("  Destroying TestRefObject %p.\n",
                   NS_STATIC_CAST(void*, this));
        }

Member Function Documentation

nsrefcnt TestRefObject::AddRef ( void  ) [inline, virtual]

Implements TestRefObjectBaseA.

Definition at line 104 of file TestAutoPtr.cpp.

        {
            ++mRefCount;
            printf("  AddRef to %d on TestRefObject %p.\n",
                   mRefCount, NS_STATIC_CAST(void*, this));
            return mRefCount;
        }
nsrefcnt TestRefObject::Release ( void  ) [inline, virtual]

Implements TestRefObjectBaseA.

Definition at line 112 of file TestAutoPtr.cpp.

        {
            --mRefCount;
            printf("  Release to %d on TestRefObject %p.\n",
                   mRefCount, NS_STATIC_CAST(void*, this));
            if (mRefCount == 0) {
                delete NS_CONST_CAST(TestRefObject*, this);
                return 0;
            }
            return mRefCount;
        }

Member Data Documentation

Definition at line 76 of file TestAutoPtr.cpp.

Definition at line 84 of file TestAutoPtr.cpp.

Definition at line 125 of file TestAutoPtr.cpp.


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