Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Event Class Reference

A named event, possibly with parameters. More...

Inheritance diagram for Event:
TypedReferenceCount TypedObject ReferenceCount

Public Member Functions

 __init__ (const Event copy)
 
 __init__ (str event_name, EventReceiver receiver)
 
 addParameter (const EventParameter obj)
 
 clearName ()
 Resets the Event's name to empty. More...
 
 clearReceiver ()
 
str getName ()
 
int getNumParameters ()
 
EventParameter getParameter (int n)
 
list getParameters ()
 
EventReceiver getReceiver ()
 
bool hasName ()
 Returns true if the Event has a nonempty name set, false if the name is empty. More...
 
bool hasReceiver ()
 
Event operator= (const Event copy)
 
 output (Ostream out)
 
 setName (str name)
 
 setReceiver (EventReceiver receiver)
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
bool unref ()
 Explicitly decrements the reference count. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Public Attributes

const String name
 
EventParameter parameters []
 
EventReceiver receiver
 
- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 

Detailed Description

A named event, possibly with parameters.

Anyone in any thread may throw an event at any time; there will be one process responsible for reading and dispacting on the events (but not necessarily immediately).

This function use to inherit from Namable, but that makes it too expensive to get its name the Python code. Now it just copies the Namable interface in.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( const Event  copy)

◆ __init__() [2/2]

__init__ ( str  event_name,
EventReceiver  receiver 
)

◆ addParameter()

addParameter ( const EventParameter  obj)

◆ clearName()

clearName ( )

Resets the Event's name to empty.

◆ clearReceiver()

clearReceiver ( )

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getName()

str getName ( )

◆ getNumParameters()

int getNumParameters ( )

◆ getParameter()

EventParameter getParameter ( int  n)

◆ getParameters()

list getParameters ( )

◆ getReceiver()

EventReceiver getReceiver ( )

◆ hasName()

bool hasName ( )

Returns true if the Event has a nonempty name set, false if the name is empty.

◆ hasReceiver()

bool hasReceiver ( )

◆ operator=()

Event operator= ( const Event  copy)

◆ output()

output ( Ostream  out)

◆ setName()

setName ( str  name)

◆ setReceiver()

setReceiver ( EventReceiver  receiver)

Member Data Documentation

◆ name

const String name

◆ parameters

EventParameter parameters[]

◆ receiver

EventReceiver receiver