The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros
lua_jailbreak_exception.hpp File Reference
#include "global.hpp"
Include dependency graph for lua_jailbreak_exception.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tlua_jailbreak_exception
 Base class for exceptions that want to be thrown 'through' lua. More...
 

Macros

#define IMPLEMENT_LUA_JAILBREAK_EXCEPTION(type)
 Helper macro for classes deriving from tlua_jailbreak_exception. More...
 

Macro Definition Documentation

#define IMPLEMENT_LUA_JAILBREAK_EXCEPTION (   type)
Value:
\
virtual type* clone() const { return new type(*this); } \
\
virtual void execute() \
{ \
type exception(dynamic_cast<type&>(*jailbreak_exception)); \
throw exception; \
}
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1221

Helper macro for classes deriving from tlua_jailbreak_exception.

tlua_jailbreak_exception has several pure virtual functions, this macro implements them properly. This macro needs to be placed in the definition of the most derived class, which uses tlua_jailbreak_exception as baseclass.

Parameters
typeThe type of the class whc

Definition at line 88 of file lua_jailbreak_exception.hpp.