Back to index

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

#include <RunnableMixin.h>

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

List of all members.

Public Member Functions

 RunnableMixin ()
DECL_SUPPORTS_MIXIN NS_IMETHOD Run ()=0
 Defines an entry point for a newly created thread.
 RunnableMixin ()
DECL_SUPPORTS_MIXIN NS_IMETHOD Run ()=0
 Defines an entry point for a newly created thread.
void run ()

Private Member Functions

nsresult queryInterface (const nsIID &aIID, void **aInstancePtr)
 The lowercase implementations of queryInterface, addRef, and release all act locally on the current object, regardless of aggregation.
nsresult queryInterface (const nsIID &aIID, void **aInstancePtr)
nsrefcnt addRef (void)
nsrefcnt addRef (void)
nsrefcnt release (void)
nsrefcnt release (void)

Static Private Attributes

static const InterfaceInfo sInterfaces []
static const UInt32 kInterfaceCount = sizeof(sInterfaces) / sizeof(InterfaceInfo)

Detailed Description

Definition at line 14 of file RunnableMixin.h.


Constructor & Destructor Documentation

Definition at line 16 of file RunnableMixin.cpp.


Member Function Documentation

nsrefcnt SupportsMixin::addRef ( void  ) [inherited]

Here is the caller graph for this function:

nsrefcnt SupportsMixin::addRef ( void  ) [inherited]
NS_IMETHODIMP SupportsMixin::queryInterface ( const nsIID aIID,
void **  aInstancePtr 
) [inherited]

The lowercase implementations of queryInterface, addRef, and release all act locally on the current object, regardless of aggregation.

They are meant to be called by aggregating outer objects.

Definition at line 129 of file SupportsMixin.cpp.

{
       if (aInstancePtr == NULL) {
              return NS_ERROR_NULL_POINTER;
       }
       // first check to see if it's one of our known interfaces.
       // need to solve the non-left inheritance graph case.
       const InterfaceInfo* interfaces = mInterfaces;
       UInt32 count = mInterfaceCount;
       for (UInt32 i = 0; i < count; i++) {
              if (aIID.Equals(interfaces[i].mIID)) {
                     *aInstancePtr = (void*) (UInt32(mInstance) + interfaces[i].mOffset);
                     addRef();
                     return NS_OK;
              }
       }
       // finally, does the interface match nsISupports?
       static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
       if (aIID.Equals(kISupportsIID)) {
              *aInstancePtr = (void*) mInstance;
              addRef();
              return NS_OK;
       }
       return NS_NOINTERFACE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SupportsMixin::queryInterface ( const nsIID aIID,
void **  aInstancePtr 
) [inherited]

Here is the caller graph for this function:

Defines an entry point for a newly created thread.

Implements nsIRunnable.

Implemented in MessageRunnable, and MessageRunnable.

void nsIRunnable::run ( ) [inherited]

Defines an entry point for a newly created thread.

Implements nsIRunnable.

Implemented in MessageRunnable, and MessageRunnable.


Member Data Documentation

static const UInt32 RunnableMixin::kInterfaceCount = sizeof(sInterfaces) / sizeof(InterfaceInfo) [static, private]

Definition at line 25 of file RunnableMixin.h.

Initial value:

Definition at line 24 of file RunnableMixin.h.


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