Factory class for events. More...
#include <eventfactory.h>
Public Member Functions | |
EventFactory (World *w) | |
constructor; | |
virtual FactoryType | factoryType (void) |
the generic type of the factory | |
virtual QString | factoryName (void) |
the name used to save this factory | |
virtual EventSource * | create (ID id) |
create an event source; | |
virtual EventSource * | create (QSettings &stg) |
create an event source; | |
virtual bool | save (QSettings &s) const |
save to a QSettings object | |
virtual bool | load (QSettings &s) |
load from a QSettings object | |
Public Member Functions inherited from april::Factory | |
Factory (World *w) | |
constructor; | |
World * | world (void) const |
the world that hosts us; | |
virtual const QString & | name (ID id) const |
name of the element represented by provided ID | |
virtual QList< qreal > | averageDNA (ID id) const |
get the default DNA sequence for a particular ID |
Protected Member Functions | |
virtual | ~EventFactory (void) |
destructor; | |
bool | addMyself (ID id) |
add this class to the world | |
Protected Member Functions inherited from april::Factory | |
virtual | ~Factory (void) |
destructor; | |
void | setName (const QString &s) |
chang the name of the element represented by provided ID | |
bool | setEnergy (ActorComp *comp, quint64 energy, quint64 cost) |
set the packed energy and the ammount of energy consumed on each time unit |
Factory class for events.
Each such class may be capable of creating one or more types or events. At construction time each such type (ID) must be associated with this instance in the World with World::addEventFactory().
|
virtual |
create an event source;
By default this method creates a simple EventSource. The caller recieves a reference that should eventually discard.
id | The id that is requested; the implementation does not use this parameter |
|
inlinevirtual |
create an event source;