summaryrefslogtreecommitdiffstats
path: root/src/gui/ThreadedLoader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ThreadedLoader.hpp')
-rw-r--r--src/gui/ThreadedLoader.hpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index 5e9392bc..27ba7c8c 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -17,20 +17,17 @@
#ifndef INGEN_GUI_THREADEDLOADER_HPP
#define INGEN_GUI_THREADEDLOADER_HPP
-#include "ingen/FilePath.hpp"
-#include "raul/Semaphore.hpp"
+#include <ingen/FilePath.hpp>
+#include <raul/Semaphore.hpp>
#include <sigc++/functors/slot.h>
#include <list>
#include <memory>
#include <mutex>
+#include <optional>
#include <thread>
-namespace boost {
-template <class T> class optional;
-} // namespace boost
-
namespace raul {
class Path;
class Symbol;
@@ -43,7 +40,9 @@ class Parser;
class Properties;
class URI;
-namespace client { class GraphModel; }
+namespace client {
+class GraphModel;
+} // namespace client
namespace gui {
@@ -51,7 +50,7 @@ class App;
/** Thread for loading graph files.
*
- * This is a seperate thread so it can send all the loading message without
+ * This is a separate thread so it can send all the loading message without
* blocking everything else, so the app can respond to the incoming events
* caused as a result of the graph loading, while the graph loads.
*
@@ -68,11 +67,11 @@ public:
~ThreadedLoader();
- void load_graph(bool merge,
- const FilePath& file_path,
- const boost::optional<raul::Path>& engine_parent,
- const boost::optional<raul::Symbol>& engine_symbol,
- const boost::optional<Properties>& engine_data);
+ void load_graph(bool merge,
+ const FilePath& file_path,
+ const std::optional<raul::Path>& engine_parent,
+ const std::optional<raul::Symbol>& engine_symbol,
+ const std::optional<Properties>& engine_data);
void save_graph(const std::shared_ptr<const client::GraphModel>& model,
const URI& uri);
@@ -80,26 +79,26 @@ public:
std::shared_ptr<Parser> parser();
private:
- void load_graph_event(const FilePath& file_path,
- const boost::optional<raul::Path>& engine_parent,
- const boost::optional<raul::Symbol>& engine_symbol,
- const boost::optional<Properties>& engine_data);
+ void load_graph_event(const FilePath& file_path,
+ const std::optional<raul::Path>& engine_parent,
+ const std::optional<raul::Symbol>& engine_symbol,
+ const std::optional<Properties>& engine_data);
void
save_graph_event(const std::shared_ptr<const client::GraphModel>& model,
const URI& uri);
- /** Returns nothing and takes no parameters (because they have all been bound) */
+ /// Returns nothing and takes no parameters (because they're all bound)
using Closure = sigc::slot<void>;
void run();
App& _app;
- raul::Semaphore _sem;
+ raul::Semaphore _sem{0};
std::shared_ptr<Interface> _engine;
std::mutex _mutex;
std::list<Closure> _events;
- bool _exit_flag;
+ bool _exit_flag{false};
std::thread _thread;
};