From 4edae3f518353bb21a02fcda2dfcff83c5a72fc3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 26 Jan 2012 12:08:39 +0100 Subject: New onCommit scripting system. --- server/src/luaoncommit.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 server/src/luaoncommit.h (limited to 'server/src/luaoncommit.h') diff --git a/server/src/luaoncommit.h b/server/src/luaoncommit.h new file mode 100644 index 0000000..b64e744 --- /dev/null +++ b/server/src/luaoncommit.h @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set et sw=2 ts=2: */ +/*************************************************************************** + * luaoncommit.h + * + * Thu Jan 12 08:38:02 CET 2012 + * Copyright 2012 Bent Bisballe Nyeng + * deva@aasimon.org + ****************************************************************************/ + +/* + * This file is part of Pracro. + * + * Pracro is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Pracro is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pracro; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ +#ifndef __PRACRO_LUAONCOMMIT_H__ +#define __PRACRO_LUAONCOMMIT_H__ + +#include "luascript.h" + +#include "transaction.h" +#include + +class LUAOnCommit : public LUAScript { +public: + LUAOnCommit() {} + LUAOnCommit(Transaction &transaction, Commit &commit); + + const char *name() { return "lua on commit"; } +}; + +#endif/*__PRACRO_LUAONCOMMIT_H__*/ -- cgit v1.2.3 From dfa4958ffb3165785149d266af6710762e88ce1e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 Feb 2012 11:14:39 +0100 Subject: Add missing virtual destructor. --- server/src/luaoncommit.h | 1 + 1 file changed, 1 insertion(+) (limited to 'server/src/luaoncommit.h') diff --git a/server/src/luaoncommit.h b/server/src/luaoncommit.h index b64e744..a9883b2 100644 --- a/server/src/luaoncommit.h +++ b/server/src/luaoncommit.h @@ -37,6 +37,7 @@ class LUAOnCommit : public LUAScript { public: LUAOnCommit() {} LUAOnCommit(Transaction &transaction, Commit &commit); + ~LUAOnCommit() {} const char *name() { return "lua on commit"; } }; -- cgit v1.2.3 From 24972d15cec9fc6ffa639f0f62109d8748a7625e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 Feb 2012 11:15:41 +0100 Subject: Add missing virtual destructors (oops, missed the 'virtual' keyword...). --- server/src/luaoncommit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/src/luaoncommit.h') diff --git a/server/src/luaoncommit.h b/server/src/luaoncommit.h index a9883b2..8db75f8 100644 --- a/server/src/luaoncommit.h +++ b/server/src/luaoncommit.h @@ -37,7 +37,7 @@ class LUAOnCommit : public LUAScript { public: LUAOnCommit() {} LUAOnCommit(Transaction &transaction, Commit &commit); - ~LUAOnCommit() {} + virtual ~LUAOnCommit() {} const char *name() { return "lua on commit"; } }; -- cgit v1.2.3