]> granicus.if.org Git - icinga2/commitdiff
Replace boost::bind/boost::function with std::bind/std::function 5803/head
authorGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 21 Nov 2017 10:52:55 +0000 (11:52 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Mon, 27 Nov 2017 14:15:11 +0000 (15:15 +0100)
113 files changed:
icinga-studio/mainform.cpp
lib/base/application.cpp
lib/base/array-script.cpp
lib/base/configobject.cpp
lib/base/configobject.hpp
lib/base/filelogger.cpp
lib/base/function.hpp
lib/base/functionwrapper.cpp
lib/base/functionwrapper.hpp
lib/base/i2-base.hpp
lib/base/loader.cpp
lib/base/loader.hpp
lib/base/object.cpp
lib/base/process.cpp
lib/base/process.hpp
lib/base/scriptutils.cpp
lib/base/socketevents.cpp
lib/base/statsfunction.hpp
lib/base/stream.cpp
lib/base/stream.hpp
lib/base/streamlogger.cpp
lib/base/threadpool.cpp
lib/base/timer.cpp
lib/base/tlsstream.cpp
lib/base/type.hpp
lib/base/typetype-script.cpp
lib/base/utility.cpp
lib/base/utility.hpp
lib/base/workqueue.cpp
lib/base/workqueue.hpp
lib/checker/checkercomponent.cpp
lib/cli/consolecommand.cpp
lib/cli/daemonutility.cpp
lib/cli/featureutility.cpp
lib/cli/troubleshootcommand.cpp
lib/compat/checkresultreader.cpp
lib/compat/compatlogger.cpp
lib/compat/externalcommandlistener.cpp
lib/compat/statusdatawriter.cpp
lib/config/applyrule.hpp
lib/config/configcompiler.cpp
lib/config/configcompiler.hpp
lib/config/configitem.cpp
lib/config/vmops.hpp
lib/db_ido/dbconnection.cpp
lib/db_ido/dbevents.cpp
lib/db_ido/dbobject.cpp
lib/db_ido/dbtype.hpp
lib/db_ido/endpointdbobject.cpp
lib/db_ido_mysql/idomysqlconnection.cpp
lib/db_ido_mysql/idomysqlconnection.hpp
lib/db_ido_pgsql/idopgsqlconnection.cpp
lib/demo/demo.cpp
lib/icinga/checkable.cpp
lib/icinga/comment.cpp
lib/icinga/downtime.cpp
lib/icinga/externalcommandprocessor.cpp
lib/icinga/externalcommandprocessor.hpp
lib/icinga/icingaapplication.cpp
lib/icinga/macroprocessor.cpp
lib/icinga/macroprocessor.hpp
lib/icinga/notification.cpp
lib/icinga/pluginutility.cpp
lib/icinga/pluginutility.hpp
lib/icinga/scheduleddowntime.cpp
lib/icinga/timeperiod.cpp
lib/livestatus/column.cpp
lib/livestatus/column.hpp
lib/livestatus/commentstable.cpp
lib/livestatus/downtimestable.cpp
lib/livestatus/hoststable.cpp
lib/livestatus/livestatuslistener.cpp
lib/livestatus/livestatuslogutility.cpp
lib/livestatus/logtable.cpp
lib/livestatus/servicestable.cpp
lib/livestatus/statehisttable.cpp
lib/livestatus/table.cpp
lib/livestatus/table.hpp
lib/methods/pluginchecktask.cpp
lib/methods/plugineventtask.cpp
lib/methods/pluginnotificationtask.cpp
lib/notification/notificationcomponent.cpp
lib/perfdata/elasticsearchwriter.cpp
lib/perfdata/gelfwriter.cpp
lib/perfdata/graphitewriter.cpp
lib/perfdata/influxdbwriter.cpp
lib/perfdata/opentsdbwriter.cpp
lib/perfdata/perfdatawriter.cpp
lib/remote/apiaction.hpp
lib/remote/apiclient.cpp
lib/remote/apiclient.hpp
lib/remote/apifunction.hpp
lib/remote/apilistener-filesync.cpp
lib/remote/apilistener.cpp
lib/remote/configpackageutility.cpp
lib/remote/consolehandler.cpp
lib/remote/filterutility.cpp
lib/remote/filterutility.hpp
lib/remote/httpclientconnection.cpp
lib/remote/httpclientconnection.hpp
lib/remote/httphandler.hpp
lib/remote/httpserverconnection.cpp
lib/remote/jsonrpcconnection-heartbeat.cpp
lib/remote/jsonrpcconnection.cpp
lib/remote/pkiutility.cpp
lib/remote/statushandler.cpp
lib/remote/templatequeryhandler.cpp
lib/remote/typequeryhandler.cpp
lib/remote/variablequeryhandler.cpp
plugins/check_disk.cpp
plugins/check_nscp_api.cpp
test/base-timer.cpp
test/icinga-checkresult.cpp

index 9c4af4da1297ff6eead37517b7beeff5203c2ba1..5f226b4fc2a277e979dc59b4cd42ffafdd20bb93 100644 (file)
@@ -39,7 +39,7 @@ MainForm::MainForm(wxWindow *parent, const Url::Ptr& url)
                port = "5665";
 
        m_ApiClient = new ApiClient(url->GetHost(), port, url->GetUsername(), url->GetPassword());
-       m_ApiClient->GetTypes(boost::bind(&MainForm::TypesCompletionHandler, this, _1, _2, true));
+       m_ApiClient->GetTypes(std::bind(&MainForm::TypesCompletionHandler, this, _1, _2, true));
 
        std::string title = url->Format() + " - Icinga Studio";
        SetTitle(title);
@@ -52,7 +52,7 @@ MainForm::MainForm(wxWindow *parent, const Url::Ptr& url)
 void MainForm::TypesCompletionHandler(boost::exception_ptr eptr, const std::vector<ApiType::Ptr>& types, bool forward)
 {
        if (forward) {
-               CallAfter(boost::bind(&MainForm::TypesCompletionHandler, this, eptr, types, false));
+               CallAfter(std::bind(&MainForm::TypesCompletionHandler, this, eptr, types, false));
                return;
        }
 
@@ -113,7 +113,7 @@ void MainForm::OnTypeSelected(wxTreeEvent& event)
        std::vector<String> attrs;
        attrs.push_back("__name");
 
-       m_ApiClient->GetObjects(type->PluralName, boost::bind(&MainForm::ObjectsCompletionHandler, this, _1, _2, true),
+       m_ApiClient->GetObjects(type->PluralName, std::bind(&MainForm::ObjectsCompletionHandler, this, _1, _2, true),
            std::vector<String>(), attrs);
 }
 
@@ -125,7 +125,7 @@ static bool ApiObjectLessComparer(const ApiObject::Ptr& o1, const ApiObject::Ptr
 void MainForm::ObjectsCompletionHandler(boost::exception_ptr eptr, const std::vector<ApiObject::Ptr>& objects, bool forward)
 {
        if (forward) {
-               CallAfter(boost::bind(&MainForm::ObjectsCompletionHandler, this, eptr, objects, false));
+               CallAfter(std::bind(&MainForm::ObjectsCompletionHandler, this, eptr, objects, false));
                return;
        }
 
@@ -172,7 +172,7 @@ void MainForm::OnObjectSelected(wxListEvent& event)
        std::vector<String> names;
        names.push_back(objectName);
 
-       m_ApiClient->GetObjects(type->PluralName, boost::bind(&MainForm::ObjectDetailsCompletionHandler, this, _1, _2, true),
+       m_ApiClient->GetObjects(type->PluralName, std::bind(&MainForm::ObjectDetailsCompletionHandler, this, _1, _2, true),
            names, std::vector<String>(), std::vector<String>(), true);
 }
 
@@ -239,7 +239,7 @@ wxPGProperty *MainForm::ValueToProperty(const String& name, const Value& value)
 void MainForm::ObjectDetailsCompletionHandler(boost::exception_ptr eptr, const std::vector<ApiObject::Ptr>& objects, bool forward)
 {
        if (forward) {
-               CallAfter(boost::bind(&MainForm::ObjectDetailsCompletionHandler, this, eptr, objects, false));
+               CallAfter(std::bind(&MainForm::ObjectDetailsCompletionHandler, this, eptr, objects, false));
                return;
        }
 
index ce4982e2a570ac52e185f6df068cde06b75000f7..43a69e8934257d27da01db1d1fd0ba9361356b96 100644 (file)
@@ -394,7 +394,7 @@ static void ReloadProcessCallback(const ProcessResult& pr)
 {
        l_Restarting = false;
 
-       boost::thread t(boost::bind(&ReloadProcessCallbackInternal, pr));
+       boost::thread t(std::bind(&ReloadProcessCallbackInternal, pr));
        t.detach();
 }
 
index 568037d9ed9f3142866226e38420866d9ad3e9e0..1e9fd9965b4bf9c315d0601a546a8cc5fc698947 100644 (file)
@@ -100,7 +100,7 @@ static Array::Ptr ArraySort(const std::vector<Value>& args)
                        BOOST_THROW_EXCEPTION(ScriptError("Sort function must be side-effect free."));
 
                ObjectLock olock(arr);
-               std::sort(arr->Begin(), arr->End(), boost::bind(ArraySortCmp, args[0], _1, _2));
+               std::sort(arr->Begin(), arr->End(), std::bind(ArraySortCmp, args[0], _1, _2));
        }
 
        return arr;
index 616aee8d553293c9cbe21857993d657328747715..55b780e13c141390c5f6d55fd0f008947d0af95f 100644 (file)
@@ -594,7 +594,7 @@ void ConfigObject::RestoreObjects(const String& filename, int attributeTypes)
                if (srs != StatusNewItem)
                        continue;
 
-               upq.Enqueue(boost::bind(&ConfigObject::RestoreObject, message, attributeTypes));
+               upq.Enqueue(std::bind(&ConfigObject::RestoreObject, message, attributeTypes));
                restored++;
        }
 
@@ -638,7 +638,7 @@ void ConfigObject::StopObjects(void)
        }
 }
 
-void ConfigObject::DumpModifiedAttributes(const boost::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback)
+void ConfigObject::DumpModifiedAttributes(const std::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback)
 {
        for (const Type::Ptr& type : Type::GetAllTypes()) {
                ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
index 1605941435ce245be326268cb2d01ae36bbe24eb..e47ba393edf3774df75fcc10b193ad721fd7669e 100644 (file)
@@ -92,7 +92,7 @@ public:
        static void RestoreObjects(const String& filename, int attributeTypes = FAState);
        static void StopObjects(void);
 
-       static void DumpModifiedAttributes(const boost::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback);
+       static void DumpModifiedAttributes(const std::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback);
 
        static Object::Ptr GetPrototype(void);
 
index 233692a25ecbe7ead75b36e3a29d1e2ba2c6b1b8..a540580974949844db9c30a6fb7b414ee582f20c 100644 (file)
@@ -50,7 +50,7 @@ void FileLogger::Start(bool runtimeCreated)
 
        ReopenLogFile();
 
-       Application::OnReopenLogs.connect(boost::bind(&FileLogger::ReopenLogFile, this));
+       Application::OnReopenLogs.connect(std::bind(&FileLogger::ReopenLogFile, this));
 }
 
 void FileLogger::ReopenLogFile(void)
index faf64ad92a86de6e96fec997ac920b20cf3edbd0..ed88db18b60d42d398794a018f6e4c588d5340ad 100644 (file)
@@ -26,7 +26,6 @@
 #include "base/functionwrapper.hpp"
 #include "base/scriptglobal.hpp"
 #include <vector>
-#include <boost/function.hpp>
 
 namespace icinga
 {
@@ -41,7 +40,7 @@ class I2_BASE_API Function : public ObjectImpl<Function>
 public:
        DECLARE_OBJECT(Function);
 
-       typedef boost::function<Value (const std::vector<Value>& arguments)> Callback;
+       typedef std::function<Value (const std::vector<Value>& arguments)> Callback;
 
        Function(const String& name, const Callback& function, const std::vector<String>& args = std::vector<String>(),
            bool side_effect_free = false, bool deprecated = false);
index 007588b5d49b8188171b227d1aa1a0c49ea4daf0..f99a0f73a9c7dfd19d87726b9b7aa90c17361969 100644 (file)
@@ -35,7 +35,7 @@ Value icinga::FunctionWrapperVA(void (*function)(const std::vector<Value>&), con
        return Empty;
 }
 
-boost::function<Value (const std::vector<Value>& arguments)> icinga::WrapFunction(void (*function)(void))
+std::function<Value (const std::vector<Value>& arguments)> icinga::WrapFunction(void (*function)(void))
 {
-       return boost::bind(&FunctionWrapperVV, function, _1);
+       return std::bind(&FunctionWrapperVV, function, _1);
 }
index af479cd40e7526cb9b1abf2d80c0ea72da833d8e..835a79961739377497fa0c7a5817c65b15a8b80d 100644 (file)
@@ -23,8 +23,8 @@
 #include "base/i2-base.hpp"
 #include "base/value.hpp"
 #include <vector>
-#include <boost/function.hpp>
-#include <boost/bind.hpp>
+
+using namespace std::placeholders;
 
 namespace icinga
 {
@@ -32,7 +32,7 @@ namespace icinga
 Value FunctionWrapperVV(void (*function)(void), const std::vector<Value>& arguments);
 Value FunctionWrapperVA(void (*function)(const std::vector<Value>&), const std::vector<Value>& arguments);
 
-boost::function<Value (const std::vector<Value>& arguments)> I2_BASE_API WrapFunction(void (*function)(void));
+std::function<Value (const std::vector<Value>& arguments)> I2_BASE_API WrapFunction(void (*function)(void));
 
 template<typename TR>
 Value FunctionWrapperR(TR (*function)(void), const std::vector<Value>&)
@@ -41,9 +41,9 @@ Value FunctionWrapperR(TR (*function)(void), const std::vector<Value>&)
 }
 
 template<typename TR>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(void))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(void))
 {
-       return boost::bind(&FunctionWrapperR<TR>, function, _1);
+       return std::bind(&FunctionWrapperR<TR>, function, _1);
 }
 
 template<typename T0>
@@ -60,9 +60,9 @@ Value FunctionWrapperV(void (*function)(T0), const std::vector<Value>& arguments
 }
 
 template<typename T0>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0))
 {
-       return boost::bind(&FunctionWrapperV<T0>, function, _1);
+       return std::bind(&FunctionWrapperV<T0>, function, _1);
 }
 
 template<typename TR, typename T0>
@@ -77,9 +77,9 @@ Value FunctionWrapperR(TR (*function)(T0), const std::vector<Value>& arguments)
 }
 
 template<typename TR, typename T0>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0>, function, _1);
 }
 
 template<typename T0, typename T1>
@@ -97,9 +97,9 @@ Value FunctionWrapperV(void (*function)(T0, T1), const std::vector<Value>& argum
 }
 
 template<typename T0, typename T1>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1>
@@ -115,9 +115,9 @@ Value FunctionWrapperR(TR (*function)(T0, T1), const std::vector<Value>& argumen
 }
 
 template<typename TR, typename T0, typename T1>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1>, function, _1);
 }
 
 template<typename T0, typename T1, typename T2>
@@ -136,9 +136,9 @@ Value FunctionWrapperV(void (*function)(T0, T1, T2), const std::vector<Value>& a
 }
 
 template<typename T0, typename T1, typename T2>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1, T2>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1, T2>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1, typename T2>
@@ -155,9 +155,9 @@ Value FunctionWrapperR(TR (*function)(T0, T1, T2), const std::vector<Value>& arg
 }
 
 template<typename TR, typename T0, typename T1, typename T2>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1, T2>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1, T2>, function, _1);
 }
 
 template<typename T0, typename T1, typename T2, typename T3>
@@ -177,9 +177,9 @@ Value FunctionWrapperV(void (*function)(T0, T1, T2, T3), const std::vector<Value
 }
 
 template<typename T0, typename T1, typename T2, typename T3>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1, T2, T3>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1, T2, T3>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3>
@@ -197,9 +197,9 @@ Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3), const std::vector<Value>&
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1, T2, T3>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1, T2, T3>, function, _1);
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4>
@@ -220,9 +220,9 @@ Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4), const std::vector<V
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1, T2, T3, T4>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1, T2, T3, T4>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4>
@@ -241,9 +241,9 @@ Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4), const std::vector<Val
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4>, function, _1);
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
@@ -265,9 +265,9 @@ Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5), const std::vect
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1, T2, T3, T4, T5>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1, T2, T3, T4, T5>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
@@ -287,9 +287,9 @@ Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5), const std::vector
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4, T5>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4, T5>, function, _1);
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
@@ -312,9 +312,9 @@ Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6), const std::
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1, T2, T3, T4, T5, T6>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1, T2, T3, T4, T5, T6>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
@@ -335,9 +335,9 @@ Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6), const std::ve
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4, T5, T6>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4, T5, T6>, function, _1);
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
@@ -361,9 +361,9 @@ Value FunctionWrapperV(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7), const s
 }
 
 template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(T0, T1, T2, T3, T4, T5, T6, T7))
 {
-       return boost::bind(&FunctionWrapperV<T0, T1, T2, T3, T4, T5, T6, T7>, function, _1);
+       return std::bind(&FunctionWrapperV<T0, T1, T2, T3, T4, T5, T6, T7>, function, _1);
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
@@ -385,20 +385,20 @@ Value FunctionWrapperR(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7), const std
 }
 
 template<typename TR, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
-boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7))
+std::function<Value (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(T0, T1, T2, T3, T4, T5, T6, T7))
 {
-       return boost::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4, T5, T6, T7>, function, _1);
+       return std::bind(&FunctionWrapperR<TR, T0, T1, T2, T3, T4, T5, T6, T7>, function, _1);
 }
 
 template<typename TR>
-boost::function<TR (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(const std::vector<Value>&))
+std::function<TR (const std::vector<Value>& arguments)> WrapFunction(TR (*function)(const std::vector<Value>&))
 {
-       return boost::bind<TR>(function, _1);
+       return std::bind<TR>(function, _1);
 }
 
-inline boost::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(const std::vector<Value>&))
+inline std::function<Value (const std::vector<Value>& arguments)> WrapFunction(void (*function)(const std::vector<Value>&))
 {
-       return boost::bind(&FunctionWrapperVA, function, _1);
+       return std::bind(&FunctionWrapperVA, function, _1);
 }
 
 }
index c48aafbb041e22fc3aa939e6a01576e0852d9c10..0e71e2c230a302c542d5c0a30ef961299f52774c 100644 (file)
 #      define unlikely(x) (x)
 #endif
 
+#define BOOST_BIND_NO_PLACEHOLDERS
+
+#include <functional>
+
+using namespace std::placeholders;
 
 #endif /* I2BASE_H */
index 9e2e0074ac13290aac0c7bff0facb559c28bd148..9988b609a779d7bce8fd87325ff248a638d67ea5 100644 (file)
@@ -81,7 +81,7 @@ void Loader::ExecuteDeferredInitializers(void)
        }
 }
 
-void Loader::AddDeferredInitializer(const boost::function<void(void)>& callback, int priority)
+void Loader::AddDeferredInitializer(const std::function<void(void)>& callback, int priority)
 {
        if (!GetDeferredInitializers().get())
                GetDeferredInitializers().reset(new std::priority_queue<DeferredInitializer>());
index 7421bb9e4467b2e79fba6440952c686a42163949..0a05f6214eabf657f744baaea69f5bde7f1f4275 100644 (file)
@@ -23,7 +23,6 @@
 #include "base/i2-base.hpp"
 #include "base/string.hpp"
 #include <boost/thread/tss.hpp>
-#include <boost/function.hpp>
 #include <queue>
 
 namespace icinga
@@ -32,7 +31,7 @@ namespace icinga
 struct DeferredInitializer
 {
 public:
-       DeferredInitializer(const boost::function<void (void)>& callback, int priority)
+       DeferredInitializer(const std::function<void (void)>& callback, int priority)
            : m_Callback(callback), m_Priority(priority)
        { }
 
@@ -47,7 +46,7 @@ public:
        }
 
 private:
-       boost::function<void (void)> m_Callback;
+       std::function<void (void)> m_Callback;
        int m_Priority;
 };
 
@@ -61,7 +60,7 @@ class I2_BASE_API Loader
 public:
        static void LoadExtensionLibrary(const String& library);
 
-       static void AddDeferredInitializer(const boost::function<void(void)>& callback, int priority = 0);
+       static void AddDeferredInitializer(const std::function<void(void)>& callback, int priority = 0);
        static void ExecuteDeferredInitializers(void);
 
 private:
index e9f3cd1bd494bb8778bdf898ec2cb27da073fca6..e07afd8aa39307d19cf2d55fe16133e5a343b14c 100644 (file)
@@ -256,7 +256,7 @@ static void TypeInfoTimerHandler(void)
 INITIALIZE_ONCE([]() {
        l_ObjectCountTimer = new Timer();
        l_ObjectCountTimer->SetInterval(10);
-       l_ObjectCountTimer->OnTimerExpired.connect(boost::bind(TypeInfoTimerHandler));
+       l_ObjectCountTimer->OnTimerExpired.connect(std::bind(TypeInfoTimerHandler));
        l_ObjectCountTimer->Start();
 });
 #endif /* I2_LEAK_DEBUG */
index 44af34a02e0eee3897778f88ced74f9410418da7..3d0cd5d3e9815bad364cacb480ab9d0c0376b077 100644 (file)
@@ -539,7 +539,7 @@ void Process::ThreadInitialize(void)
 {
        /* Note to self: Make sure this runs _after_ we've daemonized. */
        for (int tid = 0; tid < IOTHREADS; tid++) {
-               boost::thread t(boost::bind(&Process::IOThreadProc, tid));
+               boost::thread t(std::bind(&Process::IOThreadProc, tid));
                t.detach();
        }
 }
@@ -788,7 +788,7 @@ static BOOL CreatePipeOverlapped(HANDLE *outReadPipe, HANDLE *outWritePipe,
 }
 #endif /* _WIN32 */
 
-void Process::Run(const boost::function<void(const ProcessResult&)>& callback)
+void Process::Run(const std::function<void(const ProcessResult&)>& callback)
 {
 #ifndef _WIN32
        boost::call_once(l_SpawnHelperOnceFlag, &Process::InitializeSpawnHelper);
@@ -930,7 +930,7 @@ void Process::Run(const boost::function<void(const ProcessResult&)>& callback)
                delete [] args;
 
                if (callback)
-                       Utility::QueueAsyncCallback(boost::bind(callback, m_Result));
+                       Utility::QueueAsyncCallback(std::bind(callback, m_Result));
 
                return;
        }
@@ -1131,7 +1131,7 @@ bool Process::DoEvents(void)
        m_Result.Output = output;
 
        if (m_Callback)
-               Utility::QueueAsyncCallback(boost::bind(m_Callback, m_Result));
+               Utility::QueueAsyncCallback(std::bind(m_Callback, m_Result));
 
        return false;
 }
index e20311f05eede4f43fd9cc20714a75119fb30306..9414c68da37e8b75efbaae3a74280a8085ebfb92 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "base/i2-base.hpp"
 #include "base/dictionary.hpp"
-#include <boost/function.hpp>
 #include <sstream>
 #include <deque>
 #include <vector>
@@ -76,7 +75,7 @@ public:
        void SetAdjustPriority(bool adjust);
        bool GetAdjustPriority(void) const;
 
-       void Run(const boost::function<void (const ProcessResult&)>& callback = boost::function<void (const ProcessResult&)>());
+       void Run(const std::function<void (const ProcessResult&)>& callback = std::function<void (const ProcessResult&)>());
 
        pid_t GetPID(void) const;
 
@@ -109,7 +108,7 @@ private:
 #endif /* _WIN32 */
 
        std::ostringstream m_OutputStream;
-       boost::function<void (const ProcessResult&)> m_Callback;
+       std::function<void (const ProcessResult&)> m_Callback;
        ProcessResult m_Result;
 
        static void IOThreadProc(int tid);
index f71b1b8699bcf2c11272067856c43f103e0d111d..a35db87c39872f032500136d36e708fd9f30941c 100644 (file)
@@ -477,7 +477,7 @@ Value ScriptUtils::Glob(const std::vector<Value>& args)
                type = args[1];
 
        std::vector<String> paths;
-       Utility::Glob(pathSpec, boost::bind(&GlobCallbackHelper, boost::ref(paths), _1), type);
+       Utility::Glob(pathSpec, std::bind(&GlobCallbackHelper, boost::ref(paths), _1), type);
 
        return Array::FromVector(paths);
 }
@@ -496,7 +496,7 @@ Value ScriptUtils::GlobRecursive(const std::vector<Value>& args)
                type = args[2];
 
        std::vector<String> paths;
-       Utility::GlobRecursive(path, pattern, boost::bind(&GlobCallbackHelper, boost::ref(paths), _1), type);
+       Utility::GlobRecursive(path, pattern, std::bind(&GlobCallbackHelper, boost::ref(paths), _1), type);
 
        return Array::FromVector(paths);
 }
index 90b1d47980f6fb51f7257e2ce0456d317630b8fd..00ca0c525c287cfded08faea05b48ca1e3548494 100644 (file)
@@ -50,7 +50,7 @@ void SocketEventEngine::Start(void)
 
                InitializeThread(tid);
 
-               m_Threads[tid] = boost::thread(boost::bind(&SocketEventEngine::ThreadProc, this, tid));
+               m_Threads[tid] = boost::thread(std::bind(&SocketEventEngine::ThreadProc, this, tid));
        }
 }
 
index 3a8c0240de51eb5aabc34a62e4936a0247aa985d..c8880d4197124f8bc72d522787d1905e83f48cf1 100644 (file)
@@ -25,7 +25,6 @@
 #include "base/value.hpp"
 #include "base/dictionary.hpp"
 #include "base/array.hpp"
-#include <boost/function.hpp>
 
 namespace icinga
 {
@@ -40,7 +39,7 @@ class I2_BASE_API StatsFunction : public Object
 public:
        DECLARE_PTR_TYPEDEFS(StatsFunction);
 
-       typedef boost::function<void (const Dictionary::Ptr& status, const Array::Ptr& perfdata)> Callback;
+       typedef std::function<void (const Dictionary::Ptr& status, const Array::Ptr& perfdata)> Callback;
 
        StatsFunction(const Callback& function);
 
index 9390d97b9da0fdef82fff36d985bb9519ed176d1..3b1cd5426fe40adff4a84e4979a37c4bfb97a431 100644 (file)
@@ -22,7 +22,7 @@
 
 using namespace icinga;
 
-void Stream::RegisterDataHandler(const boost::function<void(const Stream::Ptr&)>& handler)
+void Stream::RegisterDataHandler(const std::function<void(const Stream::Ptr&)>& handler)
 {
        if (SupportsWaiting())
                OnDataAvailable.connect(handler);
@@ -85,7 +85,7 @@ void Stream::Close(void)
 
        /* Force signals2 to remove the slots, see https://stackoverflow.com/questions/2049291/force-deletion-of-slot-in-boostsignals2
         * for details. */
-       OnDataAvailable.connect(boost::bind(&StreamDummyCallback));
+       OnDataAvailable.connect(std::bind(&StreamDummyCallback));
 }
 
 StreamReadStatus Stream::ReadLine(String *line, StreamReadContext& context, bool may_wait)
index 6c39e79aa19b56a90ebd9c0b069dabe6a703b137..bf79a7768c3dbe75a729601b9770709cde5ab9d3 100644 (file)
@@ -131,7 +131,7 @@ public:
 
        virtual bool IsDataAvailable(void) const;
 
-       void RegisterDataHandler(const boost::function<void(const Stream::Ptr&)>& handler);
+       void RegisterDataHandler(const std::function<void(const Stream::Ptr&)>& handler);
 
        StreamReadStatus ReadLine(String *line, StreamReadContext& context, bool may_wait = false);
 
index b6a9bac31e6af15d95bd9ed60c8b4ef0981d7239..cb36a3d403cd7e077a6ef851a1a17d501c136a7a 100644 (file)
@@ -81,7 +81,7 @@ void StreamLogger::BindStream(std::ostream *stream, bool ownsStream)
 
        m_FlushLogTimer = new Timer();
        m_FlushLogTimer->SetInterval(1);
-       m_FlushLogTimer->OnTimerExpired.connect(boost::bind(&StreamLogger::FlushLogTimerHandler, this));
+       m_FlushLogTimer->OnTimerExpired.connect(std::bind(&StreamLogger::FlushLogTimerHandler, this));
        m_FlushLogTimer->Start();
 }
 
index e13f9b90b1946e2f659b2d8746e7b0ad6fff591b..0c2925f9be9aca58ba8f5c139cd1551c9306776d 100644 (file)
@@ -54,7 +54,7 @@ void ThreadPool::Start(void)
        for (size_t i = 0; i < sizeof(m_Queues) / sizeof(m_Queues[0]); i++)
                m_Queues[i].SpawnWorker(m_ThreadGroup);
 
-       m_MgmtThread = boost::thread(boost::bind(&ThreadPool::ManagerThreadProc, this));
+       m_MgmtThread = boost::thread(std::bind(&ThreadPool::ManagerThreadProc, this));
 }
 
 void ThreadPool::Stop(void)
index 293003852029c293228d4b16b2b1a5683e0302f6..9c1a2c4a1c46a368122db809ae1b0adf0e86c6ea 100644 (file)
@@ -20,7 +20,6 @@
 #include "base/timer.hpp"
 #include "base/debug.hpp"
 #include "base/utility.hpp"
-#include <boost/bind.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition_variable.hpp>
@@ -282,6 +281,6 @@ void Timer::TimerThreadProc(void)
                lock.unlock();
 
                /* Asynchronously call the timer. */
-               Utility::QueueAsyncCallback(boost::bind(&Timer::Call, ptimer));
+               Utility::QueueAsyncCallback(std::bind(&Timer::Call, ptimer));
        }
 }
index 78b1851daf865f1622963a96074e7e98771664c5..4bb98f5cd6f24713c19843f165fe30b6fd616f9f 100644 (file)
@@ -21,7 +21,6 @@
 #include "base/utility.hpp"
 #include "base/exception.hpp"
 #include "base/logger.hpp"
-#include <boost/bind.hpp>
 #include <iostream>
 
 #ifndef _WIN32
index 52aa753a51284a227961c32c3b732026e7f4c7b6..b6204b4be685bf14790b70ee51132d03cf6e9133 100644 (file)
@@ -24,7 +24,6 @@
 #include "base/string.hpp"
 #include "base/object.hpp"
 #include "base/initialize.hpp"
-#include <boost/function.hpp>
 #include <vector>
 
 namespace icinga
@@ -105,7 +104,7 @@ public:
 
        virtual std::vector<String> GetLoadDependencies(void) const;
        
-       typedef boost::function<void (const Object::Ptr&, const Value&)> AttributeHandler;
+       typedef std::function<void (const Object::Ptr&, const Value&)> AttributeHandler;
        virtual void RegisterAttributeHandler(int fieldId, const AttributeHandler& callback);
 
 protected:
index 5189845b3e1340505668e52b64cfc6b924a525fb..08d616b2e1ec3629b39f997d73519e5cc0790641 100644 (file)
@@ -39,7 +39,7 @@ static void TypeRegisterAttributeHandler(const String& fieldName, const Function
        Type::Ptr self = static_cast<Type::Ptr>(vframe->Self);
        
        int fid = self->GetFieldId(fieldName);
-       self->RegisterAttributeHandler(fid, boost::bind(&InvokeAttributeHandlerHelper, callback, _1, _2));
+       self->RegisterAttributeHandler(fid, std::bind(&InvokeAttributeHandlerHelper, callback, _1, _2));
 }
 
 Object::Ptr TypeType::GetPrototype(void)
index 791c6751c0e25e7ebe46a3df58663fc76e933f61..d98aebbfbce75f0a305153f4cbd2db29526da188 100644 (file)
@@ -36,6 +36,7 @@
 #include <ios>
 #include <fstream>
 #include <iostream>
+#include <future>
 
 #ifdef __FreeBSD__
 #      include <pthread_np.h>
@@ -502,7 +503,7 @@ static int GlobErrorHandler(const char *epath, int eerrno)
  * @param callback The callback which is invoked for each matching file.
  * @param type The file type (a combination of GlobFile and GlobDirectory)
  */
