virtual void put_state(ogzstream &out) const
Saves the basic event data (such as the type or script data) to a file.
Class to read data from a Gzip compressed file.
bool get_state(igzstream &in)
Loads the basic event date from a file.
s_int32 Repeat
Defines how often the event should be repeated.
#define s_int32
32 bits long signed integer
u_int8 Action
What happens if the event occurs - see enum above.
time_event()
Standard constructor.
Class to write data from a Gzip compressed file.
void put_state(ogzstream &out) const
Saves the basic event data (such as the type or script data) to a file.
Declares the gamedate class.
static u_int32 time()
Get the current gametime.
virtual void pause()
Disable the event temporarily.
void pause()
Disable the event temporarily.
virtual bool get_state(igzstream &in)
Loads the basic event date from a file.
py_callback * PyFunc
Python callback that may be executed instead of the script.
virtual void resume()
Re-enable an event that has been paused.
Declares the time_event class.
u_int8 Type
Event type - see enum above.
s_int32 do_repeat()
Decrease the event's repeat count and return the number of repeats left.
py_object * Script
The Python script accociated with this event.
static u_int32 parse_time(const std::string &time)
convert the time string to gametime minutes.
void callback_func0()
Calls the python function without arguments.
u_int32 time() const
Get the event's "alarm" time, i.e.
void resume()
Re-enable an event that has been paused.
Functor0 Callback
C++ callback that may be executed when the event gets triggered.
void run(PyObject *args=NULL)
Calls the run () method of this object.
void set_repeat(const string &interval, s_int32 count=-1)
Set whether the event should be raised at fixed intervals.
s_int32 execute(const event *evnt)
Executes the script associated with this time event.