Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsControllerCommandTable.cpp File Reference
#include "nsString.h"
#include "nsIControllerCommand.h"
#include "nsControllerCommandTable.h"

Go to the source code of this file.

Defines

#define NUM_COMMANDS_BOUNDS   64

Functions

nsresult NS_NewControllerCommandTable (nsIControllerCommandTable **aResult)

Define Documentation

Definition at line 49 of file nsControllerCommandTable.cpp.


Function Documentation

Definition at line 231 of file nsControllerCommandTable.cpp.

{
  NS_PRECONDITION(aResult != nsnull, "null ptr");
  if (! aResult)
    return NS_ERROR_NULL_POINTER;

  nsControllerCommandTable* newCommandTable = new nsControllerCommandTable();
  if (! newCommandTable)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(newCommandTable);
  *aResult = newCommandTable;
  return NS_OK;
}

Here is the call graph for this function: