summaryrefslogtreecommitdiffstats
path: root/src/libs/client/PatchModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-13 06:11:25 +0000
committerDavid Robillard <d@drobilla.net>2006-09-13 06:11:25 +0000
commite5675ebfeb93175e16762d0a078bd51d15d05f63 (patch)
tree189249ed9014e4c482cfaed0d6af28ced68570ca /src/libs/client/PatchModel.cpp
parent23b7568ab7a87a79c186b8ddf3d3db4f1f934b06 (diff)
downloadingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.tar.gz
ingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.tar.bz2
ingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.zip
Heavy-duty redesign of client library and GUI (now fully signal driven with clean Model/View separation).
Smarter, centralized window creation/management (should make window unification easy (panes?)). Typed metadata system, no more fugly string conversion of floats. Supports OSC fundamental types string, int, float, blob for now (though blob isn't working over the wire yet). git-svn-id: http://svn.drobilla.net/lad/ingen@131 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r--src/libs/client/PatchModel.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index a65f1c49..21e47089 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -31,13 +31,13 @@ PatchModel::set_path(const Path& new_path)
{
// FIXME: haack
if (new_path == "") {
- m_path = "";
+ _path = "";
return;
}
NodeModel::set_path(new_path);
for (NodeModelMap::iterator i = m_nodes.begin(); i != m_nodes.end(); ++i)
- (*i).second->set_path(m_path +"/"+ (*i).second->path().name());
+ (*i).second->set_path(_path +"/"+ (*i).second->path().name());
#ifdef DEBUG
// Be sure connection paths are updated and sane
@@ -72,7 +72,7 @@ PatchModel::add_child(CountedPtr<ObjectModel> c)
void
PatchModel::remove_child(CountedPtr<ObjectModel> c)
{
- assert(c->path().is_child_of(m_path));
+ assert(c->path().is_child_of(_path));
assert(c->parent().get() == this);
CountedPtr<PortModel> pm = PtrCast<PortModel>(c);
@@ -102,13 +102,13 @@ void
PatchModel::add_node(CountedPtr<NodeModel> nm)
{
assert(nm);
- assert(nm->path().is_child_of(m_path));
+ assert(nm->path().is_child_of(_path));
assert(nm->parent().get() == this);
NodeModelMap::iterator existing = m_nodes.find(nm->path().name());
if (existing != m_nodes.end()) {
- cerr << "Warning: node clash, assimilating old node " << m_path << endl;
+ cerr << "Warning: node clash, assimilating old node " << _path << endl;
nm->assimilate((*existing).second);
(*existing).second = nm;
} else {
@@ -121,23 +121,23 @@ PatchModel::add_node(CountedPtr<NodeModel> nm)
void
PatchModel::remove_node(CountedPtr<NodeModel> nm)
{
- assert(nm->path().is_child_of(m_path));
+ assert(nm->path().is_child_of(_path));
assert(nm->parent().get() == this);
NodeModelMap::iterator i = m_nodes.find(nm->path().name());
if (i != m_nodes.end()) {
assert(i->second == nm);
m_nodes.erase(i);
- removed_node_sig.emit(nm->path().name());
+ removed_node_sig.emit(nm);
i->second->parent().reset();
return;
}
- cerr << "[PatchModel::remove_node] " << m_path
+ cerr << "[PatchModel::remove_node] " << _path
<< ": failed to find node " << nm->path().name() << endl;
}
-
+#if 0
void
PatchModel::remove_node(const string& name)
{
@@ -151,9 +151,9 @@ PatchModel::remove_node(const string& name)
return;
}
- cerr << "[PatchModel::remove_node] " << m_path << ": failed to find node " << name << endl;
+ cerr << "[PatchModel::remove_node] " << _path << ": failed to find node " << name << endl;
}
-
+#endif
void
PatchModel::clear()
@@ -204,7 +204,7 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
return;
}
- cerr << "[PatchModel::rename_node] " << m_path << ": failed to find node " << old_path << endl;
+ cerr << "[PatchModel::rename_node] " << _path << ": failed to find node " << old_path << endl;
}
@@ -229,8 +229,8 @@ void
PatchModel::add_connection(CountedPtr<ConnectionModel> cm)
{
assert(cm);
- //assert(cm->src_port_path().parent().parent() == m_path);
- //assert(cm->dst_port_path().parent().parent() == m_path);
+ //assert(cm->src_port_path().parent().parent() == _path);
+ //assert(cm->dst_port_path().parent().parent() == _path);
assert(cm->patch_path() == path());
//cerr << "PatchModel::add_connection: " << cm->src_port_path() << " -> " << cm->dst_port_path() << endl;
@@ -314,9 +314,9 @@ PatchModel::disable()
bool
PatchModel::polyphonic() const
{
- return (!m_parent)
+ return (!_parent)
? (m_poly > 1)
- : (m_poly > 1) && m_poly == ((PatchModel*)m_parent.get())->poly() && m_poly > 1;
+ : (m_poly > 1) && m_poly == ((PatchModel*)_parent.get())->poly() && m_poly > 1;
}