-bool Utility::Glob(const String& pathSpec, const boost::function<void (const String&)>& callback, int type)
+bool Utility::Glob(const String& pathSpec, const std::function<void (const String&)>& callback, int type)
 {
        std::vector<String> files, dirs;
 
@@ -609,7 +610,7 @@ bool Utility::Glob(const String& pathSpec, const boost::function<void (const Str
  * @param callback The callback which is invoked for each matching file.
  * @param type The file type (a combination of GlobFile and GlobDirectory)
  */
-bool Utility::GlobRecursive(const String& path, const String& pattern, const boost::function<void (const String&)>& callback, int type)
+bool Utility::GlobRecursive(const String& path, const String& pattern, const std::function<void (const String&)>& callback, int type)
 {
        std::vector<String> files, dirs, alldirs;
 
@@ -768,7 +769,7 @@ void Utility::MkDirP(const String& path, int mode)
 void Utility::RemoveDirRecursive(const String& path)
 {
        std::vector<String> paths;
-       Utility::GlobRecursive(path, "*", boost::bind(&Utility::CollectPaths, _1, boost::ref(paths)), GlobFile | GlobDirectory);
+       Utility::GlobRecursive(path, "*", std::bind(&Utility::CollectPaths, _1, boost::ref(paths)), GlobFile | GlobDirectory);
 
        /* This relies on the fact that GlobRecursive lists the parent directory
           first before recursing into subdirectories. */
index 3e19301f032d797918b16dd58f7eb317a27c0f74..49d0a6a6d12ad7fe9a93635d55d3571a88fe35a8 100644 (file)
@@ -24,7 +24,6 @@
 #include "base/string.hpp"
 #include "base/array.hpp"
 #include "base/threadpool.hpp"
-#include <boost/function.hpp>
 #include <boost/thread/tss.hpp>
 #include <typeinfo>
 #include <vector>
@@ -80,8 +79,8 @@ public:
 
        static String NewUniqueID(void);
 
-       static bool Glob(const String& pathSpec, const boost::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
-       static bool GlobRecursive(const String& path, const String& pattern, const boost::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
+       static bool Glob(const String& pathSpec, const std::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
+       static bool GlobRecursive(const String& path, const String& pattern, const std::function<void (const String&)>& callback, int type = GlobFile | GlobDirectory);
        static void MkDir(const String& path, int mode);
        static void MkDirP(const String& path, int mode);
        static bool SetFileOwnership(const String& file, const String& user, const String& group);
index f3d2a6c3256ed9fb1d4a2128c50176c40445ee41..92641c70a76a90d58104257f4c55cdf5e301df4c 100644 (file)
@@ -23,7 +23,6 @@
 #include "base/convert.hpp"
 #include "base/application.hpp"
 #include "base/exception.hpp"
-#include <boost/bind.hpp>
 #include <boost/thread/tss.hpp>
 
 using namespace icinga;
@@ -40,7 +39,7 @@ WorkQueue::WorkQueue(size_t maxItems, int threadCount)
 
        m_StatusTimer = new Timer();
        m_StatusTimer->SetInterval(10);
-       m_StatusTimer->OnTimerExpired.connect(boost::bind(&WorkQueue::StatusTimerHandler, this));
+       m_StatusTimer->OnTimerExpired.connect(std::bind(&WorkQueue::StatusTimerHandler, this));
        m_StatusTimer->Start();
 }
 
@@ -67,7 +66,7 @@ String WorkQueue::GetName(void) const
  * allowInterleaved is true in which case the new task might be run
  * immediately if it's being enqueued from within the WorkQueue thread.
  */
-void WorkQueue::Enqueue(boost::function<void (void)>&& function, WorkQueuePriority priority,
+void WorkQueue::Enqueue(std::function<void (void)>&& function, WorkQueuePriority priority,
     bool allowInterleaved)
 {
        bool wq_thread = IsWorkerThread();
@@ -85,7 +84,7 @@ void WorkQueue::Enqueue(boost::function<void (void)>&& function, WorkQueuePriori
                    << "Spawning WorkQueue threads for '" << m_Name << "'";
 
                for (int i = 0; i < m_ThreadCount; i++) {
-                       m_Threads.create_thread(boost::bind(&WorkQueue::WorkerThreadProc, this));
+                       m_Threads.create_thread(std::bind(&WorkQueue::WorkerThreadProc, this));
                }
 
                m_Spawned = true;
index d9ec53bddf483f60d303021093c21ad17ec39c0f..760aa1353781f67b367e0516acd8ed4a09d9bbcc 100644 (file)
@@ -23,7 +23,6 @@
 #include "base/i2-base.hpp"
 #include "base/timer.hpp"
 #include "base/ringbuffer.hpp"
-#include <boost/function.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition_variable.hpp>
@@ -47,11 +46,11 @@ struct Task
            : Priority(PriorityNormal), ID(-1)
        { }
 
-       Task(boost::function<void (void)>&& function, WorkQueuePriority priority, int id)
+       Task(std::function<void (void)>&& function, WorkQueuePriority priority, int id)
            : Function(std::move(function)), Priority(priority), ID(id)
        { }
 
-       boost::function<void (void)> Function;
+       std::function<void (void)> Function;
        WorkQueuePriority Priority;
        int ID;
 };
@@ -79,7 +78,7 @@ inline bool operator<(const Task& a, const Task& b)
 class I2_BASE_API WorkQueue
 {
 public:
-       typedef boost::function<void (boost::exception_ptr)> ExceptionCallback;
+       typedef std::function<void (boost::exception_ptr)> ExceptionCallback;
 
        WorkQueue(size_t maxItems = 0, int threadCount = 1);
        ~WorkQueue(void);
@@ -87,7 +86,7 @@ public:
        void SetName(const String& name);
        String GetName(void) const;
 
-       void Enqueue(boost::function<void (void)>&& function, WorkQueuePriority priority = PriorityNormal,
+       void Enqueue(std::function<void (void)>&& function, WorkQueuePriority priority = PriorityNormal,
            bool allowInterleaved = false);
        void Join(bool stop = false);
 
index 65098d6c36b6ca22b2c790df4098148352a249c3..a943872b954b7d5f5fae444b998ec9cebe845540 100644 (file)
@@ -65,10 +65,10 @@ CheckerComponent::CheckerComponent(void)
 
 void CheckerComponent::OnConfigLoaded(void)
 {
-       ConfigObject::OnActiveChanged.connect(bind(&CheckerComponent::ObjectHandler, this, _1));
-       ConfigObject::OnPausedChanged.connect(bind(&CheckerComponent::ObjectHandler, this, _1));
+       ConfigObject::OnActiveChanged.connect(std::bind(&CheckerComponent::ObjectHandler, this, _1));
+       ConfigObject::OnPausedChanged.connect(std::bind(&CheckerComponent::ObjectHandler, this, _1));
 
-       Checkable::OnNextCheckChanged.connect(bind(&CheckerComponent::NextCheckChangedHandler, this, _1));
+       Checkable::OnNextCheckChanged.connect(std::bind(&CheckerComponent::NextCheckChangedHandler, this, _1));
 }
 
 void CheckerComponent::Start(bool runtimeCreated)
@@ -79,11 +79,11 @@ void CheckerComponent::Start(bool runtimeCreated)
            << "'" << GetName() << "' started.";
 
 
-       m_Thread = boost::thread(boost::bind(&CheckerComponent::CheckThreadProc, this));
+       m_Thread = boost::thread(std::bind(&CheckerComponent::CheckThreadProc, this));
 
        m_ResultTimer = new Timer();
        m_ResultTimer->SetInterval(5);
-       m_ResultTimer->OnTimerExpired.connect(boost::bind(&CheckerComponent::ResultTimerHandler, this));
+       m_ResultTimer->OnTimerExpired.connect(std::bind(&CheckerComponent::ResultTimerHandler, this));
        m_ResultTimer->Start();
 }
 
@@ -200,7 +200,7 @@ void CheckerComponent::CheckThreadProc(void)
 
                Checkable::IncreasePendingChecks();
 
-               Utility::QueueAsyncCallback(boost::bind(&CheckerComponent::ExecuteCheckHelper, CheckerComponent::Ptr(this), checkable));
+               Utility::QueueAsyncCallback(std::bind(&CheckerComponent::ExecuteCheckHelper, CheckerComponent::Ptr(this), checkable));
 
                lock.lock();
        }
index 444588883f60a4bb409237cc7ad351d24c048941..55b836eb30eb5d4c3f95c79a0c5746732df4e405 100644 (file)
@@ -195,7 +195,7 @@ char *ConsoleCommand::ConsoleCompleteHelper(const char *word, int state)
                        Array::Ptr suggestions;
 
                        l_ApiClient->AutocompleteScript(l_Session, word, l_ScriptFrame->Sandboxed,
-                           boost::bind(&ConsoleCommand::AutocompleteScriptCompletionHandler,
+                           std::bind(&ConsoleCommand::AutocompleteScriptCompletionHandler,
                            boost::ref(mutex), boost::ref(cv), boost::ref(ready),
                            _1, _2,
                            boost::ref(suggestions)));
@@ -425,7 +425,7 @@ incomplete:
                                boost::exception_ptr eptr;
 
                                l_ApiClient->ExecuteScript(l_Session, command, scriptFrame.Sandboxed,
-                                   boost::bind(&ConsoleCommand::ExecuteScriptCompletionHandler,
+                                   std::bind(&ConsoleCommand::ExecuteScriptCompletionHandler,
                                    boost::ref(mutex), boost::ref(cv), boost::ref(ready),
                                    _1, _2,
                                    boost::ref(result), boost::ref(eptr)));
index c6748947ec13ab8337d253aebbacf7ba5ac4418a..903cca03f95db2d0b247c16f741caf5c19016994 100644 (file)
@@ -52,7 +52,7 @@ static void IncludeZoneDirRecursive(const String& path, const String& package, b
        ConfigCompiler::RegisterZoneDir("_etc", path, zoneName);
 
        std::vector<Expression *> expressions;
-       Utility::GlobRecursive(path, "*.conf", boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zoneName, package), GlobFile);
+       Utility::GlobRecursive(path, "*.conf", std::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zoneName, package), GlobFile);
        DictExpression expr(expressions);
        if (!ExecuteExpression(&expr))
                success = false;
@@ -75,7 +75,7 @@ static void IncludeNonLocalZone(const String& zonePath, const String& package, b
        }
 
        std::vector<Expression *> expressions;
-       Utility::GlobRecursive(zonePath, "*.conf", boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zoneName, package), GlobFile);
+       Utility::GlobRecursive(zonePath, "*.conf", std::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zoneName, package), GlobFile);
        DictExpression expr(expressions);
        if (!ExecuteExpression(&expr))
                success = false;
@@ -126,7 +126,7 @@ bool DaemonUtility::ValidateConfigFiles(const std::vector<std::string>& configs,
 
        String zonesEtcDir = Application::GetZonesDir();
        if (!zonesEtcDir.IsEmpty() && Utility::PathExists(zonesEtcDir))
-               Utility::Glob(zonesEtcDir + "/*", boost::bind(&IncludeZoneDirRecursive, _1, "_etc", boost::ref(success)), GlobDirectory);
+               Utility::Glob(zonesEtcDir + "/*", std::bind(&IncludeZoneDirRecursive, _1, "_etc", boost::ref(success)), GlobDirectory);
 
        if (!success)
                return false;
@@ -135,7 +135,7 @@ bool DaemonUtility::ValidateConfigFiles(const std::vector<std::string>& configs,
         * are authoritative on this node and are checked in HasZoneConfigAuthority(). */
        String packagesVarDir = Application::GetLocalStateDir() + "/lib/icinga2/api/packages";
        if (Utility::PathExists(packagesVarDir))
-               Utility::Glob(packagesVarDir + "/*", boost::bind(&IncludePackage, _1, boost::ref(success)), GlobDirectory);
+               Utility::Glob(packagesVarDir + "/*", std::bind(&IncludePackage, _1, boost::ref(success)), GlobDirectory);
 
        if (!success)
                return false;
@@ -143,7 +143,7 @@ bool DaemonUtility::ValidateConfigFiles(const std::vector<std::string>& configs,
        /* Load cluster synchronized configuration files */
        String zonesVarDir = Application::GetLocalStateDir() + "/lib/icinga2/api/zones";
        if (Utility::PathExists(zonesVarDir))
-               Utility::Glob(zonesVarDir + "/*", boost::bind(&IncludeNonLocalZone, _1, "_cluster", boost::ref(success)), GlobDirectory);
+               Utility::Glob(zonesVarDir + "/*", std::bind(&IncludeNonLocalZone, _1, "_cluster", boost::ref(success)), GlobDirectory);
 
        if (!success)
                return false;
index 9de11d00044a72397e896a6f1e6193883b5bfcb1..4b4b9df8e9a206e7988ff597e357d1f72ff285a5 100644 (file)
@@ -200,11 +200,11 @@ bool FeatureUtility::GetFeatures(std::vector<String>& features, bool get_disable
                /* disable = available-enabled */
                String available_pattern = GetFeaturesAvailablePath() + "/*.conf";
                std::vector<String> available;
-               Utility::Glob(available_pattern, boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(available)), GlobFile);
+               Utility::Glob(available_pattern, std::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(available)), GlobFile);
 
                String enabled_pattern = GetFeaturesEnabledPath() + "/*.conf";
                std::vector<String> enabled;
-               Utility::Glob(enabled_pattern, boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(enabled)), GlobFile);
+               Utility::Glob(enabled_pattern, std::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(enabled)), GlobFile);
 
                std::sort(available.begin(), available.end());
                std::sort(enabled.begin(), enabled.end());
@@ -217,7 +217,7 @@ bool FeatureUtility::GetFeatures(std::vector<String>& features, bool get_disable
                /* all enabled features */
                String enabled_pattern = GetFeaturesEnabledPath() + "/*.conf";
 
-               Utility::Glob(enabled_pattern, boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(features)), GlobFile);
+               Utility::Glob(enabled_pattern, std::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(features)), GlobFile);
        }
 
        return true;
index 59b908941e4e008b776c4ba819fb0efb3d7f2c6e..01ae8644b1179454c315ab1c1350b39b5654b12e 100644 (file)
@@ -375,7 +375,7 @@ bool TroubleshootCommand::PrintCrashReports(InfoLog& log)
        String bestFilename;
 
        try {
-               Utility::Glob(spath, boost::bind(&GetLatestReport, _1, boost::ref(bestTimestamp),
+               Utility::Glob(spath, std::bind(&GetLatestReport, _1, boost::ref(bestTimestamp),
                    boost::ref(bestFilename)), GlobFile);
        }
 #ifdef _WIN32
index 1ac8546e58ec1318dd7f21b5934147a1023556a8..061c51470ec58495577875d501a5eddac39fe624 100644 (file)
@@ -63,7 +63,7 @@ void CheckResultReader::Start(bool runtimeCreated)
 
 #ifndef _WIN32
        m_ReadTimer = new Timer();
-       m_ReadTimer->OnTimerExpired.connect(boost::bind(&CheckResultReader::ReadTimerHandler, this));
+       m_ReadTimer->OnTimerExpired.connect(std::bind(&CheckResultReader::ReadTimerHandler, this));
        m_ReadTimer->SetInterval(5);
        m_ReadTimer->Start();
 #endif /* _WIN32 */
@@ -87,7 +87,7 @@ void CheckResultReader::ReadTimerHandler(void) const
 {
        CONTEXT("Processing check result files in '" + GetSpoolDir() + "'");
 
-       Utility::Glob(GetSpoolDir() + "/c??????.ok", boost::bind(&CheckResultReader::ProcessCheckResultFile, this, _1), GlobFile);
+       Utility::Glob(GetSpoolDir() + "/c??????.ok", std::bind(&CheckResultReader::ProcessCheckResultFile, this, _1), GlobFile);
 }
 
 void CheckResultReader::ProcessCheckResultFile(const String& path) const
index dabefe785a2b393d861816e016baa0ad3ba9d3de..67561327a3f2725b0cb0c9993775a96dd86698af 100644 (file)
@@ -63,19 +63,19 @@ void CompatLogger::Start(bool runtimeCreated)
        Log(LogInformation, "CompatLogger")
            << "'" << GetName() << "' started.";
 
-       Checkable::OnNewCheckResult.connect(bind(&CompatLogger::CheckResultHandler, this, _1, _2));
-       Checkable::OnNotificationSentToUser.connect(bind(&CompatLogger::NotificationSentHandler, this, _1, _2, _3, _4, _5, _6, _7, _8));
-       Downtime::OnDowntimeTriggered.connect(boost::bind(&CompatLogger::TriggerDowntimeHandler, this, _1));
-       Downtime::OnDowntimeRemoved.connect(boost::bind(&CompatLogger::RemoveDowntimeHandler, this, _1));
-       Checkable::OnEventCommandExecuted.connect(bind(&CompatLogger::EventCommandHandler, this, _1));
+       Checkable::OnNewCheckResult.connect(std::bind(&CompatLogger::CheckResultHandler, this, _1, _2));
+       Checkable::OnNotificationSentToUser.connect(std::bind(&CompatLogger::NotificationSentHandler, this, _1, _2, _3, _4, _5, _6, _7, _8));
+       Downtime::OnDowntimeTriggered.connect(std::bind(&CompatLogger::TriggerDowntimeHandler, this, _1));
+       Downtime::OnDowntimeRemoved.connect(std::bind(&CompatLogger::RemoveDowntimeHandler, this, _1));
+       Checkable::OnEventCommandExecuted.connect(std::bind(&CompatLogger::EventCommandHandler, this, _1));
        
-       Checkable::OnFlappingChanged.connect(boost::bind(&CompatLogger::FlappingChangedHandler, this, _1));
-       Checkable::OnEnableFlappingChanged.connect(boost::bind(&CompatLogger::EnableFlappingChangedHandler, this, _1));
+       Checkable::OnFlappingChanged.connect(std::bind(&CompatLogger::FlappingChangedHandler, this, _1));
+       Checkable::OnEnableFlappingChanged.connect(std::bind(&CompatLogger::EnableFlappingChangedHandler, this, _1));
        
-       ExternalCommandProcessor::OnNewExternalCommand.connect(boost::bind(&CompatLogger::ExternalCommandHandler, this, _2, _3));
+       ExternalCommandProcessor::OnNewExternalCommand.connect(std::bind(&CompatLogger::ExternalCommandHandler, this, _2, _3));
 
        m_RotationTimer = new Timer();
-       m_RotationTimer->OnTimerExpired.connect(boost::bind(&CompatLogger::RotationTimerHandler, this));
+       m_RotationTimer->OnTimerExpired.connect(std::bind(&CompatLogger::RotationTimerHandler, this));
        m_RotationTimer->Start();
 
        ReopenFile(false);
index 90669fafd041083920c6027304f6fc238568a85e..0402551601f31564e6b879f06c7c043527b2b398 100644 (file)
@@ -54,7 +54,7 @@ void ExternalCommandListener::Start(bool runtimeCreated)
            << "'" << GetName() << "' started.";
 
 #ifndef _WIN32
-       m_CommandThread = boost::thread(boost::bind(&ExternalCommandListener::CommandPipeThread, this, GetCommandPath()));
+       m_CommandThread = boost::thread(std::bind(&ExternalCommandListener::CommandPipeThread, this, GetCommandPath()));
        m_CommandThread.detach();
 #endif /* _WIN32 */
 }
index 22a22f7dfdb270a14a401ffe95fb76f031b9ad5e..d672580359ca2d0c748bcbfe8ea7d603a119d60b 100644 (file)
@@ -80,12 +80,12 @@ void StatusDataWriter::Start(bool runtimeCreated)
 
        m_StatusTimer = new Timer();
        m_StatusTimer->SetInterval(GetUpdateInterval());
-       m_StatusTimer->OnTimerExpired.connect(boost::bind(&StatusDataWriter::StatusTimerHandler, this));
+       m_StatusTimer->OnTimerExpired.connect(std::bind(&StatusDataWriter::StatusTimerHandler, this));
        m_StatusTimer->Start();
        m_StatusTimer->Reschedule(0);
 
-       ConfigObject::OnVersionChanged.connect(boost::bind(&StatusDataWriter::ObjectHandler, this));
-       ConfigObject::OnActiveChanged.connect(boost::bind(&StatusDataWriter::ObjectHandler, this));
+       ConfigObject::OnVersionChanged.connect(std::bind(&StatusDataWriter::ObjectHandler, this));
+       ConfigObject::OnActiveChanged.connect(std::bind(&StatusDataWriter::ObjectHandler, this));
 }
 
 /**
index ef0ffd03131b5a65afad32f55b3e87397cf58b2f..631d1e54ffe2cbdc7c19c713b569cb929ac0f643 100644 (file)
@@ -23,7 +23,6 @@
 #include "config/i2-config.hpp"
 #include "config/expression.hpp"
 #include "base/debuginfo.hpp"
-#include <boost/function.hpp>
 
 namespace icinga
 {
index 9fe90e8f864a9f92e52e344f529f698f3387abd4..f1bec5c912950bb990c87d6b7c021ab55a98f298 100644 (file)
@@ -155,7 +155,7 @@ Expression *ConfigCompiler::HandleInclude(const String& relativeBase, const Stri
 
        std::vector<Expression *> expressions;
 
-       if (!Utility::Glob(includePath, boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zone, package), GlobFile) && includePath.FindFirstOf("*?") == String::NPos) {
+       if (!Utility::Glob(includePath, std::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zone, package), GlobFile) && includePath.FindFirstOf("*?") == String::NPos) {
                std::ostringstream msgbuf;
                msgbuf << "Include file '" + path + "' does not exist";
                BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), debuginfo));
@@ -185,7 +185,7 @@ Expression *ConfigCompiler::HandleIncludeRecursive(const String& relativeBase, c
                ppath = relativeBase + "/" + path;
 
        std::vector<Expression *> expressions;
-       Utility::GlobRecursive(ppath, pattern, boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zone, package), GlobFile);
+       Utility::GlobRecursive(ppath, pattern, std::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zone, package), GlobFile);
 
        DictExpression *dict = new DictExpression(expressions);
        dict->MakeInline();
@@ -205,7 +205,7 @@ void ConfigCompiler::HandleIncludeZone(const String& relativeBase, const String&
 
        RegisterZoneDir(tag, ppath, zoneName);
 
-       Utility::GlobRecursive(ppath, pattern, boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zoneName, package), GlobFile);
+       Utility::GlobRecursive(ppath, pattern, std::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zoneName, package), GlobFile);
 }
 
 /**
@@ -231,7 +231,7 @@ Expression *ConfigCompiler::HandleIncludeZones(const String& relativeBase, const
        }
 
        std::vector<Expression *> expressions;
-       Utility::Glob(ppath + "/*", boost::bind(&ConfigCompiler::HandleIncludeZone, newRelativeBase, tag, _1, pattern, package, boost::ref(expressions)), GlobDirectory);
+       Utility::Glob(ppath + "/*", std::bind(&ConfigCompiler::HandleIncludeZone, newRelativeBase, tag, _1, pattern, package, boost::ref(expressions)), GlobDirectory);
        return new DictExpression(expressions);
 }
 
index 94ae967bdcdec1619889efc8b77ce82606d3474d..cd5395c8dd2df9213bf02b5d42faeacd2255e4df 100644 (file)
@@ -26,7 +26,6 @@
 #include "base/registry.hpp"
 #include "base/initialize.hpp"
 #include "base/singleton.hpp"
-#include <boost/function.hpp>
 #include <iostream>
 #include <stack>
 
index 8f630564f8a4023bd6aff8f5b3c79677a9251cdf..f2bd6df577defa974e6ee642f9da1ad5ca3b6702 100644 (file)
@@ -608,7 +608,7 @@ bool ConfigItem::ActivateItems(WorkQueue& upq, const std::vector<ConfigItem::Ptr
                Log(LogDebug, "ConfigItem")
                    << "Setting 'active' to true for object '" << object->GetName() << "' of type '" << object->GetReflectionType()->GetName() << "'";
 #endif /* I2_DEBUG */
-               upq.Enqueue(boost::bind(&ConfigObject::PreActivate, object));
+               upq.Enqueue(std::bind(&ConfigObject::PreActivate, object));
        }
 
        upq.Join();
@@ -631,7 +631,7 @@ bool ConfigItem::ActivateItems(WorkQueue& upq, const std::vector<ConfigItem::Ptr
                Log(LogDebug, "ConfigItem")
                    << "Activating object '" << object->GetName() << "' of type '" << object->GetReflectionType()->GetName() << "'";
 #endif /* I2_DEBUG */
-               upq.Enqueue(boost::bind(&ConfigObject::Activate, object, runtimeCreated));
+               upq.Enqueue(std::bind(&ConfigObject::Activate, object, runtimeCreated));
        }
 
        upq.Join();
index a8661faa3a94e6d39c3a0a29a46cbabc6943f3e1..c64ac1064d6b92a57fbc855411bc613b23bb4bda 100644 (file)
@@ -112,7 +112,7 @@ public:
        static inline Value NewFunction(ScriptFrame& frame, const String& name, const std::vector<String>& args,
            std::map<String, Expression *> *closedVars, const boost::shared_ptr<Expression>& expression)
        {
-               return new Function(name, boost::bind(&FunctionWrapper, _1, args,
+               return new Function(name, std::bind(&FunctionWrapper, _1, args,
                    EvaluateClosedVars(frame, closedVars), expression), args);
        }
 
index 95b14486def5016feb040e2b7f20bba32cdf1e22..96a744fdc139e3a796a633654614de30b2f095b7 100644 (file)
@@ -66,8 +66,8 @@ void DbConnection::Start(bool runtimeCreated)
        Log(LogInformation, "DbConnection")
            << "'" << GetName() << "' started.";
 
-       DbObject::OnQuery.connect(boost::bind(&DbConnection::ExecuteQuery, this, _1));
-       DbObject::OnMultipleQueries.connect(boost::bind(&DbConnection::ExecuteMultipleQueries, this, _1));
+       DbObject::OnQuery.connect(std::bind(&DbConnection::ExecuteQuery, this, _1));
+       DbObject::OnMultipleQueries.connect(std::bind(&DbConnection::ExecuteMultipleQueries, this, _1));
 }
 
 void DbConnection::Stop(bool runtimeRemoved)
@@ -81,7 +81,7 @@ void DbConnection::Stop(bool runtimeRemoved)
 void DbConnection::EnableActiveChangedHandler(void)
 {
        if (!m_ActiveChangedHandler) {
-               ConfigObject::OnActiveChanged.connect(boost::bind(&DbConnection::UpdateObject, this, _1));
+               ConfigObject::OnActiveChanged.connect(std::bind(&DbConnection::UpdateObject, this, _1));
                m_ActiveChangedHandler = true;
        }
 }
@@ -95,7 +95,7 @@ void DbConnection::Resume(void)
 
        m_CleanUpTimer = new Timer();
        m_CleanUpTimer->SetInterval(60);
-       m_CleanUpTimer->OnTimerExpired.connect(boost::bind(&DbConnection::CleanUpHandler, this));
+       m_CleanUpTimer->OnTimerExpired.connect(std::bind(&DbConnection::CleanUpHandler, this));
        m_CleanUpTimer->Start();
 }
 
@@ -131,7 +131,7 @@ void DbConnection::InitializeDbTimer(void)
 {
        m_ProgramStatusTimer = new Timer();
        m_ProgramStatusTimer->SetInterval(10);
-       m_ProgramStatusTimer->OnTimerExpired.connect(boost::bind(&DbConnection::UpdateProgramStatus));
+       m_ProgramStatusTimer->OnTimerExpired.connect(std::bind(&DbConnection::UpdateProgramStatus));
        m_ProgramStatusTimer->Start();
 }
 
index 2d665357968a3db7316953e92e4c7e8ccb29dae7..b14b19ce67b27e296d98c527252fb82ab9cbea96 100644 (file)
@@ -42,49 +42,49 @@ INITIALIZE_ONCE(&DbEvents::StaticInitialize);
 void DbEvents::StaticInitialize(void)
 {
        /* Status */
-       Comment::OnCommentAdded.connect(boost::bind(&DbEvents::AddComment, _1));
-       Comment::OnCommentRemoved.connect(boost::bind(&DbEvents::RemoveComment, _1));
-       Downtime::OnDowntimeAdded.connect(boost::bind(&DbEvents::AddDowntime, _1));
-       Downtime::OnDowntimeRemoved.connect(boost::bind(&DbEvents::RemoveDowntime, _1));
-       Downtime::OnDowntimeTriggered.connect(boost::bind(&DbEvents::TriggerDowntime, _1));
-       Checkable::OnAcknowledgementSet.connect(boost::bind(&DbEvents::AddAcknowledgement, _1, _4));
-       Checkable::OnAcknowledgementCleared.connect(boost::bind(&DbEvents::RemoveAcknowledgement, _1));
-
-       Checkable::OnNextCheckUpdated.connect(boost::bind(&DbEvents::NextCheckUpdatedHandler, _1));
-       Checkable::OnFlappingChanged.connect(boost::bind(&DbEvents::FlappingChangedHandler, _1));
-       Checkable::OnNotificationSentToAllUsers.connect(boost::bind(&DbEvents::LastNotificationChangedHandler, _1, _2));
-
-       Checkable::OnEnableActiveChecksChanged.connect(boost::bind(&DbEvents::EnableActiveChecksChangedHandler, _1));
-       Checkable::OnEnablePassiveChecksChanged.connect(boost::bind(&DbEvents::EnablePassiveChecksChangedHandler, _1));
-       Checkable::OnEnableNotificationsChanged.connect(boost::bind(&DbEvents::EnableNotificationsChangedHandler, _1));
-       Checkable::OnEnablePerfdataChanged.connect(boost::bind(&DbEvents::EnablePerfdataChangedHandler, _1));
-       Checkable::OnEnableFlappingChanged.connect(boost::bind(&DbEvents::EnableFlappingChangedHandler, _1));
-
-       Checkable::OnReachabilityChanged.connect(boost::bind(&DbEvents::ReachabilityChangedHandler, _1, _2, _3));
+       Comment::OnCommentAdded.connect(std::bind(&DbEvents::AddComment, _1));
+       Comment::OnCommentRemoved.connect(std::bind(&DbEvents::RemoveComment, _1));
+       Downtime::OnDowntimeAdded.connect(std::bind(&DbEvents::AddDowntime, _1));
+       Downtime::OnDowntimeRemoved.connect(std::bind(&DbEvents::RemoveDowntime, _1));
+       Downtime::OnDowntimeTriggered.connect(std::bind(&DbEvents::TriggerDowntime, _1));
+       Checkable::OnAcknowledgementSet.connect(std::bind(&DbEvents::AddAcknowledgement, _1, _4));
+       Checkable::OnAcknowledgementCleared.connect(std::bind(&DbEvents::RemoveAcknowledgement, _1));
+
+       Checkable::OnNextCheckUpdated.connect(std::bind(&DbEvents::NextCheckUpdatedHandler, _1));
+       Checkable::OnFlappingChanged.connect(std::bind(&DbEvents::FlappingChangedHandler, _1));
+       Checkable::OnNotificationSentToAllUsers.connect(std::bind(&DbEvents::LastNotificationChangedHandler, _1, _2));
+
+       Checkable::OnEnableActiveChecksChanged.connect(std::bind(&DbEvents::EnableActiveChecksChangedHandler, _1));
+       Checkable::OnEnablePassiveChecksChanged.connect(std::bind(&DbEvents::EnablePassiveChecksChangedHandler, _1));
+       Checkable::OnEnableNotificationsChanged.connect(std::bind(&DbEvents::EnableNotificationsChangedHandler, _1));
+       Checkable::OnEnablePerfdataChanged.connect(std::bind(&DbEvents::EnablePerfdataChangedHandler, _1));
+       Checkable::OnEnableFlappingChanged.connect(std::bind(&DbEvents::EnableFlappingChangedHandler, _1));
+
+       Checkable::OnReachabilityChanged.connect(std::bind(&DbEvents::ReachabilityChangedHandler, _1, _2, _3));
 
        /* History */
-       Comment::OnCommentAdded.connect(boost::bind(&DbEvents::AddCommentHistory, _1));
-       Downtime::OnDowntimeAdded.connect(boost::bind(&DbEvents::AddDowntimeHistory, _1));
-       Checkable::OnAcknowledgementSet.connect(boost::bind(&DbEvents::AddAcknowledgementHistory, _1, _2, _3, _4, _5, _6));
+       Comment::OnCommentAdded.connect(std::bind(&DbEvents::AddCommentHistory, _1));
+       Downtime::OnDowntimeAdded.connect(std::bind(&DbEvents::AddDowntimeHistory, _1));
+       Checkable::OnAcknowledgementSet.connect(std::bind(&DbEvents::AddAcknowledgementHistory, _1, _2, _3, _4, _5, _6));
 
-       Checkable::OnNotificationSentToAllUsers.connect(boost::bind(&DbEvents::AddNotificationHistory, _1, _2, _3, _4, _5, _6, _7));
+       Checkable::OnNotificationSentToAllUsers.connect(std::bind(&DbEvents::AddNotificationHistory, _1, _2, _3, _4, _5, _6, _7));
 
-       Checkable::OnStateChange.connect(boost::bind(&DbEvents::AddStateChangeHistory, _1, _2, _3));
+       Checkable::OnStateChange.connect(std::bind(&DbEvents::AddStateChangeHistory, _1, _2, _3));
 
-       Checkable::OnNewCheckResult.connect(boost::bind(&DbEvents::AddCheckResultLogHistory, _1, _2));
-       Checkable::OnNotificationSentToUser.connect(boost::bind(&DbEvents::AddNotificationSentLogHistory, _1, _2, _3, _4, _5, _6, _7));
-       Checkable::OnFlappingChanged.connect(boost::bind(&DbEvents::AddFlappingChangedLogHistory, _1));
-       Checkable::OnEnableFlappingChanged.connect(boost::bind(&DbEvents::AddEnableFlappingChangedLogHistory, _1));
-       Downtime::OnDowntimeTriggered.connect(boost::bind(&DbEvents::AddTriggerDowntimeLogHistory, _1));
-       Downtime::OnDowntimeRemoved.connect(boost::bind(&DbEvents::AddRemoveDowntimeLogHistory, _1));
+       Checkable::OnNewCheckResult.connect(std::bind(&DbEvents::AddCheckResultLogHistory, _1, _2));
+       Checkable::OnNotificationSentToUser.connect(std::bind(&DbEvents::AddNotificationSentLogHistory, _1, _2, _3, _4, _5, _6, _7));
+       Checkable::OnFlappingChanged.connect(std::bind(&DbEvents::AddFlappingChangedLogHistory, _1));
+       Checkable::OnEnableFlappingChanged.connect(std::bind(&DbEvents::AddEnableFlappingChangedLogHistory, _1));
+       Downtime::OnDowntimeTriggered.connect(std::bind(&DbEvents::AddTriggerDowntimeLogHistory, _1));
+       Downtime::OnDowntimeRemoved.connect(std::bind(&DbEvents::AddRemoveDowntimeLogHistory, _1));
 
-       Checkable::OnFlappingChanged.connect(boost::bind(&DbEvents::AddFlappingChangedHistory, _1));
-       Checkable::OnEnableFlappingChanged.connect(boost::bind(&DbEvents::AddEnableFlappingChangedHistory, _1));
-       Checkable::OnNewCheckResult.connect(boost::bind(&DbEvents::AddCheckableCheckHistory, _1, _2));
+       Checkable::OnFlappingChanged.connect(std::bind(&DbEvents::AddFlappingChangedHistory, _1));
+       Checkable::OnEnableFlappingChanged.connect(std::bind(&DbEvents::AddEnableFlappingChangedHistory, _1));
+       Checkable::OnNewCheckResult.connect(std::bind(&DbEvents::AddCheckableCheckHistory, _1, _2));
 
-       Checkable::OnEventCommandExecuted.connect(boost::bind(&DbEvents::AddEventHandlerHistory, _1));
+       Checkable::OnEventCommandExecuted.connect(std::bind(&DbEvents::AddEventHandlerHistory, _1));
 
-       ExternalCommandProcessor::OnNewExternalCommand.connect(boost::bind(&DbEvents::AddExternalCommandHistory, _1, _2, _3));
+       ExternalCommandProcessor::OnNewExternalCommand.connect(std::bind(&DbEvents::AddExternalCommandHistory, _1, _2, _3));
 }
 
 /* check events */
index c4e4c0e9bee4545de4f1e98e87a594d84a732790..a40e7d77543392500740daf862ed046bee276825 100644 (file)
@@ -52,11 +52,11 @@ DbObject::DbObject(const intrusive_ptr<DbType>& type, const String& name1, const
 void DbObject::StaticInitialize(void)
 {
        /* triggered in ProcessCheckResult(), requires UpdateNextCheck() to be called before */
-       ConfigObject::OnStateChanged.connect(boost::bind(&DbObject::StateChangedHandler, _1));
-       CustomVarObject::OnVarsChanged.connect(boost::bind(&DbObject::VarsChangedHandler, _1));
+       ConfigObject::OnStateChanged.connect(std::bind(&DbObject::StateChangedHandler, _1));
+       CustomVarObject::OnVarsChanged.connect(std::bind(&DbObject::VarsChangedHandler, _1));
 
        /* triggered on create, update and delete objects */
-       ConfigObject::OnVersionChanged.connect(boost::bind(&DbObject::VersionChangedHandler, _1));
+       ConfigObject::OnVersionChanged.connect(std::bind(&DbObject::VersionChangedHandler, _1));
 }
 
 void DbObject::SetObject(const ConfigObject::Ptr& object)
index 59ff8b3d966faf3637d5a88bfeb5efd16c217a6f..72fdb9831ebeb2bfaea02ea9a23bf4165fdb38b0 100644 (file)
@@ -41,7 +41,7 @@ class I2_DB_IDO_API DbType : public Object
 public:
        DECLARE_PTR_TYPEDEFS(DbType);
 
-       typedef boost::function<intrusive_ptr<DbObject> (const intrusive_ptr<DbType>&, const String&, const String&)> ObjectFactory;
+       typedef std::function<intrusive_ptr<DbObject> (const intrusive_ptr<DbType>&, const String&, const String&)> ObjectFactory;
        typedef std::map<String, DbType::Ptr> TypeMap;
        typedef std::map<std::pair<String, String>, intrusive_ptr<DbObject> > ObjectMap;
 
index a837e09c00dd6b539ae3bbd794291cf8ffd35a00..f6dbcc200b9af6514e82efea484a3d812b9b12bb 100644 (file)
@@ -36,8 +36,8 @@ INITIALIZE_ONCE(&EndpointDbObject::StaticInitialize);
 
 void EndpointDbObject::StaticInitialize(void)
 {
-       Endpoint::OnConnected.connect(boost::bind(&EndpointDbObject::UpdateConnectedStatus, _1));
-       Endpoint::OnDisconnected.connect(boost::bind(&EndpointDbObject::UpdateConnectedStatus, _1));
+       Endpoint::OnConnected.connect(std::bind(&EndpointDbObject::UpdateConnectedStatus, _1));
+       Endpoint::OnDisconnected.connect(std::bind(&EndpointDbObject::UpdateConnectedStatus, _1));
 }
 
 EndpointDbObject::EndpointDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
index 881c1d5107fdb8e261c31f602c7236974037abad..bc737b1664a303248cafe640c3931a2a9de274d8 100644 (file)
@@ -85,16 +85,16 @@ void IdoMysqlConnection::Resume(void)
 
        SetConnected(false);
 
-       m_QueryQueue.SetExceptionCallback(boost::bind(&IdoMysqlConnection::ExceptionHandler, this, _1));
+       m_QueryQueue.SetExceptionCallback(std::bind(&IdoMysqlConnection::ExceptionHandler, this, _1));
 
        m_TxTimer = new Timer();
        m_TxTimer->SetInterval(1);
-       m_TxTimer->OnTimerExpired.connect(boost::bind(&IdoMysqlConnection::TxTimerHandler, this));
+       m_TxTimer->OnTimerExpired.connect(std::bind(&IdoMysqlConnection::TxTimerHandler, this));
        m_TxTimer->Start();
 
        m_ReconnectTimer = new Timer();
        m_ReconnectTimer->SetInterval(10);
-       m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&IdoMysqlConnection::ReconnectTimerHandler, this));
+       m_ReconnectTimer->OnTimerExpired.connect(std::bind(&IdoMysqlConnection::ReconnectTimerHandler, this));
        m_ReconnectTimer->Start();
        m_ReconnectTimer->Reschedule(0);
 
@@ -115,7 +115,7 @@ void IdoMysqlConnection::Pause(void)
            << "Rescheduling disconnect task.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::Disconnect, this), PriorityHigh);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::Disconnect, this), PriorityHigh);
        m_QueryQueue.Join();
 }
 
@@ -163,8 +163,8 @@ void IdoMysqlConnection::NewTransaction(void)
            << "Scheduling new transaction and finishing async queries.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalNewTransaction, this), PriorityHigh);
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::FinishAsyncQueries, this), PriorityHigh);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalNewTransaction, this), PriorityHigh);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::FinishAsyncQueries, this), PriorityHigh);
 }
 
 void IdoMysqlConnection::InternalNewTransaction(void)
@@ -185,7 +185,7 @@ void IdoMysqlConnection::ReconnectTimerHandler(void)
            << "Scheduling reconnect task.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::Reconnect, this), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::Reconnect, this), PriorityLow);
 }
 
 void IdoMysqlConnection::Reconnect(void)
@@ -444,9 +444,9 @@ void IdoMysqlConnection::Reconnect(void)
            << "Scheduling session table clear and finish connect task.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::ClearTablesBySession, this), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::ClearTablesBySession, this), PriorityLow);
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::FinishConnect, this, startTime), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::FinishConnect, this, startTime), PriorityLow);
 }
 
 void IdoMysqlConnection::FinishConnect(double startTime)
@@ -479,7 +479,7 @@ void IdoMysqlConnection::ClearTableBySession(const String& table)
            Convert::ToString(GetSessionToken()));
 }
 
-void IdoMysqlConnection::AsyncQuery(const String& query, const boost::function<void (const IdoMysqlResult&)>& callback)
+void IdoMysqlConnection::AsyncQuery(const String& query, const std::function<void (const IdoMysqlResult&)>& callback)
 {
        AssertOnWorkQueue();
 
@@ -715,7 +715,7 @@ void IdoMysqlConnection::ActivateObject(const DbObject::Ptr& dbobj)
            << "Scheduling object activation task for '" << dbobj->GetName1() << "!" << dbobj->GetName2() << "'.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalActivateObject, this, dbobj), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalActivateObject, this, dbobj), PriorityLow);
 }
 
 void IdoMysqlConnection::InternalActivateObject(const DbObject::Ptr& dbobj)
@@ -754,7 +754,7 @@ void IdoMysqlConnection::DeactivateObject(const DbObject::Ptr& dbobj)
            << "Scheduling object deactivation task for '" << dbobj->GetName1() << "!" << dbobj->GetName2() << "'.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow);
 }
 
 void IdoMysqlConnection::InternalDeactivateObject(const DbObject::Ptr& dbobj)
@@ -859,7 +859,7 @@ void IdoMysqlConnection::ExecuteQuery(const DbQuery& query)
            << "Scheduling execute query task, type " << query.Type << ", table '" << query.Table << "'.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority, true);
 }
 
 void IdoMysqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& queries)
@@ -872,7 +872,7 @@ void IdoMysqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& quer
            << "Scheduling multiple execute query task, type " << queries[0].Type << ", table '" << queries[0].Table << "'.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
 }
 
 bool IdoMysqlConnection::CanExecuteQuery(const DbQuery& query)
@@ -925,7 +925,7 @@ void IdoMysqlConnection::InternalExecuteMultipleQueries(const std::vector<DbQuer
                            << query.Type << "', table '" << query.Table << "', queue size: '" << GetPendingQueryCount() << "'.";
 #endif /* I2_DEBUG */
 
-                       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), query.Priority);
+                       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), query.Priority);
                        return;
                }
        }
@@ -963,7 +963,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
                    << typeOverride << "', table '" << query.Table << "', queue size: '" << GetPendingQueryCount() << "'.";
 #endif /* I2_DEBUG */
 
-               m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, typeOverride), query.Priority);
+               m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, typeOverride), query.Priority);
                return;
        }
 
@@ -986,7 +986,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
                                    << typeOverride << "', table '" << query.Table << "', queue size: '" << GetPendingQueryCount() << "'.";
 #endif /* I2_DEBUG */
 
-                               m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
+                               m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
                                return;
                        }
 
@@ -1065,7 +1065,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
                                    << kv.first << "', val '" << kv.second << "', type " << typeOverride << ", table '" << query.Table << "'.";
 #endif /* I2_DEBUG */
 
-                               m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
+                               m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
                                return;
                        }
 
@@ -1095,7 +1095,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
        if (type != DbQueryInsert)
                qbuf << where.str();
 
-       AsyncQuery(qbuf.str(), boost::bind(&IdoMysqlConnection::FinishExecuteQuery, this, query, type, upsert));
+       AsyncQuery(qbuf.str(), std::bind(&IdoMysqlConnection::FinishExecuteQuery, this, query, type, upsert));
 }
 
 void IdoMysqlConnection::FinishExecuteQuery(const DbQuery& query, int type, bool upsert)
@@ -1107,7 +1107,7 @@ void IdoMysqlConnection::FinishExecuteQuery(const DbQuery& query, int type, bool
                    << "Rescheduling DELETE/INSERT query: Upsert UPDATE did not affect rows, type " << type << ", table '" << query.Table << "'.";
 #endif /* I2_DEBUG */
 
-               m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, DbQueryDelete | DbQueryInsert), query.Priority);
+               m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, DbQueryDelete | DbQueryInsert), query.Priority);
 
                return;
        }
@@ -1132,7 +1132,7 @@ void IdoMysqlConnection::CleanUpExecuteQuery(const String& table, const String&
                    << time_column << "'. max_age is set to '" << max_age << "'.";
 #endif /* I2_DEBUG */
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalCleanUpExecuteQuery, this, table, time_column, max_age), PriorityLow, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoMysqlConnection::InternalCleanUpExecuteQuery, this, table, time_column, max_age), PriorityLow, true);
 }
 
 void IdoMysqlConnection::InternalCleanUpExecuteQuery(const String& table, const String& time_column, double max_age)
index eef37df58561b0c0784d2d878a7706ce77332dbf..5c6156acf74464edfda1286ebeebc702d5525a0b 100644 (file)
@@ -31,7 +31,7 @@ namespace icinga
 
 typedef boost::shared_ptr<MYSQL_RES> IdoMysqlResult;
 
-typedef boost::function<void (const IdoMysqlResult&)> IdoAsyncCallback;
+typedef std::function<void (const IdoMysqlResult&)> IdoAsyncCallback;
 
 struct IdoAsyncQuery
 {
index 3d1a8662c2c8d5dce391f8a77740bef030b7ade8..035a9c9d07ed27a036ad84bee6404edb5ccc7f83 100644 (file)
@@ -89,16 +89,16 @@ void IdoPgsqlConnection::Resume(void)
 
        SetConnected(false);
 
-       m_QueryQueue.SetExceptionCallback(boost::bind(&IdoPgsqlConnection::ExceptionHandler, this, _1));
+       m_QueryQueue.SetExceptionCallback(std::bind(&IdoPgsqlConnection::ExceptionHandler, this, _1));
 
        m_TxTimer = new Timer();
        m_TxTimer->SetInterval(1);
-       m_TxTimer->OnTimerExpired.connect(boost::bind(&IdoPgsqlConnection::TxTimerHandler, this));
+       m_TxTimer->OnTimerExpired.connect(std::bind(&IdoPgsqlConnection::TxTimerHandler, this));
        m_TxTimer->Start();
 
        m_ReconnectTimer = new Timer();
        m_ReconnectTimer->SetInterval(10);
-       m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&IdoPgsqlConnection::ReconnectTimerHandler, this));
+       m_ReconnectTimer->OnTimerExpired.connect(std::bind(&IdoPgsqlConnection::ReconnectTimerHandler, this));
        m_ReconnectTimer->Start();
        m_ReconnectTimer->Reschedule(0);
 
@@ -114,7 +114,7 @@ void IdoPgsqlConnection::Pause(void)
 
        DbConnection::Pause();
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::Disconnect, this), PriorityHigh);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::Disconnect, this), PriorityHigh);
        m_QueryQueue.Join();
 }
 
@@ -156,7 +156,7 @@ void IdoPgsqlConnection::TxTimerHandler(void)
 
 void IdoPgsqlConnection::NewTransaction(void)
 {
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalNewTransaction, this), PriorityHigh, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalNewTransaction, this), PriorityHigh, true);
 }
 
 void IdoPgsqlConnection::InternalNewTransaction(void)
@@ -172,7 +172,7 @@ void IdoPgsqlConnection::InternalNewTransaction(void)
 
 void IdoPgsqlConnection::ReconnectTimerHandler(void)
 {
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::Reconnect, this), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::Reconnect, this), PriorityLow);
 }
 
 void IdoPgsqlConnection::Reconnect(void)
@@ -395,9 +395,9 @@ void IdoPgsqlConnection::Reconnect(void)
 
        UpdateAllObjects();
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::ClearTablesBySession, this), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::ClearTablesBySession, this), PriorityLow);
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::FinishConnect, this, startTime), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::FinishConnect, this, startTime), PriorityLow);
 }
 
 void IdoPgsqlConnection::FinishConnect(double startTime)
@@ -542,7 +542,7 @@ Dictionary::Ptr IdoPgsqlConnection::FetchRow(const IdoPgsqlResult& result, int r
 
 void IdoPgsqlConnection::ActivateObject(const DbObject::Ptr& dbobj)
 {
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalActivateObject, this, dbobj), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalActivateObject, this, dbobj), PriorityLow);
 }
 
 void IdoPgsqlConnection::InternalActivateObject(const DbObject::Ptr& dbobj)
@@ -576,7 +576,7 @@ void IdoPgsqlConnection::InternalActivateObject(const DbObject::Ptr& dbobj)
 
 void IdoPgsqlConnection::DeactivateObject(const DbObject::Ptr& dbobj)
 {
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow);
 }
 
 void IdoPgsqlConnection::InternalDeactivateObject(const DbObject::Ptr& dbobj)
@@ -676,7 +676,7 @@ void IdoPgsqlConnection::ExecuteQuery(const DbQuery& query)
 {
        ASSERT(query.Category != DbCatInvalid);
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, -1), query.Priority, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, -1), query.Priority, true);
 }
 
 void IdoPgsqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& queries)
@@ -684,7 +684,7 @@ void IdoPgsqlConnection::ExecuteMultipleQueries(const std::vector<DbQuery>& quer
        if (queries.empty())
                return;
 
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true);
 }
 
 bool IdoPgsqlConnection::CanExecuteQuery(const DbQuery& query)
@@ -730,7 +730,7 @@ void IdoPgsqlConnection::InternalExecuteMultipleQueries(const std::vector<DbQuer
                ASSERT(query.Type == DbQueryNewTransaction || query.Category != DbCatInvalid);
 
                if (!CanExecuteQuery(query)) {
-                       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), query.Priority);
+                       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalExecuteMultipleQueries, this, queries), query.Priority);
                        return;
                }
        }
@@ -761,7 +761,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
 
        /* check if there are missing object/insert ids and re-enqueue the query */
        if (!CanExecuteQuery(query)) {
-               m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, typeOverride), query.Priority);
+               m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, typeOverride), query.Priority);
                return;
        }
 
@@ -777,7 +777,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
 
                for (const Dictionary::Pair& kv : query.WhereCriteria) {
                        if (!FieldToEscapedString(kv.first, kv.second, &value)) {
-                               m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
+                               m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
                                return;
                        }
 
@@ -848,7 +848,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
                                continue;
 
                        if (!FieldToEscapedString(kv.first, kv.second, &value)) {
-                               m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
+                               m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalExecuteQuery, this, query, -1), query.Priority);
                                return;
                        }
 
@@ -908,7 +908,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, int typeOver
 
 void IdoPgsqlConnection::CleanUpExecuteQuery(const String& table, const String& time_column, double max_age)
 {
-       m_QueryQueue.Enqueue(boost::bind(&IdoPgsqlConnection::InternalCleanUpExecuteQuery, this, table, time_column, max_age), PriorityLow, true);
+       m_QueryQueue.Enqueue(std::bind(&IdoPgsqlConnection::InternalCleanUpExecuteQuery, this, table, time_column, max_age), PriorityLow, true);
 }
 
 void IdoPgsqlConnection::InternalCleanUpExecuteQuery(const String& table, const String& time_column, double max_age)
index efa91e6119f8925dda33b785785b6b76fdf36756..f54aa270b8f06cbd7b29fd842d7a55f87599091f 100644 (file)
@@ -39,7 +39,7 @@ void Demo::Start(bool runtimeCreated)
 
        m_DemoTimer = new Timer();
        m_DemoTimer->SetInterval(5);
-       m_DemoTimer->OnTimerExpired.connect(boost::bind(&Demo::DemoTimerHandler, this));
+       m_DemoTimer->OnTimerExpired.connect(std::bind(&Demo::DemoTimerHandler, this));
        m_DemoTimer->Start();
 }
 
index 100b8ed2b65fd48e6b35376501f4b184411451d8..1fbfa47ab1734bbef4f687edfca58630b2ebd19b 100644 (file)
@@ -36,11 +36,11 @@ boost::signals2::signal<void (const Checkable::Ptr&, const MessageOrigin::Ptr&)>
 void Checkable::StaticInitialize(void)
 {
        /* fixed downtime start */
-       Downtime::OnDowntimeStarted.connect(boost::bind(&Checkable::NotifyFixedDowntimeStart, _1));
+       Downtime::OnDowntimeStarted.connect(std::bind(&Checkable::NotifyFixedDowntimeStart, _1));
        /* flexible downtime start */
-       Downtime::OnDowntimeTriggered.connect(boost::bind(&Checkable::NotifyFlexibleDowntimeStart, _1));
+       Downtime::OnDowntimeTriggered.connect(std::bind(&Checkable::NotifyFlexibleDowntimeStart, _1));
        /* fixed/flexible downtime end */
-       Downtime::OnDowntimeRemoved.connect(boost::bind(&Checkable::NotifyDowntimeEnd, _1));
+       Downtime::OnDowntimeRemoved.connect(std::bind(&Checkable::NotifyDowntimeEnd, _1));
 }
 
 Checkable::Checkable(void)
index fc267039c0c5f3f6c2e08a0877ecc7ad1f4004e9..497c9a0157f81e9e8f2366bbfa130890fc01a860 100644 (file)
@@ -45,7 +45,7 @@ void Comment::StaticInitialize(void)
 {
        l_CommentsExpireTimer = new Timer();
        l_CommentsExpireTimer->SetInterval(60);
-       l_CommentsExpireTimer->OnTimerExpired.connect(boost::bind(&Comment::CommentsExpireTimerHandler));
+       l_CommentsExpireTimer->OnTimerExpired.connect(std::bind(&Comment::CommentsExpireTimerHandler));
        l_CommentsExpireTimer->Start();
 }
 
index f2fbc8419d4cb4bb02c9b032cb8ccfc8fb3caa62..9c9903484042aa8639237bfd02ddc6e484becf4b 100644 (file)
@@ -49,12 +49,12 @@ void Downtime::StaticInitialize(void)
 {
        l_DowntimesStartTimer = new Timer();
        l_DowntimesStartTimer->SetInterval(5);
-       l_DowntimesStartTimer->OnTimerExpired.connect(boost::bind(&Downtime::DowntimesStartTimerHandler));
+       l_DowntimesStartTimer->OnTimerExpired.connect(std::bind(&Downtime::DowntimesStartTimerHandler));
        l_DowntimesStartTimer->Start();
 
        l_DowntimesExpireTimer = new Timer();
        l_DowntimesExpireTimer->SetInterval(60);
-       l_DowntimesExpireTimer->OnTimerExpired.connect(boost::bind(&Downtime::DowntimesExpireTimerHandler));
+       l_DowntimesExpireTimer->OnTimerExpired.connect(std::bind(&Downtime::DowntimesExpireTimerHandler));
        l_DowntimesExpireTimer->Start();
 }
 
index 6c3469f76c4761e3f2e36c0b49e950588de19510..32db49ec321e8c9289403fbbbc744c6e17c46722 100644 (file)
@@ -44,7 +44,7 @@ using namespace icinga;
 
 INITIALIZE_ONCE(&ExternalCommandProcessor::StaticInitialize);
 
