aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine/Action.hpp2
-rw-r--r--src/engine/LearnRequest.cpp6
-rw-r--r--src/engine/LearnRequest.hpp2
-rw-r--r--src/engine/Updates.cpp1
-rw-r--r--src/engine/machina/Updates.hpp1
-rw-r--r--src/engine/machina/types.hpp6
6 files changed, 10 insertions, 8 deletions
diff --git a/src/engine/Action.hpp b/src/engine/Action.hpp
index 90f8664..2916099 100644
--- a/src/engine/Action.hpp
+++ b/src/engine/Action.hpp
@@ -33,7 +33,7 @@ namespace machina {
/** An Action, executed on entering or exiting of a state.
*/
struct Action
- : public Raul::Maid::Manageable
+ : public Raul::Maid::Disposable
, public Stateful
{
bool operator==(const Action& rhs) const { return false; }
diff --git a/src/engine/LearnRequest.cpp b/src/engine/LearnRequest.cpp
index 9ad8422..5756dd1 100644
--- a/src/engine/LearnRequest.cpp
+++ b/src/engine/LearnRequest.cpp
@@ -27,16 +27,12 @@ LearnRequest::LearnRequest(SPtr<Raul::Maid> maid, SPtr<Node> node)
, _enter_action(new MidiAction(4, NULL))
, _exit_action(new MidiAction(4, NULL))
{
- maid->manage(_enter_action);
- maid->manage(_exit_action);
}
SPtr<LearnRequest>
LearnRequest::create(SPtr<Raul::Maid> maid, SPtr<Node> node)
{
- SPtr<LearnRequest> ret(new LearnRequest(maid, node));
- maid->manage(ret);
- return ret;
+ return SPtr<LearnRequest>(new LearnRequest(maid, node));
}
void
diff --git a/src/engine/LearnRequest.hpp b/src/engine/LearnRequest.hpp
index 685b140..9cdfc3c 100644
--- a/src/engine/LearnRequest.hpp
+++ b/src/engine/LearnRequest.hpp
@@ -31,7 +31,7 @@ class MidiAction;
/** A request to MIDI learn a certain node.
*/
-class LearnRequest : public Raul::Maid::Manageable
+class LearnRequest : public Raul::Maid::Disposable
{
public:
static SPtr<LearnRequest> create(SPtr<Raul::Maid> maid, SPtr<Node> node);
diff --git a/src/engine/Updates.cpp b/src/engine/Updates.cpp
index 846bf8d..ce655e4 100644
--- a/src/engine/Updates.cpp
+++ b/src/engine/Updates.cpp
@@ -19,6 +19,7 @@
#include "machina/Atom.hpp"
#include "machina/Updates.hpp"
#include "machina/types.hpp"
+#include "raul/RingBuffer.hpp"
namespace machina {
diff --git a/src/engine/machina/Updates.hpp b/src/engine/machina/Updates.hpp
index 7c0391b..ff09af9 100644
--- a/src/engine/machina/Updates.hpp
+++ b/src/engine/machina/Updates.hpp
@@ -21,6 +21,7 @@
#include "machina/Atom.hpp"
#include "machina/types.hpp"
+#include "raul/RingBuffer.hpp"
namespace machina {
diff --git a/src/engine/machina/types.hpp b/src/engine/machina/types.hpp
index e9ac7d0..61137b7 100644
--- a/src/engine/machina/types.hpp
+++ b/src/engine/machina/types.hpp
@@ -20,7 +20,7 @@
#include <map>
#include <memory>
-#include "raul/RingBuffer.hpp"
+#include "raul/Maid.hpp"
namespace machina {
@@ -37,9 +37,13 @@ using SPtr = std::shared_ptr<T>;
template <class T>
using WPtr = std::weak_ptr<T>;
+
+template <class T>
+using MPtr = Raul::managed_ptr<T>;
#else
#define SPtr std::shared_ptr
#define WPtr std::weak_ptr
+#define MPtr Raul::managed_ptr
#endif
template <class T>