diff options
author | David Robillard <d@drobilla.net> | 2011-01-10 21:23:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-10 21:23:14 +0000 |
commit | f293da6bc4f0f631c086d35666e3e8bfef19b8f2 (patch) | |
tree | d0e693bdec5e4a53daca500434533d2fc5c43650 /src/engine/machina/Edge.hpp | |
parent | db319f5a8cb7915b2d5b93adab148fa16d92e7e5 (diff) | |
download | machina-f293da6bc4f0f631c086d35666e3e8bfef19b8f2.tar.gz machina-f293da6bc4f0f631c086d35666e3e8bfef19b8f2.tar.bz2 machina-f293da6bc4f0f631c086d35666e3e8bfef19b8f2.zip |
Rewrite with UI/engine split.
Note some things aren't quite working right again yet...
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@2821 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina/Edge.hpp')
-rw-r--r-- | src/engine/machina/Edge.hpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/engine/machina/Edge.hpp b/src/engine/machina/Edge.hpp deleted file mode 100644 index 8a2d1c2..0000000 --- a/src/engine/machina/Edge.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/* This file is part of Machina. - * Copyright (C) 2007-2009 David Robillard <http://drobilla.net> - * - * Machina is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Machina is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Machina. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef MACHINA_EDGE_HPP -#define MACHINA_EDGE_HPP - -#include <list> -#include <boost/utility.hpp> - -#include "raul/DoubleBuffer.hpp" -#include "raul/SharedPtr.hpp" -#include "raul/WeakPtr.hpp" - -#include "Action.hpp" -#include "Stateful.hpp" -#include "types.hpp" - -namespace Machina { - -class Node; - -class Edge : public Stateful { -public: - - Edge(WeakPtr<Node> tail, SharedPtr<Node> head) - : _probability(1.0f) - , _tail(tail) - , _head(head) - {} - - void write_state(Redland::Model& model); - - WeakPtr<Node> tail() { return _tail; } - SharedPtr<Node> head() { return _head; } - - void set_tail(WeakPtr<Node> tail) { _tail = tail; } - void set_head(SharedPtr<Node> head) { _head = head; } - - inline float probability() { return _probability.get(); } - inline void set_probability(float p) { _probability.set(p); } - -private: - Raul::DoubleBuffer<float> _probability; - - WeakPtr<Node> _tail; - SharedPtr<Node> _head; -}; - - -} // namespace Machina - -#endif // MACHINA_EDGE_HPP |