28 #ifndef GAME_EVENTS_PUMP_H_INCLUDED
29 #define GAME_EVENTS_PUMP_H_INCLUDED
49 : name(name), loc1(loc1), loc2(loc2), data(data)
51 std::replace(this->name.begin(), this->name.end(),
' ',
'_');
67 boost::scoped_ptr<pump_impl>
impl_;
129 #endif // GAME_EVENTS_PUMP_H_INCLUDED
bool context_skip_messages()
Returns whether or not we are skipping messages.
static thandler * handler
boost::scoped_ptr< pump_impl > impl_
bool fire(const std::string &event, const entity_location &loc1=entity_location::null_entity, const entity_location &loc2=entity_location::null_entity, const config &data=config())
Function to fire an event.
void show_wml_messages()
Shows a summary of the messages generated so far by WML.
void flush_messages()
Flushes WML messages and errors.
bool process_event(handler_ptr &handler_p, const queued_event &ev)
Processes an event through a single event handler.
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definitions for the interface to Wesnoth Markup Language (WML).
static const entity_location null_entity
void fill_wml_messages_map(std::map< std::string, int > &msg_map, std::stringstream &source)
Helper function for show_wml_messages(), which gathers the messages from a stringstream.
size_t wml_tracking()
This function can be used to detect when no WML/Lua has been executed.
bool filter_event(const event_handler &handler, const queued_event &ev)
Returns true iff the given event passes all its filters.
queued_event(const std::string &name, const entity_location &loc1, const entity_location &loc2, const config &data)
The game event manager loads the scenario configuration object, and ensures that events are handled a...
bool context_mutated()
Context: The general environment within which events are processed.
std::string replace(std::string str, const std::string &src, const std::string &dst)
Replace all instances of src in str with dst.
GLuint const GLchar * name
void show_wml_errors()
Shows a summary of the errors encountered in WML so far, to avoid a lot of the same messages to be sh...
Define the handlers for the game's events mechanism.
A variable-expanding proxy for the config class.
GLsizei GLenum GLuint GLuint GLsizei char * message
A config object defines a single node in a WML file, with access to child nodes.
void put_wml_message(const std::string &logger, const std::string &message, bool in_chat)
Helper function which determines whether a wml_message text can really be pushed into the wml_message...
GLsizei const GLcharARB ** string
GLsizei GLsizei GLchar * source
Define locations as used by the game's events mechanism.