Back to index

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

#include <nsAEClassDispatcher.h>

List of all members.

Public Member Functions

 AEDispatchTree ()
 ~AEDispatchTree ()
void InsertHandler (DescType handlerClass, AEGenericClass *handler, Boolean isDuplicate=false)
AEDispatchHandlerFindHandler (DescType handlerClass)

Protected Types

enum  { kDuplicateKeyError = 750 }

Static Protected Member Functions

static int FreeDispatchTreeNodeData (void *nodeData, unsigned char *key, void *refCon)
static int ReplaceDispatchTreeNode (void *nodeData, unsigned char *key, void *replaceData)

Protected Attributes

PatriciaTreeRef mTree

Detailed Description

Definition at line 103 of file nsAEClassDispatcher.h.

Member Enumeration Documentation

anonymous enum [protected]

Definition at line 114 of file nsAEClassDispatcher.h.

              kDuplicateKeyError = 750

Constructor & Destructor Documentation

Definition at line 175 of file nsAEClassDispatcher.cpp.

:      mTree(nil)
       mTree = PatriciaInitTree(8 * sizeof(DescType));

Here is the call graph for this function:

Definition at line 188 of file nsAEClassDispatcher.cpp.

Here is the call graph for this function:

Member Function Documentation

AEDispatchHandler * AEDispatchTree::FindHandler ( DescType  handlerClass)

Definition at line 224 of file nsAEClassDispatcher.cpp.

       AEDispatchHandler*   foundClass = nil;
       unsigned char        key[5] = {0};                      
       *(DescType *)key = handlerClass;

       (void)PatriciaSearch(mTree, key, (void**)&foundClass);
       return foundClass;

Here is the call graph for this function:

int AEDispatchTree::FreeDispatchTreeNodeData ( void nodeData,
unsigned char *  key,
void refCon 
) [static, protected]

Definition at line 255 of file nsAEClassDispatcher.cpp.

       AEDispatchTree*      dispatchTree = reinterpret_cast<AEDispatchTree *>(refCon);
       AEDispatchHandler*   handler = reinterpret_cast<AEDispatchHandler *>(nodeData);
       delete handler;
       return 0;

Here is the caller graph for this function:

void AEDispatchTree::InsertHandler ( DescType  handlerClass,
AEGenericClass handler,
Boolean  isDuplicate = false 

Definition at line 199 of file nsAEClassDispatcher.cpp.

       AEDispatchHandler    *newHandler = new AEDispatchHandler(handlerClass, handler, !isDuplicate);
       unsigned char        key[5] = {0};                      
       int                         result;
       *(DescType *)key = handlerClass;
       result = PatriciaInsert(mTree, nil, key, newHandler, nil);
       if (result == kDuplicateKeyError || result == 1)
       else if (result != 0)

Here is the call graph for this function:

int AEDispatchTree::ReplaceDispatchTreeNode ( void nodeData,
unsigned char *  key,
void replaceData 
) [static, protected]

Definition at line 245 of file nsAEClassDispatcher.cpp.

       return kDuplicateKeyError;

Member Data Documentation

Definition at line 124 of file nsAEClassDispatcher.h.

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