From 363f23b1d8411ff28837acb5def0f41e61931b14 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 21 Jan 2015 08:47:45 +0100 Subject: [PATCH] Rename ScriptFunction to Function fixes #8258 --- lib/base/CMakeLists.txt | 2 +- lib/base/array-script.cpp | 22 ++-- lib/base/boolean-script.cpp | 6 +- lib/base/dictionary-script.cpp | 14 +-- lib/base/dynamicobject.cpp | 2 +- ...unction-script.cpp => function-script.cpp} | 18 +-- lib/base/{scriptfunction.cpp => function.cpp} | 8 +- lib/base/{scriptfunction.hpp => function.hpp} | 10 +- ...unctionwrapper.cpp => functionwrapper.cpp} | 10 +- ...unctionwrapper.hpp => functionwrapper.hpp} | 114 +++++++++--------- lib/base/math-script.cpp | 46 +++---- lib/base/number-script.cpp | 6 +- lib/base/object-script.cpp | 6 +- lib/base/scriptutils.cpp | 2 +- lib/base/string-script.cpp | 20 +-- lib/compat/compatlogger.cpp | 2 +- lib/config/configitem.cpp | 2 +- lib/config/configtype.cpp | 6 +- lib/config/expression.cpp | 4 +- lib/config/expression.hpp | 2 +- lib/config/vmops.hpp | 6 +- lib/db_ido/dbconnection.cpp | 2 +- lib/icinga/checkable.cpp | 2 +- lib/icinga/command.cpp | 2 +- lib/icinga/command.ti | 4 +- lib/icinga/dependency.cpp | 2 +- lib/icinga/legacytimeperiod.cpp | 2 +- lib/icinga/notification.cpp | 2 +- lib/icinga/timeperiod.ti | 4 +- lib/icinga/user.cpp | 2 +- lib/livestatus/livestatuslistener.cpp | 2 +- lib/methods/clrchecktask.cpp | 2 +- lib/methods/clusterchecktask.cpp | 2 +- lib/methods/clusterzonechecktask.cpp | 2 +- lib/methods/icingachecktask.cpp | 2 +- lib/methods/nullchecktask.cpp | 2 +- lib/methods/nulleventtask.cpp | 2 +- lib/methods/pluginchecktask.cpp | 2 +- lib/methods/plugineventtask.cpp | 2 +- lib/methods/pluginnotificationtask.cpp | 2 +- lib/methods/randomchecktask.cpp | 2 +- lib/methods/timeperiodtask.cpp | 2 +- 42 files changed, 177 insertions(+), 177 deletions(-) rename lib/base/{scriptfunction-script.cpp => function-script.cpp} (78%) rename lib/base/{scriptfunction.cpp => function.cpp} (87%) rename lib/base/{scriptfunction.hpp => function.hpp} (89%) rename lib/base/{scriptfunctionwrapper.cpp => functionwrapper.cpp} (81%) rename lib/base/{scriptfunctionwrapper.hpp => functionwrapper.hpp} (72%) diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index 0fe018675..3630f2be4 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -27,7 +27,7 @@ set(base_SOURCES convert.cpp debuginfo.cpp dictionary.cpp dictionary-script.cpp dynamicobject.cpp dynamicobject.thpp dynamictype.cpp exception.cpp fifo.cpp filelogger.cpp filelogger.thpp initialize.cpp json.cpp logger.cpp logger.thpp math-script.cpp netstring.cpp networkstream.cpp number.cpp number-script.cpp object.cpp object-script.cpp primitivetype.cpp process.cpp - ringbuffer.cpp scriptframe.cpp scriptfunction.cpp scriptfunction-script.cpp scriptfunctionwrapper.cpp scriptglobal.cpp + ringbuffer.cpp scriptframe.cpp function.cpp function-script.cpp functionwrapper.cpp scriptglobal.cpp scriptutils.cpp serializer.cpp socket.cpp stacktrace.cpp statsfunction.cpp stdiostream.cpp stream.cpp streamlogger.cpp streamlogger.thpp string.cpp string-script.cpp sysloglogger.cpp sysloglogger.thpp tcpsocket.cpp thinmutex.cpp threadpool.cpp timer.cpp diff --git a/lib/base/array-script.cpp b/lib/base/array-script.cpp index 46f020a03..38dab7f28 100644 --- a/lib/base/array-script.cpp +++ b/lib/base/array-script.cpp @@ -18,8 +18,8 @@ ******************************************************************************/ #include "base/array.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" #include "base/objectlock.hpp" @@ -67,7 +67,7 @@ static void ArrayClear(void) self->Clear(); } -static bool ArraySortCmp(const ScriptFunction::Ptr& cmp, const Value& a, const Value& b) +static bool ArraySortCmp(const Function::Ptr& cmp, const Value& a, const Value& b) { std::vector args; args.push_back(a); @@ -106,14 +106,14 @@ Object::Ptr Array::GetPrototype(void) if (!prototype) { prototype = new Dictionary(); - prototype->Set("len", new ScriptFunction(WrapScriptFunction(ArrayLen))); - prototype->Set("set", new ScriptFunction(WrapScriptFunction(ArraySet))); - prototype->Set("add", new ScriptFunction(WrapScriptFunction(ArrayAdd))); - prototype->Set("remove", new ScriptFunction(WrapScriptFunction(ArrayRemove))); - prototype->Set("contains", new ScriptFunction(WrapScriptFunction(ArrayContains))); - prototype->Set("clear", new ScriptFunction(WrapScriptFunction(ArrayClear))); - prototype->Set("sort", new ScriptFunction(WrapScriptFunction(ArraySort))); - prototype->Set("clone", new ScriptFunction(WrapScriptFunction(ArrayClone))); + prototype->Set("len", new Function(WrapFunction(ArrayLen))); + prototype->Set("set", new Function(WrapFunction(ArraySet))); + prototype->Set("add", new Function(WrapFunction(ArrayAdd))); + prototype->Set("remove", new Function(WrapFunction(ArrayRemove))); + prototype->Set("contains", new Function(WrapFunction(ArrayContains))); + prototype->Set("clear", new Function(WrapFunction(ArrayClear))); + prototype->Set("sort", new Function(WrapFunction(ArraySort))); + prototype->Set("clone", new Function(WrapFunction(ArrayClone))); } return prototype; diff --git a/lib/base/boolean-script.cpp b/lib/base/boolean-script.cpp index 29f637463..262c31ba0 100644 --- a/lib/base/boolean-script.cpp +++ b/lib/base/boolean-script.cpp @@ -19,8 +19,8 @@ #include "base/boolean.hpp" #include "base/convert.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" using namespace icinga; @@ -38,7 +38,7 @@ Object::Ptr Boolean::GetPrototype(void) if (!prototype) { prototype = new Dictionary(); - prototype->Set("to_string", new ScriptFunction(WrapScriptFunction(BooleanToString))); + prototype->Set("to_string", new Function(WrapFunction(BooleanToString))); } return prototype; diff --git a/lib/base/dictionary-script.cpp b/lib/base/dictionary-script.cpp index c46cdc990..6f2215c47 100644 --- a/lib/base/dictionary-script.cpp +++ b/lib/base/dictionary-script.cpp @@ -18,8 +18,8 @@ ******************************************************************************/ #include "base/dictionary.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" using namespace icinga; @@ -65,11 +65,11 @@ Object::Ptr Dictionary::GetPrototype(void) if (!prototype) { prototype = new Dictionary(); - prototype->Set("len", new ScriptFunction(WrapScriptFunction(DictionaryLen))); - prototype->Set("set", new ScriptFunction(WrapScriptFunction(DictionarySet))); - prototype->Set("remove", new ScriptFunction(WrapScriptFunction(DictionaryRemove))); - prototype->Set("contains", new ScriptFunction(WrapScriptFunction(DictionaryContains))); - prototype->Set("clone", new ScriptFunction(WrapScriptFunction(DictionaryClone))); + prototype->Set("len", new Function(WrapFunction(DictionaryLen))); + prototype->Set("set", new Function(WrapFunction(DictionarySet))); + prototype->Set("remove", new Function(WrapFunction(DictionaryRemove))); + prototype->Set("contains", new Function(WrapFunction(DictionaryContains))); + prototype->Set("clone", new Function(WrapFunction(DictionaryClone))); } return prototype; diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index 55438ee91..bfbe2ab6a 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -27,7 +27,7 @@ #include "base/objectlock.hpp" #include "base/logger.hpp" #include "base/exception.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/initialize.hpp" #include "base/workqueue.hpp" #include "base/context.hpp" diff --git a/lib/base/scriptfunction-script.cpp b/lib/base/function-script.cpp similarity index 78% rename from lib/base/scriptfunction-script.cpp rename to lib/base/function-script.cpp index 02e501ed9..4aec0759b 100644 --- a/lib/base/scriptfunction-script.cpp +++ b/lib/base/function-script.cpp @@ -17,31 +17,31 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" #include "base/objectlock.hpp" #include "base/exception.hpp" using namespace icinga; -static Value ScriptFunctionCall(const std::vector& args) +static Value FunctionCall(const std::vector& args) { if (args.size() < 1) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for call()")); ScriptFrame *vframe = ScriptFrame::GetCurrentFrame(); - ScriptFunction::Ptr self = static_cast(vframe->Self); + Function::Ptr self = static_cast(vframe->Self); ScriptFrame uframe(args[0]); std::vector uargs(args.begin() + 1, args.end()); return self->Invoke(uargs); } -static Value ScriptFunctionCallV(const Value& thisArg, const Array::Ptr& args) +static Value FunctionCallV(const Value& thisArg, const Array::Ptr& args) { ScriptFrame *vframe = ScriptFrame::GetCurrentFrame(); - ScriptFunction::Ptr self = static_cast(vframe->Self); + Function::Ptr self = static_cast(vframe->Self); ScriptFrame uframe(thisArg); std::vector uargs; @@ -55,14 +55,14 @@ static Value ScriptFunctionCallV(const Value& thisArg, const Array::Ptr& args) } -Object::Ptr ScriptFunction::GetPrototype(void) +Object::Ptr Function::GetPrototype(void) { static Dictionary::Ptr prototype; if (!prototype) { prototype = new Dictionary(); - prototype->Set("call", new ScriptFunction(WrapScriptFunction(ScriptFunctionCall))); - prototype->Set("callv", new ScriptFunction(WrapScriptFunction(ScriptFunctionCallV))); + prototype->Set("call", new Function(WrapFunction(FunctionCall))); + prototype->Set("callv", new Function(WrapFunction(FunctionCallV))); } return prototype; diff --git a/lib/base/scriptfunction.cpp b/lib/base/function.cpp similarity index 87% rename from lib/base/scriptfunction.cpp rename to lib/base/function.cpp index 5b9c6dc03..69d895a6f 100644 --- a/lib/base/scriptfunction.cpp +++ b/lib/base/function.cpp @@ -17,19 +17,19 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/primitivetype.hpp" #include "base/dictionary.hpp" using namespace icinga; -REGISTER_PRIMITIVE_TYPE(ScriptFunction, ScriptFunction::GetPrototype()); +REGISTER_PRIMITIVE_TYPE(Function, Function::GetPrototype()); -ScriptFunction::ScriptFunction(const Callback& function) +Function::Function(const Callback& function) : m_Callback(function) { } -Value ScriptFunction::Invoke(const std::vector& arguments) +Value Function::Invoke(const std::vector& arguments) { return m_Callback(arguments); } diff --git a/lib/base/scriptfunction.hpp b/lib/base/function.hpp similarity index 89% rename from lib/base/scriptfunction.hpp rename to lib/base/function.hpp index a43846220..889c745a1 100644 --- a/lib/base/scriptfunction.hpp +++ b/lib/base/function.hpp @@ -22,7 +22,7 @@ #include "base/i2-base.hpp" #include "base/value.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptglobal.hpp" #include #include @@ -35,14 +35,14 @@ namespace icinga * * @ingroup base */ -class I2_BASE_API ScriptFunction : public Object +class I2_BASE_API Function : public Object { public: - DECLARE_OBJECT(ScriptFunction); + DECLARE_OBJECT(Function); typedef boost::function& arguments)> Callback; - ScriptFunction(const Callback& function); + Function(const Callback& function); Value Invoke(const std::vector& arguments); @@ -55,7 +55,7 @@ private: #define REGISTER_SCRIPTFUNCTION(name, callback) \ namespace { namespace UNIQUE_NAME(sf) { namespace sf ## name { \ void RegisterFunction(void) { \ - ScriptFunction::Ptr sf = new icinga::ScriptFunction(WrapScriptFunction(callback)); \ + Function::Ptr sf = new icinga::Function(WrapFunction(callback)); \ ScriptGlobal::Set(#name, sf); \ } \ INITIALIZE_ONCE(RegisterFunction); \ diff --git a/lib/base/scriptfunctionwrapper.cpp b/lib/base/functionwrapper.cpp similarity index 81% rename from lib/base/scriptfunctionwrapper.cpp rename to lib/base/functionwrapper.cpp index 80e6590c6..c4d64c1d2 100644 --- a/lib/base/scriptfunctionwrapper.cpp +++ b/lib/base/functionwrapper.cpp @@ -17,25 +17,25 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -#include "base/scriptfunctionwrapper.hpp" +#include "base/functionwrapper.hpp" using namespace icinga; -Value icinga::ScriptFunctionWrapperVV(void (*function)(void), const std::vector&) +Value icinga::FunctionWrapperVV(void (*function)(void), const std::vector&) { function(); return Empty; } -Value icinga::ScriptFunctionWrapperVA(void (*function)(const std::vector&), const std::vector& arguments) +Value icinga::FunctionWrapperVA(void (*function)(const std::vector&), const std::vector& arguments) { function(arguments); return Empty; } -boost::function& arguments)> icinga::WrapScriptFunction(void (*function)(void)) +boost::function& arguments)> icinga::WrapFunction(void (*function)(void)) { - return boost::bind(&ScriptFunctionWrapperVV, function, _1); + return boost::bind(&FunctionWrapperVV, function, _1); } diff --git a/lib/base/scriptfunctionwrapper.hpp b/lib/base/functionwrapper.hpp similarity index 72% rename from lib/base/scriptfunctionwrapper.hpp rename to lib/base/functionwrapper.hpp index e0b08be41..ff28dcec6 100644 --- a/lib/base/scriptfunctionwrapper.hpp +++ b/lib/base/functionwrapper.hpp @@ -29,25 +29,25 @@ namespace icinga { -Value ScriptFunctionWrapperVV(void (*function)(void), const std::vector& arguments); -Value ScriptFunctionWrapperVA(void (*function)(const std::vector&), const std::vector& arguments); +Value FunctionWrapperVV(void (*function)(void), const std::vector& arguments); +Value FunctionWrapperVA(void (*function)(const std::vector&), const std::vector& arguments); -boost::function& arguments)> I2_BASE_API WrapScriptFunction(void (*function)(void)); +boost::function& arguments)> I2_BASE_API WrapFunction(void (*function)(void)); template -Value ScriptFunctionWrapperR(TR (*function)(void), const std::vector&) +Value FunctionWrapperR(TR (*function)(void), const std::vector&) { return function(); } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(void)) +boost::function& arguments)> WrapFunction(TR (*function)(void)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0), const std::vector& arguments) { if (arguments.size() < 1) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -58,13 +58,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0), const std::vector& arg } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0)) +boost::function& arguments)> WrapFunction(void (*function)(T0)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0), const std::vector& arguments) { if (arguments.size() < 1) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -73,13 +73,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0), const std::vector& argum } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0)) +boost::function& arguments)> WrapFunction(TR (*function)(T0)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1), const std::vector& arguments) { if (arguments.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -91,13 +91,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1), const std::vector& } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1), const std::vector& arguments) { if (arguments.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -107,13 +107,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1), const std::vector& a } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1, T2), const std::vector& arguments) { if (arguments.size() < 3) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -126,13 +126,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2), const std::vector -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1, T2)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1, T2)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1, T2), const std::vector& arguments) { if (arguments.size() < 3) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -143,13 +143,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2), const std::vector -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1, T2)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1, T2)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1, T2, T3), const std::vector& arguments) { if (arguments.size() < 4) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -163,13 +163,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3), const std::vector } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1, T2, T3)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3), const std::vector& arguments) { if (arguments.size() < 4) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -181,13 +181,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3), const std::vector -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1, T2, T3)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4), const std::vector& arguments) { if (arguments.size() < 5) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -202,13 +202,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4), const std::ve } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1, T2, T3, T4)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4), const std::vector& arguments) { if (arguments.size() < 5) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -221,13 +221,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4), const std::vect } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1, T2, T3, T4)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5), const std::vector& arguments) { if (arguments.size() < 6) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -243,13 +243,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5), const std } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1, T2, T3, T4, T5)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5), const std::vector& arguments) { if (arguments.size() < 6) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -263,13 +263,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5), const std:: } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1, T2, T3, T4, T5)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6), const std::vector& arguments) { if (arguments.size() < 7) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -286,13 +286,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6), const } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6), const std::vector& arguments) { if (arguments.size() < 7) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -307,13 +307,13 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6), const s } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7), const std::vector& arguments) +Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7), const std::vector& arguments) { if (arguments.size() < 8) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -331,13 +331,13 @@ Value ScriptFunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7), c } template -boost::function& arguments)> WrapScriptFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7)) +boost::function& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7)) { - return boost::bind(&ScriptFunctionWrapperV, function, _1); + return boost::bind(&FunctionWrapperV, function, _1); } template -Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7), const std::vector& arguments) +Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7), const std::vector& arguments) { if (arguments.size() < 8) BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for function.")); @@ -353,20 +353,20 @@ Value ScriptFunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7), con } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7)) +boost::function& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7)) { - return boost::bind(&ScriptFunctionWrapperR, function, _1); + return boost::bind(&FunctionWrapperR, function, _1); } template -boost::function& arguments)> WrapScriptFunction(TR (*function)(const std::vector&)) +boost::function& arguments)> WrapFunction(TR (*function)(const std::vector&)) { return boost::bind(function, _1); } -inline boost::function& arguments)> WrapScriptFunction(void (*function)(const std::vector&)) +inline boost::function& arguments)> WrapFunction(void (*function)(const std::vector&)) { - return boost::bind(&ScriptFunctionWrapperVA, function, _1); + return boost::bind(&FunctionWrapperVA, function, _1); } } diff --git a/lib/base/math-script.cpp b/lib/base/math-script.cpp index 7f2023f7b..7e7a0bada 100644 --- a/lib/base/math-script.cpp +++ b/lib/base/math-script.cpp @@ -18,8 +18,8 @@ ******************************************************************************/ #include "base/dictionary.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" #include "base/initialize.hpp" #include @@ -174,27 +174,27 @@ static void InitializeMathObj(void) mathObj->Set("SQRT2", 1.41421356237309504880); /* Methods */ - mathObj->Set("abs", new ScriptFunction(WrapScriptFunction(MathAbs))); - mathObj->Set("acos", new ScriptFunction(WrapScriptFunction(MathAcos))); - mathObj->Set("asin", new ScriptFunction(WrapScriptFunction(MathAsin))); - mathObj->Set("atan", new ScriptFunction(WrapScriptFunction(MathAtan))); - mathObj->Set("atan2", new ScriptFunction(WrapScriptFunction(MathAtan2))); - mathObj->Set("ceil", new ScriptFunction(WrapScriptFunction(MathCeil))); - mathObj->Set("cos", new ScriptFunction(WrapScriptFunction(MathCos))); - mathObj->Set("exp", new ScriptFunction(WrapScriptFunction(MathExp))); - mathObj->Set("floor", new ScriptFunction(WrapScriptFunction(MathFloor))); - mathObj->Set("log", new ScriptFunction(WrapScriptFunction(MathLog))); - mathObj->Set("max", new ScriptFunction(WrapScriptFunction(MathMax))); - mathObj->Set("min", new ScriptFunction(WrapScriptFunction(MathMin))); - mathObj->Set("pow", new ScriptFunction(WrapScriptFunction(MathPow))); - mathObj->Set("random", new ScriptFunction(WrapScriptFunction(MathRandom))); - mathObj->Set("round", new ScriptFunction(WrapScriptFunction(MathRound))); - mathObj->Set("sin", new ScriptFunction(WrapScriptFunction(MathSin))); - mathObj->Set("sqrt", new ScriptFunction(WrapScriptFunction(MathSqrt))); - mathObj->Set("tan", new ScriptFunction(WrapScriptFunction(MathTan))); - mathObj->Set("isnan", new ScriptFunction(WrapScriptFunction(MathIsnan))); - mathObj->Set("isinf", new ScriptFunction(WrapScriptFunction(MathIsinf))); - mathObj->Set("sign", new ScriptFunction(WrapScriptFunction(MathSign))); + mathObj->Set("abs", new Function(WrapFunction(MathAbs))); + mathObj->Set("acos", new Function(WrapFunction(MathAcos))); + mathObj->Set("asin", new Function(WrapFunction(MathAsin))); + mathObj->Set("atan", new Function(WrapFunction(MathAtan))); + mathObj->Set("atan2", new Function(WrapFunction(MathAtan2))); + mathObj->Set("ceil", new Function(WrapFunction(MathCeil))); + mathObj->Set("cos", new Function(WrapFunction(MathCos))); + mathObj->Set("exp", new Function(WrapFunction(MathExp))); + mathObj->Set("floor", new Function(WrapFunction(MathFloor))); + mathObj->Set("log", new Function(WrapFunction(MathLog))); + mathObj->Set("max", new Function(WrapFunction(MathMax))); + mathObj->Set("min", new Function(WrapFunction(MathMin))); + mathObj->Set("pow", new Function(WrapFunction(MathPow))); + mathObj->Set("random", new Function(WrapFunction(MathRandom))); + mathObj->Set("round", new Function(WrapFunction(MathRound))); + mathObj->Set("sin", new Function(WrapFunction(MathSin))); + mathObj->Set("sqrt", new Function(WrapFunction(MathSqrt))); + mathObj->Set("tan", new Function(WrapFunction(MathTan))); + mathObj->Set("isnan", new Function(WrapFunction(MathIsnan))); + mathObj->Set("isinf", new Function(WrapFunction(MathIsinf))); + mathObj->Set("sign", new Function(WrapFunction(MathSign))); ScriptGlobal::Set("Math", mathObj); } diff --git a/lib/base/number-script.cpp b/lib/base/number-script.cpp index 76dd582dc..19768db21 100644 --- a/lib/base/number-script.cpp +++ b/lib/base/number-script.cpp @@ -19,8 +19,8 @@ #include "base/number.hpp" #include "base/convert.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" using namespace icinga; @@ -38,7 +38,7 @@ Object::Ptr Number::GetPrototype(void) if (!prototype) { prototype = new Dictionary(); - prototype->Set("to_string", new ScriptFunction(WrapScriptFunction(NumberToString))); + prototype->Set("to_string", new Function(WrapFunction(NumberToString))); } return prototype; diff --git a/lib/base/object-script.cpp b/lib/base/object-script.cpp index c1d202d03..196db9c47 100644 --- a/lib/base/object-script.cpp +++ b/lib/base/object-script.cpp @@ -19,8 +19,8 @@ #include "base/object.hpp" #include "base/dictionary.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" using namespace icinga; @@ -38,7 +38,7 @@ Object::Ptr Object::GetPrototype(void) if (!prototype) { prototype = new Dictionary(); - prototype->Set("to_string", new ScriptFunction(WrapScriptFunction(ObjectToString))); + prototype->Set("to_string", new Function(WrapFunction(ObjectToString))); } return prototype; diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp index ceabf1ec8..1aeea549f 100644 --- a/lib/base/scriptutils.cpp +++ b/lib/base/scriptutils.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "base/scriptutils.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/utility.hpp" #include "base/convert.hpp" #include "base/json.hpp" diff --git a/lib/base/string-script.cpp b/lib/base/string-script.cpp index 725270d9a..43fb9f271 100644 --- a/lib/base/string-script.cpp +++ b/lib/base/string-script.cpp @@ -19,8 +19,8 @@ #include "base/object.hpp" #include "base/dictionary.hpp" -#include "base/scriptfunction.hpp" -#include "base/scriptfunctionwrapper.hpp" +#include "base/function.hpp" +#include "base/functionwrapper.hpp" #include "base/scriptframe.hpp" #include "base/exception.hpp" #include @@ -126,14 +126,14 @@ Object::Ptr String::GetPrototype(void) if (!prototype) { prototype = new Dictionary(); - prototype->Set("len", new ScriptFunction(WrapScriptFunction(StringLen))); - prototype->Set("to_string", new ScriptFunction(WrapScriptFunction(StringToString))); - prototype->Set("substr", new ScriptFunction(WrapScriptFunction(StringSubstr))); - prototype->Set("upper", new ScriptFunction(WrapScriptFunction(StringUpper))); - prototype->Set("lower", new ScriptFunction(WrapScriptFunction(StringLower))); - prototype->Set("split", new ScriptFunction(WrapScriptFunction(StringSplit))); - prototype->Set("find", new ScriptFunction(WrapScriptFunction(StringFind))); - prototype->Set("replace", new ScriptFunction(WrapScriptFunction(StringReplace))); + prototype->Set("len", new Function(WrapFunction(StringLen))); + prototype->Set("to_string", new Function(WrapFunction(StringToString))); + prototype->Set("substr", new Function(WrapFunction(StringSubstr))); + prototype->Set("upper", new Function(WrapFunction(StringUpper))); + prototype->Set("lower", new Function(WrapFunction(StringLower))); + prototype->Set("split", new Function(WrapFunction(StringSplit))); + prototype->Set("find", new Function(WrapFunction(StringFind))); + prototype->Set("replace", new Function(WrapFunction(StringReplace))); } return prototype; diff --git a/lib/compat/compatlogger.cpp b/lib/compat/compatlogger.cpp index 7690dc1dd..cdc2ffd83 100644 --- a/lib/compat/compatlogger.cpp +++ b/lib/compat/compatlogger.cpp @@ -32,7 +32,7 @@ #include "base/convert.hpp" #include "base/application.hpp" #include "base/utility.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/statsfunction.hpp" #include #include diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index c3b87f857..adfadab47 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -35,7 +35,7 @@ #include "base/serializer.hpp" #include "base/json.hpp" #include "base/exception.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include #include #include diff --git a/lib/config/configtype.cpp b/lib/config/configtype.cpp index 0a226af30..bfe3f896f 100644 --- a/lib/config/configtype.cpp +++ b/lib/config/configtype.cpp @@ -22,7 +22,7 @@ #include "base/objectlock.hpp" #include "base/convert.hpp" #include "base/singleton.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include using namespace icinga; @@ -172,7 +172,7 @@ void ConfigType::ValidateObject(const Object::Ptr& object, String validator = ruleList->GetValidator(); if (!validator.IsEmpty()) { - ScriptFunction::Ptr func = ScriptGlobal::Get(validator, &Empty); + Function::Ptr func = ScriptGlobal::Get(validator, &Empty); if (!func) BOOST_THROW_EXCEPTION(std::invalid_argument("Validator function '" + validator + "' does not exist.")); @@ -229,7 +229,7 @@ void ConfigType::ValidateArray(const Array::Ptr& array, String validator = ruleList->GetValidator(); if (!validator.IsEmpty()) { - ScriptFunction::Ptr func = ScriptGlobal::Get(validator, &Empty); + Function::Ptr func = ScriptGlobal::Get(validator, &Empty); if (!func) BOOST_THROW_EXCEPTION(std::invalid_argument("Validator function '" + validator + "' does not exist.")); diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index 5bf17806c..7aa79105f 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -267,10 +267,10 @@ Value FunctionCallExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) c else vfunc = m_FName->Evaluate(frame); - if (!vfunc.IsObjectType()) + if (!vfunc.IsObjectType()) BOOST_THROW_EXCEPTION(ScriptError("Argument is not a callable object.", m_DebugInfo)); - ScriptFunction::Ptr func = vfunc; + Function::Ptr func = vfunc; std::vector arguments; BOOST_FOREACH(Expression *arg, m_Args) { diff --git a/lib/config/expression.hpp b/lib/config/expression.hpp index 6948d1cca..c2a78cc34 100644 --- a/lib/config/expression.hpp +++ b/lib/config/expression.hpp @@ -24,7 +24,7 @@ #include "base/debuginfo.hpp" #include "base/array.hpp" #include "base/dictionary.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/exception.hpp" #include "base/scriptframe.hpp" #include "base/convert.hpp" diff --git a/lib/config/vmops.hpp b/lib/config/vmops.hpp index cb5f3e508..d1cde03d3 100644 --- a/lib/config/vmops.hpp +++ b/lib/config/vmops.hpp @@ -28,7 +28,7 @@ #include "base/debuginfo.hpp" #include "base/array.hpp" #include "base/dictionary.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/scriptglobal.hpp" #include "base/exception.hpp" #include "base/convert.hpp" @@ -54,7 +54,7 @@ public: return ScriptGlobal::Get(name); } - static inline Value FunctionCall(ScriptFrame& frame, const Value& self, const ScriptFunction::Ptr& func, const std::vector& arguments) + static inline Value FunctionCall(ScriptFrame& frame, const Value& self, const Function::Ptr& func, const std::vector& arguments) { boost::shared_ptr vframe; @@ -69,7 +69,7 @@ public: static inline Value NewFunction(ScriptFrame& frame, const std::vector& args, std::map *closedVars, const boost::shared_ptr& expression) { - return new ScriptFunction(boost::bind(&FunctionWrapper, _1, args, + return new Function(boost::bind(&FunctionWrapper, _1, args, EvaluateClosedVars(frame, closedVars), expression)); } diff --git a/lib/db_ido/dbconnection.cpp b/lib/db_ido/dbconnection.cpp index 54fa30b11..da50aa0b1 100644 --- a/lib/db_ido/dbconnection.cpp +++ b/lib/db_ido/dbconnection.cpp @@ -28,7 +28,7 @@ #include "base/utility.hpp" #include "base/initialize.hpp" #include "base/logger.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/exception.hpp" #include diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp index ad8a92117..846161b71 100644 --- a/lib/icinga/checkable.cpp +++ b/lib/icinga/checkable.cpp @@ -20,7 +20,7 @@ #include "icinga/checkable.hpp" #include "base/objectlock.hpp" #include "base/utility.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/exception.hpp" #include #include diff --git a/lib/icinga/command.cpp b/lib/icinga/command.cpp index b6ccf9fd4..ff58a4baf 100644 --- a/lib/icinga/command.cpp +++ b/lib/icinga/command.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "icinga/command.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/exception.hpp" using namespace icinga; diff --git a/lib/icinga/command.ti b/lib/icinga/command.ti index 0b1fc6480..0b4c4881d 100644 --- a/lib/icinga/command.ti +++ b/lib/icinga/command.ti @@ -18,7 +18,7 @@ ******************************************************************************/ #include "icinga/customvarobject.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" namespace icinga { @@ -31,7 +31,7 @@ abstract class Command : CustomVarObject default {{{ return 60; }}} }; [config] Dictionary::Ptr env; - [config] ScriptFunction::Ptr execute; + [config] Function::Ptr execute; }; } diff --git a/lib/icinga/dependency.cpp b/lib/icinga/dependency.cpp index db7d945c0..d04e348a6 100644 --- a/lib/icinga/dependency.cpp +++ b/lib/icinga/dependency.cpp @@ -20,7 +20,7 @@ #include "icinga/dependency.hpp" #include "icinga/service.hpp" #include "base/logger.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/exception.hpp" #include diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp index e2f3aa119..456e05187 100644 --- a/lib/icinga/legacytimeperiod.cpp +++ b/lib/icinga/legacytimeperiod.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "icinga/legacytimeperiod.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/convert.hpp" #include "base/exception.hpp" #include "base/objectlock.hpp" diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp index 4bc207cc9..3d457cf43 100644 --- a/lib/icinga/notification.cpp +++ b/lib/icinga/notification.cpp @@ -27,7 +27,7 @@ #include "base/exception.hpp" #include "base/initialize.hpp" #include "base/scriptglobal.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include using namespace icinga; diff --git a/lib/icinga/timeperiod.ti b/lib/icinga/timeperiod.ti index 6c12e7720..cc062645c 100644 --- a/lib/icinga/timeperiod.ti +++ b/lib/icinga/timeperiod.ti @@ -18,7 +18,7 @@ ******************************************************************************/ #include "icinga/customvarobject.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" namespace icinga { @@ -34,7 +34,7 @@ class TimePeriod : CustomVarObject }}} }; [config] Dictionary::Ptr ranges; - [config] ScriptFunction::Ptr update; + [config] Function::Ptr update; [state] Value valid_begin; [state] Value valid_end; [state] Array::Ptr segments; diff --git a/lib/icinga/user.cpp b/lib/icinga/user.cpp index 434e520ad..c9f42a1b9 100644 --- a/lib/icinga/user.cpp +++ b/lib/icinga/user.cpp @@ -21,7 +21,7 @@ #include "icinga/usergroup.hpp" #include "icinga/notification.hpp" #include "icinga/usergroup.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/objectlock.hpp" #include "base/exception.hpp" #include diff --git a/lib/livestatus/livestatuslistener.cpp b/lib/livestatus/livestatuslistener.cpp index 7d8252cd3..a0c6683b0 100644 --- a/lib/livestatus/livestatuslistener.cpp +++ b/lib/livestatus/livestatuslistener.cpp @@ -28,7 +28,7 @@ #include "base/unixsocket.hpp" #include "base/networkstream.hpp" #include "base/application.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/statsfunction.hpp" #include "base/convert.hpp" diff --git a/lib/methods/clrchecktask.cpp b/lib/methods/clrchecktask.cpp index e77fd69ff..bad67ad6b 100644 --- a/lib/methods/clrchecktask.cpp +++ b/lib/methods/clrchecktask.cpp @@ -24,7 +24,7 @@ #include "icinga/icingaapplication.hpp" #include "base/dynamictype.hpp" #include "base/logger.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/utility.hpp" #include "base/process.hpp" #include diff --git a/lib/methods/clusterchecktask.cpp b/lib/methods/clusterchecktask.cpp index 36f24bea4..43ad37b77 100644 --- a/lib/methods/clusterchecktask.cpp +++ b/lib/methods/clusterchecktask.cpp @@ -27,7 +27,7 @@ #include "base/objectlock.hpp" #include "base/convert.hpp" #include "base/utility.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/dynamictype.hpp" #include #include diff --git a/lib/methods/clusterzonechecktask.cpp b/lib/methods/clusterzonechecktask.cpp index a8fc94833..d5945c85d 100644 --- a/lib/methods/clusterzonechecktask.cpp +++ b/lib/methods/clusterzonechecktask.cpp @@ -23,7 +23,7 @@ #include "remote/apilistener.hpp" #include "remote/endpoint.hpp" #include "remote/zone.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include using namespace icinga; diff --git a/lib/methods/icingachecktask.cpp b/lib/methods/icingachecktask.cpp index 808e1581c..4ef791743 100644 --- a/lib/methods/icingachecktask.cpp +++ b/lib/methods/icingachecktask.cpp @@ -25,7 +25,7 @@ #include "base/application.hpp" #include "base/objectlock.hpp" #include "base/utility.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/dynamictype.hpp" using namespace icinga; diff --git a/lib/methods/nullchecktask.cpp b/lib/methods/nullchecktask.cpp index 09f369ddf..e779fe7d4 100644 --- a/lib/methods/nullchecktask.cpp +++ b/lib/methods/nullchecktask.cpp @@ -24,7 +24,7 @@ #include "icinga/perfdatavalue.hpp" #include "base/utility.hpp" #include "base/convert.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/logger.hpp" using namespace icinga; diff --git a/lib/methods/nulleventtask.cpp b/lib/methods/nulleventtask.cpp index 4332a67d1..35a64ca78 100644 --- a/lib/methods/nulleventtask.cpp +++ b/lib/methods/nulleventtask.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "methods/nulleventtask.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/logger.hpp" using namespace icinga; diff --git a/lib/methods/pluginchecktask.cpp b/lib/methods/pluginchecktask.cpp index b45dcf72c..c3896e89e 100644 --- a/lib/methods/pluginchecktask.cpp +++ b/lib/methods/pluginchecktask.cpp @@ -24,7 +24,7 @@ #include "icinga/icingaapplication.hpp" #include "base/dynamictype.hpp" #include "base/logger.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/utility.hpp" #include "base/process.hpp" #include "base/convert.hpp" diff --git a/lib/methods/plugineventtask.cpp b/lib/methods/plugineventtask.cpp index e976b0018..b637c345f 100644 --- a/lib/methods/plugineventtask.cpp +++ b/lib/methods/plugineventtask.cpp @@ -24,7 +24,7 @@ #include "icinga/icingaapplication.hpp" #include "base/dynamictype.hpp" #include "base/logger.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/utility.hpp" #include "base/process.hpp" #include "base/convert.hpp" diff --git a/lib/methods/pluginnotificationtask.cpp b/lib/methods/pluginnotificationtask.cpp index 39fb67879..d16ad869d 100644 --- a/lib/methods/pluginnotificationtask.cpp +++ b/lib/methods/pluginnotificationtask.cpp @@ -24,7 +24,7 @@ #include "icinga/service.hpp" #include "icinga/macroprocessor.hpp" #include "icinga/icingaapplication.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/logger.hpp" #include "base/utility.hpp" #include "base/process.hpp" diff --git a/lib/methods/randomchecktask.cpp b/lib/methods/randomchecktask.cpp index 79a10be52..10459f595 100644 --- a/lib/methods/randomchecktask.cpp +++ b/lib/methods/randomchecktask.cpp @@ -24,7 +24,7 @@ #include "icinga/perfdatavalue.hpp" #include "base/utility.hpp" #include "base/convert.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" #include "base/logger.hpp" using namespace icinga; diff --git a/lib/methods/timeperiodtask.cpp b/lib/methods/timeperiodtask.cpp index 7960ecd7c..1f10a55c7 100644 --- a/lib/methods/timeperiodtask.cpp +++ b/lib/methods/timeperiodtask.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "methods/timeperiodtask.hpp" -#include "base/scriptfunction.hpp" +#include "base/function.hpp" using namespace icinga; -- 2.40.0