-typedef boost::function<void (double, const std::vector<String>& arguments)> ExternalCommandCallback;
+typedef std::function<void (double, const std::vector<String>& arguments)> ExternalCommandCallback;
 
 struct ExternalCommandInfo
 {
index ab03a9f7b8463be83b1567fb02a1f5d9d44b58ea..07fbfa5125f2a96c34ac9267cf38c3f173a18a70 100644 (file)
@@ -23,7 +23,6 @@
 #include "icinga/i2-icinga.hpp"
 #include "icinga/command.hpp"
 #include "base/string.hpp"
-#include <boost/function.hpp>
 #include <boost/signals2.hpp>
 #include <vector>
 
index ef7354393d83674fb27eb06b5288d367bfb96e80..74a4a4c8d70549c7b5fd517d87122cc1b4ffa089 100644 (file)
@@ -100,7 +100,7 @@ int IcingaApplication::Main(void)
        /* periodically dump the program state */
        l_RetentionTimer = new Timer();
        l_RetentionTimer->SetInterval(300);
-       l_RetentionTimer->OnTimerExpired.connect(boost::bind(&IcingaApplication::DumpProgramState, this));
+       l_RetentionTimer->OnTimerExpired.connect(std::bind(&IcingaApplication::DumpProgramState, this));
        l_RetentionTimer->Start();
 
        RunEventLoop();
@@ -166,7 +166,7 @@ void IcingaApplication::DumpModifiedAttributes(void)
        fp.exceptions(std::ofstream::failbit | std::ofstream::badbit);
 
        ConfigObject::Ptr previousObject;
-       ConfigObject::DumpModifiedAttributes(boost::bind(&PersistModAttrHelper, boost::ref(fp), boost::ref(previousObject), _1, _2, _3));
+       ConfigObject::DumpModifiedAttributes(std::bind(&PersistModAttrHelper, boost::ref(fp), boost::ref(previousObject), _1, _2, _3));
 
        if (previousObject) {
                ConfigWriter::EmitRaw(fp, "\tobj.version = ");
index 2027ef82f8416ec8e8d78b13de74115d02dd101c..c7755df27b7221c1db1e08d1afa3a10e41c13b8f 100644 (file)
@@ -215,10 +215,10 @@ Value MacroProcessor::EvaluateFunction(const Function::Ptr& func, const Resolver
                resolvers_this->Set(resolver.first, resolver.second);
        }
 
-       resolvers_this->Set("macro", new Function("macro (temporary)", boost::bind(&MacroProcessor::InternalResolveMacrosShim,
+       resolvers_this->Set("macro", new Function("macro (temporary)", std::bind(&MacroProcessor::InternalResolveMacrosShim,
            _1, boost::cref(resolvers), cr, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros,
            recursionLevel + 1), { "str" }));
-       resolvers_this->Set("resolve_arguments", new Function("resolve_arguments (temporary)", boost::bind(&MacroProcessor::InternalResolveArgumentsShim,
+       resolvers_this->Set("resolve_arguments", new Function("resolve_arguments (temporary)", std::bind(&MacroProcessor::InternalResolveArgumentsShim,
            _1, boost::cref(resolvers), cr, resolvedMacros, useResolvedMacros,
            recursionLevel + 1)));
 
index 8d3e803753338404e915908dbfa122844ea663d7..bd5e0dac8f3aac66eff62d9abab4e89763067e90 100644 (file)
@@ -23,7 +23,6 @@
 #include "icinga/i2-icinga.hpp"
 #include "icinga/checkable.hpp"
 #include "base/value.hpp"
-#include <boost/function.hpp>
 #include <vector>
 
 namespace icinga
@@ -37,7 +36,7 @@ namespace icinga
 class I2_ICINGA_API MacroProcessor
 {
 public:
-       typedef boost::function<Value (const Value&)> EscapeCallback;
+       typedef std::function<Value (const Value&)> EscapeCallback;
        typedef std::pair<String, Object::Ptr> ResolverSpec;
        typedef std::vector<ResolverSpec> ResolverList;
 
index 2dfb895416d696187468ec313025aeab1de87f5b..1738bd35908738d7b03eb9eca98d2789b0f6e8bc 100644 (file)
@@ -416,7 +416,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
                    << "Sending " << (reminder ? "reminder " : "") << "'" << NotificationTypeToStringInternal(type) << "' notification '"
                    << GetName() << "' for user '" << userName << "'";
 
-               Utility::QueueAsyncCallback(boost::bind(&Notification::ExecuteNotificationHelper, this, type, user, cr, force, author, text));
+               Utility::QueueAsyncCallback(std::bind(&Notification::ExecuteNotificationHelper, this, type, user, cr, force, author, text));
 
                /* collect all notified users */
                allNotifiedUsers.insert(user);
index d59aac84516accdea23f80c619925de1d39ae6e9..15b390a6ddf70a46db0d5dc1740bfa92b057f973 100644 (file)
@@ -35,7 +35,7 @@ using namespace icinga;
 void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkable::Ptr& checkable,
     const CheckResult::Ptr& cr, const MacroProcessor::ResolverList& macroResolvers,
     const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros,
-    const boost::function<void(const Value& commandLine, const ProcessResult&)>& callback)
+    const std::function<void(const Value& commandLine, const ProcessResult&)>& callback)
 {
        Value raw_command = commandObj->GetCommandLine();
        Dictionary::Ptr raw_arguments = commandObj->GetArguments();
@@ -95,7 +95,7 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
 
        process->SetAdjustPriority(true);
 
-       process->Run(boost::bind(callback, command, _1));
+       process->Run(std::bind(callback, command, _1));
 }
 
 ServiceState PluginUtility::ExitStatusToState(int exitStatus)
index 59d052ba951938c6234f95920f797152d91d74ef..b0b55b49799809354aecbbd7a3011066bea76499 100644 (file)
@@ -42,7 +42,7 @@ public:
        static void ExecuteCommand(const Command::Ptr& commandObj, const Checkable::Ptr& checkable,
            const CheckResult::Ptr& cr, const MacroProcessor::ResolverList& macroResolvers,
            const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros,
-           const boost::function<void(const Value& commandLine, const ProcessResult&)>& callback = boost::function<void(const Value& commandLine, const ProcessResult&)>());
+           const std::function<void(const Value& commandLine, const ProcessResult&)>& callback = std::function<void(const Value& commandLine, const ProcessResult&)>());
 
        static ServiceState ExitStatusToState(int exitStatus);
        static std::pair<String, String> ParseCheckOutput(const String& output);
index c51c5c29659928641e08bab6a25bbfc076690af7..be980e68f9468a644d593a8850f3866814063613 100644 (file)
@@ -83,7 +83,7 @@ void ScheduledDowntime::StaticInitialize(void)
 {
        l_Timer = new Timer();
        l_Timer->SetInterval(60);
-       l_Timer->OnTimerExpired.connect(boost::bind(&ScheduledDowntime::TimerProc));
+       l_Timer->OnTimerExpired.connect(std::bind(&ScheduledDowntime::TimerProc));
        l_Timer->Start();
 }
 
@@ -99,7 +99,7 @@ void ScheduledDowntime::Start(bool runtimeCreated)
 {
        ObjectImpl<ScheduledDowntime>::Start(runtimeCreated);
 
-       Utility::QueueAsyncCallback(boost::bind(&ScheduledDowntime::CreateNextDowntime, this));
+       Utility::QueueAsyncCallback(std::bind(&ScheduledDowntime::CreateNextDowntime, this));
 }
 
 void ScheduledDowntime::TimerProc(void)
index de844331d9bf9ec9a7d2830271029bf1f2e734ad..004e67538a9b65c2e950d7280ed74a5779cc361a 100644 (file)
@@ -39,7 +39,7 @@ void TimePeriod::StaticInitialize(void)
 {
        l_UpdateTimer = new Timer();
        l_UpdateTimer->SetInterval(300);
-       l_UpdateTimer->OnTimerExpired.connect(boost::bind(&TimePeriod::UpdateTimerHandler));
+       l_UpdateTimer->OnTimerExpired.connect(std::bind(&TimePeriod::UpdateTimerHandler));
        l_UpdateTimer->Start();
 }
 
index cb40ef278c8822768a3755d2457233c52e31dba3..4c315015b162ba50681ce74a5a89a88e2acbd2d2 100644 (file)
@@ -29,7 +29,7 @@ Value Column::ExtractValue(const Value& urow, LivestatusGroupByType groupByType,
 {
        Value row;
 
-       if (!m_ObjectAccessor.empty())
+       if (m_ObjectAccessor)
                row = m_ObjectAccessor(urow, groupByType, groupByObject);
        else
                row = urow;
index cb83cbb06b5af82778b7f94a9fec30ee7d5bbdc0..92bf036a34a5f5b61352423163e8f7a98052a292 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "livestatus/i2-livestatus.hpp"
 #include "base/value.hpp"
-#include <boost/function.hpp>
 
 using namespace icinga;
 
@@ -38,8 +37,8 @@ enum LivestatusGroupByType {
 class I2_LIVESTATUS_API Column
 {
 public:
-       typedef boost::function<Value (const Value&)> ValueAccessor;
-       typedef boost::function<Value (const Value&, LivestatusGroupByType, const Object::Ptr&)> ObjectAccessor;
+       typedef std::function<Value (const Value&)> ValueAccessor;
+       typedef std::function<Value (const Value&, LivestatusGroupByType, const Object::Ptr&)> ObjectAccessor;
 
        Column(const ValueAccessor& valueAccessor, const ObjectAccessor& objectAccessor);
 
index c332ae14019645cf8481224fbcd99d7821fb8a41..3d69aa62b181e80c87819917cefbbf5adb2ea6da 100644 (file)
@@ -48,8 +48,8 @@ void CommentsTable::AddColumns(Table *table, const String& prefix,
        table->AddColumn(prefix + "expire_time", Column(&CommentsTable::ExpireTimeAccessor, objectAccessor));
 
        /* order is important - host w/o services must not be empty */
-       ServicesTable::AddColumns(table, "service_", boost::bind(&CommentsTable::ServiceAccessor, _1, objectAccessor));
-       HostsTable::AddColumns(table, "host_", boost::bind(&CommentsTable::HostAccessor, _1, objectAccessor));
+       ServicesTable::AddColumns(table, "service_", std::bind(&CommentsTable::ServiceAccessor, _1, objectAccessor));
+       HostsTable::AddColumns(table, "host_", std::bind(&CommentsTable::HostAccessor, _1, objectAccessor));
 }
 
 String CommentsTable::GetName(void) const
index 0697394b046b5508b242b6f2912acdd8ff53a0fe..dbb97cc5238e8a3c35793c924b700b8d7cf284c5 100644 (file)
@@ -48,8 +48,8 @@ void DowntimesTable::AddColumns(Table *table, const String& prefix,
        table->AddColumn(prefix + "triggered_by", Column(&DowntimesTable::TriggeredByAccessor, objectAccessor));
 
        /* order is important - host w/o services must not be empty */
-       ServicesTable::AddColumns(table, "service_", boost::bind(&DowntimesTable::ServiceAccessor, _1, objectAccessor));
-       HostsTable::AddColumns(table, "host_", boost::bind(&DowntimesTable::HostAccessor, _1, objectAccessor));
+       ServicesTable::AddColumns(table, "service_", std::bind(&DowntimesTable::ServiceAccessor, _1, objectAccessor));
+       HostsTable::AddColumns(table, "host_", std::bind(&DowntimesTable::HostAccessor, _1, objectAccessor));
 }
 
 String DowntimesTable::GetName(void) const
index 7e4a5bb30571de12afcd5d630674eb79687cb811..ce4cb2a83b35d18170b34e4f56f972d389ef11ba 100644 (file)
@@ -170,7 +170,7 @@ void HostsTable::AddColumns(Table *table, const String& prefix,
                /* _1 = row, _2 = groupByType, _3 = groupByObject */
                Log(LogDebug, "Livestatus")
                    << "Processing hosts group by hostgroup table.";
-               HostGroupsTable::AddColumns(table, "hostgroup_", boost::bind(&HostsTable::HostGroupAccessor, _1, _2, _3));
+               HostGroupsTable::AddColumns(table, "hostgroup_", std::bind(&HostsTable::HostGroupAccessor, _1, _2, _3));
        }
 }
 
index d5e20140924c9b5cb914d21a039fed5527cd7e64..ae0cbc1e62baa4d379df030a3f056f104396b648 100644 (file)
@@ -82,7 +82,7 @@ void LivestatusListener::Start(bool runtimeCreated)
 
                m_Listener = socket;
 
-               m_Thread = boost::thread(boost::bind(&LivestatusListener::ServerThreadProc, this));
+               m_Thread = boost::thread(std::bind(&LivestatusListener::ServerThreadProc, this));
 
                Log(LogInformation, "LivestatusListener")
                    << "Created TCP socket listening on host '" << GetBindHost() << "' port '" << GetBindPort() << "'.";
@@ -110,7 +110,7 @@ void LivestatusListener::Start(bool runtimeCreated)
 
                m_Listener = socket;
 
-               m_Thread = boost::thread(boost::bind(&LivestatusListener::ServerThreadProc, this));
+               m_Thread = boost::thread(std::bind(&LivestatusListener::ServerThreadProc, this));
 
                Log(LogInformation, "LivestatusListener")
                    << "Created UNIX socket in '" << GetSocketPath() << "'.";
@@ -160,7 +160,7 @@ void LivestatusListener::ServerThreadProc(void)
                        if (m_Listener->Poll(true, false, &tv)) {
                                Socket::Ptr client = m_Listener->Accept();
                                Log(LogNotice, "LivestatusListener", "Client connected");
-                               Utility::QueueAsyncCallback(boost::bind(&LivestatusListener::ClientHandler, this, client), LowLatencyScheduler);
+                               Utility::QueueAsyncCallback(std::bind(&LivestatusListener::ClientHandler, this, client), LowLatencyScheduler);
                        }
 
                        if (!IsActive())
index ec1fbd218ee8431860bce29bf3cb3902cd1489f8..21570cf94620ebdf5739ef936bce706dc97aa53f 100644 (file)
@@ -39,8 +39,8 @@ using namespace icinga;
 
 void LivestatusLogUtility::CreateLogIndex(const String& path, std::map<time_t, String>& index)
 {
-       Utility::Glob(path + "/icinga.log", boost::bind(&LivestatusLogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
-       Utility::Glob(path + "/archives/*.log", boost::bind(&LivestatusLogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
+       Utility::Glob(path + "/icinga.log", std::bind(&LivestatusLogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
+       Utility::Glob(path + "/archives/*.log", std::bind(&LivestatusLogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
 }
 
 void LivestatusLogUtility::CreateLogIndexFileHandler(const String& path, std::map<time_t, String>& index)
index 3da5b0708a53f7def204aa0603f7bec926e2089d..73cf8deaa26ba521d049c8482b0cd40ddfd7035b 100644 (file)
@@ -75,10 +75,10 @@ void LogTable::AddColumns(Table *table, const String& prefix,
        table->AddColumn(prefix + "contact_name", Column(&LogTable::ContactNameAccessor, objectAccessor));
        table->AddColumn(prefix + "command_name", Column(&LogTable::CommandNameAccessor, objectAccessor));
 
-       HostsTable::AddColumns(table, "current_host_", boost::bind(&LogTable::HostAccessor, _1, objectAccessor));
-       ServicesTable::AddColumns(table, "current_service_", boost::bind(&LogTable::ServiceAccessor, _1, objectAccessor));
-       ContactsTable::AddColumns(table, "current_contact_", boost::bind(&LogTable::ContactAccessor, _1, objectAccessor));
-       CommandsTable::AddColumns(table, "current_command_", boost::bind(&LogTable::CommandAccessor, _1, objectAccessor));
+       HostsTable::AddColumns(table, "current_host_", std::bind(&LogTable::HostAccessor, _1, objectAccessor));
+       ServicesTable::AddColumns(table, "current_service_", std::bind(&LogTable::ServiceAccessor, _1, objectAccessor));
+       ContactsTable::AddColumns(table, "current_contact_", std::bind(&LogTable::ContactAccessor, _1, objectAccessor));
+       CommandsTable::AddColumns(table, "current_command_", std::bind(&LogTable::CommandAccessor, _1, objectAccessor));
 }
 
 String LogTable::GetName(void) const
index e2edf8481e7198b6cb18a0bd820b87be44abcd69..d7583da2cb6ded264473a231b76faa141ff7b93b 100644 (file)
@@ -138,19 +138,19 @@ void ServicesTable::AddColumns(Table *table, const String& prefix,
        table->AddColumn(prefix + "cv_is_json", Column(&ServicesTable::CVIsJsonAccessor, objectAccessor));
        table->AddColumn(prefix + "original_attributes", Column(&ServicesTable::OriginalAttributesAccessor, objectAccessor));
 
-       HostsTable::AddColumns(table, "host_", boost::bind(&ServicesTable::HostAccessor, _1, objectAccessor));
+       HostsTable::AddColumns(table, "host_", std::bind(&ServicesTable::HostAccessor, _1, objectAccessor));
 
        /* add additional group by values received through the object accessor */
        if (table->GetGroupByType() == LivestatusGroupByServiceGroup) {
                /* _1 = row, _2 = groupByType, _3 = groupByObject */
                Log(LogDebug, "Livestatus")
                    << "Processing services group by servicegroup table.";
-               ServiceGroupsTable::AddColumns(table, "servicegroup_", boost::bind(&ServicesTable::ServiceGroupAccessor, _1, _2, _3));
+               ServiceGroupsTable::AddColumns(table, "servicegroup_", std::bind(&ServicesTable::ServiceGroupAccessor, _1, _2, _3));
        } else if (table->GetGroupByType() == LivestatusGroupByHostGroup) {
                /* _1 = row, _2 = groupByType, _3 = groupByObject */
                Log(LogDebug, "Livestatus")
                    << "Processing services group by hostgroup table.";
-               HostGroupsTable::AddColumns(table, "hostgroup_", boost::bind(&ServicesTable::HostGroupAccessor, _1, _2, _3));
+               HostGroupsTable::AddColumns(table, "hostgroup_", std::bind(&ServicesTable::HostGroupAccessor, _1, _2, _3));
        }
 }
 
index 311ee22acf5ee9119faf7626bab52ef90737ef96..b8728472a5fcc5b5e6371a0cbf95e99003274f4f 100644 (file)
@@ -240,8 +240,8 @@ void StateHistTable::AddColumns(Table *table, const String& prefix,
        table->AddColumn(prefix + "duration_unmonitored", Column(&StateHistTable::DurationUnmonitoredAccessor, objectAccessor));
        table->AddColumn(prefix + "duration_part_unmonitored", Column(&StateHistTable::DurationPartUnmonitoredAccessor, objectAccessor));
 
-       HostsTable::AddColumns(table, "current_host_", boost::bind(&StateHistTable::HostAccessor, _1, objectAccessor));
-       ServicesTable::AddColumns(table, "current_service_", boost::bind(&StateHistTable::ServiceAccessor, _1, objectAccessor));
+       HostsTable::AddColumns(table, "current_host_", std::bind(&StateHistTable::HostAccessor, _1, objectAccessor));
+       ServicesTable::AddColumns(table, "current_service_", std::bind(&StateHistTable::ServiceAccessor, _1, objectAccessor));
 }
 
 String StateHistTable::GetName(void) const
index c71cf466a817e4f0864cefc2b439fe937c9db07f..7e04b21c0af3bc8912a05123e20a13afb9aefce2 100644 (file)
@@ -38,7 +38,6 @@
 #include "base/dictionary.hpp"
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/tuple/tuple.hpp>
-#include <boost/bind.hpp>
 
 using namespace icinga;
 
@@ -129,7 +128,7 @@ std::vector<LivestatusRowValue> Table::FilterRows(const Filter::Ptr& filter, int
 {
        std::vector<LivestatusRowValue> rs;
 
-       FetchRows(boost::bind(&Table::FilteredAddRow, this, boost::ref(rs), filter, limit, _1, _2, _3));
+       FetchRows(std::bind(&Table::FilteredAddRow, this, boost::ref(rs), filter, limit, _1, _2, _3));
 
        return rs;
 }
index 56db6cf16fa3d042ac500b3d609b5ce8a89208a4..bae11b599eb065a0b11574543c8fd00ab9543c5b 100644 (file)
@@ -35,8 +35,7 @@ struct LivestatusRowValue {
        Value GroupByObject;
 };
 
-
-typedef boost::function<bool (const Value&, LivestatusGroupByType, const Object::Ptr&)> AddRowFunction;
+typedef std::function<bool (const Value&, LivestatusGroupByType, const Object::Ptr&)> AddRowFunction;
 
 class Filter;
 
index abf2b0cd511cd33d4b64579268290deeb8c765d3..d2953b0dda56cd61147b699c1a5853e7fc7bda3a 100644 (file)
@@ -53,7 +53,7 @@ void PluginCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
 
        PluginUtility::ExecuteCommand(commandObj, checkable, checkable->GetLastCheckResult(),
            resolvers, resolvedMacros, useResolvedMacros,
-           boost::bind(&PluginCheckTask::ProcessFinishedHandler, checkable, cr, _1, _2));
+           std::bind(&PluginCheckTask::ProcessFinishedHandler, checkable, cr, _1, _2));
 
        if (!resolvedMacros || useResolvedMacros)
                Checkable::IncreasePendingChecks();
index 48a0b9ce05649c2e7bc03a9344c1b52784c98c60..51308f55598e395db6f030c2f124358b550219e8 100644 (file)
@@ -51,7 +51,7 @@ void PluginEventTask::ScriptFunc(const Checkable::Ptr& checkable,
 
        PluginUtility::ExecuteCommand(commandObj, checkable, checkable->GetLastCheckResult(),
            resolvers, resolvedMacros, useResolvedMacros,
-           boost::bind(&PluginEventTask::ProcessFinishedHandler, checkable, _1, _2));
+           std::bind(&PluginEventTask::ProcessFinishedHandler, checkable, _1, _2));
 }
 
 void PluginEventTask::ProcessFinishedHandler(const Checkable::Ptr& checkable, const Value& commandLine, const ProcessResult& pr)
index 42403e7bbe8fe5bf3ea17b132b3da4ad2c885548..3485c5c0fc3f9c36885bf873fd955266c3a33d96 100644 (file)
@@ -66,7 +66,7 @@ void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification,
 
        PluginUtility::ExecuteCommand(commandObj, checkable, cr, resolvers,
            resolvedMacros, useResolvedMacros,
-           boost::bind(&PluginNotificationTask::ProcessFinishedHandler, checkable, _1, _2));
+           std::bind(&PluginNotificationTask::ProcessFinishedHandler, checkable, _1, _2));
 }
 
 void PluginNotificationTask::ProcessFinishedHandler(const Checkable::Ptr& checkable, const Value& commandLine, const ProcessResult& pr)
index 3eebcf164f5b3e0dd9e12fd5267eca3445365e27..5ad1a43eacc979a5737d37fbcf808a7b4e52841b 100644 (file)
@@ -55,12 +55,12 @@ void NotificationComponent::Start(bool runtimeCreated)
        Log(LogInformation, "NotificationComponent")
            << "'" << GetName() << "' started.";
 
-       Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationComponent::SendNotificationsHandler, this, _1,
+       Checkable::OnNotificationsRequested.connect(std::bind(&NotificationComponent::SendNotificationsHandler, this, _1,
            _2, _3, _4, _5));
 
        m_NotificationTimer = new Timer();
        m_NotificationTimer->SetInterval(5);
-       m_NotificationTimer->OnTimerExpired.connect(boost::bind(&NotificationComponent::NotificationTimerHandler, this));
+       m_NotificationTimer->OnTimerExpired.connect(std::bind(&NotificationComponent::NotificationTimerHandler, this));
        m_NotificationTimer->Start();
 }
 
index 69221fd88ff8b943517b6a4cc519573448015586..f1880269d327601e747234f45763684804c815b0 100644 (file)
@@ -35,6 +35,7 @@
 #include "base/exception.hpp"
 #include "base/statsfunction.hpp"
 #include <boost/algorithm/string.hpp>
+#include <boost/scoped_array.hpp>
 
 using namespace icinga;
 
@@ -83,19 +84,19 @@ void ElasticsearchWriter::Start(bool runtimeCreated)
        Log(LogInformation, "ElasticsearchWriter")
            << "'" << GetName() << "' started.";
 
-       m_WorkQueue.SetExceptionCallback(boost::bind(&ElasticsearchWriter::ExceptionHandler, this, _1));
+       m_WorkQueue.SetExceptionCallback(std::bind(&ElasticsearchWriter::ExceptionHandler, this, _1));
 
        /* Setup timer for periodically flushing m_DataBuffer */
        m_FlushTimer = new Timer();
        m_FlushTimer->SetInterval(GetFlushInterval());
-       m_FlushTimer->OnTimerExpired.connect(boost::bind(&ElasticsearchWriter::FlushTimeout, this));
+       m_FlushTimer->OnTimerExpired.connect(std::bind(&ElasticsearchWriter::FlushTimeout, this));
        m_FlushTimer->Start();
        m_FlushTimer->Reschedule(0);
 
        /* Register for new metrics. */
-       Checkable::OnNewCheckResult.connect(boost::bind(&ElasticsearchWriter::CheckResultHandler, this, _1, _2));
-       Checkable::OnStateChange.connect(boost::bind(&ElasticsearchWriter::StateChangeHandler, this, _1, _2, _3));
-       Checkable::OnNotificationSentToAllUsers.connect(boost::bind(&ElasticsearchWriter::NotificationSentToAllUsersHandler, this, _1, _2, _3, _4, _5, _6, _7));
+       Checkable::OnNewCheckResult.connect(std::bind(&ElasticsearchWriter::CheckResultHandler, this, _1, _2));
+       Checkable::OnStateChange.connect(std::bind(&ElasticsearchWriter::StateChangeHandler, this, _1, _2, _3));
+       Checkable::OnNotificationSentToAllUsers.connect(std::bind(&ElasticsearchWriter::NotificationSentToAllUsersHandler, this, _1, _2, _3, _4, _5, _6, _7));
 }
 
 void ElasticsearchWriter::Stop(bool runtimeRemoved)
@@ -175,7 +176,7 @@ void ElasticsearchWriter::AddCheckResult(const Dictionary::Ptr& fields, const Ch
 
 void ElasticsearchWriter::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
 {
-       m_WorkQueue.Enqueue(boost::bind(&ElasticsearchWriter::InternalCheckResultHandler, this, checkable, cr));
+       m_WorkQueue.Enqueue(std::bind(&ElasticsearchWriter::InternalCheckResultHandler, this, checkable, cr));
 }
 
 void ElasticsearchWriter::InternalCheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
@@ -229,7 +230,7 @@ void ElasticsearchWriter::InternalCheckResultHandler(const Checkable::Ptr& check
 
 void ElasticsearchWriter::StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type)
 {
-       m_WorkQueue.Enqueue(boost::bind(&ElasticsearchWriter::StateChangeHandlerInternal, this, checkable, cr, type));
+       m_WorkQueue.Enqueue(std::bind(&ElasticsearchWriter::StateChangeHandlerInternal, this, checkable, cr, type));
 }
 
 void ElasticsearchWriter::StateChangeHandlerInternal(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type)
@@ -278,7 +279,7 @@ void ElasticsearchWriter::NotificationSentToAllUsersHandler(const Notification::
     const Checkable::Ptr& checkable, const std::set<User::Ptr>& users, NotificationType type,
     const CheckResult::Ptr& cr, const String& author, const String& text)
 {
-       m_WorkQueue.Enqueue(boost::bind(&ElasticsearchWriter::NotificationSentToAllUsersHandlerInternal, this,
+       m_WorkQueue.Enqueue(std::bind(&ElasticsearchWriter::NotificationSentToAllUsersHandlerInternal, this,
            notification, checkable, users, type, cr, author, text));
 }
 
index f8798d4f684a1712426f35f09c2778937090d5df..b459da7ae5119aa873f74a457f2b95acc00cf1ac 100644 (file)
@@ -87,19 +87,19 @@ void GelfWriter::Start(bool runtimeCreated)
            << "'" << GetName() << "' started.";
 
        /* Register exception handler for WQ tasks. */
-       m_WorkQueue.SetExceptionCallback(boost::bind(&GelfWriter::ExceptionHandler, this, _1));
+       m_WorkQueue.SetExceptionCallback(std::bind(&GelfWriter::ExceptionHandler, this, _1));
 
        /* Timer for reconnecting */
        m_ReconnectTimer = new Timer();
        m_ReconnectTimer->SetInterval(10);
-       m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&GelfWriter::ReconnectTimerHandler, this));
+       m_ReconnectTimer->OnTimerExpired.connect(std::bind(&GelfWriter::ReconnectTimerHandler, this));
        m_ReconnectTimer->Start();
        m_ReconnectTimer->Reschedule(0);
 
        /* Register event handlers. */
-       Checkable::OnNewCheckResult.connect(boost::bind(&GelfWriter::CheckResultHandler, this, _1, _2));
-       Checkable::OnNotificationSentToUser.connect(boost::bind(&GelfWriter::NotificationToUserHandler, this, _1, _2, _3, _4, _5, _6, _7, _8));
-       Checkable::OnStateChange.connect(boost::bind(&GelfWriter::StateChangeHandler, this, _1, _2, _3));
+       Checkable::OnNewCheckResult.connect(std::bind(&GelfWriter::CheckResultHandler, this, _1, _2));
+       Checkable::OnNotificationSentToUser.connect(std::bind(&GelfWriter::NotificationToUserHandler, this, _1, _2, _3, _4, _5, _6, _7, _8));
+       Checkable::OnStateChange.connect(std::bind(&GelfWriter::StateChangeHandler, this, _1, _2, _3));
 }
 
 void GelfWriter::Stop(bool runtimeRemoved)
@@ -167,7 +167,7 @@ void GelfWriter::Reconnect(void)
 
 void GelfWriter::ReconnectTimerHandler(void)
 {
-       m_WorkQueue.Enqueue(boost::bind(&GelfWriter::Reconnect, this), PriorityNormal);
+       m_WorkQueue.Enqueue(std::bind(&GelfWriter::Reconnect, this), PriorityNormal);
 }
 
 void GelfWriter::Disconnect(void)
@@ -184,7 +184,7 @@ void GelfWriter::Disconnect(void)
 
 void GelfWriter::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
 {
-       m_WorkQueue.Enqueue(boost::bind(&GelfWriter::CheckResultHandlerInternal, this, checkable, cr));
+       m_WorkQueue.Enqueue(std::bind(&GelfWriter::CheckResultHandlerInternal, this, checkable, cr));
 }
 
 void GelfWriter::CheckResultHandlerInternal(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
@@ -284,7 +284,7 @@ void GelfWriter::NotificationToUserHandler(const Notification::Ptr& notification
     const User::Ptr& user, NotificationType notificationType, CheckResult::Ptr const& cr,
     const String& author, const String& commentText, const String& commandName)
 {
-       m_WorkQueue.Enqueue(boost::bind(&GelfWriter::NotificationToUserHandlerInternal, this,
+       m_WorkQueue.Enqueue(std::bind(&GelfWriter::NotificationToUserHandlerInternal, this,
            notification, checkable, user, notificationType, cr, author, commentText, commandName));
 }
 
@@ -349,7 +349,7 @@ void GelfWriter::NotificationToUserHandlerInternal(const Notification::Ptr& noti
 
 void GelfWriter::StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type)
 {
-       m_WorkQueue.Enqueue(boost::bind(&GelfWriter::StateChangeHandlerInternal, this, checkable, cr, type));
+       m_WorkQueue.Enqueue(std::bind(&GelfWriter::StateChangeHandlerInternal, this, checkable, cr, type));
 }
 
 void GelfWriter::StateChangeHandlerInternal(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type)
index eb6db28b2161360ad376abb0402258a826229329..04aad230a720d86c36f5421e2ba310011a0ee64e 100644 (file)
@@ -86,17 +86,17 @@ void GraphiteWriter::Start(bool runtimeCreated)
            << "'" << GetName() << "' started.";
 
        /* Register exception handler for WQ tasks. */
-       m_WorkQueue.SetExceptionCallback(boost::bind(&GraphiteWriter::ExceptionHandler, this, _1));
+       m_WorkQueue.SetExceptionCallback(std::bind(&GraphiteWriter::ExceptionHandler, this, _1));
 
        /* Timer for reconnecting */
        m_ReconnectTimer = new Timer();
        m_ReconnectTimer->SetInterval(10);
-       m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&GraphiteWriter::ReconnectTimerHandler, this));
+       m_ReconnectTimer->OnTimerExpired.connect(std::bind(&GraphiteWriter::ReconnectTimerHandler, this));
        m_ReconnectTimer->Start();
        m_ReconnectTimer->Reschedule(0);
 
        /* Register event handlers. */
-       Checkable::OnNewCheckResult.connect(boost::bind(&GraphiteWriter::CheckResultHandler, this, _1, _2));
+       Checkable::OnNewCheckResult.connect(std::bind(&GraphiteWriter::CheckResultHandler, this, _1, _2));
 }
 
 void GraphiteWriter::Stop(bool runtimeRemoved)
@@ -164,7 +164,7 @@ void GraphiteWriter::Reconnect(void)
 
 void GraphiteWriter::ReconnectTimerHandler(void)
 {
-       m_WorkQueue.Enqueue(boost::bind(&GraphiteWriter::Reconnect, this), PriorityNormal);
+       m_WorkQueue.Enqueue(std::bind(&GraphiteWriter::Reconnect, this), PriorityNormal);
 }
 
 void GraphiteWriter::Disconnect(void)
@@ -181,7 +181,7 @@ void GraphiteWriter::Disconnect(void)
 
 void GraphiteWriter::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
 {
-       m_WorkQueue.Enqueue(boost::bind(&GraphiteWriter::CheckResultHandlerInternal, this, checkable, cr));
+       m_WorkQueue.Enqueue(std::bind(&GraphiteWriter::CheckResultHandlerInternal, this, checkable, cr));
 }
 
 void GraphiteWriter::CheckResultHandlerInternal(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
@@ -206,9 +206,9 @@ void GraphiteWriter::CheckResultHandlerInternal(const Checkable::Ptr& checkable,
        String prefix;
 
        if (service) {
-               prefix = MacroProcessor::ResolveMacros(GetServiceNameTemplate(), resolvers, cr, NULL, boost::bind(&GraphiteWriter::EscapeMacroMetric, _1));
+               prefix = MacroProcessor::ResolveMacros(GetServiceNameTemplate(), resolvers, cr, NULL, std::bind(&GraphiteWriter::EscapeMacroMetric, _1));
        } else {
-               prefix = MacroProcessor::ResolveMacros(GetHostNameTemplate(), resolvers, cr, NULL, boost::bind(&GraphiteWriter::EscapeMacroMetric, _1));
+               prefix = MacroProcessor::ResolveMacros(GetHostNameTemplate(), resolvers, cr, NULL, std::bind(&GraphiteWriter::EscapeMacroMetric, _1));
        }
 
        String prefixPerfdata = prefix + ".perfdata";
index 9b9bd7410c1836d266d91d004082c028b522b18f..fa08a69f37b909b40f9f64b4cb2c38a764706cef 100644 (file)
@@ -96,17 +96,17 @@ void InfluxdbWriter::Start(bool runtimeCreated)
            << "'" << GetName() << "' started.";
 
        /* Register exception handler for WQ tasks. */
-       m_WorkQueue.SetExceptionCallback(boost::bind(&InfluxdbWriter::ExceptionHandler, this, _1));
+       m_WorkQueue.SetExceptionCallback(std::bind(&InfluxdbWriter::ExceptionHandler, this, _1));
 
        /* Setup timer for periodically flushing m_DataBuffer */
        m_FlushTimer = new Timer();
        m_FlushTimer->SetInterval(GetFlushInterval());
-       m_FlushTimer->OnTimerExpired.connect(boost::bind(&InfluxdbWriter::FlushTimeout, this));
+       m_FlushTimer->OnTimerExpired.connect(std::bind(&InfluxdbWriter::FlushTimeout, this));
        m_FlushTimer->Start();
        m_FlushTimer->Reschedule(0);
 
        /* Register for new metrics. */
-       Service::OnNewCheckResult.connect(boost::bind(&InfluxdbWriter::CheckResultHandler, this, _1, _2));
+       Service::OnNewCheckResult.connect(std::bind(&InfluxdbWriter::CheckResultHandler, this, _1, _2));
 }
 
 void InfluxdbWriter::Stop(bool runtimeRemoved)
@@ -176,7 +176,7 @@ Stream::Ptr InfluxdbWriter::Connect()
 
 void InfluxdbWriter::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
 {
-       m_WorkQueue.Enqueue(boost::bind(&InfluxdbWriter::InternalCheckResultHandler, this, checkable, cr));
+       m_WorkQueue.Enqueue(std::bind(&InfluxdbWriter::InternalCheckResultHandler, this, checkable, cr));
 }
 
 void InfluxdbWriter::InternalCheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
index 328c5be7f973712070f07c3c632598582cccadf6..f225eff9b8180c864882f6b77f927182c73a24d8 100644 (file)
@@ -66,11 +66,11 @@ void OpenTsdbWriter::Start(bool runtimeCreated)
 
        m_ReconnectTimer = new Timer();
        m_ReconnectTimer->SetInterval(10);
-       m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&OpenTsdbWriter::ReconnectTimerHandler, this));
+       m_ReconnectTimer->OnTimerExpired.connect(std::bind(&OpenTsdbWriter::ReconnectTimerHandler, this));
        m_ReconnectTimer->Start();
        m_ReconnectTimer->Reschedule(0);
 
-       Service::OnNewCheckResult.connect(boost::bind(&OpenTsdbWriter::CheckResultHandler, this, _1, _2));
+       Service::OnNewCheckResult.connect(std::bind(&OpenTsdbWriter::CheckResultHandler, this, _1, _2));
 }
 
 void OpenTsdbWriter::Stop(bool runtimeRemoved)
index 0ba3e89403e6647e93b9da441fa1bdc55b302b11..3200252ff6b4764bd8b476004341ee91eafd8266 100644 (file)
@@ -56,10 +56,10 @@ void PerfdataWriter::Start(bool runtimeCreated)
        Log(LogInformation, "PerfdataWriter")
            << "'" << GetName() << "' started.";
 
-       Checkable::OnNewCheckResult.connect(boost::bind(&PerfdataWriter::CheckResultHandler, this, _1, _2));
+       Checkable::OnNewCheckResult.connect(std::bind(&PerfdataWriter::CheckResultHandler, this, _1, _2));
 
        m_RotationTimer = new Timer();
-       m_RotationTimer->OnTimerExpired.connect(boost::bind(&PerfdataWriter::RotationTimerHandler, this));
+       m_RotationTimer->OnTimerExpired.connect(std::bind(&PerfdataWriter::RotationTimerHandler, this));
        m_RotationTimer->SetInterval(GetRotationInterval());
        m_RotationTimer->Start();
 
index b4b4f957f4e6a77134474920b92e544f73724c4f..6d515be4b3599116c40b3f311c3e0759b6facba7 100644 (file)
@@ -26,7 +26,6 @@
 #include "base/dictionary.hpp"
 #include "base/configobject.hpp"
 #include <vector>
-#include <boost/function.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -44,7 +43,7 @@ class I2_REMOTE_API ApiAction : public Object
 public:
        DECLARE_PTR_TYPEDEFS(ApiAction);
 
-       typedef boost::function<Value(const ConfigObject::Ptr& target, const Dictionary::Ptr& params)> Callback;
+       typedef std::function<Value(const ConfigObject::Ptr& target, const Dictionary::Ptr& params)> Callback;
 
        ApiAction(const std::vector<String>& registerTypes, const Callback& function);
 
index 8aa676a47e36ff2e413517f8c512972b16a414e0..45cf06f6a1698808d60f94f108debe064cbf1468 100644 (file)
@@ -51,7 +51,7 @@ void ApiClient::GetTypes(const TypesCompletionCallback& callback) const
                req->RequestUrl = url;
                req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
                req->AddHeader("Accept", "application/json");
-               m_Connection->SubmitRequest(req, boost::bind(TypesHttpCompletionCallback, _1, _2, callback));
+               m_Connection->SubmitRequest(req, std::bind(TypesHttpCompletionCallback, _1, _2, callback));
        } catch (const std::exception& ex) {
                callback(boost::current_exception(), std::vector<ApiType::Ptr>());
        }
@@ -141,7 +141,7 @@ void ApiClient::GetObjects(const String& pluralType, const ObjectsCompletionCall
                req->RequestUrl = url;
                req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
                req->AddHeader("Accept", "application/json");
-               m_Connection->SubmitRequest(req, boost::bind(ObjectsHttpCompletionCallback, _1, _2, callback));
+               m_Connection->SubmitRequest(req, std::bind(ObjectsHttpCompletionCallback, _1, _2, callback));
        } catch (const std::exception& ex) {
                callback(boost::current_exception(), std::vector<ApiObject::Ptr>());
        }
@@ -255,7 +255,7 @@ void ApiClient::ExecuteScript(const String& session, const String& command, bool
                req->RequestUrl = url;
                req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
                req->AddHeader("Accept", "application/json");
-               m_Connection->SubmitRequest(req, boost::bind(ExecuteScriptHttpCompletionCallback, _1, _2, callback));
+               m_Connection->SubmitRequest(req, std::bind(ExecuteScriptHttpCompletionCallback, _1, _2, callback));
        } catch (const std::exception& ex) {
                callback(boost::current_exception(), Empty);
        }
@@ -339,7 +339,7 @@ void ApiClient::AutocompleteScript(const String& session, const String& command,
                req->RequestUrl = url;
                req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
                req->AddHeader("Accept", "application/json");
-               m_Connection->SubmitRequest(req, boost::bind(AutocompleteScriptHttpCompletionCallback, _1, _2, callback));
+               m_Connection->SubmitRequest(req, std::bind(AutocompleteScriptHttpCompletionCallback, _1, _2, callback));
        } catch (const std::exception& ex) {
                callback(boost::current_exception(), Array::Ptr());
        }
index 4c2122df5d0a57273ed5f249467753e50dbaea94..554682694f4f6da299c7b374e45ed050b831184f 100644 (file)
@@ -92,20 +92,20 @@ public:
        ApiClient(const String& host, const String& port,
            const String& user, const String& password);
 
-       typedef boost::function<void(boost::exception_ptr, const std::vector<ApiType::Ptr>&)> TypesCompletionCallback;
+       typedef std::function<void(boost::exception_ptr, const std::vector<ApiType::Ptr>&)> TypesCompletionCallback;
        void GetTypes(const TypesCompletionCallback& callback) const;
 
-       typedef boost::function<void(boost::exception_ptr, const std::vector<ApiObject::Ptr>&)> ObjectsCompletionCallback;
+       typedef std::function<void(boost::exception_ptr, const std::vector<ApiObject::Ptr>&)> ObjectsCompletionCallback;
        void GetObjects(const String& pluralType, const ObjectsCompletionCallback& callback,
            const std::vector<String>& names = std::vector<String>(),
            const std::vector<String>& attrs = std::vector<String>(),
            const std::vector<String>& joins = std::vector<String>(), bool all_joins = false) const;
 
-       typedef boost::function<void(boost::exception_ptr, const Value&)> ExecuteScriptCompletionCallback;
+       typedef std::function<void(boost::exception_ptr, const Value&)> ExecuteScriptCompletionCallback;
        void ExecuteScript(const String& session, const String& command, bool sandboxed,
            const ExecuteScriptCompletionCallback& callback) const;
        
-       typedef boost::function<void(boost::exception_ptr, const Array::Ptr&)> AutocompleteScriptCompletionCallback;
+       typedef std::function<void(boost::exception_ptr, const Array::Ptr&)> AutocompleteScriptCompletionCallback;
        void AutocompleteScript(const String& session, const String& command, bool sandboxed,
            const AutocompleteScriptCompletionCallback& callback) const;
 
index b71ed647572a44a0f36964cf26beedd6c3a457a8..264ff95f69d64236a5509fba408490a349202080 100644 (file)
@@ -26,7 +26,6 @@
 #include "base/value.hpp"
 #include "base/dictionary.hpp"
 #include <vector>
-#include <boost/function.hpp>
 
 namespace icinga
 {
@@ -41,7 +40,7 @@ class I2_REMOTE_API ApiFunction : public Object
 public:
        DECLARE_PTR_TYPEDEFS(ApiFunction);
 
-       typedef boost::function<Value(const MessageOrigin::Ptr& origin, const Dictionary::Ptr&)> Callback;
+       typedef std::function<Value(const MessageOrigin::Ptr& origin, const Dictionary::Ptr&)> Callback;
 
        ApiFunction(const Callback& function);
 
index 0743d25bcb4e4becb5b86f368c862244b6f31c7a..7dd5e4502890f4a86d80db3c1cb3e77b3f9605a8 100644 (file)
@@ -72,7 +72,7 @@ ConfigDirInformation ApiListener::LoadConfigDir(const String& dir)
        ConfigDirInformation config;
        config.UpdateV1 = new Dictionary();
        config.UpdateV2 = new Dictionary();
-       Utility::GlobRecursive(dir, "*", boost::bind(&ApiListener::ConfigGlobHandler, boost::ref(config), dir, _1), GlobFile);
+       Utility::GlobRecursive(dir, "*", std::bind(&ApiListener::ConfigGlobHandler, boost::ref(config), dir, _1), GlobFile);
        return config;
 }
 
index 86cc797594f30b0fa41c01591f660747d1572415..2e93c2af454a5de7e01b7b8b0bc4d32eff56a30d 100644 (file)
@@ -233,24 +233,24 @@ void ApiListener::Start(bool runtimeCreated)
        }
 
        m_Timer = new Timer();
-       m_Timer->OnTimerExpired.connect(boost::bind(&ApiListener::ApiTimerHandler, this));
+       m_Timer->OnTimerExpired.connect(std::bind(&ApiListener::ApiTimerHandler, this));
        m_Timer->SetInterval(5);
        m_Timer->Start();
        m_Timer->Reschedule(0);
 
        m_ReconnectTimer = new Timer();
-       m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&ApiListener::ApiReconnectTimerHandler, this));
+       m_ReconnectTimer->OnTimerExpired.connect(std::bind(&ApiListener::ApiReconnectTimerHandler, this));
        m_ReconnectTimer->SetInterval(60);
        m_ReconnectTimer->Start();
        m_ReconnectTimer->Reschedule(0);
 
        m_AuthorityTimer = new Timer();
-       m_AuthorityTimer->OnTimerExpired.connect(boost::bind(&ApiListener::UpdateObjectAuthority));
+       m_AuthorityTimer->OnTimerExpired.connect(std::bind(&ApiListener::UpdateObjectAuthority));
        m_AuthorityTimer->SetInterval(30);
        m_AuthorityTimer->Start();
 
        m_CleanupCertificateRequestsTimer = new Timer();
-       m_CleanupCertificateRequestsTimer->OnTimerExpired.connect(boost::bind(&ApiListener::CleanupCertificateRequestsTimerHandler, this));
+       m_CleanupCertificateRequestsTimer->OnTimerExpired.connect(std::bind(&ApiListener::CleanupCertificateRequestsTimerHandler, this));
        m_CleanupCertificateRequestsTimer->SetInterval(3600);
        m_CleanupCertificateRequestsTimer->Start();
        m_CleanupCertificateRequestsTimer->Reschedule(0);
@@ -332,7 +332,7 @@ bool ApiListener::AddListener(const String& node, const String& service)
                return false;
        }
 
-       boost::thread thread(boost::bind(&ApiListener::ListenerThreadProc, this, server));
+       boost::thread thread(std::bind(&ApiListener::ListenerThreadProc, this, server));
        thread.detach();
 
        m_Servers.insert(server);
@@ -349,7 +349,7 @@ void ApiListener::ListenerThreadProc(const Socket::Ptr& server)
        for (;;) {
                try {
                        Socket::Ptr client = server->Accept();
-                       boost::thread thread(boost::bind(&ApiListener::NewClientHandler, this, client, String(), RoleServer));
+                       boost::thread thread(std::bind(&ApiListener::NewClientHandler, this, client, String(), RoleServer));
                        thread.detach();
                } catch (const std::exception&) {
                        Log(LogCritical, "ApiListener", "Cannot accept new connection.");
@@ -539,7 +539,7 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri
 
                        endpoint->AddClient(aclient);
 
-                       m_SyncQueue.Enqueue(boost::bind(&ApiListener::SyncClient, this, aclient, endpoint, needSync));
+                       m_SyncQueue.Enqueue(std::bind(&ApiListener::SyncClient, this, aclient, endpoint, needSync));
                } else
                        AddAnonymousClient(aclient);
        } else {
@@ -571,7 +571,7 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi
                        JsonRpcConnection::SendCertificateRequest(aclient, MessageOrigin::Ptr(), String());
 
                        if (Utility::PathExists(ApiListener::GetCertificateRequestsDir()))
-                               Utility::Glob(ApiListener::GetCertificateRequestsDir() + "/*.json", boost::bind(&JsonRpcConnection::SendCertificateRequest, aclient, MessageOrigin::Ptr(), _1), GlobFile);
+                               Utility::Glob(ApiListener::GetCertificateRequestsDir() + "/*.json", std::bind(&JsonRpcConnection::SendCertificateRequest, aclient, MessageOrigin::Ptr(), _1), GlobFile);
                }
 
                /* Make sure that the config updates are synced
@@ -631,7 +631,7 @@ void ApiListener::ApiTimerHandler(void)
        double now = Utility::GetTime();
 
        std::vector<int> files;
-       Utility::Glob(GetApiDir() + "log/*", boost::bind(&ApiListener::LogGlobHandler, boost::ref(files), _1), GlobFile);
+       Utility::Glob(GetApiDir() + "log/*", std::bind(&ApiListener::LogGlobHandler, boost::ref(files), _1), GlobFile);
        std::sort(files.begin(), files.end());
 
        for (int ts : files) {
@@ -744,7 +744,7 @@ void ApiListener::ApiReconnectTimerHandler(void)
                                continue;
                        }
 
-                       boost::thread thread(boost::bind(&ApiListener::AddConnection, this, endpoint));
+                       boost::thread thread(std::bind(&ApiListener::AddConnection, this, endpoint));
                        thread.detach();
                }
        }
@@ -787,7 +787,7 @@ void ApiListener::CleanupCertificateRequestsTimerHandler(void)
        if (Utility::PathExists(requestsDir)) {
                /* remove certificate requests that are older than a week */
                double expiryTime = Utility::GetTime() - 7 * 24 * 60 * 60;
-               Utility::Glob(requestsDir + "/*.json", boost::bind(&CleanupCertificateRequest, _1, expiryTime), GlobFile);
+               Utility::Glob(requestsDir + "/*.json", std::bind(&CleanupCertificateRequest, _1, expiryTime), GlobFile);
        }
 }
 
@@ -797,7 +797,7 @@ void ApiListener::RelayMessage(const MessageOrigin::Ptr& origin,
        if (!IsActive())
                return;
 
-       m_RelayQueue.Enqueue(boost::bind(&ApiListener::SyncRelayMessage, this, origin, secobj, message, log), PriorityNormal, true);
+       m_RelayQueue.Enqueue(std::bind(&ApiListener::SyncRelayMessage, this, origin, secobj, message, log), PriorityNormal, true);
 }
 
 void ApiListener::PersistMessage(const Dictionary::Ptr& message, const ConfigObject::Ptr& secobj)
@@ -1090,7 +1090,7 @@ void ApiListener::ReplayLog(const JsonRpcConnection::Ptr& client)
                count = 0;
 
                std::vector<int> files;
-               Utility::Glob(GetApiDir() + "log/*", boost::bind(&ApiListener::LogGlobHandler, boost::ref(files), _1), GlobFile);
+               Utility::Glob(GetApiDir() + "log/*", std::bind(&ApiListener::LogGlobHandler, boost::ref(files), _1), GlobFile);
                std::sort(files.begin(), files.end());
 
                for (int ts : files) {
index b7f04a18fca2ec81e877fdc28b6b265836ea09da..c7a6670fa2b9276cb07b08072430f8ab86f472a9 100644 (file)
@@ -59,7 +59,7 @@ void ConfigPackageUtility::DeletePackage(const String& name)
 std::vector<String> ConfigPackageUtility::GetPackages(void)
 {
        std::vector<String> packages;
-       Utility::Glob(GetPackageDir() + "/*", boost::bind(&ConfigPackageUtility::CollectDirNames,
+       Utility::Glob(GetPackageDir() + "/*", std::bind(&ConfigPackageUtility::CollectDirNames,
            _1, boost::ref(packages)), GlobDirectory);
        return packages;
 }
@@ -218,7 +218,7 @@ void ConfigPackageUtility::AsyncTryActivateStage(const String& packageName, cons
 
        Process::Ptr process = new Process(Process::PrepareCommand(args));
        process->SetTimeout(300);
-       process->Run(boost::bind(&TryActivateStageCallback, _1, packageName, stageName, reload));
+       process->Run(std::bind(&TryActivateStageCallback, _1, packageName, stageName, reload));
 }
 
 void ConfigPackageUtility::DeleteStage(const String& packageName, const String& stageName)
@@ -237,7 +237,7 @@ void ConfigPackageUtility::DeleteStage(const String& packageName, const String&
 std::vector<String> ConfigPackageUtility::GetStages(const String& packageName)
 {
        std::vector<String> stages;
-       Utility::Glob(GetPackageDir() + "/" + packageName + "/*", boost::bind(&ConfigPackageUtility::CollectDirNames, _1, boost::ref(stages)), GlobDirectory);
+       Utility::Glob(GetPackageDir() + "/" + packageName + "/*", std::bind(&ConfigPackageUtility::CollectDirNames, _1, boost::ref(stages)), GlobDirectory);
        return stages;
 }
 
@@ -263,7 +263,7 @@ String ConfigPackageUtility::GetActiveStage(const String& packageName)
 std::vector<std::pair<String, bool> > ConfigPackageUtility::GetFiles(const String& packageName, const String& stageName)
 {
        std::vector<std::pair<String, bool> > paths;
-       Utility::GlobRecursive(GetPackageDir() + "/" + packageName + "/" + stageName, "*", boost::bind(&ConfigPackageUtility::CollectPaths, _1, boost::ref(paths)), GlobDirectory | GlobFile);
+       Utility::GlobRecursive(GetPackageDir() + "/" + packageName + "/" + stageName, "*", std::bind(&ConfigPackageUtility::CollectPaths, _1, boost::ref(paths)), GlobDirectory | GlobFile);
 
        return paths;
 }
index 0cfc1b971d0257752fb9a75ee5b826e227ec8422..953bb23b58663a9b37accdd58cb5afa7d3ee0a10 100644 (file)
@@ -59,7 +59,7 @@ static void ScriptFrameCleanupHandler(void)
 
 INITIALIZE_ONCE([]() {
        l_FrameCleanupTimer = new Timer();
-       l_FrameCleanupTimer->OnTimerExpired.connect(boost::bind(ScriptFrameCleanupHandler));
+       l_FrameCleanupTimer->OnTimerExpired.connect(std::bind(ScriptFrameCleanupHandler));
        l_FrameCleanupTimer->SetInterval(30);
        l_FrameCleanupTimer->Start();
 });
index aa17436986eea436d574c304244545aea7500aca..7d897745f2c5d422d459c54db1f439177258868c 100644 (file)
@@ -44,7 +44,7 @@ Type::Ptr FilterUtility::TypeFromPluralName(const String& pluralName)
        return Type::Ptr();
 }
 
-void ConfigObjectTargetProvider::FindTargets(const String& type, const boost::function<void (const Value&)>& addTarget) const
+void ConfigObjectTargetProvider::FindTargets(const String& type, const std::function<void (const Value&)>& addTarget) const
 {
        Type::Ptr ptype = Type::GetByName(type);
        ConfigType *ctype = dynamic_cast<ConfigType *>(ptype.get());
@@ -268,7 +268,7 @@ std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, c
                frame.Self = uvars;
 
                try {
-                       provider->FindTargets(type, boost::bind(&FilteredAddTarget,
+                       provider->FindTargets(type, std::bind(&FilteredAddTarget,
                            boost::ref(permissionFrame), permissionFilter,
                            boost::ref(frame), ufilter, boost::ref(result), variableName, _1));
                } catch (const std::exception& ex) {
index 0f742b58c741cdc62309d6f2c05e8b32dfd404bd..461cfd6384c751662f728b6cf857c1e545b7de28 100644 (file)
@@ -35,7 +35,7 @@ class TargetProvider : public Object
 public:
        DECLARE_PTR_TYPEDEFS(TargetProvider);
 
-       virtual void FindTargets(const String& type, const boost::function<void (const Value&)>& addTarget) const = 0;
+       virtual void FindTargets(const String& type, const std::function<void (const Value&)>& addTarget) const = 0;
        virtual Value GetTargetByName(const String& type, const String& name) const = 0;
        virtual bool IsValidType(const String& type) const = 0;
        virtual String GetPluralName(const String& type) const = 0;
@@ -46,7 +46,7 @@ class ConfigObjectTargetProvider : public TargetProvider
 public:
        DECLARE_PTR_TYPEDEFS(ConfigObjectTargetProvider);
 
-       virtual void FindTargets(const String& type, const boost::function<void (const Value&)>& addTarget) const override;
+       virtual void FindTargets(const String& type, const std::function<void (const Value&)>& addTarget) const override;
        virtual Value GetTargetByName(const String& type, const String& name) const override;
        virtual bool IsValidType(const String& type) const override;
        virtual String GetPluralName(const String& type) const override;
index ffd241caab68f98549b154ef021defa9add38f94..3caeb3057e22bd911038cf910e59f31c556a3ebc 100644 (file)
@@ -63,7 +63,7 @@ void HttpClientConnection::Reconnect(void)
                   -- does not currently work because the NetworkStream class doesn't support async I/O */
 
        /* the stream holds an owning reference to this object through the callback we're registering here */
-       m_Stream->RegisterDataHandler(boost::bind(&HttpClientConnection::DataAvailableHandler, HttpClientConnection::Ptr(this), _1));
+       m_Stream->RegisterDataHandler(std::bind(&HttpClientConnection::DataAvailableHandler, HttpClientConnection::Ptr(this), _1));
        if (m_Stream->IsDataAvailable())
                DataAvailableHandler(m_Stream);
 }
index 41a4ba136d9d6d108ba47ef2ddeab68c4fc72d0d..d8b820831e268abcc6fdbae124fb1f295dc19625 100644 (file)
@@ -52,7 +52,7 @@ public:
 
        boost::shared_ptr<HttpRequest> NewRequest(void);
 
-       typedef boost::function<void(HttpRequest&, HttpResponse&)> HttpCompletionCallback;
+       typedef std::function<void(HttpRequest&, HttpResponse&)> HttpCompletionCallback;
        void SubmitRequest(const boost::shared_ptr<HttpRequest>& request, const HttpCompletionCallback& callback);
 
 private:
index 444c6694a151a019162b89c6944d07480e5ed9fc..7c440f9627fa8231301aa8b24ec95a01bb11c5a3 100644 (file)
@@ -25,7 +25,6 @@
 #include "remote/apiuser.hpp"
 #include "base/registry.hpp"
 #include <vector>
-#include <boost/function.hpp>
 
 namespace icinga
 {
index c2538b6eb693d7a6bc52f686b3f05636fda1cb86..53e6f7af71c7829248f7182814b10d515b568025 100644 (file)
@@ -51,7 +51,7 @@ HttpServerConnection::HttpServerConnection(const String& identity, bool authenti
 void HttpServerConnection::StaticInitialize(void)
 {
        l_HttpServerConnectionTimeoutTimer = new Timer();
-       l_HttpServerConnectionTimeoutTimer->OnTimerExpired.connect(boost::bind(&HttpServerConnection::TimeoutTimerHandler));
+       l_HttpServerConnectionTimeoutTimer->OnTimerExpired.connect(std::bind(&HttpServerConnection::TimeoutTimerHandler));
        l_HttpServerConnectionTimeoutTimer->SetInterval(15);
        l_HttpServerConnectionTimeoutTimer->Start();
 }
@@ -59,7 +59,7 @@ void HttpServerConnection::StaticInitialize(void)
 void HttpServerConnection::Start(void)
 {
        /* the stream holds an owning reference to this object through the callback we're registering here */
-       m_Stream->RegisterDataHandler(boost::bind(&HttpServerConnection::DataAvailableHandler, HttpServerConnection::Ptr(this)));
+       m_Stream->RegisterDataHandler(std::bind(&HttpServerConnection::DataAvailableHandler, HttpServerConnection::Ptr(this)));
        if (m_Stream->IsDataAvailable())
                DataAvailableHandler();
 }
@@ -114,7 +114,7 @@ bool HttpServerConnection::ProcessMessage(void)
        }
 
        if (m_CurrentRequest.Complete) {
-               m_RequestQueue.Enqueue(boost::bind(&HttpServerConnection::ProcessMessageAsync,
+               m_RequestQueue.Enqueue(std::bind(&HttpServerConnection::ProcessMessageAsync,
                    HttpServerConnection::Ptr(this), m_CurrentRequest));
 
                m_Seen = Utility::GetTime();
index 4ae677b3538f0b9a912cffcebd85fab0d9f00971..5485ca8d9f10dee6fe7a4c88372b656fbaddd4d9 100644 (file)
@@ -33,7 +33,7 @@ static Timer::Ptr l_HeartbeatTimer;
 
 INITIALIZE_ONCE([]() {
        l_HeartbeatTimer = new Timer();
-       l_HeartbeatTimer->OnTimerExpired.connect(boost::bind(&JsonRpcConnection::HeartbeatTimerHandler));
+       l_HeartbeatTimer->OnTimerExpired.connect(std::bind(&JsonRpcConnection::HeartbeatTimerHandler));
        l_HeartbeatTimer->SetInterval(10);
        l_HeartbeatTimer->Start();
 });
index 3d9cacaf0c0c55eaef6f6dfffcb15a5dab8b0eff..0107871db937f39ce315eb97ff094c07d5de944e 100644 (file)
@@ -55,7 +55,7 @@ JsonRpcConnection::JsonRpcConnection(const String& identity, bool authenticated,
 void JsonRpcConnection::StaticInitialize(void)
 {
        l_JsonRpcConnectionTimeoutTimer = new Timer();
-       l_JsonRpcConnectionTimeoutTimer->OnTimerExpired.connect(boost::bind(&JsonRpcConnection::TimeoutTimerHandler));
+       l_JsonRpcConnectionTimeoutTimer->OnTimerExpired.connect(std::bind(&JsonRpcConnection::TimeoutTimerHandler));
        l_JsonRpcConnectionTimeoutTimer->SetInterval(15);
        l_JsonRpcConnectionTimeoutTimer->Start();
 
@@ -70,7 +70,7 @@ void JsonRpcConnection::StaticInitialize(void)
 void JsonRpcConnection::Start(void)
 {
        /* the stream holds an owning reference to this object through the callback we're registering here */
-       m_Stream->RegisterDataHandler(boost::bind(&JsonRpcConnection::DataAvailableHandler, JsonRpcConnection::Ptr(this)));
+       m_Stream->RegisterDataHandler(std::bind(&JsonRpcConnection::DataAvailableHandler, JsonRpcConnection::Ptr(this)));
        if (m_Stream->IsDataAvailable())
                DataAvailableHandler();
 }
@@ -237,7 +237,7 @@ bool JsonRpcConnection::ProcessMessage(void)
        if (srs != StatusNewItem)
                return false;
 
-       l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(boost::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
+       l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(std::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
 
        return true;
 }
index 6e8443bd55d4c9c2428b7a3a153a74588986316e..ab368558868a8dacbc8d8253ea3c3d8a01e95fa8 100644 (file)
@@ -431,7 +431,7 @@ Dictionary::Ptr PkiUtility::GetCertificateRequests(void)
        String requestDir = ApiListener::GetCertificateRequestsDir();
 
        if (Utility::PathExists(requestDir))
-               Utility::Glob(requestDir + "/*.json", boost::bind(&CollectRequestHandler, requests, _1), GlobFile);
+               Utility::Glob(requestDir + "/*.json", std::bind(&CollectRequestHandler, requests, _1), GlobFile);
 
        return requests;
 }
index 8578d43524f19bd61bdceb85488045a0d4931b2a..518a9513f3283694b759d75c10ad216723352d78 100644 (file)
@@ -33,7 +33,7 @@ public:
        DECLARE_PTR_TYPEDEFS(StatusTargetProvider);
 
        virtual void FindTargets(const String& type,
-           const boost::function<void (const Value&)>& addTarget) const override
+           const std::function<void (const Value&)>& addTarget) const override
        {
                typedef std::pair<String, StatsFunction::Ptr> kv_pair;
                for (const kv_pair& kv : StatsFunctionRegistry::GetInstance()->GetItems()) {
index 4d812428680b2d20c78ccb44bc32c5d388f28bbb..d6445f42a062b8e376607f08d29df38bb63a6be9 100644 (file)
@@ -55,7 +55,7 @@ public:
        }
 
        virtual void FindTargets(const String& type,
-           const boost::function<void (const Value&)>& addTarget) const override
+           const std::function<void (const Value&)>& addTarget) const override
        {
                Type::Ptr ptype = Type::GetByName(type);
 
index 73dde3678e1ac9a082be35a367ffd781f1c6e95e..c0b56b0d4dbc3ee827fd8e4a03ab357eef355277 100644 (file)
@@ -36,7 +36,7 @@ public:
        DECLARE_PTR_TYPEDEFS(TypeTargetProvider);
 
        virtual void FindTargets(const String& type,
-           const boost::function<void (const Value&)>& addTarget) const override
+           const std::function<void (const Value&)>& addTarget) const override
        {
                for (const Type::Ptr& target : Type::GetAllTypes()) {
                        addTarget(target);
index 65afdde6121d1f736b24c4fdff136c2b8a1d317b..0f3dbd95300da5a37d6e04454830a6d835c2aeee 100644 (file)
@@ -46,7 +46,7 @@ public:
        }
 
        virtual void FindTargets(const String& type,
-           const boost::function<void (const Value&)>& addTarget) const override
+           const std::function<void (const Value&)>& addTarget) const override
        {
                {
                        Dictionary::Ptr globals = ScriptGlobal::GetGlobals();
index 7e4fa35d0c54fa4292f90e510becd4ffe003f973..75835c8fd42f9eff96feca615def6d7e45885635 100644 (file)
@@ -362,7 +362,7 @@ static INT check_drives(std::vector<drive>& vDrives, std::vector<std::wstring>&
                BOOST_FOREACH(const std::wstring wsDriveName, vExclude_Drives)
                {
                        vDrives.erase(std::remove_if(vDrives.begin(), vDrives.end(), 
-                           boost::bind(checkName, _1, wsDriveName + L'\\')), vDrives.end());
+                           std::bind(checkName, _1, wsDriveName + L'\\')), vDrives.end());
                }
        }
        return -1;
index 8a632ef8544c8c59f1cb024bccab28b5390a42d1..71ae8623c0c710382029d09a240165e072e99cfe 100644 (file)
@@ -94,7 +94,7 @@ static Dictionary::Ptr QueryEndpoint(const String& host, const String& port, con
 
                // Submits the request. The 'ResultHttpCompletionCallback' is called once the HttpRequest receives an answer,
                // which then sets 'ready' to true
-               m_Connection->SubmitRequest(req, boost::bind(ResultHttpCompletionCallback, _1, _2,
+               m_Connection->SubmitRequest(req, std::bind(ResultHttpCompletionCallback, _1, _2,
                        boost::ref(ready), boost::ref(cv), boost::ref(mtx), boost::ref(result)));
 
                // We need to spinlock here because our 'HttpRequest' works asynchronous
index 1a473537035d11eebdc8f1e6a84188be9708af1e..e82e30a85e6425397b072a5fd7d7b0dbd8a128cc 100644 (file)
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE(invoke)
 {
        int counter;
        Timer::Ptr timer = new Timer();
-       timer->OnTimerExpired.connect(boost::bind(&Callback, &counter));
+       timer->OnTimerExpired.connect(std::bind(&Callback, &counter));
        timer->SetInterval(1);
 
        counter = 0;
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(scope)
 {
        int counter;
        Timer::Ptr timer = new Timer();
-       timer->OnTimerExpired.connect(boost::bind(&Callback, &counter));
+       timer->OnTimerExpired.connect(std::bind(&Callback, &counter));
        timer->SetInterval(1);
 
        counter = 0;
index 6adbcc06535834c2683c46ea41f410754f8f12a4..1dae65862544ad1fa9b4d3744e47856255a1208f 100644 (file)
@@ -60,7 +60,7 @@ static void CheckNotification(const Checkable::Ptr& checkable, bool expected, No
 
 BOOST_AUTO_TEST_CASE(host_1attempt)
 {
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        Host::Ptr host = new Host();
        host->SetMaxCheckAttempts(1);
@@ -108,7 +108,7 @@ BOOST_AUTO_TEST_CASE(host_1attempt)
 
 BOOST_AUTO_TEST_CASE(host_2attempts)
 {
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        Host::Ptr host = new Host();
        host->SetMaxCheckAttempts(2);
@@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(host_2attempts)
 
 BOOST_AUTO_TEST_CASE(host_3attempts)
 {
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        Host::Ptr host = new Host();
        host->SetMaxCheckAttempts(3);
@@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE(host_3attempts)
 
 BOOST_AUTO_TEST_CASE(service_1attempt)
 {
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        Service::Ptr service = new Service();
        service->SetMaxCheckAttempts(1);
@@ -273,7 +273,7 @@ BOOST_AUTO_TEST_CASE(service_1attempt)
 
 BOOST_AUTO_TEST_CASE(service_2attempts)
 {
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        Service::Ptr service = new Service();
        service->SetMaxCheckAttempts(2);
@@ -328,7 +328,7 @@ BOOST_AUTO_TEST_CASE(service_2attempts)
 
 BOOST_AUTO_TEST_CASE(service_3attempts)
 {
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        Service::Ptr service = new Service();
        service->SetMaxCheckAttempts(3);
@@ -393,7 +393,7 @@ BOOST_AUTO_TEST_CASE(host_flapping_notification)
 #ifndef I2_DEBUG
        BOOST_WARN_MESSAGE(false, "This test can only be run in a debug build!");
 #else /* I2_DEBUG */
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        int timeStepInterval = 60;
 
@@ -446,7 +446,7 @@ BOOST_AUTO_TEST_CASE(service_flapping_notification)
 #ifndef I2_DEBUG
        BOOST_WARN_MESSAGE(false, "This test can only be run in a debug build!");
 #else /* I2_DEBUG */
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        int timeStepInterval = 60;
 
@@ -500,7 +500,7 @@ BOOST_AUTO_TEST_CASE(service_flapping_problem_notifications)
 #ifndef I2_DEBUG
        BOOST_WARN_MESSAGE(false, "This test can only be run in a debug build!");
 #else /* I2_DEBUG */
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        int timeStepInterval = 60;
 
@@ -598,7 +598,7 @@ BOOST_AUTO_TEST_CASE(service_flapping_ok_into_bad)
 #ifndef I2_DEBUG
        BOOST_WARN_MESSAGE(false, "This test can only be run in a debug build!");
 #else /* I2_DEBUG */
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        int timeStepInterval = 60;
 
@@ -676,7 +676,7 @@ BOOST_AUTO_TEST_CASE(service_flapping_ok_over_bad_into_ok)
 #ifndef I2_DEBUG
        BOOST_WARN_MESSAGE(false, "This test can only be run in a debug build!");
 #else /* I2_DEBUG */
-       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationHandler, _1, _2));
+       boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
 
        int timeStepInterval = 60;