Back to index

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

import "IFoo.idl";

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

List of all members.

Public Member Functions

 NS_IMETHOD_ (nsrefcnt) RefCnt()=0
 NS_IMETHOD_ (PRInt32) ID()=0
 IFoo ()
virtual ~IFoo ()
 NS_IMETHOD_ (nsrefcnt) AddRef()
 NS_IMETHOD_ (nsrefcnt) Release()
NS_IMETHOD QueryInterface (const nsIID &, void **)
 IFoo ()
 NS_IMETHOD_ (nsrefcnt) AddRef()
 NS_IMETHOD_ (nsrefcnt) Release()
NS_IMETHOD QueryInterface (const nsIID &, void **)
NS_IMETHOD SetString (const nsACString &aString)
NS_IMETHOD GetString (nsACString &aString)

Static Public Member Functions

static void print_totals ()
static void print_totals ()

Public Attributes

readonly attribute long id

Private Member Functions

 ~IFoo ()

Private Attributes

unsigned int refcount_
nsCString mString

Static Private Attributes

static unsigned int total_constructions_
static unsigned int total_destructions_

Detailed Description

Definition at line 41 of file IFoo.idl.


Constructor & Destructor Documentation

Definition at line 129 of file TestCOMPtr.cpp.

    : refcount_(0)
  {
    ++total_constructions_;
    printf("  new IFoo@%p [#%d]\n",
           STATIC_CAST(void*, this), total_constructions_);
  }
IFoo::~IFoo ( ) [virtual]

Definition at line 137 of file TestCOMPtr.cpp.

  {
    ++total_destructions_;
    printf("IFoo@%p::~IFoo() [#%d]\n",
           STATIC_CAST(void*, this), total_destructions_);
  }
IFoo::~IFoo ( ) [private]

Member Function Documentation

nsresult IFoo::GetString ( nsACString &  aString)

Definition at line 340 of file TestHashtables.cpp.

{
  aString = mString;
  return NS_OK;
}

Here is the caller graph for this function:

IFoo::NS_IMETHOD_ ( nsrefcnt  ) [pure virtual]

Implemented in Foo.

IFoo::NS_IMETHOD_ ( PRInt32  ) [pure virtual]

Implemented in Foo.

Reimplemented in Foo.

Reimplemented in Foo.

Reimplemented in Foo.

Reimplemented in Foo.

void IFoo::print_totals ( ) [static]

Definition at line 123 of file TestCOMPtr.cpp.

  {
    printf("total constructions/destructions --> %d/%d\n", 
           total_constructions_, total_destructions_);
  }

Here is the caller graph for this function:

static void IFoo::print_totals ( ) [static]
nsresult IFoo::QueryInterface ( const nsIID aIID,
void **  aResult 
)

Reimplemented in IBar.

Definition at line 177 of file TestCOMPtr.cpp.

       {
    printf("IFoo@%p::QueryInterface()\n", STATIC_CAST(void*, this));
              nsISupports* rawPtr = 0;
              nsresult status = NS_OK;

              if ( aIID.Equals(GetIID()) )
                     rawPtr = this;
              else
                     {
                            nsID iid_of_ISupports = NS_ISUPPORTS_IID;
                            if ( aIID.Equals(iid_of_ISupports) )
                                   rawPtr = STATIC_CAST(nsISupports*, this);
                            else
                                   status = NS_ERROR_NO_INTERFACE;
                     }

              NS_IF_ADDREF(rawPtr);
              *aResult = rawPtr;

              return status;
       }

Here is the call graph for this function:

Reimplemented in IBar.

nsresult IFoo::SetString ( const nsACString &  aString)

Definition at line 333 of file TestHashtables.cpp.

{
  mString = aString;
  return NS_OK;
}

Member Data Documentation

Definition at line 43 of file IFoo.idl.

Definition at line 248 of file TestHashtables.cpp.

unsigned int IFoo::refcount_ [private]

Definition at line 74 of file TestCOMPtr.cpp.

unsigned int IFoo::total_constructions_ [static, private]

Definition at line 76 of file TestCOMPtr.cpp.

unsigned int IFoo::total_destructions_ [static, private]

Definition at line 77 of file TestCOMPtr.cpp.


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