Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
SimConsoleEvent Class Reference

`#include <simConsoleEvent.h>`

Inheritance diagram for SimConsoleEvent:

## Public Member Functions
| SimConsoleEvent (S32 argc, const char **argv, bool onObject)
| ~SimConsoleEvent ()
virtual void | process (SimObject *object)
Public Member Functions inherited from SimEvent
| SimEvent ()
virtual | ~SimEvent ()

## Protected Attributes
S32 | mArgc
char ** | mArgv
bool | mOnObject

## Additional Inherited Members
Public Attributes inherited from SimEvent
SimEvent * | nextEvent
| Linked list details - pointer to next item in the list. More...
SimTime | startTime
| When the event was posted. More...
SimTime | time
| When the event is scheduled to occur. More...
U32 | sequenceCount
SimObject * | destObject
| Object on which this event will be applied. More...

## Detailed Description

Implementation of schedule() function.

This allows you to set a console function to be called at some point in the future.

## Constructor & Destructor Documentation

SimConsoleEvent | ( | S32 | argc,
|  | const char ** | argv,
|  | bool | onObject
| ) |  |

Constructor

Pass the arguments of a function call, optionally on an object.

The object for the call to be executed on is specified by setting onObject and storing a reference to the object in destObject. If onObject is false, you don't need to store anything into destObject.

The parameters here are passed unmodified to Con::execute() at the time of the event.

See also
  Con::execute(S32 argc, const char *argv[])
  Con::execute(SimObject *object, S32 argc, const char *argv[])

~SimConsoleEvent | ( |  | ) |

## Member Function Documentation

void process | ( | SimObject * | object | ) |
| virtual

Function called when event occurs.

This is where the meat of your event's implementation goes.

See any of the subclasses for ideas of what goes in here.

The event is deleted immediately after processing. If the object referenced in destObject is deleted, then the event is not called. The even will be executed unconditionally if the object referenced is NULL.

Parameters

  object | Object stored in destObject.

Implements SimEvent.

Reimplemented in SimConsoleThreadExecEvent.

## Member Data Documentation

S32 mArgc
| protected

char** mArgv
| protected

bool mOnObject
| protected

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

- sim/simConsoleEvent.h
- sim/simConsoleEvent.cc