summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-07 03:22:42 +0000
committerDavid Robillard <d@drobilla.net>2007-02-07 03:22:42 +0000
commit39d5400b39c8089287d5d294becae1268d232d31 (patch)
tree0cf73ef86233121bc7f0408ca536aad196d3166c /src/libs/client
parente135edf1e65ac978f86f4849bd3667299dd69c7e (diff)
downloadingen-39d5400b39c8089287d5d294becae1268d232d31.tar.gz
ingen-39d5400b39c8089287d5d294becae1268d232d31.tar.bz2
ingen-39d5400b39c8089287d5d294becae1268d232d31.zip
Mad sed-fu for consistent private member naming.
git-svn-id: http://svn.drobilla.net/lad/ingen@286 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/ControlModel.h18
-rw-r--r--src/libs/client/NodeModel.cpp40
-rw-r--r--src/libs/client/NodeModel.h22
-rw-r--r--src/libs/client/OSCClientReceiver.cpp52
-rw-r--r--src/libs/client/OSCClientReceiver.h11
-rw-r--r--src/libs/client/OSCEngineSender.cpp8
-rw-r--r--src/libs/client/PatchModel.cpp78
-rw-r--r--src/libs/client/PatchModel.h28
-rw-r--r--src/libs/client/PluginModel.h54
-rw-r--r--src/libs/client/PresetModel.h18
10 files changed, 162 insertions, 167 deletions
diff --git a/src/libs/client/ControlModel.h b/src/libs/client/ControlModel.h
index 337acfc6..749436b5 100644
--- a/src/libs/client/ControlModel.h
+++ b/src/libs/client/ControlModel.h
@@ -32,20 +32,20 @@ class ControlModel
{
public:
ControlModel(const Path& port_path, float value)
- : m_port_path(port_path),
- m_value(value)
+ : _port_path(port_path),
+ _value(value)
{
- assert(m_port_path.find("//") == string::npos);
+ assert(_port_path.find("//") == string::npos);
}
- const Path& port_path() const { return m_port_path; }
- void port_path(const string& p) { m_port_path = p; }
- float value() const { return m_value; }
- void value(float v) { m_value = v; }
+ const Path& port_path() const { return _port_path; }
+ void port_path(const string& p) { _port_path = p; }
+ float value() const { return _value; }
+ void value(float v) { _value = v; }
private:
- Path m_port_path;
- float m_value;
+ Path _port_path;
+ float _value;
};
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index 56df1a12..c882645d 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -24,16 +24,16 @@ namespace Client {
NodeModel::NodeModel(SharedPtr<PluginModel> plugin, const Path& path, bool polyphonic)
: ObjectModel(path),
- m_polyphonic(polyphonic),
- m_plugin_uri(plugin->uri()),
- m_plugin(plugin)
+ _polyphonic(polyphonic),
+ _plugin_uri(plugin->uri()),
+ _plugin(plugin)
{
}
NodeModel::NodeModel(const string& plugin_uri, const Path& path, bool polyphonic)
: ObjectModel(path),
- m_polyphonic(polyphonic),
- m_plugin_uri(plugin_uri)
+ _polyphonic(polyphonic),
+ _plugin_uri(plugin_uri)
{
}
@@ -47,7 +47,7 @@ NodeModel::~NodeModel()
void
NodeModel::remove_port(SharedPtr<PortModel> port)
{
- m_ports.remove(port);
+ _ports.remove(port);
removed_port_sig.emit(port);
}
@@ -55,9 +55,9 @@ NodeModel::remove_port(SharedPtr<PortModel> port)
void
NodeModel::remove_port(const Path& port_path)
{
- for (PortModelList::iterator i = m_ports.begin(); i != m_ports.end(); ++i) {
+ for (PortModelList::iterator i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i)->path() == port_path) {
- m_ports.erase(i);
+ _ports.erase(i);
break;
}
}
@@ -67,8 +67,8 @@ NodeModel::remove_port(const Path& port_path)
void
NodeModel::clear()
{
- m_ports.clear();
- assert(m_ports.empty());
+ _ports.clear();
+ assert(_ports.empty());
}
@@ -80,10 +80,10 @@ NodeModel::set_path(const Path& p)
ObjectModel::set_path(p);
// FIXME: rename
-// for (PortModelList::iterator i = m_ports.begin(); i != m_ports.end(); ++i)
+// for (PortModelList::iterator i = _ports.begin(); i != _ports.end(); ++i)
// (*i)->set_path(_path + "/" + (*i)->path().name());
- //if (m_parent && old_path.length() > 0)
+ //if (_parent && old_path.length() > 0)
// parent_patch()->rename_node(old_path, p);
}
@@ -118,12 +118,12 @@ NodeModel::add_port(SharedPtr<PortModel> pm)
assert(pm->path().is_child_of(_path));
assert(pm->parent().get() == this);
- PortModelList::iterator existing = find(m_ports.begin(), m_ports.end(), pm);
+ PortModelList::iterator existing = find(_ports.begin(), _ports.end(), pm);
// Store should have handled this by merging the two
- assert(existing == m_ports.end());
+ assert(existing == _ports.end());
- m_ports.push_back(pm);
+ _ports.push_back(pm);
new_port_sig.emit(pm);
}
@@ -132,7 +132,7 @@ SharedPtr<PortModel>
NodeModel::get_port(const string& port_name) const
{
assert(port_name.find("/") == string::npos);
- for (PortModelList::const_iterator i = m_ports.begin(); i != m_ports.end(); ++i)
+ for (PortModelList::const_iterator i = _ports.begin(); i != _ports.end(); ++i)
if ((*i)->path().name() == port_name)
return (*i);
return SharedPtr<PortModel>();
@@ -142,16 +142,16 @@ NodeModel::get_port(const string& port_name) const
void
NodeModel::add_program(int bank, int program, const string& name)
{
- m_banks[bank][program] = name;
+ _banks[bank][program] = name;
}
void
NodeModel::remove_program(int bank, int program)
{
- m_banks[bank].erase(program);
- if (m_banks[bank].size() == 0)
- m_banks.erase(bank);
+ _banks[bank].erase(program);
+ if (_banks[bank].size() == 0)
+ _banks.erase(bank);
}
diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h
index a63932d9..77c9c985 100644
--- a/src/libs/client/NodeModel.h
+++ b/src/libs/client/NodeModel.h
@@ -49,12 +49,12 @@ public:
SharedPtr<PortModel> get_port(const string& port_name) const;
- const map<int, map<int, string> >& get_programs() const { return m_banks; }
- const string& plugin_uri() const { return m_plugin_uri; }
- SharedPtr<PluginModel> plugin() const { return m_plugin; }
- int num_ports() const { return m_ports.size(); }
- const PortModelList& ports() const { return m_ports; }
- virtual bool polyphonic() const { return m_polyphonic; }
+ const map<int, map<int, string> >& get_programs() const { return _banks; }
+ const string& plugin_uri() const { return _plugin_uri; }
+ SharedPtr<PluginModel> plugin() const { return _plugin; }
+ int num_ports() const { return _ports.size(); }
+ const PortModelList& ports() const { return _ports; }
+ virtual bool polyphonic() const { return _polyphonic; }
// Signals
sigc::signal<void, SharedPtr<PortModel> > new_port_sig;
@@ -80,11 +80,11 @@ protected:
friend class PatchModel;
void set_path(const Path& p);
- bool m_polyphonic;
- PortModelList m_ports; ///< List of ports (not a map to preserve order)
- string m_plugin_uri; ///< Plugin URI (if PluginModel is unknown)
- SharedPtr<PluginModel> m_plugin; ///< The plugin this node is an instance of
- map<int, map<int, string> > m_banks; ///< DSSI banks
+ bool _polyphonic;
+ PortModelList _ports; ///< List of ports (not a map to preserve order)
+ string _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
+ SharedPtr<PluginModel> _plugin; ///< The plugin this node is an instance of
+ map<int, map<int, string> > _banks; ///< DSSI banks
};
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 5b4d66d9..bdfeaa21 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -166,7 +166,7 @@ OSCClientReceiver::setup_callbacks()
/** Catches errors that aren't a direct result of a client request.
*/
int
-OSCClientReceiver::m_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
cerr << "ERROR: " << argv[0]->s << endl;
// FIXME
@@ -176,7 +176,7 @@ OSCClientReceiver::m_error_cb(const char* path, const char* types, lo_arg** argv
int
-OSCClientReceiver::m_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
new_patch(&argv[0]->s, argv[1]->i); // path, poly
return 0;
@@ -184,7 +184,7 @@ OSCClientReceiver::m_new_patch_cb(const char* path, const char* types, lo_arg**
int
-OSCClientReceiver::m_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
object_destroyed((const char*)&argv[0]->s);
return 0;
@@ -192,7 +192,7 @@ OSCClientReceiver::m_destroyed_cb(const char* path, const char* types, lo_arg**
int
-OSCClientReceiver::m_patch_enabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_patch_enabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_enabled((const char*)&argv[0]->s);
return 0;
@@ -200,7 +200,7 @@ OSCClientReceiver::m_patch_enabled_cb(const char* path, const char* types, lo_ar
int
-OSCClientReceiver::m_patch_disabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_patch_disabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_disabled((const char*)&argv[0]->s);
return 0;
@@ -208,7 +208,7 @@ OSCClientReceiver::m_patch_disabled_cb(const char* path, const char* types, lo_a
int
-OSCClientReceiver::m_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_cleared((const char*)&argv[0]->s);
return 0;
@@ -216,7 +216,7 @@ OSCClientReceiver::m_patch_cleared_cb(const char* path, const char* types, lo_ar
int
-OSCClientReceiver::m_object_renamed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_object_renamed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
object_renamed((const char*)&argv[0]->s, (const char*)&argv[1]->s);
return 0;
@@ -224,7 +224,7 @@ OSCClientReceiver::m_object_renamed_cb(const char* path, const char* types, lo_a
int
-OSCClientReceiver::m_connection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_connection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* const src_port_path = &argv[0]->s;
const char* const dst_port_path = &argv[1]->s;
@@ -236,7 +236,7 @@ OSCClientReceiver::m_connection_cb(const char* path, const char* types, lo_arg**
int
-OSCClientReceiver::m_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[0]->s;
const char* dst_port_path = &argv[1]->s;
@@ -250,7 +250,7 @@ OSCClientReceiver::m_disconnection_cb(const char* path, const char* types, lo_ar
/** Notification of a new node creation.
*/
int
-OSCClientReceiver::m_new_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_new_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* uri = &argv[0]->s;
const char* node_path = &argv[1]->s;
@@ -276,7 +276,7 @@ OSCClientReceiver::m_new_node_cb(const char* path, const char* types, lo_arg** a
/** Notification of a new port creation.
*/
int
-OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_new_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[0]->s;
const char* type = &argv[1]->s;
@@ -312,17 +312,17 @@ OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** a
PortModel* port_model = new PortModel(port_path, ptype, pdir, phint, default_val, min_val, max_val);
*/
PortModel* port_model = new PortModel(port_path, ptype, pdir);
- if (m_receiving_node) {
- assert(m_receiving_node_model);
- m_receiving_node_model->add_port(port_model);
+ if (_receiving_node) {
+ assert(_receiving_node_model);
+ _receiving_node_model->add_port(port_model);
++m_num_received_ports;
// If transmission is done, send new node to client
- if (m_num_received_ports == m_receiving_node_num_ports) {
- new_node_model(m_receiving_node_model);
- m_receiving_node = false;
- m_receiving_node_model = NULL;
- m_num_received_ports = 0;
+ if (_num_received_ports == _receiving_node_num_ports) {
+ new_node_model(_receiving_node_model);
+ _receiving_node = false;
+ _receiving_node_model = NULL;
+ _num_received_ports = 0;
}
} else {
new_port_model(port_model);
@@ -336,7 +336,7 @@ OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** a
/** Notification of a new or updated piece of metadata.
*/
int
-OSCClientReceiver::m_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 3 || types[0] != 's' || types[1] != 's')
return 1;
@@ -353,7 +353,7 @@ OSCClientReceiver::m_metadata_update_cb(const char* path, const char* types, lo_
int
-OSCClientReceiver::m_control_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_control_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* const port_path = &argv[0]->s;
const float value = argv[1]->f;
@@ -365,7 +365,7 @@ OSCClientReceiver::m_control_change_cb(const char* path, const char* types, lo_a
int
-OSCClientReceiver::m_response_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_response_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
assert(!strcmp(types, "iis"));
response(argv[0]->i, argv[1]->i, &argv[2]->s);
@@ -378,7 +378,7 @@ OSCClientReceiver::m_response_cb(const char* path, const char* types, lo_arg** a
* to a /om/send_plugins
*/
int
-OSCClientReceiver::m_num_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_num_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
num_plugins(argv[0]->i);
@@ -389,7 +389,7 @@ OSCClientReceiver::m_num_plugins_cb(const char* path, const char* types, lo_arg*
/** A plugin info response from the server, in response to a /send_plugins
*/
int
-OSCClientReceiver::m_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
assert(argc == 3 && !strcmp(types, "sss"));
new_plugin(&argv[0]->s, &argv[1]->s, &argv[2]->s); // type, uri
@@ -399,7 +399,7 @@ OSCClientReceiver::m_plugin_cb(const char* path, const char* types, lo_arg** arg
int
-OSCClientReceiver::m_program_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_program_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[0]->s;
int32_t bank = argv[1]->i;
@@ -413,7 +413,7 @@ OSCClientReceiver::m_program_add_cb(const char* path, const char* types, lo_arg*
int
-OSCClientReceiver::m_program_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_program_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[0]->s;
int32_t bank = argv[1]->i;
diff --git a/src/libs/client/OSCClientReceiver.h b/src/libs/client/OSCClientReceiver.h
index 0031441f..a287932d 100644
--- a/src/libs/client/OSCClientReceiver.h
+++ b/src/libs/client/OSCClientReceiver.h
@@ -37,9 +37,9 @@ namespace Client {
* wrapper around a non-static method that does the real work. Makes a whoole
* lot of ugly boiler plate go away */
#define LO_HANDLER(name) \
-int m_##name##_cb (LO_HANDLER_ARGS);\
+int _##name##_cb (LO_HANDLER_ARGS);\
inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\
-{ return ((OSCClientReceiver*)osc_listener)->m_##name##_cb(path, types, argv, argc, msg); }
+{ return ((OSCClientReceiver*)osc_listener)->_##name##_cb(path, types, argv, argc, msg); }
/** Callbacks for "notification band" OSC messages.
@@ -77,12 +77,7 @@ private:
static void error_cb(int num, const char* msg, const char* path);
static int generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data);
static int unknown_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* osc_receiver);
- /*
- inline static int om_response_ok_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* comm);
- int m_om_response_ok_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data);
- inline static int om_response_error_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* comm);
- int m_om_response_error_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data);
-*/
+
int _listen_port;
lo_server_thread _st;
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index fce24116..f93e3636 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -58,8 +58,8 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
//start_listen_thread(_client_port);
/*if (engine_url == "") {
- string local_url = m_osc_listener->listen_url().substr(
- 0, m_osc_listener->listen_url().find_last_of(":"));
+ string local_url = _osc_listener->listen_url().substr(
+ 0, _osc_listener->listen_url().find_last_of(":"));
local_url.append(":16180");
_engine_addr = lo_address_new_from_url(local_url.c_str());
} else {
@@ -82,14 +82,14 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
set_wait_response_id(request_id);
while (1) {
- if (m_response_semaphore.try_wait() != 0) {
+ if (_response_semaphore.try_wait() != 0) {
cout << ".";
cout.flush();
ping(request_id);
usleep(100000);
} else {
cout << " connected." << endl;
- m_waiting_for_response = false;
+ _waiting_for_response = false;
break;
}
}
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 61dbe0a0..c05f7217 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -36,13 +36,13 @@ PatchModel::set_path(const Path& new_path)
}
NodeModel::set_path(new_path);
- for (NodeModelMap::iterator i = m_nodes.begin(); i != m_nodes.end(); ++i)
+ for (NodeModelMap::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i).second->set_path(_path +"/"+ (*i).second->path().name());
#ifdef DEBUG
// Be sure connection paths are updated and sane
- for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin();
- j != m_connections.end(); ++j) {
+ for (list<SharedPtr<ConnectionModel> >::iterator j = _connections.begin();
+ j != _connections.end(); ++j) {
assert((*j)->src_port_path().parent().parent() == new_path);
assert((*j)->src_port_path().parent().parent() == new_path);
}
@@ -93,8 +93,8 @@ SharedPtr<NodeModel>
PatchModel::get_node(const string& name) const
{
assert(name.find("/") == string::npos);
- NodeModelMap::const_iterator i = m_nodes.find(name);
- return ((i != m_nodes.end()) ? (*i).second : SharedPtr<NodeModel>());
+ NodeModelMap::const_iterator i = _nodes.find(name);
+ return ((i != _nodes.end()) ? (*i).second : SharedPtr<NodeModel>());
}
@@ -105,12 +105,12 @@ PatchModel::add_node(SharedPtr<NodeModel> nm)
assert(nm->path().is_child_of(_path));
assert(nm->parent().get() == this);
- NodeModelMap::iterator existing = m_nodes.find(nm->path().name());
+ NodeModelMap::iterator existing = _nodes.find(nm->path().name());
// Store should have handled this by merging the two
- assert(existing == m_nodes.end());
+ assert(existing == _nodes.end());
- m_nodes[nm->path().name()] = nm;
+ _nodes[nm->path().name()] = nm;
new_node_sig.emit(nm);
}
@@ -121,20 +121,20 @@ PatchModel::remove_node(SharedPtr<NodeModel> nm)
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()) {
+ NodeModelMap::iterator i = _nodes.find(nm->path().name());
+ if (i != _nodes.end()) {
assert(i->second == nm);
// Remove any connections which referred to this node,
// since they can't possibly exist anymore
- for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin();
- j != m_connections.end() ; ) {
+ for (list<SharedPtr<ConnectionModel> >::iterator j = _connections.begin();
+ j != _connections.end() ; ) {
list<SharedPtr<ConnectionModel> >::iterator next = j;
++next;
SharedPtr<ConnectionModel> cm = (*j);
if (cm->src_port_path().parent() == nm->path()
|| cm->dst_port_path().parent() == nm->path()) {
- m_connections.erase(j); // cuts our reference
+ _connections.erase(j); // cuts our reference
assert(!get_connection(cm->src_port_path(), cm->dst_port_path())); // no duplicates
removed_connection_sig.emit(cm->src_port_path(), cm->dst_port_path());
}
@@ -142,7 +142,7 @@ PatchModel::remove_node(SharedPtr<NodeModel> nm)
}
// Remove the Node itself
- m_nodes.erase(i);
+ _nodes.erase(i);
removed_node_sig.emit(nm);
} else {
@@ -156,10 +156,10 @@ void
PatchModel::remove_node(const string& name)
{
assert(name.find("/") == string::npos);
- NodeModelMap::iterator i = m_nodes.find(name);
- if (i != m_nodes.end()) {
+ NodeModelMap::iterator i = _nodes.find(name);
+ if (i != _nodes.end()) {
//delete i->second;
- m_nodes.erase(i);
+ _nodes.erase(i);
removed_node_sig.emit(name);
i->second->parent().reset();
return;
@@ -172,22 +172,22 @@ PatchModel::remove_node(const string& name)
void
PatchModel::clear()
{
- //for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin(); j != m_connections.end(); ++j)
+ //for (list<SharedPtr<ConnectionModel> >::iterator j = _connections.begin(); j != _connections.end(); ++j)
// delete (*j);
- for (NodeModelMap::iterator i = m_nodes.begin(); i != m_nodes.end(); ++i) {
+ for (NodeModelMap::iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
(*i).second->clear();
//delete (*i).second;
}
- m_nodes.clear();
- m_connections.clear();
+ _nodes.clear();
+ _connections.clear();
NodeModel::clear();
- assert(m_nodes.empty());
- assert(m_connections.empty());
- assert(m_ports.empty());
+ assert(_nodes.empty());
+ assert(_connections.empty());
+ assert(_ports.empty());
}
@@ -204,19 +204,19 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
assert(old_path.parent() == path());
assert(new_path.parent() == path());
- NodeModelMap::iterator i = m_nodes.find(old_path.name());
+ NodeModelMap::iterator i = _nodes.find(old_path.name());
- if (i != m_nodes.end()) {
+ if (i != _nodes.end()) {
SharedPtr<NodeModel> nm = (*i).second;
- for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin(); j != m_connections.end(); ++j) {
+ for (list<SharedPtr<ConnectionModel> >::iterator j = _connections.begin(); j != _connections.end(); ++j) {
if ((*j)->src_port_path().parent() == old_path)
(*j)->src_port_path(new_path.base() + (*j)->src_port_path().name());
if ((*j)->dst_port_path().parent() == old_path)
(*j)->dst_port_path(new_path.base() + (*j)->dst_port_path().name());
}
- m_nodes.erase(i);
+ _nodes.erase(i);
assert(nm->path() == new_path);
- m_nodes[new_path.name()] = nm;
+ _nodes[new_path.name()] = nm;
return;
}
@@ -228,7 +228,7 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
SharedPtr<ConnectionModel>
PatchModel::get_connection(const string& src_port_path, const string& dst_port_path) const
{
- for (list<SharedPtr<ConnectionModel> >::const_iterator i = m_connections.begin(); i != m_connections.end(); ++i)
+ for (list<SharedPtr<ConnectionModel> >::const_iterator i = _connections.begin(); i != _connections.end(); ++i)
if ((*i)->src_port_path() == src_port_path && (*i)->dst_port_path() == dst_port_path)
return (*i);
return SharedPtr<ConnectionModel>();
@@ -263,7 +263,7 @@ PatchModel::add_connection(SharedPtr<ConnectionModel> cm)
assert(cm->src_port() == existing->src_port());
assert(cm->dst_port() == existing->dst_port());
} else {
- m_connections.push_back(cm);
+ _connections.push_back(cm);
new_connection_sig.emit(cm);
}
}
@@ -272,10 +272,10 @@ PatchModel::add_connection(SharedPtr<ConnectionModel> cm)
void
PatchModel::remove_connection(const string& src_port_path, const string& dst_port_path)
{
- for (list<SharedPtr<ConnectionModel> >::iterator i = m_connections.begin(); i != m_connections.end(); ++i) {
+ for (list<SharedPtr<ConnectionModel> >::iterator i = _connections.begin(); i != _connections.end(); ++i) {
SharedPtr<ConnectionModel> cm = (*i);
if (cm->src_port_path() == src_port_path && cm->dst_port_path() == dst_port_path) {
- m_connections.erase(i); // cuts our reference
+ _connections.erase(i); // cuts our reference
assert(!get_connection(src_port_path, dst_port_path)); // no duplicates
removed_connection_sig.emit(src_port_path, dst_port_path);
return;
@@ -290,8 +290,8 @@ PatchModel::remove_connection(const string& src_port_path, const string& dst_por
void
PatchModel::enable()
{
- if (!m_enabled) {
- m_enabled = true;
+ if (!_enabled) {
+ _enabled = true;
enabled_sig.emit();
}
}
@@ -300,8 +300,8 @@ PatchModel::enable()
void
PatchModel::disable()
{
- if (m_enabled) {
- m_enabled = false;
+ if (_enabled) {
+ _enabled = false;
disabled_sig.emit();
}
}
@@ -311,8 +311,8 @@ bool
PatchModel::polyphonic() const
{
return (_parent)
- ? (m_poly > 1) && m_poly == PtrCast<PatchModel>(_parent)->poly() && m_poly > 1
- : (m_poly > 1);
+ ? (_poly > 1) && _poly == PtrCast<PatchModel>(_parent)->poly() && _poly > 1
+ : (_poly > 1);
}
diff --git a/src/libs/client/PatchModel.h b/src/libs/client/PatchModel.h
index 402e84c3..715cfe7f 100644
--- a/src/libs/client/PatchModel.h
+++ b/src/libs/client/PatchModel.h
@@ -41,15 +41,15 @@ class Store;
class PatchModel : public NodeModel
{
public:
- const NodeModelMap& nodes() const { return m_nodes; }
- const ConnectionList& connections() const { return m_connections; }
+ const NodeModelMap& nodes() const { return _nodes; }
+ const ConnectionList& connections() const { return _connections; }
SharedPtr<ConnectionModel> get_connection(const string& src_port_path, const string& dst_port_path) const;
SharedPtr<NodeModel> get_node(const string& node_name) const;
- size_t poly() const { return m_poly; }
- const string& filename() const { return m_filename; }
- bool enabled() const { return m_enabled; }
+ size_t poly() const { return _poly; }
+ const string& filename() const { return _filename; }
+ bool enabled() const { return _enabled; }
bool polyphonic() const;
// Signals
@@ -65,13 +65,13 @@ private:
PatchModel(const Path& patch_path, size_t internal_poly)
: NodeModel("ingen:patch", patch_path, false), // FIXME
- m_enabled(false),
- m_poly(internal_poly)
+ _enabled(false),
+ _poly(internal_poly)
{
}
- void filename(const string& f) { m_filename = f; }
- void poly(size_t p) { m_poly = p; }
+ void filename(const string& f) { _filename = f; }
+ void poly(size_t p) { _poly = p; }
void enable();
void disable();
void clear();
@@ -87,11 +87,11 @@ private:
void rename_node(const Path& old_path, const Path& new_path);
void rename_node_port(const Path& old_path, const Path& new_path);
- NodeModelMap m_nodes;
- ConnectionList m_connections;
- string m_filename;
- bool m_enabled;
- size_t m_poly;
+ NodeModelMap _nodes;
+ ConnectionList _connections;
+ string _filename;
+ bool _enabled;
+ size_t _poly;
};
typedef map<string, SharedPtr<PatchModel> > PatchModelMap;
diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h
index 8bc96558..21266091 100644
--- a/src/libs/client/PluginModel.h
+++ b/src/libs/client/PluginModel.h
@@ -36,44 +36,44 @@ public:
enum Type { LV2, LADSPA, DSSI, Internal, Patch };
PluginModel(const string& uri, const string& type_uri, const string& name)
- : m_uri(uri),
- m_name(name)
+ : _uri(uri),
+ _name(name)
{
set_type_from_uri(type_uri);
}
- Type type() const { return m_type; }
- void type(Type t) { m_type = t; }
- const string& uri() const { return m_uri; }
- void uri(const string& s) { m_uri = s; }
- const string& name() const { return m_name; }
- void name(const string& s) { m_name = s; }
+ Type type() const { return _type; }
+ void type(Type t) { _type = t; }
+ const string& uri() const { return _uri; }
+ void uri(const string& s) { _uri = s; }
+ const string& name() const { return _name; }
+ void name(const string& s) { _name = s; }
/*const char* const type_string() const {
- if (m_type == LV2) return "LV2";
- else if (m_type == LADSPA) return "LADSPA";
- else if (m_type == DSSI) return "DSSI";
- else if (m_type == Internal) return "Internal";
- else if (m_type == Patch) return "Patch";
+ if (_type == LV2) return "LV2";
+ else if (_type == LADSPA) return "LADSPA";
+ else if (_type == DSSI) return "DSSI";
+ else if (_type == Internal) return "Internal";
+ else if (_type == Patch) return "Patch";
else return "";
}*/
const char* const type_uri() const {
- if (m_type == LV2) return "ingen:LV2Plugin";
- else if (m_type == LADSPA) return "ingen:LADSPAPlugin";
- else if (m_type == DSSI) return "ingen:DSSIPlugin";
- else if (m_type == Internal) return "ingen:InternalPlugin";
- else if (m_type == Patch) return "ingen:Patch";
+ if (_type == LV2) return "ingen:LV2Plugin";
+ else if (_type == LADSPA) return "ingen:LADSPAPlugin";
+ else if (_type == DSSI) return "ingen:DSSIPlugin";
+ else if (_type == Internal) return "ingen:InternalPlugin";
+ else if (_type == Patch) return "ingen:Patch";
else return "";
}
/** DEPRECATED */
void set_type(const string& type_string) {
- if (type_string == "LV2") m_type = LV2;
- else if (type_string == "LADSPA") m_type = LADSPA;
- else if (type_string == "DSSI") m_type = DSSI;
- else if (type_string == "Internal") m_type = Internal;
- else if (type_string == "Patch") m_type = Patch;
+ if (type_string == "LV2") _type = LV2;
+ else if (type_string == "LADSPA") _type = LADSPA;
+ else if (type_string == "DSSI") _type = DSSI;
+ else if (type_string == "Internal") _type = Internal;
+ else if (type_string == "Patch") _type = Patch;
}
void set_type_from_uri(const string& type_uri) {
@@ -84,12 +84,12 @@ public:
}
}
- string default_node_name() { return Raul::Path::nameify(m_name); }
+ string default_node_name() { return Raul::Path::nameify(_name); }
private:
- Type m_type;
- string m_uri;
- string m_name;
+ Type _type;
+ string _uri;
+ string _name;
};
diff --git a/src/libs/client/PresetModel.h b/src/libs/client/PresetModel.h
index 9e7f5339..918a6f34 100644
--- a/src/libs/client/PresetModel.h
+++ b/src/libs/client/PresetModel.h
@@ -35,7 +35,7 @@ class PresetModel
{
public:
PresetModel(const string& base_path)
- : m_base_path(base_path)
+ : _base_path(base_path)
{}
/** Add a control value to this preset. An empty string for a node_name
@@ -45,20 +45,20 @@ public:
const string& port_name, float value)
{
if (node_name != "")
- m_controls.push_back(ControlModel(m_base_path + node_name +"/"+ port_name, value));
+ _controls.push_back(ControlModel(_base_path + node_name +"/"+ port_name, value));
else
- m_controls.push_back(ControlModel(m_base_path + port_name, value));
+ _controls.push_back(ControlModel(_base_path + port_name, value));
}
- const string& name() const { return m_name; }
- void name(const string& n) { m_name = n; }
+ const string& name() const { return _name; }
+ void name(const string& n) { _name = n; }
- const list<ControlModel>& controls() const { return m_controls; }
+ const list<ControlModel>& controls() const { return _controls; }
private:
- string m_name;
- string m_base_path;
- list<ControlModel> m_controls;
+ string _name;
+ string _base_path;
+ list<ControlModel> _controls;
};