summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/libs/engine/Array.h60
-rw-r--r--src/libs/engine/Connection.cpp6
-rw-r--r--src/libs/engine/Connection.h14
-rw-r--r--src/libs/engine/Engine.cpp102
-rw-r--r--src/libs/engine/Engine.h44
-rw-r--r--src/libs/engine/InputPort.cpp152
-rw-r--r--src/libs/engine/InputPort.h10
-rw-r--r--src/libs/engine/JackAudioDriver.cpp14
-rw-r--r--src/libs/engine/LV2Node.cpp8
-rw-r--r--src/libs/engine/LashDriver.cpp54
-rw-r--r--src/libs/engine/LashDriver.h10
-rw-r--r--src/libs/engine/List.h172
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp72
-rw-r--r--src/libs/engine/OSCEngineReceiver.h4
-rw-r--r--src/libs/engine/ObjectStore.cpp8
-rw-r--r--src/libs/engine/ObjectStore.h4
-rw-r--r--src/libs/engine/PluginLibrary.h24
-rw-r--r--src/libs/engine/TransportNode.cpp12
-rw-r--r--src/libs/engine/Tree.h74
-rw-r--r--src/libs/engine/TreeImplementation.h112
-rw-r--r--src/libs/engine/TypedConnection.cpp38
-rw-r--r--src/libs/engine/TypedConnection.h28
-rw-r--r--src/libs/engine/TypedPort.cpp22
-rw-r--r--src/libs/engine/TypedPort.h10
-rw-r--r--src/libs/engine/events/AddNodeEvent.cpp88
-rw-r--r--src/libs/engine/events/AddNodeEvent.h22
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.cpp16
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.h4
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp50
-rw-r--r--src/libs/engine/events/ClearPatchEvent.h6
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp148
-rw-r--r--src/libs/engine/events/ConnectionEvent.h32
-rw-r--r--src/libs/engine/events/CreatePatchEvent.cpp80
-rw-r--r--src/libs/engine/events/CreatePatchEvent.h14
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.cpp22
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.h8
-rw-r--r--src/libs/engine/events/DSSIControlEvent.cpp22
-rw-r--r--src/libs/engine/events/DSSIControlEvent.h8
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.cpp24
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.h8
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.cpp22
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.h6
-rw-r--r--src/libs/engine/events/DisablePatchEvent.cpp16
-rw-r--r--src/libs/engine/events/DisablePatchEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp52
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.h14
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp60
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.h14
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp144
-rw-r--r--src/libs/engine/events/DisconnectionEvent.h26
-rw-r--r--src/libs/engine/events/EnablePatchEvent.cpp28
-rw-r--r--src/libs/engine/events/EnablePatchEvent.h6
-rw-r--r--src/libs/engine/events/MidiLearnEvent.cpp22
-rw-r--r--src/libs/engine/events/MidiLearnEvent.h16
-rw-r--r--src/libs/engine/events/NoteOffEvent.cpp26
-rw-r--r--src/libs/engine/events/NoteOffEvent.h6
-rw-r--r--src/libs/engine/events/NoteOnEvent.cpp36
-rw-r--r--src/libs/engine/events/NoteOnEvent.h10
-rw-r--r--src/libs/engine/events/RenameEvent.cpp56
-rw-r--r--src/libs/engine/events/RenameEvent.h12
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.cpp6
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.h2
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.cpp26
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.h10
-rw-r--r--src/libs/engine/events/RequestObjectEvent.cpp24
-rw-r--r--src/libs/engine/events/RequestObjectEvent.h6
-rw-r--r--src/libs/engine/events/RequestPluginEvent.cpp16
-rw-r--r--src/libs/engine/events/RequestPluginEvent.h6
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.cpp8
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.h4
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.cpp22
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.h8
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp20
-rw-r--r--src/libs/engine/events/SetMetadataEvent.h8
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp54
-rw-r--r--src/libs/engine/events/SetPortValueEvent.h10
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.cpp60
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.h10
-rw-r--r--src/progs/ingenuity/App.cpp2
-rw-r--r--src/progs/ingenuity/ConfigWindow.cpp30
-rw-r--r--src/progs/ingenuity/ConfigWindow.h10
-rw-r--r--src/progs/ingenuity/Configuration.cpp28
-rw-r--r--src/progs/ingenuity/Configuration.h18
-rw-r--r--src/progs/ingenuity/Connection.h6
-rw-r--r--src/progs/ingenuity/ControlGroups.cpp234
-rw-r--r--src/progs/ingenuity/ControlGroups.h54
-rw-r--r--src/progs/ingenuity/ControlPanel.cpp78
-rw-r--r--src/progs/ingenuity/ControlPanel.h20
-rw-r--r--src/progs/ingenuity/DSSIController.cpp24
-rw-r--r--src/progs/ingenuity/DSSIController.h6
-rw-r--r--src/progs/ingenuity/DSSIModule.cpp2
-rw-r--r--src/progs/ingenuity/LashController.cpp34
-rw-r--r--src/progs/ingenuity/LashController.h4
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp44
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.h22
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.cpp228
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.h68
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.cpp64
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.h22
-rw-r--r--src/progs/ingenuity/MessagesWindow.cpp20
-rw-r--r--src/progs/ingenuity/MessagesWindow.h6
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp50
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.h14
-rw-r--r--src/progs/ingenuity/NodeControlWindow.cpp48
-rw-r--r--src/progs/ingenuity/NodeControlWindow.h16
-rw-r--r--src/progs/ingenuity/NodeMenu.cpp40
-rw-r--r--src/progs/ingenuity/NodeMenu.h4
-rw-r--r--src/progs/ingenuity/NodeModule.cpp20
-rw-r--r--src/progs/ingenuity/NodeModule.h6
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.cpp22
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.h12
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp104
-rw-r--r--src/progs/ingenuity/PatchCanvas.h28
-rw-r--r--src/progs/ingenuity/PatchPortModule.cpp14
-rw-r--r--src/progs/ingenuity/PatchPortModule.h8
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.cpp34
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.h10
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp112
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.h16
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp194
-rw-r--r--src/progs/ingenuity/PatchWindow.h64
-rw-r--r--src/progs/ingenuity/Port.cpp2
-rw-r--r--src/progs/ingenuity/RenameWindow.cpp56
-rw-r--r--src/progs/ingenuity/RenameWindow.h10
-rw-r--r--src/progs/ingenuity/SubpatchModule.cpp16
-rw-r--r--src/progs/ingenuity/SubpatchModule.h4
-rw-r--r--src/progs/ingenuity/ingenuity.glade4
137 files changed, 2370 insertions, 2373 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;
};
diff --git a/src/libs/engine/Array.h b/src/libs/engine/Array.h
index bef6ef5b..aaad9c5a 100644
--- a/src/libs/engine/Array.h
+++ b/src/libs/engine/Array.h
@@ -31,25 +31,25 @@ template <class T>
class Array : public MaidObject
{
public:
- Array(size_t size = 0) : m_size(size), m_top(0), m_elems(NULL) {
+ Array(size_t size = 0) : _size(size), _top(0), _elems(NULL) {
if (size > 0)
- m_elems = new T[size];
+ _elems = new T[size];
}
- Array(size_t size, T initial_value) : m_size(size), m_top(0), m_elems(NULL) {
+ Array(size_t size, T initial_value) : _size(size), _top(0), _elems(NULL) {
if (size > 0) {
- m_elems = new T[size];
+ _elems = new T[size];
for (size_t i=0; i < size; ++i)
- m_elems[i] = initial_value;
+ _elems[i] = initial_value;
}
}
- Array(size_t size, const Array<T>& contents) : m_size(size), m_top(size+1) {
- m_elems = new T[size];
+ Array(size_t size, const Array<T>& contents) : _size(size), _top(size+1) {
+ _elems = new T[size];
if (size <= contents.size())
- memcpy(m_elems, contents.m_elems, size * sizeof(T));
+ memcpy(_elems, contents._elems, size * sizeof(T));
else
- memcpy(m_elems, contents.m_elems, contents.size() * sizeof(T));
+ memcpy(_elems, contents._elems, contents.size() * sizeof(T));
}
~Array() {
@@ -59,46 +59,46 @@ public:
void alloc(size_t num_elems) {
assert(num_elems > 0);
- delete[] m_elems;
- m_size = num_elems;
- m_top = 0;
+ delete[] _elems;
+ _size = num_elems;
+ _top = 0;
- m_elems = new T[num_elems];
+ _elems = new T[num_elems];
}
void alloc(size_t num_elems, T initial_value) {
assert(num_elems > 0);
- delete[] m_elems;
- m_size = num_elems;
- m_top = 0;
+ delete[] _elems;
+ _size = num_elems;
+ _top = 0;
- m_elems = new T[num_elems];
- for (size_t i=0; i < m_size; ++i)
- m_elems[i] = initial_value;
+ _elems = new T[num_elems];
+ for (size_t i=0; i < _size; ++i)
+ _elems[i] = initial_value;
}
void free() {
- delete[] m_elems;
- m_size = 0;
- m_top = 0;
+ delete[] _elems;
+ _size = 0;
+ _top = 0;
}
void push_back(T n) {
- assert(m_top < m_size);
- m_elems[m_top++] = n;
+ assert(_top < _size);
+ _elems[_top++] = n;
}
- inline size_t size() const { return m_size; }
+ inline size_t size() const { return _size; }
- inline T& operator[](size_t i) const { assert(i < m_size); return m_elems[i]; }
+ inline T& operator[](size_t i) const { assert(i < _size); return _elems[i]; }
- inline T& at(size_t i) const { assert(i < m_size); return m_elems[i]; }
+ inline T& at(size_t i) const { assert(i < _size); return _elems[i]; }
private:
- size_t m_size;
- size_t m_top; // points to empty element above "top" element
- T* m_elems;
+ size_t _size;
+ size_t _top; // points to empty element above "top" element
+ T* _elems;
};
diff --git a/src/libs/engine/Connection.cpp b/src/libs/engine/Connection.cpp
index a896913b..6f8b0851 100644
--- a/src/libs/engine/Connection.cpp
+++ b/src/libs/engine/Connection.cpp
@@ -28,9 +28,9 @@ namespace Ingen {
* user (InputPort).
*/
Connection::Connection(Port* const src_port, Port* const dst_port)
-: m_src_port(src_port),
- m_dst_port(dst_port),
- m_pending_disconnection(false)
+: _src_port(src_port),
+ _dst_port(dst_port),
+ _pending_disconnection(false)
{
assert(src_port != NULL);
assert(dst_port != NULL);
diff --git a/src/libs/engine/Connection.h b/src/libs/engine/Connection.h
index 3fe86f94..d619d50e 100644
--- a/src/libs/engine/Connection.h
+++ b/src/libs/engine/Connection.h
@@ -42,21 +42,21 @@ class Connection : public MaidObject
public:
virtual ~Connection() {}
- Port* src_port() const { return m_src_port; }
- Port* dst_port() const { return m_dst_port; }
+ Port* src_port() const { return _src_port; }
+ Port* dst_port() const { return _dst_port; }
/** Used by some (recursive) events to prevent double disconnections */
- bool pending_disconnection() { return m_pending_disconnection; }
- void pending_disconnection(bool b) { m_pending_disconnection = b; }
+ bool pending_disconnection() { return _pending_disconnection; }
+ void pending_disconnection(bool b) { _pending_disconnection = b; }
virtual void set_buffer_size(size_t size) {}
protected:
Connection(Port* const src_port, Port* const dst_port);
- Port* const m_src_port;
- Port* const m_dst_port;
- bool m_pending_disconnection;
+ Port* const _src_port;
+ Port* const _dst_port;
+ bool _pending_disconnection;
};
diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp
index c7c5f80a..090e42fd 100644
--- a/src/libs/engine/Engine.cpp
+++ b/src/libs/engine/Engine.cpp
@@ -49,19 +49,19 @@ namespace Ingen {
Engine::Engine()
-: m_midi_driver(NULL),
- m_maid(new Maid(maid_queue_size)),
- m_post_processor(new PostProcessor(*m_maid, post_processor_queue_size)),
- m_broadcaster(new ClientBroadcaster()),
- m_object_store(new ObjectStore()),
- m_node_factory(new NodeFactory()),
+: _midi_driver(NULL),
+ _maid(new Maid(maid_queue_size)),
+ _post_processor(new PostProcessor(*_maid, post_processor_queue_size)),
+ _broadcaster(new ClientBroadcaster()),
+ _object_store(new ObjectStore()),
+ _node_factory(new NodeFactory()),
#ifdef HAVE_LASH
- m_lash_driver(new LashDriver()),
+ _lash_driver(new LashDriver()),
#else
- m_lash_driver(NULL),
+ _lash_driver(NULL),
#endif
- m_quit_flag(false),
- m_activated(false)
+ _quit_flag(false),
+ _activated(false)
{
}
@@ -70,18 +70,18 @@ Engine::~Engine()
{
deactivate();
- for (Tree<GraphObject*>::iterator i = m_object_store->objects().begin();
- i != m_object_store->objects().end(); ++i) {
+ for (Tree<GraphObject*>::iterator i = _object_store->objects().begin();
+ i != _object_store->objects().end(); ++i) {
if ((*i)->parent() == NULL)
delete (*i);
}
- delete m_object_store;
- delete m_broadcaster;
- delete m_node_factory;
- delete m_midi_driver;
+ delete _object_store;
+ delete _broadcaster;
+ delete _node_factory;
+ delete _midi_driver;
- delete m_maid;
+ delete _maid;
munlockall();
}
@@ -94,22 +94,22 @@ Engine::~Engine()
* more elegant and extensible, but this is faster and simpler - for now.
*/
template<>
-Driver<MidiMessage>* Engine::driver<MidiMessage>() { return m_midi_driver; }
+Driver<MidiMessage>* Engine::driver<MidiMessage>() { return _midi_driver; }
template<>
-Driver<Sample>* Engine::driver<Sample>() { return m_audio_driver.get(); }
+Driver<Sample>* Engine::driver<Sample>() { return _audio_driver.get(); }
int
Engine::main()
{
// Loop until quit flag is set (by OSCReceiver)
- while ( ! m_quit_flag) {
+ while ( ! _quit_flag) {
nanosleep(&main_rate, NULL);
main_iteration();
}
cout << "[Main] Done main loop." << endl;
- if (m_activated)
+ if (_activated)
deactivate();
sleep(1);
@@ -132,53 +132,53 @@ Engine::main_iteration()
lash_driver->process_events();
#endif
// Run the maid (garbage collector)
- m_maid->cleanup();
+ _maid->cleanup();
- return !m_quit_flag;
+ return !_quit_flag;
}
bool
Engine::activate(SharedPtr<AudioDriver> ad, SharedPtr<EventSource> es)
{
- if (m_activated)
+ if (_activated)
return false;
// Setup drivers
- m_audio_driver = ad;
+ _audio_driver = ad;
#ifdef HAVE_JACK_MIDI
- m_midi_driver = new JackMidiDriver(((JackAudioDriver*)m_audio_driver.get())->jack_client());
+ _midi_driver = new JackMidiDriver(((JackAudioDriver*)_audio_driver.get())->jack_client());
#elif HAVE_ALSA_MIDI
- m_midi_driver = new AlsaMidiDriver(m_audio_driver.get());
+ _midi_driver = new AlsaMidiDriver(_audio_driver.get());
#else
- m_midi_driver = new DummyMidiDriver();
+ _midi_driver = new DummyMidiDriver();
#endif
// Set event source (FIXME: handle multiple sources)
- m_event_source = es;
+ _event_source = es;
- m_event_source->activate();
+ _event_source->activate();
// Create root patch
Patch* root_patch = new Patch("", 1, NULL,
- m_audio_driver->sample_rate(), m_audio_driver->buffer_size(), 1);
+ _audio_driver->sample_rate(), _audio_driver->buffer_size(), 1);
root_patch->activate();
- root_patch->add_to_store(m_object_store);
+ root_patch->add_to_store(_object_store);
root_patch->process_order(root_patch->build_process_order());
root_patch->enable();
- assert(m_audio_driver->root_patch() == NULL);
- m_audio_driver->set_root_patch(root_patch);
+ assert(_audio_driver->root_patch() == NULL);
+ _audio_driver->set_root_patch(root_patch);
- m_audio_driver->activate();
+ _audio_driver->activate();
#ifdef HAVE_ALSA_MIDI
- m_midi_driver->activate();
+ _midi_driver->activate();
#endif
- m_post_processor->start();
+ _post_processor->start();
- m_activated = true;
+ _activated = true;
return true;
}
@@ -187,31 +187,31 @@ Engine::activate(SharedPtr<AudioDriver> ad, SharedPtr<EventSource> es)
void
Engine::deactivate()
{
- if (!m_activated)
+ if (!_activated)
return;
- m_audio_driver->root_patch()->disable();
- m_audio_driver->root_patch()->deactivate();
+ _audio_driver->root_patch()->disable();
+ _audio_driver->root_patch()->deactivate();
- /*for (Tree<GraphObject*>::iterator i = m_object_store->objects().begin();
- i != m_object_store->objects().end(); ++i)
+ /*for (Tree<GraphObject*>::iterator i = _object_store->objects().begin();
+ i != _object_store->objects().end(); ++i)
if ((*i)->as_node() != NULL && (*i)->as_node()->parent() == NULL)
(*i)->as_node()->deactivate();*/
- if (m_midi_driver != NULL)
- m_midi_driver->deactivate();
+ if (_midi_driver != NULL)
+ _midi_driver->deactivate();
- m_audio_driver->deactivate();
+ _audio_driver->deactivate();
// Finalize any lingering events (unlikely)
- m_post_processor->whip();
- m_post_processor->stop();
+ _post_processor->whip();
+ _post_processor->stop();
- m_audio_driver.reset();
+ _audio_driver.reset();
- m_event_source.reset();
+ _event_source.reset();
- m_activated = false;
+ _activated = false;
}
diff --git a/src/libs/engine/Engine.h b/src/libs/engine/Engine.h
index 01aaa3a1..bcff871b 100644
--- a/src/libs/engine/Engine.h
+++ b/src/libs/engine/Engine.h
@@ -58,39 +58,39 @@ public:
/** Set the quit flag that should kill all threads and exit cleanly.
* Note that it will take some time. */
- void quit() { m_quit_flag = true; }
+ void quit() { _quit_flag = true; }
bool activate(SharedPtr<AudioDriver> ad, SharedPtr<EventSource> es);
void deactivate();
- bool activated() { return m_activated; }
+ bool activated() { return _activated; }
- EventSource* event_source() const { return m_event_source.get(); }
- AudioDriver* audio_driver() const { return m_audio_driver.get(); }
- MidiDriver* midi_driver() const { return m_midi_driver; }
- Maid* maid() const { return m_maid; }
- PostProcessor* post_processor() const { return m_post_processor; }
- ClientBroadcaster* broadcaster() const { return m_broadcaster; }
- ObjectStore* object_store() const { return m_object_store; }
- NodeFactory* node_factory() const { return m_node_factory; }
- LashDriver* lash_driver() const { return m_lash_driver; }
+ EventSource* event_source() const { return _event_source.get(); }
+ AudioDriver* audio_driver() const { return _audio_driver.get(); }
+ MidiDriver* midi_driver() const { return _midi_driver; }
+ Maid* maid() const { return _maid; }
+ PostProcessor* post_processor() const { return _post_processor; }
+ ClientBroadcaster* broadcaster() const { return _broadcaster; }
+ ObjectStore* object_store() const { return _object_store; }
+ NodeFactory* node_factory() const { return _node_factory; }
+ LashDriver* lash_driver() const { return _lash_driver; }
/** Return the active driver for the given (template parameter) type */
template<typename T> Driver<T>* driver();
private:
- SharedPtr<EventSource> m_event_source;
- SharedPtr<AudioDriver> m_audio_driver;
- MidiDriver* m_midi_driver;
- Maid* m_maid;
- PostProcessor* m_post_processor;
- ClientBroadcaster* m_broadcaster;
- ObjectStore* m_object_store;
- NodeFactory* m_node_factory;
- LashDriver* m_lash_driver;
+ SharedPtr<EventSource> _event_source;
+ SharedPtr<AudioDriver> _audio_driver;
+ MidiDriver* _midi_driver;
+ Maid* _maid;
+ PostProcessor* _post_processor;
+ ClientBroadcaster* _broadcaster;
+ ObjectStore* _object_store;
+ NodeFactory* _node_factory;
+ LashDriver* _lash_driver;
- bool m_quit_flag;
- bool m_activated;
+ bool _quit_flag;
+ bool _activated;
};
diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp
index 6fbd500f..2a369521 100644
--- a/src/libs/engine/InputPort.cpp
+++ b/src/libs/engine/InputPort.cpp
@@ -47,35 +47,35 @@ template<typename T>
void
InputPort<T>::add_connection(ListNode<TypedConnection<T>*>* const c)
{
- m_connections.push_back(c);
+ _connections.push_back(c);
- bool modify_buffers = !m_fixed_buffers;
- //if (modify_buffers && m_is_tied)
- // modify_buffers = !m_tied_port->fixed_buffers();
+ bool modify_buffers = !_fixed_buffers;
+ //if (modify_buffers && _is_tied)
+ // modify_buffers = !_tied_port->fixed_buffers();
if (modify_buffers) {
- if (m_connections.size() == 1) {
+ if (_connections.size() == 1) {
// Use buffer directly to avoid copying
for (size_t i=0; i < _poly; ++i) {
- m_buffers.at(i)->join(c->elem()->buffer(i));
- //if (m_is_tied)
- // m_tied_port->buffer(i)->join(m_buffers.at(i));
- assert(m_buffers.at(i)->data() == c->elem()->buffer(i)->data());
+ _buffers.at(i)->join(c->elem()->buffer(i));
+ //if (_is_tied)
+ // _tied_port->buffer(i)->join(_buffers.at(i));
+ assert(_buffers.at(i)->data() == c->elem()->buffer(i)->data());
}
- } else if (m_connections.size() == 2) {
+ } else if (_connections.size() == 2) {
// Used to directly use single connection buffer, now there's two
// so have to use local ones again and mix down
for (size_t i=0; i < _poly; ++i) {
- m_buffers.at(i)->unjoin();
- //if (m_is_tied)
- // m_tied_port->buffer(i)->join(m_buffers.at(i));
+ _buffers.at(i)->unjoin();
+ //if (_is_tied)
+ // _tied_port->buffer(i)->join(_buffers.at(i));
}
}
TypedPort<T>::connect_buffers();
}
- //assert( ! m_is_tied || m_tied_port != NULL);
- //assert( ! m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert( ! _is_tied || _tied_port != NULL);
+ //assert( ! _is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
}
template void InputPort<Sample>::add_connection(ListNode<TypedConnection<Sample>*>* const c);
template void InputPort<MidiMessage>::add_connection(ListNode<TypedConnection<MidiMessage>*>* const c);
@@ -87,16 +87,16 @@ template <typename T>
ListNode<TypedConnection<T>*>*
InputPort<T>::remove_connection(const OutputPort<T>* const src_port)
{
- bool modify_buffers = !m_fixed_buffers;
- //if (modify_buffers && m_is_tied)
- // modify_buffers = !m_tied_port->fixed_buffers();
+ bool modify_buffers = !_fixed_buffers;
+ //if (modify_buffers && _is_tied)
+ // modify_buffers = !_tied_port->fixed_buffers();
typedef typename List<TypedConnection<T>*>::iterator TypedConnectionListIterator;
bool found = false;
ListNode<TypedConnection<T>*>* connection = NULL;
- for (TypedConnectionListIterator i = m_connections.begin(); i != m_connections.end(); ++i) {
+ for (TypedConnectionListIterator i = _connections.begin(); i != _connections.end(); ++i) {
if ((*i)->src_port()->path() == src_port->path()) {
- connection = m_connections.remove(i);
+ connection = _connections.remove(i);
found = true;
}
}
@@ -105,21 +105,21 @@ InputPort<T>::remove_connection(const OutputPort<T>* const src_port)
cerr << "WARNING: [InputPort<T>::remove_connection] Connection not found !" << endl;
exit(EXIT_FAILURE);
} else {
- if (m_connections.size() == 0) {
+ if (_connections.size() == 0) {
for (size_t i=0; i < _poly; ++i) {
// Use a local buffer
- if (modify_buffers && m_buffers.at(i)->is_joined())
- m_buffers.at(i)->unjoin();
- m_buffers.at(i)->clear(); // Write silence
- //if (m_is_tied)
- //m_tied_port->buffer(i)->join(m_buffers.at(i));
+ if (modify_buffers && _buffers.at(i)->is_joined())
+ _buffers.at(i)->unjoin();
+ _buffers.at(i)->clear(); // Write silence
+ //if (_is_tied)
+ //m_tied_port->buffer(i)->join(_buffers.at(i));
}
- } else if (modify_buffers && m_connections.size() == 1) {
+ } else if (modify_buffers && _connections.size() == 1) {
// Share a buffer
for (size_t i=0; i < _poly; ++i) {
- m_buffers.at(i)->join((*m_connections.begin())->buffer(i));
- //if (m_is_tied)
- // m_tied_port->buffer(i)->join(m_buffers.at(i));
+ _buffers.at(i)->join((*_connections.begin())->buffer(i));
+ //if (_is_tied)
+ // _tied_port->buffer(i)->join(_buffers.at(i));
}
}
}
@@ -127,8 +127,8 @@ InputPort<T>::remove_connection(const OutputPort<T>* const src_port)
if (modify_buffers)
TypedPort<T>::connect_buffers();
- //assert( ! m_is_tied || m_tied_port != NULL);
- //assert( ! m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert( ! _is_tied || _tied_port != NULL);
+ //assert( ! _is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
return connection;
}
@@ -145,7 +145,7 @@ bool
InputPort<T>::is_connected_to(const OutputPort<T>* const port) const
{
typedef typename List<TypedConnection<T>*>::const_iterator TypedConnectionListIterator;
- for (TypedConnectionListIterator i = m_connections.begin(); i != m_connections.end(); ++i)
+ for (TypedConnectionListIterator i = _connections.begin(); i != _connections.end(); ++i)
if ((*i)->src_port() == port)
return true;
@@ -162,27 +162,27 @@ template<>
void
InputPort<Sample>::process(SampleCount nframes, FrameTime start, FrameTime end)
{
- //assert(!m_is_tied || m_tied_port != NULL);
+ //assert(!_is_tied || _tied_port != NULL);
typedef List<TypedConnection<Sample>*>::iterator TypedConnectionListIterator;
bool do_mixdown = true;
- if (m_connections.size() == 0) return;
+ if (_connections.size() == 0) return;
- for (TypedConnectionListIterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (TypedConnectionListIterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->process(nframes, start, end);
// If only one connection, buffer is (maybe) used directly (no copying)
- if (m_connections.size() == 1) {
+ if (_connections.size() == 1) {
// Buffer changed since connection
- if (m_buffers.at(0)->data() != (*m_connections.begin())->buffer(0)->data()) {
- if (m_fixed_buffers) { // || (m_is_tied && m_tied_port->fixed_buffers())) {
+ if (_buffers.at(0)->data() != (*_connections.begin())->buffer(0)->data()) {
+ if (_fixed_buffers) { // || (_is_tied && _tied_port->fixed_buffers())) {
// can't change buffer, must copy
do_mixdown = true;
} else {
// zero-copy
- assert(m_buffers.at(0)->is_joined());
- m_buffers.at(0)->join((*m_connections.begin())->buffer(0));
+ assert(_buffers.at(0)->is_joined());
+ _buffers.at(0)->join((*_connections.begin())->buffer(0));
do_mixdown = false;
}
connect_buffers();
@@ -194,24 +194,24 @@ InputPort<Sample>::process(SampleCount nframes, FrameTime start, FrameTime end)
//cerr << path() << " mixing: " << do_mixdown << endl;
if (!do_mixdown) {
- assert(m_buffers.at(0)->data() == (*m_connections.begin())->buffer(0)->data());
+ assert(_buffers.at(0)->data() == (*_connections.begin())->buffer(0)->data());
return;
}
- /*assert(!m_is_tied || m_tied_port != NULL);
- assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());*/
+ /*assert(!_is_tied || _tied_port != NULL);
+ assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());*/
for (size_t voice=0; voice < _poly; ++voice) {
// Copy first connection
- m_buffers.at(voice)->copy((*m_connections.begin())->buffer(voice), 0, _buffer_size-1);
+ _buffers.at(voice)->copy((*_connections.begin())->buffer(voice), 0, _buffer_size-1);
// Accumulate the rest
- if (m_connections.size() > 1) {
+ if (_connections.size() > 1) {
- TypedConnectionListIterator c = m_connections.begin();
+ TypedConnectionListIterator c = _connections.begin();
- for (++c; c != m_connections.end(); ++c)
- m_buffers.at(voice)->accumulate((*c)->buffer(voice), 0, _buffer_size-1);
+ for (++c; c != _connections.end(); ++c)
+ _buffers.at(voice)->accumulate((*c)->buffer(voice), 0, _buffer_size-1);
}
}
}
@@ -225,9 +225,9 @@ template <>
void
InputPort<MidiMessage>::process(SampleCount nframes, FrameTime start, FrameTime end)
{
- //assert(!m_is_tied || m_tied_port != NULL);
+ //assert(!_is_tied || _tied_port != NULL);
- const size_t num_ins = m_connections.size();
+ const size_t num_ins = _connections.size();
bool do_mixdown = true;
assert(num_ins == 0 || num_ins == 1);
@@ -235,67 +235,67 @@ InputPort<MidiMessage>::process(SampleCount nframes, FrameTime start, FrameTime
typedef List<TypedConnection<MidiMessage>*>::iterator TypedConnectionListIterator;
assert(_poly == 1);
- for (TypedConnectionListIterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (TypedConnectionListIterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->process(nframes, start, end);
// If only one connection, buffer is used directly (no copying)
if (num_ins == 1) {
// Buffer changed since connection
- if (m_buffers.at(0) != (*m_connections.begin())->buffer(0)) {
- if (m_fixed_buffers) { // || (m_is_tied && m_tied_port->fixed_buffers())) {
+ if (_buffers.at(0) != (*_connections.begin())->buffer(0)) {
+ if (_fixed_buffers) { // || (_is_tied && _tied_port->fixed_buffers())) {
// can't change buffer, must copy
do_mixdown = true;
} else {
// zero-copy
- m_buffers.at(0)->join((*m_connections.begin())->buffer(0));
- //if (m_is_tied)
- // m_tied_port->buffer(0)->join(m_buffers.at(0));
+ _buffers.at(0)->join((*_connections.begin())->buffer(0));
+ //if (_is_tied)
+ // _tied_port->buffer(0)->join(_buffers.at(0));
do_mixdown = false;
}
connect_buffers();
} else {
do_mixdown = false;
}
- //assert(!m_is_tied || m_tied_port != NULL);
- //assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
- //assert(!m_is_tied || m_buffers.at(0)->filled_size() == m_tied_port->buffer(0)->filled_size());
- assert(do_mixdown || m_buffers.at(0)->filled_size() ==
- (*m_connections.begin())->src_port()->buffer(0)->filled_size());
+ //assert(!_is_tied || _tied_port != NULL);
+ //assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
+ //assert(!_is_tied || _buffers.at(0)->filled_size() == _tied_port->buffer(0)->filled_size());
+ assert(do_mixdown || _buffers.at(0)->filled_size() ==
+ (*_connections.begin())->src_port()->buffer(0)->filled_size());
}
// Get valid buffer size from inbound connections, unless a port on a top-level
// patch (which will be fed by the MidiDriver)
if (_parent->parent() != NULL) {
if (num_ins == 1) {
- m_buffers.at(0)->filled_size(
- (*m_connections.begin())->src_port()->buffer(0)->filled_size());
+ _buffers.at(0)->filled_size(
+ (*_connections.begin())->src_port()->buffer(0)->filled_size());
- //if (m_is_tied)
- // m_tied_port->buffer(0)->filled_size(m_buffers.at(0)->filled_size());
+ //if (_is_tied)
+ // _tied_port->buffer(0)->filled_size(_buffers.at(0)->filled_size());
- assert(m_buffers.at(0)->filled_size() ==
- (*m_connections.begin())->src_port()->buffer(0)->filled_size());
+ assert(_buffers.at(0)->filled_size() ==
+ (*_connections.begin())->src_port()->buffer(0)->filled_size());
} else {
// Mixing not implemented
- m_buffers.at(0)->clear();
+ _buffers.at(0)->clear();
}
}
- //assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
- if (!do_mixdown || m_buffers.at(0)->filled_size() == 0 || num_ins == 0)
+ if (!do_mixdown || _buffers.at(0)->filled_size() == 0 || num_ins == 0)
return;
//cerr << path() << " - Copying MIDI buffer" << endl;
// Be sure buffers are the same as tied port's, if joined
- //assert(!m_is_tied || m_tied_port != NULL);
- //assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());
+ //assert(!_is_tied || _tied_port != NULL);
+ //assert(!_is_tied || _buffers.at(0)->data() == _tied_port->buffer(0)->data());
if (num_ins > 0)
- for (size_t i=0; i < m_buffers.at(0)->filled_size(); ++i)
- m_buffers.at(0)[i] = (*m_connections.begin())->buffer(0)[i];
+ for (size_t i=0; i < _buffers.at(0)->filled_size(); ++i)
+ _buffers.at(0)[i] = (*_connections.begin())->buffer(0)[i];
}
@@ -306,7 +306,7 @@ InputPort<T>::set_buffer_size(size_t size)
TypedPort<T>::set_buffer_size(size);
assert(_buffer_size = size);
- for (typename List<TypedConnection<T>*>::iterator c = m_connections.begin(); c != m_connections.end(); ++c)
+ for (typename List<TypedConnection<T>*>::iterator c = _connections.begin(); c != _connections.end(); ++c)
(*c)->set_buffer_size(size);
}
diff --git a/src/libs/engine/InputPort.h b/src/libs/engine/InputPort.h
index 1fc90246..bb6f0560 100644
--- a/src/libs/engine/InputPort.h
+++ b/src/libs/engine/InputPort.h
@@ -53,11 +53,11 @@ public:
void add_connection(ListNode<TypedConnection<T>*>* const c);
ListNode<TypedConnection<T>*>* remove_connection(const OutputPort<T>* const src_port);
- const List<TypedConnection<T>*>& connections() { return m_connections; }
+ const List<TypedConnection<T>*>& connections() { return _connections; }
void process(SampleCount nframes, FrameTime start, FrameTime end);
- bool is_connected() const { return (m_connections.size() > 0); }
+ bool is_connected() const { return (_connections.size() > 0); }
bool is_connected_to(const OutputPort<T>* const port) const;
bool is_input() const { return true; }
@@ -67,14 +67,14 @@ public:
private:
- List<TypedConnection<T>*> m_connections;
+ List<TypedConnection<T>*> _connections;
// This is just stupid...
- using TypedPort<T>::m_buffers;
+ using TypedPort<T>::_buffers;
using TypedPort<T>::_poly;
using TypedPort<T>::_index;
using TypedPort<T>::_buffer_size;
- using TypedPort<T>::m_fixed_buffers;
+ using TypedPort<T>::_fixed_buffers;
};
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index d148a549..ab71ea25 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -75,10 +75,10 @@ void
JackAudioPort::prepare_buffer(jack_nframes_t nframes)
{
// FIXME: Technically this doesn't need to be done every time for output ports
- /*m_jack_buffer->set_data((jack_default_audio_sample_t*)
- jack_port_get_buffer(m_jack_port, nframes));
+ /*_jack_buffer->set_data((jack_default_audio_sample_t*)
+ jack_port_get_buffer(_jack_port, nframes));
- m_patch_port->buffer(0)->join(m_jack_buffer);
+ _patch_port->buffer(0)->join(_jack_buffer);
*/
jack_sample_t* jack_buf = (jack_sample_t*)jack_port_get_buffer(_jack_port, nframes);
@@ -88,17 +88,17 @@ JackAudioPort::prepare_buffer(jack_nframes_t nframes)
_jack_buffer = jack_buf;
}
- //assert(m_patch_port->tied_port() != NULL);
+ //assert(_patch_port->tied_port() != NULL);
// FIXME: fixed_buffers switch on/off thing can be removed once this
// gets figured out and assertions can go away
//m_patch_port->fixed_buffers(false);
- //m_patch_port->buffer(0)->join(m_jack_buffer);
- //m_patch_port->tied_port()->buffer(0)->join(m_jack_buffer);
+ //m_patch_port->buffer(0)->join(_jack_buffer);
+ //m_patch_port->tied_port()->buffer(0)->join(_jack_buffer);
//m_patch_port->fixed_buffers(true);
- //assert(m_patch_port->buffer(0)->data() == _patch_port->tied_port()->buffer(0)->data());
+ //assert(_patch_port->buffer(0)->data() == _patch_port->tied_port()->buffer(0)->data());
assert(_patch_port->buffer(0)->data() == jack_buf);
}
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 1f195dbe..a2bdd932 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -80,14 +80,16 @@ LV2Node::instantiate()
Port* port = NULL;
for (size_t j=0; j < num_ports; ++j) {
+ SLV2PortID id = slv2_port_by_index(j);
+
// LV2 shortnames are guaranteed to be unique, valid C identifiers
- port_name = (char*)slv2_port_get_symbol(_lv2_plugin, j);
+ port_name = (char*)slv2_port_get_symbol(_lv2_plugin, id);
assert(port_name.find("/") == string::npos);
port_path = path() + "/" + port_name;
- SLV2PortClass port_class = slv2_port_get_class(_lv2_plugin, j);
+ SLV2PortClass port_class = slv2_port_get_class(_lv2_plugin, id);
const bool is_control = (port_class == SLV2_CONTROL_RATE_INPUT
|| port_class == SLV2_CONTROL_RATE_OUTPUT);
const bool is_input = (port_class == SLV2_CONTROL_RATE_INPUT
@@ -98,7 +100,7 @@ LV2Node::instantiate()
else
port_buffer_size = _buffer_size;
- char* const data_type = slv2_port_get_data_type(_lv2_plugin, j);
+ char* const data_type = slv2_port_get_data_type(_lv2_plugin, id);
if (!strcmp(data_type, SLV2_DATA_TYPE_FLOAT)) {
if (is_input) {
diff --git a/src/libs/engine/LashDriver.cpp b/src/libs/engine/LashDriver.cpp
index 79b839bc..706d49c8 100644
--- a/src/libs/engine/LashDriver.cpp
+++ b/src/libs/engine/LashDriver.cpp
@@ -27,19 +27,19 @@ namespace Ingen {
LashDriver::LashDriver(Ingen* app, lash_args_t* args)
-: m_app(app),
- m_client(NULL),
- m_alsa_client_id(0) // FIXME: appropriate sentinel?
+: _app(app),
+ _client(NULL),
+ _alsa_client_id(0) // FIXME: appropriate sentinel?
{
- m_client = lash_init(args, PACKAGE_NAME,
+ _client = lash_init(args, PACKAGE_NAME,
/*LASH_Config_Data_Set|LASH_Config_File*/0, LASH_PROTOCOL(2, 0));
- if (m_client == NULL) {
+ if (_client == NULL) {
cerr << "[LashDriver] Failed to connect to LASH. Session management will not function." << endl;
} else {
cout << "[LashDriver] Lash initialised" << endl;
lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
lash_event_set_string(event, "Ingen");
- lash_send_event(m_client, event);
+ lash_send_event(_client, event);
}
}
@@ -50,8 +50,8 @@ LashDriver::LashDriver(Ingen* app, lash_args_t* args)
void
LashDriver::set_jack_client_name(const char* name)
{
- m_jack_client_name = name;
- lash_jack_client_name(m_client, m_jack_client_name.c_str());
+ _jack_client_name = name;
+ lash_jack_client_name(_client, _jack_client_name.c_str());
}
@@ -61,8 +61,8 @@ LashDriver::set_jack_client_name(const char* name)
void
LashDriver::set_alsa_client_id(int id)
{
- m_alsa_client_id = id;
- lash_alsa_client_id(m_client, m_alsa_client_id);
+ _alsa_client_id = id;
+ lash_alsa_client_id(_client, _alsa_client_id);
}
@@ -73,32 +73,32 @@ LashDriver::set_alsa_client_id(int id)
void
LashDriver::restore_finished()
{
- assert(m_jack_client_name != "");
- assert(m_alsa_client_id != 0);
+ assert(_jack_client_name != "");
+ assert(_alsa_client_id != 0);
- cerr << "LASH RESTORE FINISHED " << m_jack_client_name << " - " << m_alsa_client_id << endl;
+ cerr << "LASH RESTORE FINISHED " << _jack_client_name << " - " << _alsa_client_id << endl;
- lash_jack_client_name(m_client, m_jack_client_name.c_str());
- lash_alsa_client_id(m_client, m_alsa_client_id);
+ lash_jack_client_name(_client, _jack_client_name.c_str());
+ lash_alsa_client_id(_client, _alsa_client_id);
}
void
LashDriver::process_events()
{
- assert(m_client != NULL);
+ assert(_client != NULL);
lash_event_t* ev = NULL;
lash_config_t* conf = NULL;
// Process events
- while ((ev = lash_get_event(m_client)) != NULL) {
+ while ((ev = lash_get_event(_client)) != NULL) {
handle_event(ev);
lash_event_destroy(ev);
}
// Process configs
- while ((conf = lash_get_config(m_client)) != NULL) {
+ while ((conf = lash_get_config(_client)) != NULL) {
handle_config(conf);
lash_config_destroy(conf);
}
@@ -116,24 +116,24 @@ LashDriver::handle_event(lash_event_t* ev)
/*if (type == LASH_Save_File) {
//cout << "[LashDriver] LASH Save File - " << str << endl;
- m_app->store_window_location();
- m_app->state_manager()->save(str.append("/locations"));
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_File));
+ _app->store_window_location();
+ _app->state_manager()->save(str.append("/locations"));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_File));
} else if (type == LASH_Restore_File) {
//cout << "[LashDriver] LASH Restore File - " << str << endl;
- m_app->state_manager()->load(str.append("/locations"));
- m_app->update_state();
- lash_send_event(m_client, lash_event_new_with_type(LASH_Restore_File));
+ _app->state_manager()->load(str.append("/locations"));
+ _app->update_state();
+ lash_send_event(_client, lash_event_new_with_type(LASH_Restore_File));
} else if (type == LASH_Save_Data_Set) {
//cout << "[LashDriver] LASH Save Data Set - " << endl;
// Tell LASH we're done
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_Data_Set));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_Data_Set));
} else*/
if (type == LASH_Quit) {
//stop_thread();
- m_client = NULL;
- m_app->quit();
+ _client = NULL;
+ _app->quit();
} else {
cerr << "[LashDriver] WARNING: Unhandled lash event, type " << static_cast<int>(type) << endl;
}
diff --git a/src/libs/engine/LashDriver.h b/src/libs/engine/LashDriver.h
index 568e4709..d3dcbf72 100644
--- a/src/libs/engine/LashDriver.h
+++ b/src/libs/engine/LashDriver.h
@@ -34,18 +34,18 @@ class LashDriver
public:
LashDriver(Ingen* app, lash_args_t* args);
- bool enabled() { return (m_client != NULL && lash_enabled(m_client)); }
+ bool enabled() { return (_client != NULL && lash_enabled(_client)); }
void process_events();
void set_jack_client_name(const char* name);
void set_alsa_client_id(int id);
void restore_finished();
private:
- Ingen* m_app;
- lash_client_t* m_client;
+ Ingen* _app;
+ lash_client_t* _client;
- int m_alsa_client_id;
- string m_jack_client_name;
+ int _alsa_client_id;
+ string _jack_client_name;
void handle_event(lash_event_t* conf);
void handle_config(lash_config_t* conf);
diff --git a/src/libs/engine/List.h b/src/libs/engine/List.h
index 7997a6c5..1baf55ac 100644
--- a/src/libs/engine/List.h
+++ b/src/libs/engine/List.h
@@ -32,20 +32,20 @@ template <typename T>
class ListNode : public MaidObject
{
public:
- ListNode(T elem) : m_elem(elem), m_next(NULL), m_prev(NULL) {}
+ ListNode(T elem) : _elem(elem), _next(NULL), _prev(NULL) {}
virtual ~ListNode() {}
- ListNode* next() const { return m_next; }
- void next(ListNode* ln) { m_next = ln; }
- ListNode* prev() const { return m_prev; }
- void prev(ListNode* ln) { m_prev = ln; }
- T& elem() { return m_elem;}
- const T& elem() const { return m_elem; }
+ ListNode* next() const { return _next; }
+ void next(ListNode* ln) { _next = ln; }
+ ListNode* prev() const { return _prev; }
+ void prev(ListNode* ln) { _prev = ln; }
+ T& elem() { return _elem;}
+ const T& elem() const { return _elem; }
private:
- T m_elem;
- ListNode* m_next;
- ListNode* m_prev;
+ T _elem;
+ ListNode* _next;
+ ListNode* _prev;
};
@@ -59,12 +59,12 @@ template <typename T>
class List : public MaidObject
{
public:
- List() : m_head(NULL), m_tail(NULL), m_size(0), m_end_iter(this), m_const_end_iter(this)
+ List() : _head(NULL), _tail(NULL), _size(0), _end_iter(this), _const_end_iter(this)
{
- m_end_iter.m_listnode = NULL;
- m_end_iter.m_next = NULL;
- m_const_end_iter.m_listnode = NULL;
- m_const_end_iter.m_next = NULL;
+ _end_iter._listnode = NULL;
+ _end_iter._next = NULL;
+ _const_end_iter._listnode = NULL;
+ _const_end_iter._next = NULL;
}
~List();
@@ -72,7 +72,7 @@ public:
ListNode<T>* remove(const T elem);
void clear();
- size_t size() const { return m_size; }
+ size_t size() const { return _size; }
class iterator;
@@ -82,7 +82,7 @@ public:
public:
const_iterator(const List<T>* const list);
const_iterator(const iterator& i)
- : m_list(i.m_list), m_listnode(i.m_listnode), m_next(i.m_next) {}
+ : _list(i._list), _listnode(i._listnode), _next(i._next) {}
inline const T& operator*();
inline const_iterator& operator++();
@@ -92,9 +92,9 @@ public:
friend class List<T>;
private:
- const List<T>* const m_list;
- const ListNode<T>* m_listnode;
- const ListNode<T>* m_next; // use this instead of m_listnode->next() to allow deleting
+ const List<T>* const _list;
+ const ListNode<T>* _listnode;
+ const ListNode<T>* _next; // use this instead of _listnode->next() to allow deleting
};
@@ -113,9 +113,9 @@ public:
friend class List<T>::const_iterator;
private:
- const List<T>* m_list;
- ListNode<T>* m_listnode;
- ListNode<T>* m_next; // use this instead of m_listnode->next() to allow deleting
+ const List<T>* _list;
+ ListNode<T>* _listnode;
+ ListNode<T>* _next; // use this instead of _listnode->next() to allow deleting
};
@@ -128,11 +128,11 @@ public:
//const_iterator end() const;
private:
- ListNode<T>* m_head;
- ListNode<T>* m_tail;
- size_t m_size;
- iterator m_end_iter;
- const_iterator m_const_end_iter;
+ ListNode<T>* _head;
+ ListNode<T>* _tail;
+ size_t _size;
+ iterator _end_iter;
+ const_iterator _const_end_iter;
};
@@ -153,9 +153,9 @@ template <typename T>
void
List<T>::clear()
{
- if (m_head == NULL) return;
+ if (_head == NULL) return;
- ListNode<T>* node = m_head;
+ ListNode<T>* node = _head;
ListNode<T>* next = NULL;
while (node != NULL) {
@@ -163,8 +163,8 @@ List<T>::clear()
delete node;
node = next;
}
- m_tail = m_head = NULL;
- m_size = 0;
+ _tail = _head = NULL;
+ _size = 0;
}
@@ -181,15 +181,15 @@ List<T>::push_back(ListNode<T>* const ln)
ln->next(NULL);
// FIXME: atomicity? relevant?
- if (m_head == NULL) {
+ if (_head == NULL) {
ln->prev(NULL);
- m_head = m_tail = ln;
+ _head = _tail = ln;
} else {
- ln->prev(m_tail);
- m_tail->next(ln);
- m_tail = ln;
+ ln->prev(_tail);
+ _tail->next(ln);
+ _tail = ln;
}
- ++m_size;
+ ++_size;
}
@@ -203,21 +203,21 @@ ListNode<T>*
List<T>::remove(const T elem)
{
// FIXME: atomicity?
- ListNode<T>* n = m_head;
+ ListNode<T>* n = _head;
while (n != NULL) {
if (n->elem() == elem)
break;
n = n->next();
}
if (n != NULL) {
- if (n == m_head) m_head = m_head->next();
- if (n == m_tail) m_tail = m_tail->prev();
+ if (n == _head) _head = _head->next();
+ if (n == _tail) _tail = _tail->prev();
if (n->prev() != NULL)
n->prev()->next(n->next());
if (n->next() != NULL)
n->next()->prev(n->prev());
- --m_size;
- if (m_size == 0) m_head = m_tail = NULL; // FIXME: Shouldn't be necessary
+ --_size;
+ if (_size == 0) _head = _tail = NULL; // FIXME: Shouldn't be necessary
return n;
}
return NULL;
@@ -233,16 +233,16 @@ template <typename T>
ListNode<T>*
List<T>::remove(const iterator iter)
{
- ListNode<T>* n = iter.m_listnode;
+ ListNode<T>* n = iter._listnode;
if (n != NULL) {
- if (n == m_head) m_head = m_head->next();
- if (n == m_tail) m_tail = m_tail->prev();
+ if (n == _head) _head = _head->next();
+ if (n == _tail) _tail = _tail->prev();
if (n->prev() != NULL)
n->prev()->next(n->next());
if (n->next() != NULL)
n->next()->prev(n->prev());
- --m_size;
- if (m_size == 0) m_head = m_tail = NULL; // FIXME: Shouldn't be necessary
+ --_size;
+ if (_size == 0) _head = _tail = NULL; // FIXME: Shouldn't be necessary
return n;
}
return NULL;
@@ -253,9 +253,9 @@ List<T>::remove(const iterator iter)
template <typename T>
List<T>::iterator::iterator(List<T>* list)
-: m_list(list),
- m_listnode(NULL),
- m_next(NULL)
+: _list(list),
+ _listnode(NULL),
+ _next(NULL)
{
}
@@ -264,8 +264,8 @@ template <typename T>
T&
List<T>::iterator::operator*()
{
- assert(m_listnode != NULL);
- return m_listnode->elem();
+ assert(_listnode != NULL);
+ return _listnode->elem();
}
@@ -273,12 +273,12 @@ template <typename T>
inline typename List<T>::iterator&
List<T>::iterator::operator++()
{
- assert(m_listnode != NULL);
- m_listnode = m_next;
- if (m_next != NULL)
- m_next = m_next->next();
+ assert(_listnode != NULL);
+ _listnode = _next;
+ if (_next != NULL)
+ _next = _next->next();
else
- m_next = NULL;
+ _next = NULL;
return *this;
}
@@ -288,7 +288,7 @@ template <typename T>
inline bool
List<T>::iterator::operator!=(const iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -296,7 +296,7 @@ template <typename T>
inline bool
List<T>::iterator::operator!=(const const_iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -305,11 +305,11 @@ inline typename List<T>::iterator
List<T>::begin()
{
typename List<T>::iterator iter(this);
- iter.m_listnode = m_head;
- if (m_head != NULL)
- iter.m_next = m_head->next();
+ iter._listnode = _head;
+ if (_head != NULL)
+ iter._next = _head->next();
else
- iter.m_next = NULL;
+ iter._next = NULL;
return iter;
}
@@ -319,10 +319,10 @@ inline const typename List<T>::iterator
List<T>::end() const
{
/*typename List<T>::iterator iter(this);
- iter.m_listnode = NULL;
- iter.m_next = NULL;
+ iter._listnode = NULL;
+ iter._next = NULL;
return iter;*/
- return m_end_iter;
+ return _end_iter;
}
@@ -332,9 +332,9 @@ List<T>::end() const
template <typename T>
List<T>::const_iterator::const_iterator(const List<T>* const list)
-: m_list(list),
- m_listnode(NULL),
- m_next(NULL)
+: _list(list),
+ _listnode(NULL),
+ _next(NULL)
{
}
@@ -343,8 +343,8 @@ template <typename T>
const T&
List<T>::const_iterator::operator*()
{
- assert(m_listnode != NULL);
- return m_listnode->elem();
+ assert(_listnode != NULL);
+ return _listnode->elem();
}
@@ -352,12 +352,12 @@ template <typename T>
inline typename List<T>::const_iterator&
List<T>::const_iterator::operator++()
{
- assert(m_listnode != NULL);
- m_listnode = m_next;
- if (m_next != NULL)
- m_next = m_next->next();
+ assert(_listnode != NULL);
+ _listnode = _next;
+ if (_next != NULL)
+ _next = _next->next();
else
- m_next = NULL;
+ _next = NULL;
return *this;
}
@@ -367,7 +367,7 @@ template <typename T>
inline bool
List<T>::const_iterator::operator!=(const const_iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -375,7 +375,7 @@ template <typename T>
inline bool
List<T>::const_iterator::operator!=(const iterator& iter) const
{
- return (m_listnode != iter.m_listnode);
+ return (_listnode != iter._listnode);
}
@@ -384,11 +384,11 @@ inline typename List<T>::const_iterator
List<T>::begin() const
{
typename List<T>::const_iterator iter(this);
- iter.m_listnode = m_head;
- if (m_head != NULL)
- iter.m_next = m_head->next();
+ iter._listnode = _head;
+ if (_head != NULL)
+ iter._next = _head->next();
else
- iter.m_next = NULL;
+ iter._next = NULL;
return iter;
}
@@ -398,10 +398,10 @@ inline typename List<T>::const_iterator
List<T>::end() const
{
/*typename List<T>::const_iterator iter(this);
- iter.m_listnode = NULL;
- iter.m_next = NULL;
+ iter._listnode = NULL;
+ iter._next = NULL;
return iter;*/
- return m_const_end_iter;
+ return _const_end_iter;
}
#endif
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index 73711ab4..69febce8 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -277,7 +277,7 @@ OSCEngineReceiver::error_cb(int num, const char* msg, const char* path)
* \arg \b response-id (integer) </p> \n \n
*/
int
-OSCEngineReceiver::m_ping_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_ping_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
_responder->respond_ok();
return 0;
@@ -294,7 +294,7 @@ OSCEngineReceiver::m_ping_cb(const char* path, const char* types, lo_arg** argv,
* finished processing.</p> \n \n
*/
int
-OSCEngineReceiver::m_ping_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_ping_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
ping();
return 0;
@@ -310,7 +310,7 @@ OSCEngineReceiver::m_ping_slow_cb(const char* path, const char* types, lo_arg**
* 10 messages would never get executed. </p> \n \n
*/
int
-OSCEngineReceiver::m_quit_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_quit_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
quit();
@@ -325,7 +325,7 @@ OSCEngineReceiver::m_quit_cb(const char* path, const char* types, lo_arg** argv,
* want to register a different specific address, use the URL version.
*/
int
-OSCEngineReceiver::m_register_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
lo_address addr = lo_message_get_source(msg);
@@ -343,7 +343,7 @@ OSCEngineReceiver::m_register_client_cb(const char* path, const char* types, lo_
* \arg \b response-id (integer) </p> \n \n
*/
int
-OSCEngineReceiver::m_unregister_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_unregister_client_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
lo_address addr = lo_message_get_source(msg);
@@ -360,7 +360,7 @@ OSCEngineReceiver::m_unregister_client_cb(const char* path, const char* types, l
* \arg \b response-id (integer) </p> \n \n
*/
int
-OSCEngineReceiver::m_load_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_load_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
load_plugins();
return 0;
@@ -375,7 +375,7 @@ OSCEngineReceiver::m_load_plugins_cb(const char* path, const char* types, lo_arg
* anything at all - <em>including respond to your messages!</em> \n \n
*/
int
-OSCEngineReceiver::m_engine_activate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_engine_activate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
QueuedEngineInterface::activate();
return 0;
@@ -387,7 +387,7 @@ OSCEngineReceiver::m_engine_activate_cb(const char* path, const char* types, lo_
* \arg \b response-id (integer) </p> \n \n
*/
int
-OSCEngineReceiver::m_engine_deactivate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_engine_deactivate_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
QueuedEngineInterface::deactivate();
return 0;
@@ -401,7 +401,7 @@ OSCEngineReceiver::m_engine_deactivate_cb(const char* path, const char* types, l
* \arg \b poly (integer) - Patch's (internal) polyphony </p> \n \n
*/
int
-OSCEngineReceiver::m_create_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
const int poly = argv[2]->i;
@@ -418,7 +418,7 @@ OSCEngineReceiver::m_create_patch_cb(const char* path, const char* types, lo_arg
* \arg \b name - New name for object </p> \n \n
*/
int
-OSCEngineReceiver::m_rename_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_rename_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* object_path = &argv[1]->s;
const char* name = &argv[2]->s;
@@ -434,7 +434,7 @@ OSCEngineReceiver::m_rename_cb(const char* path, const char* types, lo_arg** arg
* \arg \b patch-path - Patch's path
*/
int
-OSCEngineReceiver::m_enable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_enable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -449,7 +449,7 @@ OSCEngineReceiver::m_enable_patch_cb(const char* path, const char* types, lo_arg
* \arg \b patch-path - Patch's path
*/
int
-OSCEngineReceiver::m_disable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_disable_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -464,7 +464,7 @@ OSCEngineReceiver::m_disable_patch_cb(const char* path, const char* types, lo_ar
* \arg \b patch-path - Patch's path
*/
int
-OSCEngineReceiver::m_clear_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -481,7 +481,7 @@ OSCEngineReceiver::m_clear_patch_cb(const char* path, const char* types, lo_arg*
* \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1) </p> \n \n
*/
int
-OSCEngineReceiver::m_create_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const char* data_type = &argv[2]->s;
@@ -499,7 +499,7 @@ OSCEngineReceiver::m_create_port_cb(const char* path, const char* types, lo_arg*
* \arg \b poly (integer-boolean) - Whether node is polyphonic (0 = false, 1 = true) </p> \n \n
*/
int
-OSCEngineReceiver::m_create_node_by_uri_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_node_by_uri_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
const char* plug_uri = &argv[2]->s;
@@ -526,7 +526,7 @@ OSCEngineReceiver::m_create_node_by_uri_cb(const char* path, const char* types,
* </p> \n \n
*/
int
-OSCEngineReceiver::m_create_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_create_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
const char* type = &argv[2]->s;
@@ -545,7 +545,7 @@ OSCEngineReceiver::m_create_node_cb(const char* path, const char* types, lo_arg*
* \arg \b node-path (string) - Full path of the object </p> \n \n
*/
int
-OSCEngineReceiver::m_destroy_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_destroy_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
@@ -561,7 +561,7 @@ OSCEngineReceiver::m_destroy_cb(const char* path, const char* types, lo_arg** ar
* \arg \b dst-port-path (string) - Full path of destination port </p> \n \n
*/
int
-OSCEngineReceiver::m_connect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_connect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[1]->s;
const char* dst_port_path = &argv[2]->s;
@@ -578,7 +578,7 @@ OSCEngineReceiver::m_connect_cb(const char* path, const char* types, lo_arg** ar
* \arg \b dst-port-path (string) - Full path of destination port </p> \n \n
*/
int
-OSCEngineReceiver::m_disconnect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_disconnect_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[1]->s;
const char* dst_port_path = &argv[2]->s;
@@ -594,7 +594,7 @@ OSCEngineReceiver::m_disconnect_cb(const char* path, const char* types, lo_arg**
* \arg \b node-path (string) - Full path of node. </p> \n \n
*/
int
-OSCEngineReceiver::m_disconnect_all_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_disconnect_all_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[1]->s;
@@ -610,7 +610,7 @@ OSCEngineReceiver::m_disconnect_all_cb(const char* path, const char* types, lo_a
* \arg \b value (float) - Value to set port to
*/
int
-OSCEngineReceiver::m_set_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const float value = argv[2]->f;
@@ -628,7 +628,7 @@ OSCEngineReceiver::m_set_port_value_cb(const char* path, const char* types, lo_a
* \arg \b value (float) - Value to set port to
*/
int
-OSCEngineReceiver::m_set_port_value_voice_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_port_value_voice_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const int voice = argv[2]->i;
@@ -650,7 +650,7 @@ OSCEngineReceiver::m_set_port_value_voice_cb(const char* path, const char* types
* slow event and arrive out of order). </p> \n \n
*/
int
-OSCEngineReceiver::m_set_port_value_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_port_value_slow_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
const float value = argv[2]->f;
@@ -668,7 +668,7 @@ OSCEngineReceiver::m_set_port_value_slow_cb(const char* path, const char* types,
* \arg \b velocity (int) - MIDI style velocity (0-127)</p> \n \n
*/
int
-OSCEngineReceiver::m_note_on_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_note_on_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
@@ -689,7 +689,7 @@ OSCEngineReceiver::m_note_on_cb(const char* path, const char* types, lo_arg** ar
* \arg \b note-num (int) - MIDI style note number (0-127)</p> \n \n
*/
int
-OSCEngineReceiver::m_note_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_note_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
@@ -708,7 +708,7 @@ OSCEngineReceiver::m_note_off_cb(const char* path, const char* types, lo_arg** a
* \arg \b patch-path (string) - Patch of patch to send event to </p> \n \n
*/
int
-OSCEngineReceiver::m_all_notes_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_all_notes_off_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
@@ -731,7 +731,7 @@ OSCEngineReceiver::m_all_notes_off_cb(const char* path, const char* types, lo_ar
* method will go away completely. </p> \n \n
*/
int
-OSCEngineReceiver::m_midi_learn_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_midi_learn_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* patch_path = &argv[1]->s;
@@ -747,7 +747,7 @@ OSCEngineReceiver::m_midi_learn_cb(const char* path, const char* types, lo_arg**
* \arg \b response-id (integer)
*/
int
-OSCEngineReceiver::m_lash_restore_done_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_lash_restore_done_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
lash_restore_done();
return 0;
@@ -763,7 +763,7 @@ OSCEngineReceiver::m_lash_restore_done_cb(const char* path, const char* types, l
* \arg \b value (string) - Value of new piece of metadata
*/
int
-OSCEngineReceiver::m_metadata_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_metadata_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 4 || types[0] != 'i' || types[1] != 's' || types[2] != 's')
return 1;
@@ -788,7 +788,7 @@ OSCEngineReceiver::m_metadata_set_cb(const char* path, const char* types, lo_arg
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::m_metadata_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_metadata_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/*
const char* node_path = &argv[1]->s;
@@ -814,7 +814,7 @@ OSCEngineReceiver::m_metadata_get_cb(const char* path, const char* types, lo_arg
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::m_request_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* uri = &argv[1]->s;
@@ -832,7 +832,7 @@ OSCEngineReceiver::m_request_plugin_cb(const char* path, const char* types, lo_a
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::m_request_object_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_object_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* object_path = &argv[1]->s;
@@ -850,7 +850,7 @@ OSCEngineReceiver::m_request_object_cb(const char* path, const char* types, lo_a
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::m_request_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_port_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[1]->s;
@@ -866,7 +866,7 @@ OSCEngineReceiver::m_request_port_value_cb(const char* path, const char* types,
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::m_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
request_plugins();
return 0;
@@ -880,7 +880,7 @@ OSCEngineReceiver::m_request_plugins_cb(const char* path, const char* types, lo_
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::m_request_all_objects_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_all_objects_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
request_all_objects();
return 0;
@@ -889,7 +889,7 @@ OSCEngineReceiver::m_request_all_objects_cb(const char* path, const char* types,
#ifdef HAVE_DSSI
int
-OSCEngineReceiver::m_dssi_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_dssi_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
#if 0
string node_path(path);
diff --git a/src/libs/engine/OSCEngineReceiver.h b/src/libs/engine/OSCEngineReceiver.h
index b15ffe78..1df4c7b6 100644
--- a/src/libs/engine/OSCEngineReceiver.h
+++ b/src/libs/engine/OSCEngineReceiver.h
@@ -39,9 +39,9 @@ class Patch;
* 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* myself)\
-{ return ((OSCEngineReceiver*)myself)->m_##name##_cb(path, types, argv, argc, msg); }
+{ return ((OSCEngineReceiver*)myself)->_##name##_cb(path, types, argv, argc, msg); }
/* FIXME: Make this receive and preprocess in the same thread? */
diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp
index 87005d1f..48864bf7 100644
--- a/src/libs/engine/ObjectStore.cpp
+++ b/src/libs/engine/ObjectStore.cpp
@@ -60,7 +60,7 @@ ObjectStore::find_port(const Path& path)
GraphObject*
ObjectStore::find(const Path& path)
{
- return m_objects.find(path);
+ return _objects.find(path);
}
@@ -70,7 +70,7 @@ void
ObjectStore::add(GraphObject* o)
{
cerr << "[ObjectStore] Adding " << o->path() << endl;
- m_objects.insert(new TreeNode<GraphObject*>(o->path(), o));
+ _objects.insert(new TreeNode<GraphObject*>(o->path(), o));
}
@@ -80,7 +80,7 @@ void
ObjectStore::add(TreeNode<GraphObject*>* tn)
{
cerr << "[ObjectStore] Adding " << tn->key() << endl;
- m_objects.insert(tn);
+ _objects.insert(tn);
}
@@ -93,7 +93,7 @@ ObjectStore::add(TreeNode<GraphObject*>* tn)
TreeNode<GraphObject*>*
ObjectStore::remove(const string& path)
{
- TreeNode<GraphObject*>* const removed = m_objects.remove(path);
+ TreeNode<GraphObject*>* const removed = _objects.remove(path);
if (removed == NULL)
cerr << "[ObjectStore] WARNING: Removing " << path << " failed." << endl;
diff --git a/src/libs/engine/ObjectStore.h b/src/libs/engine/ObjectStore.h
index 014d156c..2d3c225c 100644
--- a/src/libs/engine/ObjectStore.h
+++ b/src/libs/engine/ObjectStore.h
@@ -51,10 +51,10 @@ public:
void add(TreeNode<GraphObject*>* o);
TreeNode<GraphObject*>* remove(const string& key);
- const Tree<GraphObject*>& objects() { return m_objects; }
+ const Tree<GraphObject*>& objects() { return _objects; }
private:
- Tree<GraphObject*> m_objects;
+ Tree<GraphObject*> _objects;
};
diff --git a/src/libs/engine/PluginLibrary.h b/src/libs/engine/PluginLibrary.h
index 6f79ee57..dc4cbfeb 100644
--- a/src/libs/engine/PluginLibrary.h
+++ b/src/libs/engine/PluginLibrary.h
@@ -43,7 +43,7 @@ public:
* successfully dlopen'ed.
*/
PluginLibrary(const string& path)
- : m_path(path), m_handle(NULL)
+ : _path(path), _handle(NULL)
{}
~PluginLibrary()
@@ -59,12 +59,12 @@ public:
*/
void open()
{
- if (m_handle == NULL) {
+ if (_handle == NULL) {
dlerror();
- m_handle = dlopen(m_path.c_str(), RTLD_NOW);
- if (m_handle == NULL)
+ _handle = dlopen(_path.c_str(), RTLD_NOW);
+ if (_handle == NULL)
cerr << "[PluginLibrary] Warning: Error opening shared library "
- << m_path << "(" << dlerror() << ")" << endl;
+ << _path << "(" << dlerror() << ")" << endl;
}
}
@@ -74,20 +74,20 @@ public:
*/
void close()
{
- if (m_handle != NULL) {
+ if (_handle != NULL) {
dlerror();
- if (dlclose(m_handle))
- cerr << "[PluginLibrary] Error closing shared library " << m_path
+ if (dlclose(_handle))
+ cerr << "[PluginLibrary] Error closing shared library " << _path
<< "(" << dlerror() << ")" << endl;
}
- m_handle = NULL;
+ _handle = NULL;
}
- void* handle() const { return m_handle; }
+ void* handle() const { return _handle; }
private:
- string m_path;
- void* m_handle;
+ string _path;
+ void* _handle;
};
diff --git a/src/libs/engine/TransportNode.cpp b/src/libs/engine/TransportNode.cpp
index caab50d2..e0e89f6d 100644
--- a/src/libs/engine/TransportNode.cpp
+++ b/src/libs/engine/TransportNode.cpp
@@ -121,12 +121,12 @@ TransportNode::process(SampleCount nframes, FrameTime start, FrameTime end)
}
- ((OutputPort<Sample>*)m_ports.at(0))->buffer(0)->set(spb, 0, 0);
- ((OutputPort<Sample>*)m_ports.at(1))->buffer(0)->set(bpb, 0, 0);
+ ((OutputPort<Sample>*)_ports.at(0))->buffer(0)->set(spb, 0, 0);
+ ((OutputPort<Sample>*)_ports.at(1))->buffer(0)->set(bpb, 0, 0);
// fill the trigger buffers with zeros
- ((OutputPort<Sample>*)m_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1);
- ((OutputPort<Sample>*)m_ports.at(3))->buffer(0)->set(0.0f, 0, nframes - 1);
+ ((OutputPort<Sample>*)_ports.at(2))->buffer(0)->set(0.0f, 0, nframes - 1);
+ ((OutputPort<Sample>*)_ports.at(3))->buffer(0)->set(0.0f, 0, nframes - 1);
// if the transport is rolling, add triggers at the right frame positions
if ((position->valid & JackTransportBBT) && (state == JackTransportRolling)) {
@@ -138,9 +138,9 @@ TransportNode::process(SampleCount nframes, FrameTime start, FrameTime end)
--first_beat_no;
}
for ( ; first_beat < nframes; first_beat += frames_per_beat) {
- ((OutputPort<Sample>*)m_ports.at(2))->buffer(0)->set(1.0f, size_t(first_beat));
+ ((OutputPort<Sample>*)_ports.at(2))->buffer(0)->set(1.0f, size_t(first_beat));
if (first_beat_no % int(bpb) == 0) {
- ((OutputPort<Sample>*)m_ports.at(3))->buffer(0)->set(1.0f, size_t(first_beat));
+ ((OutputPort<Sample>*)_ports.at(3))->buffer(0)->set(1.0f, size_t(first_beat));
++first_beat_no;
}
}
diff --git a/src/libs/engine/Tree.h b/src/libs/engine/Tree.h
index 8750b717..605e6b3d 100644
--- a/src/libs/engine/Tree.h
+++ b/src/libs/engine/Tree.h
@@ -33,44 +33,44 @@ class TreeNode : public MaidObject
{
public:
TreeNode(const string& key)
- : m_parent(NULL), m_left_child(NULL), m_right_child(NULL),
- m_key(key), m_node(NULL) {}
+ : _parent(NULL), _left_child(NULL), _right_child(NULL),
+ _key(key), _node(NULL) {}
TreeNode(const string& key, T n)
- : m_parent(NULL), m_left_child(NULL), m_right_child(NULL),
- m_key(key), m_node(n) {}
+ : _parent(NULL), _left_child(NULL), _right_child(NULL),
+ _key(key), _node(n) {}
~TreeNode() {
- assert(m_parent == NULL || m_parent->left_child() != this);
- assert(m_parent == NULL || m_parent->right_child() != this);
- assert(m_left_child == NULL || m_left_child->parent() != this);
- assert(m_right_child == NULL || m_right_child->parent() != this);
- m_parent = m_left_child = m_right_child = NULL;
+ assert(_parent == NULL || _parent->left_child() != this);
+ assert(_parent == NULL || _parent->right_child() != this);
+ assert(_left_child == NULL || _left_child->parent() != this);
+ assert(_right_child == NULL || _right_child->parent() != this);
+ _parent = _left_child = _right_child = NULL;
}
- string key() const { return m_key; }
- void key(const string& key) { m_key = key; }
- TreeNode<T>* parent() const { return m_parent; }
- void parent(TreeNode<T>* n) { m_parent = n; }
- TreeNode<T>* left_child() const { return m_left_child; }
- void left_child(TreeNode<T>* n) { m_left_child = n; }
- TreeNode<T>* right_child() const { return m_right_child; }
- void right_child(TreeNode<T>* n) { m_right_child = n; }
+ string key() const { return _key; }
+ void key(const string& key) { _key = key; }
+ TreeNode<T>* parent() const { return _parent; }
+ void parent(TreeNode<T>* n) { _parent = n; }
+ TreeNode<T>* left_child() const { return _left_child; }
+ void left_child(TreeNode<T>* n) { _left_child = n; }
+ TreeNode<T>* right_child() const { return _right_child; }
+ void right_child(TreeNode<T>* n) { _right_child = n; }
- bool is_leaf() { return (m_left_child == NULL && m_right_child == NULL); }
- bool is_left_child() { return (m_parent != NULL && m_parent->left_child() == this); }
- bool is_right_child() { return (m_parent != NULL && m_parent->right_child() == this); }
+ bool is_leaf() { return (_left_child == NULL && _right_child == NULL); }
+ bool is_left_child() { return (_parent != NULL && _parent->left_child() == this); }
+ bool is_right_child() { return (_parent != NULL && _parent->right_child() == this); }
- T node() { return m_node; }
+ T node() { return _node; }
friend class Tree<T>;
protected:
- TreeNode<T>* m_parent;
- TreeNode<T>* m_left_child;
- TreeNode<T>* m_right_child;
- string m_key;
- T m_node;
+ TreeNode<T>* _parent;
+ TreeNode<T>* _left_child;
+ TreeNode<T>* _right_child;
+ string _key;
+ T _node;
};
@@ -92,7 +92,7 @@ template <typename T>
class Tree : boost::noncopyable
{
public:
- Tree() : m_root(0), m_size(0) {}
+ Tree() : _root(0), _size(0) {}
~Tree();
void insert(TreeNode<T>* const n);
@@ -100,7 +100,7 @@ public:
T find(const string& key) const;
TreeNode<T>* find_treenode(const string& key) const;
- size_t size() const { return m_size; }
+ size_t size() const { return _size; }
/** NON realtime safe iterator for a Tree<T>. */
class iterator
@@ -119,23 +119,23 @@ public:
iterator& operator=(const iterator& copy);
private:
- int m_depth;
- size_t m_size;
- TreeNode<T>** m_stack;
- const Tree<T>* m_tree;
+ int _depth;
+ size_t _size;
+ TreeNode<T>** _stack;
+ const Tree<T>* _tree;
};
iterator begin() const;
iterator end() const;
private:
- void m_set_all_traversed_recursive(TreeNode<T>* root, bool b);
+ void _set_all_traversed_recursive(TreeNode<T>* root, bool b);
- TreeNode<T>* m_find_smallest(TreeNode<T>* root);
- TreeNode<T>* m_find_largest(TreeNode<T>* root);
+ TreeNode<T>* _find_smallest(TreeNode<T>* root);
+ TreeNode<T>* _find_largest(TreeNode<T>* root);
- TreeNode<T>* m_root;
- size_t m_size;
+ TreeNode<T>* _root;
+ size_t _size;
};
diff --git a/src/libs/engine/TreeImplementation.h b/src/libs/engine/TreeImplementation.h
index b00da7f2..1e30e5f7 100644
--- a/src/libs/engine/TreeImplementation.h
+++ b/src/libs/engine/TreeImplementation.h
@@ -51,12 +51,12 @@ Tree<T>::insert(TreeNode<T>* const n)
assert(n->key().length() > 0);
assert(find_treenode(n->key()) == NULL);
- if (m_root == NULL) {
- m_root = n;
+ if (_root == NULL) {
+ _root = n;
} else {
bool left = false; // which child to insert at
bool right = false;
- TreeNode<T>* i = m_root;
+ TreeNode<T>* i = _root;
while (true) {
assert(i != NULL);
if (n->key() <= i->key()) {
@@ -89,7 +89,7 @@ Tree<T>::insert(TreeNode<T>* const n)
}
n->parent(i);
}
- ++m_size;
+ ++_size;
}
@@ -113,7 +113,7 @@ Tree<T>::remove(const string& key)
return NULL;
// Node is not even in tree
- if (node->parent() == NULL && m_root != node)
+ if (node->parent() == NULL && _root != node)
return NULL;
// FIXME: What if the node is in a different tree? Check for this?
@@ -124,19 +124,19 @@ Tree<T>::remove(const string& key)
// n has two children
if (n->left_child() != NULL && n->right_child() != NULL) {
if (rand()%2)
- swap = m_find_largest(n->left_child());
+ swap = _find_largest(n->left_child());
else
- swap = m_find_smallest(n->right_child());
+ swap = _find_smallest(n->right_child());
// Swap node's elements
- temp_node = swap->m_node;
- swap->m_node = n->m_node;
- n->m_node = temp_node;
+ temp_node = swap->_node;
+ swap->_node = n->_node;
+ n->_node = temp_node;
// Swap node's keys
- temp_key = swap->m_key;
- swap->m_key = n->m_key;
- n->m_key = temp_key;
+ temp_key = swap->_key;
+ swap->_key = n->_key;
+ n->_key = temp_key;
n = swap;
assert(n != NULL);
@@ -154,7 +154,7 @@ Tree<T>::remove(const string& key)
else if (n->is_right_child())
n->parent()->right_child(NULL);
- if (m_root == n) m_root = NULL;
+ if (_root == n) _root = NULL;
} else { // has a single child
TreeNode<T>* child = NULL;
if (n->left_child() != NULL)
@@ -179,7 +179,7 @@ Tree<T>::remove(const string& key)
} else {
child->parent(NULL);
}
- if (m_root == n) m_root = child;
+ if (_root == n) _root = child;
}
// Be sure node is cut off completely
@@ -188,15 +188,15 @@ Tree<T>::remove(const string& key)
assert(n->parent() == NULL || n->parent()->right_child() != n);
assert(n->left_child() == NULL || n->left_child()->parent() != n);
assert(n->right_child() == NULL || n->right_child()->parent() != n);
- assert(m_root != n);
+ assert(_root != n);
n->parent(NULL);
n->left_child(NULL);
n->right_child(NULL);
- --m_size;
+ --_size;
- if (m_size == 0) m_root = NULL;
+ if (_size == 0) _root = NULL;
// Be sure right node is being removed
assert(n->node() == remove_node);
@@ -219,7 +219,7 @@ template<typename T>
TreeNode<T>*
Tree<T>::find_treenode(const string& name) const
{
- TreeNode<T>* i = m_root;
+ TreeNode<T>* i = _root;
int cmp = 0;
while (i != NULL) {
@@ -239,16 +239,16 @@ Tree<T>::find_treenode(const string& name) const
/// Private ///
template<typename T>
void
-Tree<T>::m_set_all_traversed_recursive(TreeNode<T>* root, bool b)
+Tree<T>::_set_all_traversed_recursive(TreeNode<T>* root, bool b)
{
assert(root != NULL);
// Preorder traversal
root->node()->traversed(b);
if (root->left_child() != NULL)
- m_set_all_traversed_recursive(root->left_child(), b);
+ _set_all_traversed_recursive(root->left_child(), b);
if (root->right_child() != NULL)
- m_set_all_traversed_recursive(root->right_child(), b);
+ _set_all_traversed_recursive(root->right_child(), b);
}
@@ -256,7 +256,7 @@ Tree<T>::m_set_all_traversed_recursive(TreeNode<T>* root, bool b)
*/
template<typename T>
TreeNode<T>*
-Tree<T>::m_find_smallest(TreeNode<T>* root)
+Tree<T>::_find_smallest(TreeNode<T>* root)
{
TreeNode<T>* r = root;
@@ -271,7 +271,7 @@ Tree<T>::m_find_smallest(TreeNode<T>* root)
*/
template<typename T>
TreeNode<T>*
-Tree<T>::m_find_largest(TreeNode<T>* root)
+Tree<T>::_find_largest(TreeNode<T>* root)
{
TreeNode<T>* r = root;
@@ -290,20 +290,20 @@ Tree<T>::m_find_largest(TreeNode<T>* root)
template<typename T>
Tree<T>::iterator::iterator(const Tree *tree, size_t size)
-: m_depth(-1),
- m_size(size),
- m_stack(NULL),
- m_tree(tree)
+: _depth(-1),
+ _size(size),
+ _stack(NULL),
+ _tree(tree)
{
if (size > 0)
- m_stack = new TreeNode<T>*[size];
+ _stack = new TreeNode<T>*[size];
}
template<typename T>
Tree<T>::iterator::~iterator()
{
- delete[] m_stack;
+ delete[] _stack;
}
@@ -314,13 +314,13 @@ Tree<T>::iterator::~iterator()
// Copy constructor (for the typical for loop usage)
template<typename T>
Tree<T>::iterator::iterator(const Tree<T>::iterator& copy)
-: m_depth(copy.m_depth),
- m_size(copy.m_size),
- m_tree(copy.m_tree)
+: _depth(copy._depth),
+ _size(copy._size),
+ _tree(copy._tree)
{
- if (m_size > 0) {
- m_stack = new TreeNode<T>*[m_size];
- memcpy(m_stack, copy.m_stack, m_size * sizeof(TreeNode<T>*));
+ if (_size > 0) {
+ _stack = new TreeNode<T>*[_size];
+ memcpy(_stack, copy._stack, _size * sizeof(TreeNode<T>*));
}
}
@@ -329,13 +329,13 @@ Tree<T>::iterator::iterator(const Tree<T>::iterator& copy)
template<typename T>
typename Tree<T>::iterator&
Tree<T>::iterator::operator=(const Tree<T>::iterator& copy) {
- m_depth = copy.m_depth;
- m_size = copy.m_size;
- m_tree = copy.m_tree;
+ _depth = copy._depth;
+ _size = copy._size;
+ _tree = copy._tree;
- if (m_size > 0) {
- m_stack = new TreeNode<T>*[m_size];
- memcpy(m_stack, copy.m_stack, m_size * sizeof(TreeNode<T>*));
+ if (_size > 0) {
+ _stack = new TreeNode<T>*[_size];
+ memcpy(_stack, copy._stack, _size * sizeof(TreeNode<T>*));
}
return *this;
}
@@ -345,8 +345,8 @@ template<typename T>
T
Tree<T>::iterator::operator*() const
{
- assert(m_depth >= 0);
- return m_stack[m_depth]->node();
+ assert(_depth >= 0);
+ return _stack[_depth]->node();
}
@@ -354,15 +354,15 @@ template<typename T>
typename Tree<T>::iterator&
Tree<T>::iterator::operator++()
{
- assert(m_depth >= 0);
+ assert(_depth >= 0);
- TreeNode<T>* tn = m_stack[m_depth];
- --m_depth;
+ TreeNode<T>* tn = _stack[_depth];
+ --_depth;
tn = tn->right_child();
while (tn != NULL) {
- ++m_depth;
- m_stack[m_depth] = tn;
+ ++_depth;
+ _stack[_depth] = tn;
tn = tn->left_child();
}
@@ -375,7 +375,7 @@ bool
Tree<T>::iterator::operator!=(const Tree<T>::iterator& iter) const
{
// (DeMorgan's Law)
- return (m_tree != iter.m_tree || m_depth != iter.m_depth);
+ return (_tree != iter._tree || _depth != iter._depth);
}
@@ -383,13 +383,13 @@ template<typename T>
typename Tree<T>::iterator
Tree<T>::begin() const
{
- typename Tree<T>::iterator iter(this, m_size);
- iter.m_depth = -1;
+ typename Tree<T>::iterator iter(this, _size);
+ iter._depth = -1;
- TreeNode<T> *ptr = m_root;
+ TreeNode<T> *ptr = _root;
while (ptr != NULL) {
- iter.m_depth++;
- iter.m_stack[iter.m_depth] = ptr;
+ iter._depth++;
+ iter._stack[iter._depth] = ptr;
ptr = ptr->left_child();
}
@@ -402,7 +402,7 @@ typename Tree<T>::iterator
Tree<T>::end() const
{
typename Tree<T>::iterator iter(this, 0);
- iter.m_depth = -1;
+ iter._depth = -1;
return iter;
}
diff --git a/src/libs/engine/TypedConnection.cpp b/src/libs/engine/TypedConnection.cpp
index d4391fab..e85e3cf3 100644
--- a/src/libs/engine/TypedConnection.cpp
+++ b/src/libs/engine/TypedConnection.cpp
@@ -32,21 +32,21 @@ namespace Ingen {
template <typename T>
TypedConnection<T>::TypedConnection(OutputPort<T>* const src_port, InputPort<T>* const dst_port)
: Connection(src_port, dst_port),
- m_local_buffer(NULL),
- m_must_mix(true),
- m_buffer_size(src_port->buffer_size()),
- m_pending_disconnection(false)
+ _local_buffer(NULL),
+ _must_mix(true),
+ _buffer_size(src_port->buffer_size()),
+ _pending_disconnection(false)
{
assert((src_port->parent_node()->poly() == dst_port->parent_node()->poly())
|| (src_port->parent_node()->poly() == 1 || dst_port->parent_node()->poly() == 1));
if (src_port->poly() == dst_port->poly())
- m_must_mix = false;
+ _must_mix = false;
else // Poly -> Mono connection, need a buffer to mix into
- m_local_buffer = new Buffer<T>(m_buffer_size);
+ _local_buffer = new Buffer<T>(_buffer_size);
//cerr << "Connection " << src_port->path() << " -> " << dst_port->path()
- // << "\t mixing: " << m_must_mix << endl;
+ // << "\t mixing: " << _must_mix << endl;
}
template TypedConnection<Sample>::TypedConnection(OutputPort<Sample>* const src_port, InputPort<Sample>* const dst_port);
template TypedConnection<MidiMessage>::TypedConnection(OutputPort<MidiMessage>* const src_port, InputPort<MidiMessage>* const dst_port);
@@ -55,7 +55,7 @@ template TypedConnection<MidiMessage>::TypedConnection(OutputPort<MidiMessage>*
template <typename T>
TypedConnection<T>::~TypedConnection()
{
- delete m_local_buffer;
+ delete _local_buffer;
}
template TypedConnection<Sample>::~TypedConnection();
template TypedConnection<MidiMessage>::~TypedConnection();
@@ -66,14 +66,14 @@ template <typename T>
void
TypedConnection<T>::set_buffer_size(size_t size)
{
- if (m_must_mix) {
- assert(m_local_buffer);
- delete m_local_buffer;
+ if (_must_mix) {
+ assert(_local_buffer);
+ delete _local_buffer;
- m_local_buffer = new Buffer<T>(size);
+ _local_buffer = new Buffer<T>(size);
}
- m_buffer_size = size;
+ _buffer_size = size;
}
@@ -82,7 +82,7 @@ void
TypedConnection<Sample>::process(SampleCount nframes, FrameTime start, FrameTime end)
{
// FIXME: nframes parameter not used
- assert(m_buffer_size == 1 || m_buffer_size == nframes);
+ assert(_buffer_size == 1 || _buffer_size == nframes);
/* Thought: A poly output port can be connected to multiple mono input
* ports, which means this mix down would have to happen many times.
@@ -91,20 +91,20 @@ TypedConnection<Sample>::process(SampleCount nframes, FrameTime start, FrameTime
* would avoid having to mix multiple times. Probably not a very common
* case, but it would be faster anyway. */
- if (m_must_mix) {
+ if (_must_mix) {
//cerr << "Mixing " << src_port()->buffer(0)->data()
- // << " -> " << m_local_buffer->data() << endl;
+ // << " -> " << _local_buffer->data() << endl;
- m_local_buffer->copy(src_port()->buffer(0), 0, m_buffer_size-1);
+ _local_buffer->copy(src_port()->buffer(0), 0, _buffer_size-1);
// Mix all the source's voices down into local buffer starting at the second
// voice (buffer is already set to first voice above)
for (size_t j=1; j < src_port()->poly(); ++j)
- m_local_buffer->accumulate(src_port()->buffer(j), 0, m_buffer_size-1);
+ _local_buffer->accumulate(src_port()->buffer(j), 0, _buffer_size-1);
// Scale the buffer down.
if (src_port()->poly() > 1)
- m_local_buffer->scale(1.0f/(float)src_port()->poly(), 0, m_buffer_size-1);
+ _local_buffer->scale(1.0f/(float)src_port()->poly(), 0, _buffer_size-1);
}
}
template void TypedConnection<Sample>::process(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/TypedConnection.h b/src/libs/engine/TypedConnection.h
index c6b0b0cf..7e28697d 100644
--- a/src/libs/engine/TypedConnection.h
+++ b/src/libs/engine/TypedConnection.h
@@ -41,12 +41,12 @@ public:
void process(SampleCount nframes, FrameTime start, FrameTime end);
- inline OutputPort<T>* src_port() const { return dynamic_cast<OutputPort<T>*>(m_src_port); }
- inline InputPort<T>* dst_port() const { return dynamic_cast<InputPort<T>*>(m_dst_port); }
+ inline OutputPort<T>* src_port() const { return dynamic_cast<OutputPort<T>*>(_src_port); }
+ inline InputPort<T>* dst_port() const { return dynamic_cast<InputPort<T>*>(_dst_port); }
/** Used by some (recursive) events to prevent double disconnections */
- bool pending_disconnection() { return m_pending_disconnection; }
- void pending_disconnection(bool b) { m_pending_disconnection = b; }
+ bool pending_disconnection() { return _pending_disconnection; }
+ void pending_disconnection(bool b) { _pending_disconnection = b; }
/** Get the buffer for a particular voice.
* A TypedConnection is smart - it knows the destination port respondering the
@@ -58,10 +58,10 @@ public:
void set_buffer_size(size_t size);
private:
- Buffer<T>* m_local_buffer; ///< Only used for poly->mono connections
- bool m_must_mix;
- size_t m_buffer_size;
- bool m_pending_disconnection;
+ Buffer<T>* _local_buffer; ///< Only used for poly->mono connections
+ bool _must_mix;
+ size_t _buffer_size;
+ bool _pending_disconnection;
};
@@ -69,10 +69,10 @@ template <>
inline Buffer<Sample>*
TypedConnection<Sample>::buffer(size_t voice) const
{
- TypedPort<Sample>* const src_port = (TypedPort<Sample>*)m_src_port;
+ TypedPort<Sample>* const src_port = (TypedPort<Sample>*)_src_port;
- if (m_must_mix) {
- return m_local_buffer;
+ if (_must_mix) {
+ return _local_buffer;
} else {
if (src_port->poly() == 1)
return src_port->buffer(0);
@@ -87,10 +87,10 @@ inline Buffer<MidiMessage>*
TypedConnection<MidiMessage>::buffer(size_t voice) const
{
// No such thing as polyphonic MIDI ports
- assert(m_src_port->poly() == 1);
- assert(m_dst_port->poly() == 1);
+ assert(_src_port->poly() == 1);
+ assert(_dst_port->poly() == 1);
- TypedPort<MidiMessage>* const src_port = (TypedPort<MidiMessage>*)m_src_port;
+ TypedPort<MidiMessage>* const src_port = (TypedPort<MidiMessage>*)_src_port;
return src_port->buffer(0);
}
diff --git a/src/libs/engine/TypedPort.cpp b/src/libs/engine/TypedPort.cpp
index d2825b17..895bb525 100644
--- a/src/libs/engine/TypedPort.cpp
+++ b/src/libs/engine/TypedPort.cpp
@@ -32,12 +32,12 @@ namespace Ingen {
template <typename T>
TypedPort<T>::TypedPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size)
: Port(parent, name, index, poly, type, buffer_size)
-, m_fixed_buffers(false)
+, _fixed_buffers(false)
{
allocate_buffers();
clear_buffers();
- assert(m_buffers.size() > 0);
+ assert(_buffers.size() > 0);
}
template
TypedPort<Sample>::TypedPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size);
@@ -49,7 +49,7 @@ template <typename T>
TypedPort<T>::~TypedPort()
{
for (size_t i=0; i < _poly; ++i)
- delete m_buffers.at(i);
+ delete _buffers.at(i);
}
template TypedPort<Sample>::~TypedPort();
template TypedPort<MidiMessage>::~TypedPort();
@@ -66,7 +66,7 @@ TypedPort<Sample>::set_value(Sample val, size_t offset)
assert(offset < _buffer_size);
for (size_t v=0; v < _poly; ++v)
- m_buffers.at(v)->set(val, offset);
+ _buffers.at(v)->set(val, offset);
}
/** Set the port's value for a specific voice.
@@ -81,7 +81,7 @@ TypedPort<Sample>::set_value(size_t voice, Sample val, size_t offset)
cerr << path() << " setting voice value " << val << endl;
- m_buffers.at(voice)->set(val, offset);
+ _buffers.at(voice)->set(val, offset);
}
@@ -89,10 +89,10 @@ template <typename T>
void
TypedPort<T>::allocate_buffers()
{
- m_buffers.alloc(_poly);
+ _buffers.alloc(_poly);
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i) = new Buffer<T>(_buffer_size);
+ _buffers.at(i) = new Buffer<T>(_buffer_size);
}
template void TypedPort<Sample>::allocate_buffers();
template void TypedPort<MidiMessage>::allocate_buffers();
@@ -105,7 +105,7 @@ TypedPort<T>::set_buffer_size(size_t size)
_buffer_size = size;
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->resize(size);
+ _buffers.at(i)->resize(size);
connect_buffers();
}
@@ -123,7 +123,7 @@ void
TypedPort<T>::connect_buffers()
{
for (size_t i=0; i < _poly; ++i)
- TypedPort<T>::parent_node()->set_port_buffer(i, _index, m_buffers.at(i)->data());
+ TypedPort<T>::parent_node()->set_port_buffer(i, _index, _buffers.at(i)->data());
}
template void TypedPort<Sample>::connect_buffers();
template void TypedPort<MidiMessage>::connect_buffers();
@@ -134,7 +134,7 @@ void
TypedPort<T>::clear_buffers()
{
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->clear();
+ _buffers.at(i)->clear();
}
template void TypedPort<Sample>::clear_buffers();
template void TypedPort<MidiMessage>::clear_buffers();
@@ -145,7 +145,7 @@ void
TypedPort<T>::process(SampleCount nframes, FrameTime start, FrameTime end)
{
for (size_t i=0; i < _poly; ++i)
- m_buffers.at(i)->prepare(nframes);
+ _buffers.at(i)->prepare(nframes);
}
diff --git a/src/libs/engine/TypedPort.h b/src/libs/engine/TypedPort.h
index 56d6fc51..69daa8e7 100644
--- a/src/libs/engine/TypedPort.h
+++ b/src/libs/engine/TypedPort.h
@@ -47,14 +47,14 @@ public:
void set_value(size_t voice, T val, size_t offset);
void set_value(T val, size_t offset);
- Buffer<T>* buffer(size_t voice) const { return m_buffers.at(voice); }
+ Buffer<T>* buffer(size_t voice) const { return _buffers.at(voice); }
virtual void process(SampleCount nframes, FrameTime start, FrameTime end);
virtual void clear_buffers();
/** Used by drivers to prevent port from changing buffers */
- void fixed_buffers(bool b) { m_fixed_buffers = b; }
- bool fixed_buffers() { return m_fixed_buffers; }
+ void fixed_buffers(bool b) { _fixed_buffers = b; }
+ bool fixed_buffers() { return _fixed_buffers; }
virtual void set_buffer_size(size_t size);
@@ -64,9 +64,9 @@ protected:
void allocate_buffers();
void connect_buffers();
- bool m_fixed_buffers;
+ bool _fixed_buffers;
- Array<Buffer<T>*> m_buffers;
+ Array<Buffer<T>*> _buffers;
};
diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp
index 92214009..b7bc8a66 100644
--- a/src/libs/engine/events/AddNodeEvent.cpp
+++ b/src/libs/engine/events/AddNodeEvent.cpp
@@ -36,13 +36,13 @@ namespace Ingen {
AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
const string& plugin_uri, bool poly)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_plugin_uri(plugin_uri),
- m_poly(poly),
- m_patch(NULL),
- m_node(NULL),
- m_process_order(NULL),
- m_node_already_exists(false)
+ _path(path),
+ _plugin_uri(plugin_uri),
+ _poly(poly),
+ _patch(NULL),
+ _node(NULL),
+ _process_order(NULL),
+ _node_already_exists(false)
{
}
@@ -54,15 +54,15 @@ AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, Sampl
AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
const string& plugin_type, const string& plugin_lib, const string& plugin_label, bool poly)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_plugin_type(plugin_type),
- m_plugin_lib(plugin_lib),
- m_plugin_label(plugin_label),
- m_poly(poly),
- m_patch(NULL),
- m_node(NULL),
- m_process_order(NULL),
- m_node_already_exists(false)
+ _path(path),
+ _plugin_type(plugin_type),
+ _plugin_lib(plugin_lib),
+ _plugin_label(plugin_label),
+ _poly(poly),
+ _patch(NULL),
+ _node(NULL),
+ _process_order(NULL),
+ _node_already_exists(false)
{
}
@@ -70,36 +70,36 @@ AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, Sampl
void
AddNodeEvent::pre_process()
{
- if (_engine.object_store()->find(m_path) != NULL) {
- m_node_already_exists = true;
+ if (_engine.object_store()->find(_path) != NULL) {
+ _node_already_exists = true;
QueuedEvent::pre_process();
return;
}
- m_patch = _engine.object_store()->find_patch(m_path.parent());
+ _patch = _engine.object_store()->find_patch(_path.parent());
- const Plugin* plugin = (m_plugin_uri != "")
- ? _engine.node_factory()->plugin(m_plugin_uri)
- : _engine.node_factory()->plugin(m_plugin_type, m_plugin_lib, m_plugin_label);
+ const Plugin* plugin = (_plugin_uri != "")
+ ? _engine.node_factory()->plugin(_plugin_uri)
+ : _engine.node_factory()->plugin(_plugin_type, _plugin_lib, _plugin_label);
- if (m_patch && plugin) {
- if (m_poly)
- m_node = _engine.node_factory()->load_plugin(plugin, m_path.name(), m_patch->internal_poly(), m_patch);
+ if (_patch && plugin) {
+ if (_poly)
+ _node = _engine.node_factory()->load_plugin(plugin, _path.name(), _patch->internal_poly(), _patch);
else
- m_node = _engine.node_factory()->load_plugin(plugin, m_path.name(), 1, m_patch);
+ _node = _engine.node_factory()->load_plugin(plugin, _path.name(), 1, _patch);
- if (m_node != NULL) {
- m_node->activate();
+ if (_node != NULL) {
+ _node->activate();
// This can be done here because the audio thread doesn't touch the
// node tree - just the process order array
- m_patch->add_node(new ListNode<Node*>(m_node));
- m_node->add_to_store(_engine.object_store());
+ _patch->add_node(new ListNode<Node*>(_node));
+ _node->add_to_store(_engine.object_store());
// FIXME: not really necessary to build process order since it's not connected,
// just append to the list
- if (m_patch->enabled())
- m_process_order = m_patch->build_process_order();
+ if (_patch->enabled())
+ _process_order = _patch->build_process_order();
}
}
QueuedEvent::pre_process();
@@ -111,10 +111,10 @@ AddNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL) {
- if (m_patch->process_order() != NULL)
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(m_process_order);
+ if (_node != NULL) {
+ if (_patch->process_order() != NULL)
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(_process_order);
}
}
@@ -123,20 +123,20 @@ void
AddNodeEvent::post_process()
{
string msg;
- if (m_node_already_exists) {
- msg = string("Could not create node - ").append(m_path);// + " already exists.";
+ if (_node_already_exists) {
+ msg = string("Could not create node - ").append(_path);// + " already exists.";
_responder->respond_error(msg);
- } else if (m_patch == NULL) {
- msg = "Could not find patch '" + m_path.parent() +"' for add_node.";
+ } else if (_patch == NULL) {
+ msg = "Could not find patch '" + _path.parent() +"' for add_node.";
_responder->respond_error(msg);
- } else if (m_node == NULL) {
+ } else if (_node == NULL) {
msg = "Unable to load node ";
- msg.append(m_path).append(" (you're missing the plugin \"").append(
- m_plugin_uri);
+ msg.append(_path).append(" (you're missing the plugin \"").append(
+ _plugin_uri);
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _engine.broadcaster()->send_node(m_node, true); // yes, send ports
+ _engine.broadcaster()->send_node(_node, true); // yes, send ports
}
}
diff --git a/src/libs/engine/events/AddNodeEvent.h b/src/libs/engine/events/AddNodeEvent.h
index b4d7b0ba..23274a23 100644
--- a/src/libs/engine/events/AddNodeEvent.h
+++ b/src/libs/engine/events/AddNodeEvent.h
@@ -61,17 +61,17 @@ public:
void post_process();
private:
- string m_patch_name;
- Path m_path;
- string m_plugin_uri; ///< If nonempty then type, library, label, are ignored
- string m_plugin_type;
- string m_plugin_lib;
- string m_plugin_label;
- bool m_poly;
- Patch* m_patch;
- Node* m_node;
- Array<Node*>* m_process_order; ///< Patch's new process order
- bool m_node_already_exists;
+ string _patch_name;
+ Path _path;
+ string _plugin_uri; ///< If nonempty then type, library, label, are ignored
+ string _plugin_type;
+ string _plugin_lib;
+ string _plugin_label;
+ bool _poly;
+ Patch* _patch;
+ Node* _node;
+ Array<Node*>* _process_order; ///< Patch's new process order
+ bool _node_already_exists;
};
diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp
index c90b1e45..25e647c9 100644
--- a/src/libs/engine/events/AllNotesOffEvent.cpp
+++ b/src/libs/engine/events/AllNotesOffEvent.cpp
@@ -26,7 +26,7 @@ namespace Ingen {
*/
AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Patch* patch)
: Event(engine, responder, timestamp),
- m_patch(patch)
+ _patch(patch)
{
}
@@ -35,8 +35,8 @@ AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responde
*/
AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: Event(engine, responder, timestamp),
- m_patch(NULL),
- m_patch_path(patch_path)
+ _patch(NULL),
+ _patch_path(patch_path)
{
}
@@ -46,11 +46,11 @@ AllNotesOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
Event::execute(nframes, start, end);
- if (m_patch == NULL && m_patch_path != "")
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ if (_patch == NULL && _patch_path != "")
+ _patch = _engine.object_store()->find_patch(_patch_path);
- //if (m_patch != NULL)
- // for (List<MidiInNode*>::iterator j = m_patch->midi_in_nodes().begin(); j != m_patch->midi_in_nodes().end(); ++j)
+ //if (_patch != NULL)
+ // for (List<MidiInNode*>::iterator j = _patch->midi_in_nodes().begin(); j != _patch->midi_in_nodes().end(); ++j)
// (*j)->all_notes_off(offset);
}
@@ -58,7 +58,7 @@ AllNotesOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
AllNotesOffEvent::post_process()
{
- if (m_patch != NULL)
+ if (_patch != NULL)
_responder->respond_ok();
}
diff --git a/src/libs/engine/events/AllNotesOffEvent.h b/src/libs/engine/events/AllNotesOffEvent.h
index 53b8f158..a5264a6f 100644
--- a/src/libs/engine/events/AllNotesOffEvent.h
+++ b/src/libs/engine/events/AllNotesOffEvent.h
@@ -40,8 +40,8 @@ public:
void post_process();
private:
- Patch* m_patch;
- string m_patch_path;
+ Patch* _patch;
+ string _patch_path;
};
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index db2ea54b..2e59ab5a 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -32,9 +32,9 @@ namespace Ingen {
ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path)
: QueuedEvent(engine, responder, time, true, source),
- m_patch_path(patch_path),
- m_patch(NULL),
- m_process(false)
+ _patch_path(patch_path),
+ _patch(NULL),
+ _process(false)
{
}
@@ -42,13 +42,13 @@ ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder,
void
ClearPatchEvent::pre_process()
{
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ _patch = _engine.object_store()->find_patch(_patch_path);
- if (m_patch != NULL) {
+ if (_patch != NULL) {
- m_process = m_patch->enabled();
+ _process = _patch->enabled();
- for (List<Node*>::const_iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i)
+ for (List<Node*>::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
(*i)->remove_from_store();
}
@@ -61,16 +61,16 @@ ClearPatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL) {
- m_patch->disable();
+ if (_patch != NULL) {
+ _patch->disable();
cerr << "FIXME: CLEAR PATCH\n";
- //for (List<Node*>::const_iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i)
+ //for (List<Node*>::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
// (*i)->remove_from_patch();
- if (m_patch->process_order() != NULL) {
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(NULL);
+ if (_patch->process_order() != NULL) {
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(NULL);
}
}
}
@@ -79,34 +79,34 @@ ClearPatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
ClearPatchEvent::post_process()
{
- if (m_patch != NULL) {
+ if (_patch != NULL) {
// Delete all nodes
- for (List<Node*>::iterator i = m_patch->nodes().begin(); i != m_patch->nodes().end(); ++i) {
+ for (List<Node*>::iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i) {
(*i)->deactivate();
delete *i;
}
- m_patch->nodes().clear();
+ _patch->nodes().clear();
// Delete all connections
- for (List<Connection*>::iterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i)
+ for (List<Connection*>::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
delete *i;
- m_patch->connections().clear();
+ _patch->connections().clear();
// Restore patch's run state
- if (m_process)
- m_patch->enable();
+ if (_process)
+ _patch->enable();
else
- m_patch->disable();
+ _patch->disable();
// Make sure everything's sane
- assert(m_patch->nodes().size() == 0);
- assert(m_patch->connections().size() == 0);
+ assert(_patch->nodes().size() == 0);
+ assert(_patch->connections().size() == 0);
// Reply
_responder->respond_ok();
- _engine.broadcaster()->send_patch_cleared(m_patch_path);
+ _engine.broadcaster()->send_patch_cleared(_patch_path);
} else {
- _responder->respond_error(string("Patch ") + m_patch_path + " not found");
+ _responder->respond_error(string("Patch ") + _patch_path + " not found");
}
_source->unblock();
diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h
index 0ed9294b..37f1ab11 100644
--- a/src/libs/engine/events/ClearPatchEvent.h
+++ b/src/libs/engine/events/ClearPatchEvent.h
@@ -42,9 +42,9 @@ public:
void post_process();
private:
- string m_patch_path;
- Patch* m_patch;
- bool m_process;
+ string _patch_path;
+ Patch* _patch;
+ bool _process;
};
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index c54e440f..40e8a660 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -38,86 +38,86 @@ namespace Ingen {
ConnectionEvent::ConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(engine, responder, timestamp),
- m_src_port_path(src_port_path),
- m_dst_port_path(dst_port_path),
- m_patch(NULL),
- m_src_port(NULL),
- m_dst_port(NULL),
- m_typed_event(NULL),
- m_error(NO_ERROR)
+ _src_port_path(src_port_path),
+ _dst_port_path(dst_port_path),
+ _patch(NULL),
+ _src_port(NULL),
+ _dst_port(NULL),
+ _typed_event(NULL),
+ _error(NO_ERROR)
{
}
ConnectionEvent::~ConnectionEvent()
{
- delete m_typed_event;
+ delete _typed_event;
}
void
ConnectionEvent::pre_process()
{
- if (m_src_port_path.parent().parent() != m_dst_port_path.parent().parent()
- && m_src_port_path.parent() != m_dst_port_path.parent().parent()
- && m_src_port_path.parent().parent() != m_dst_port_path.parent()) {
- m_error = PARENT_PATCH_DIFFERENT;
+ if (_src_port_path.parent().parent() != _dst_port_path.parent().parent()
+ && _src_port_path.parent() != _dst_port_path.parent().parent()
+ && _src_port_path.parent().parent() != _dst_port_path.parent()) {
+ _error = PARENT_PATCH_DIFFERENT;
QueuedEvent::pre_process();
return;
}
- /*m_patch = _engine.object_store()->find_patch(m_src_port_path.parent().parent());
+ /*_patch = _engine.object_store()->find_patch(_src_port_path.parent().parent());
- if (m_patch == NULL) {
- m_error = PORT_NOT_FOUND;
+ if (_patch == NULL) {
+ _error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}*/
- m_src_port = _engine.object_store()->find_port(m_src_port_path);
- m_dst_port = _engine.object_store()->find_port(m_dst_port_path);
+ _src_port = _engine.object_store()->find_port(_src_port_path);
+ _dst_port = _engine.object_store()->find_port(_dst_port_path);
- if (m_src_port == NULL || m_dst_port == NULL) {
- m_error = PORT_NOT_FOUND;
+ if (_src_port == NULL || _dst_port == NULL) {
+ _error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
- if (m_src_port->type() != m_dst_port->type() || m_src_port->buffer_size() != m_dst_port->buffer_size()) {
- m_error = TYPE_MISMATCH;
+ if (_src_port->type() != _dst_port->type() || _src_port->buffer_size() != _dst_port->buffer_size()) {
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
/*if (port1->is_output() && port2->is_input()) {
- m_src_port = port1;
- m_dst_port = port2;
+ _src_port = port1;
+ _dst_port = port2;
} else if (port2->is_output() && port1->is_input()) {
- m_src_port = port2;
- m_dst_port = port1;
+ _src_port = port2;
+ _dst_port = port1;
} else {
- m_error = TYPE_MISMATCH;
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}*/
// Create the typed event to actually do the work
- const DataType type = m_src_port->type();
+ const DataType type = _src_port->type();
if (type == DataType::FLOAT) {
- m_typed_event = new TypedConnectionEvent<Sample>(_engine, _responder, _time,
- dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
+ _typed_event = new TypedConnectionEvent<Sample>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<Sample>*>(_src_port), dynamic_cast<InputPort<Sample>*>(_dst_port));
} else if (type == DataType::MIDI) {
- m_typed_event = new TypedConnectionEvent<MidiMessage>(_engine, _responder, _time,
- dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
+ _typed_event = new TypedConnectionEvent<MidiMessage>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<MidiMessage>*>(_src_port), dynamic_cast<InputPort<MidiMessage>*>(_dst_port));
} else {
- m_error = TYPE_MISMATCH;
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
- assert(m_typed_event);
- m_typed_event->pre_process();
- assert(m_typed_event->is_prepared());
+ assert(_typed_event);
+ _typed_event->pre_process();
+ assert(_typed_event->is_prepared());
QueuedEvent::pre_process();
}
@@ -128,20 +128,20 @@ ConnectionEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_error == NO_ERROR)
- m_typed_event->execute(nframes, start, end);
+ if (_error == NO_ERROR)
+ _typed_event->execute(nframes, start, end);
}
void
ConnectionEvent::post_process()
{
- if (m_error == NO_ERROR) {
- m_typed_event->post_process();
+ if (_error == NO_ERROR) {
+ _typed_event->post_process();
} else {
// FIXME: better error messages
string msg = "Unable to make connection ";
- msg.append(m_src_port_path + " -> " + m_dst_port_path);
+ msg.append(_src_port_path + " -> " + _dst_port_path);
_responder->respond_error(msg);
}
}
@@ -154,13 +154,13 @@ ConnectionEvent::post_process()
template <typename T>
TypedConnectionEvent<T>::TypedConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(engine, responder, timestamp),
- m_src_port(src_port),
- m_dst_port(dst_port),
- m_patch(NULL),
- m_process_order(NULL),
- m_connection(NULL),
- m_port_listnode(NULL),
- m_succeeded(true)
+ _src_port(src_port),
+ _dst_port(dst_port),
+ _patch(NULL),
+ _process_order(NULL),
+ _connection(NULL),
+ _port_listnode(NULL),
+ _succeeded(true)
{
assert(src_port != NULL);
assert(dst_port != NULL);
@@ -171,50 +171,50 @@ template <typename T>
void
TypedConnectionEvent<T>::pre_process()
{
- if (m_dst_port->is_connected_to(m_src_port)) {
- m_succeeded = false;
+ if (_dst_port->is_connected_to(_src_port)) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- Node* const src_node = m_src_port->parent_node();
- Node* const dst_node = m_dst_port->parent_node();
+ Node* const src_node = _src_port->parent_node();
+ Node* const dst_node = _dst_port->parent_node();
// Connection to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
if (src_node->parent() == dst_node)
- m_patch = dynamic_cast<Patch*>(dst_node);
+ _patch = dynamic_cast<Patch*>(dst_node);
else
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Connection from a patch input to a patch output (pass through)
} else if (src_node == dst_node && dynamic_cast<Patch*>(src_node)) {
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Normal connection between nodes with the same parent
} else {
- m_patch = src_node->parent_patch();
+ _patch = src_node->parent_patch();
}
- assert(m_patch);
+ assert(_patch);
if (src_node == NULL || dst_node == NULL) {
- m_succeeded = false;
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- if (m_patch != src_node && src_node->parent() != m_patch && dst_node->parent() != m_patch) {
- m_succeeded = false;
+ if (_patch != src_node && src_node->parent() != _patch && dst_node->parent() != _patch) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- m_connection = new TypedConnection<T>(m_src_port, m_dst_port);
- m_port_listnode = new ListNode<TypedConnection<T>*>(m_connection);
- m_patch_listnode = new ListNode<Connection*>(m_connection);
+ _connection = new TypedConnection<T>(_src_port, _dst_port);
+ _port_listnode = new ListNode<TypedConnection<T>*>(_connection);
+ _patch_listnode = new ListNode<Connection*>(_connection);
// Need to be careful about patch port connections here and adding a node's
// parent as a dependant/provider, or adding a patch as it's own provider...
@@ -223,10 +223,10 @@ TypedConnectionEvent<T>::pre_process()
src_node->dependants()->push_back(new ListNode<Node*>(dst_node));
}
- if (m_patch->enabled())
- m_process_order = m_patch->build_process_order();
+ if (_patch->enabled())
+ _process_order = _patch->build_process_order();
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -237,13 +237,13 @@ TypedConnectionEvent<T>::execute(SampleCount nframes, FrameTime start, FrameTime
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
+ if (_succeeded) {
// These must be inserted here, since they're actually used by the audio thread
- m_dst_port->add_connection(m_port_listnode);
- m_patch->add_connection(m_patch_listnode);
- if (m_patch->process_order() != NULL)
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(m_process_order);
+ _dst_port->add_connection(_port_listnode);
+ _patch->add_connection(_patch_listnode);
+ if (_patch->process_order() != NULL)
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(_process_order);
}
}
@@ -252,12 +252,12 @@ template <typename T>
void
TypedConnectionEvent<T>::post_process()
{
- if (m_succeeded) {
- assert(m_connection != NULL);
+ if (_succeeded) {
+ assert(_connection != NULL);
_responder->respond_ok();
- _engine.broadcaster()->send_connection(m_connection);
+ _engine.broadcaster()->send_connection(_connection);
} else {
_responder->respond_error("Unable to make connection.");
}
diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h
index 6e4f11b4..0b55994b 100644
--- a/src/libs/engine/events/ConnectionEvent.h
+++ b/src/libs/engine/events/ConnectionEvent.h
@@ -57,16 +57,16 @@ private:
enum ErrorType { NO_ERROR, PARENT_PATCH_DIFFERENT, PORT_NOT_FOUND, TYPE_MISMATCH };
- Raul::Path m_src_port_path;
- Raul::Path m_dst_port_path;
+ Raul::Path _src_port_path;
+ Raul::Path _dst_port_path;
- Patch* m_patch;
- Port* m_src_port;
- Port* m_dst_port;
+ Patch* _patch;
+ Port* _src_port;
+ Port* _dst_port;
- QueuedEvent* m_typed_event;
+ QueuedEvent* _typed_event;
- ErrorType m_error;
+ ErrorType _error;
};
@@ -87,16 +87,16 @@ public:
void post_process();
private:
- OutputPort<T>* m_src_port;
- InputPort<T>* m_dst_port;
-
- Patch* m_patch;
- Array<Node*>* m_process_order; ///< New process order for Patch
- TypedConnection<T>* m_connection;
- ListNode<Connection*>* m_patch_listnode;
- ListNode<TypedConnection<T>*>* m_port_listnode;
+ OutputPort<T>* _src_port;
+ InputPort<T>* _dst_port;
+
+ Patch* _patch;
+ Array<Node*>* _process_order; ///< New process order for Patch
+ TypedConnection<T>* _connection;
+ ListNode<Connection*>* _patch_listnode;
+ ListNode<TypedConnection<T>*>* _port_listnode;
- bool m_succeeded;
+ bool _succeeded;
};
diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp
index 73813dbb..14fb6693 100644
--- a/src/libs/engine/events/CreatePatchEvent.cpp
+++ b/src/libs/engine/events/CreatePatchEvent.cpp
@@ -32,12 +32,12 @@ namespace Ingen {
CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_patch(NULL),
- m_parent(NULL),
- m_process_order(NULL),
- m_poly(poly),
- m_error(NO_ERROR)
+ _path(path),
+ _patch(NULL),
+ _parent(NULL),
+ _process_order(NULL),
+ _poly(poly),
+ _error(NO_ERROR)
{
}
@@ -45,42 +45,42 @@ CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responde
void
CreatePatchEvent::pre_process()
{
- if (m_path == "/" || _engine.object_store()->find(m_path) != NULL) {
- m_error = OBJECT_EXISTS;
+ if (_path == "/" || _engine.object_store()->find(_path) != NULL) {
+ _error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
}
- if (m_poly < 1) {
- m_error = INVALID_POLY;
+ if (_poly < 1) {
+ _error = INVALID_POLY;
QueuedEvent::pre_process();
return;
}
- m_parent = _engine.object_store()->find_patch(m_path.parent());
- if (m_parent == NULL) {
- m_error = PARENT_NOT_FOUND;
+ _parent = _engine.object_store()->find_patch(_path.parent());
+ if (_parent == NULL) {
+ _error = PARENT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
size_t poly = 1;
- if (m_parent != NULL && m_poly > 1 && m_poly == static_cast<int>(m_parent->internal_poly()))
- poly = m_poly;
+ if (_parent != NULL && _poly > 1 && _poly == static_cast<int>(_parent->internal_poly()))
+ poly = _poly;
- m_patch = new Patch(m_path.name(), poly, m_parent, _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size(), m_poly);
+ _patch = new Patch(_path.name(), poly, _parent, _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size(), _poly);
- if (m_parent != NULL) {
- m_parent->add_node(new ListNode<Node*>(m_patch));
+ if (_parent != NULL) {
+ _parent->add_node(new ListNode<Node*>(_patch));
- if (m_parent->enabled())
- m_process_order = m_parent->build_process_order();
+ if (_parent->enabled())
+ _process_order = _parent->build_process_order();
}
- m_patch->activate();
+ _patch->activate();
// Insert into ObjectStore
- m_patch->add_to_store(_engine.object_store());
+ _patch->add_to_store(_engine.object_store());
QueuedEvent::pre_process();
}
@@ -91,18 +91,18 @@ CreatePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL) {
- if (m_parent == NULL) {
- assert(m_path == "/");
- assert(m_patch->parent_patch() == NULL);
- _engine.audio_driver()->set_root_patch(m_patch);
+ if (_patch != NULL) {
+ if (_parent == NULL) {
+ assert(_path == "/");
+ assert(_patch->parent_patch() == NULL);
+ _engine.audio_driver()->set_root_patch(_patch);
} else {
- assert(m_parent != NULL);
- assert(m_path != "/");
+ assert(_parent != NULL);
+ assert(_path != "/");
- if (m_parent->process_order() != NULL)
- _engine.maid()->push(m_parent->process_order());
- m_parent->process_order(m_process_order);
+ if (_parent->process_order() != NULL)
+ _engine.maid()->push(_parent->process_order());
+ _parent->process_order(_process_order);
}
}
}
@@ -112,25 +112,25 @@ void
CreatePatchEvent::post_process()
{
if (_responder.get()) {
- if (m_error == NO_ERROR) {
+ if (_error == NO_ERROR) {
_responder->respond_ok();
// Don't send ports/nodes that have been added since prepare()
// (otherwise they would be sent twice)
- _engine.broadcaster()->send_patch(m_patch, false);
+ _engine.broadcaster()->send_patch(_patch, false);
- } else if (m_error == OBJECT_EXISTS) {
+ } else if (_error == OBJECT_EXISTS) {
string msg = "Unable to create patch: ";
- msg += m_path += " already exists.";
+ msg += _path += " already exists.";
_responder->respond_error(msg);
- } else if (m_error == PARENT_NOT_FOUND) {
+ } else if (_error == PARENT_NOT_FOUND) {
string msg = "Unable to create patch: Parent ";
- msg += m_path.parent() += " not found.";
+ msg += _path.parent() += " not found.";
_responder->respond_error(msg);
- } else if (m_error == INVALID_POLY) {
+ } else if (_error == INVALID_POLY) {
string msg = "Unable to create patch ";
- msg.append(m_path).append(": ").append("Invalid polyphony respondered.");
+ msg.append(_path).append(": ").append("Invalid polyphony respondered.");
_responder->respond_error(msg);
} else {
_responder->respond_error("Unable to load patch.");
diff --git a/src/libs/engine/events/CreatePatchEvent.h b/src/libs/engine/events/CreatePatchEvent.h
index f62b3ee5..069eb52a 100644
--- a/src/libs/engine/events/CreatePatchEvent.h
+++ b/src/libs/engine/events/CreatePatchEvent.h
@@ -48,13 +48,13 @@ public:
private:
enum ErrorType { NO_ERROR, OBJECT_EXISTS, PARENT_NOT_FOUND, INVALID_POLY };
- Path m_path;
- Patch* m_patch;
- Patch* m_parent;
- Array<Node*>* m_process_order;
- TreeNode<Node*>* m_patch_treenode;
- int m_poly;
- ErrorType m_error;
+ Path _path;
+ Patch* _patch;
+ Patch* _parent;
+ Array<Node*>* _process_order;
+ TreeNode<Node*>* _patch_treenode;
+ int _poly;
+ ErrorType _error;
};
diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp
index 91225cb0..e19e6d24 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.cpp
+++ b/src/libs/engine/events/DSSIConfigureEvent.cpp
@@ -26,10 +26,10 @@ namespace Ingen {
DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_key(key),
- m_val(val),
- m_node(NULL)
+ _node_path(node_path),
+ _key(key),
+ _val(val),
+ _node(NULL)
{
}
@@ -37,11 +37,11 @@ DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> resp
void
DSSIConfigureEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_node_path);
+ Node* node = _engine.object_store()->find_node(_node_path);
if (node != NULL && node->plugin()->type() == Plugin::DSSI) {
- m_node = (DSSINode*)node;
- m_node->configure(m_key, m_val);
+ _node = (DSSINode*)node;
+ _node->configure(_key, _val);
}
QueuedEvent::pre_process();
@@ -59,12 +59,12 @@ DSSIConfigureEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
DSSIConfigureEvent::post_process()
{
- if (m_node == NULL) {
- cerr << "Unable to find DSSI node " << m_node_path << endl;
+ if (_node == NULL) {
+ cerr << "Unable to find DSSI node " << _node_path << endl;
} else {
string key = "dssi-configure--";
- key += m_key;
- _engine.broadcaster()->send_metadata_update(m_node_path, key, Atom(m_val.c_str()));
+ key += _key;
+ _engine.broadcaster()->send_metadata_update(_node_path, key, Atom(_val.c_str()));
}
}
diff --git a/src/libs/engine/events/DSSIConfigureEvent.h b/src/libs/engine/events/DSSIConfigureEvent.h
index 24472480..0e97702b 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.h
+++ b/src/libs/engine/events/DSSIConfigureEvent.h
@@ -37,10 +37,10 @@ public:
void post_process();
private:
- string m_node_path;
- string m_key;
- string m_val;
- DSSINode* m_node;
+ string _node_path;
+ string _key;
+ string _val;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp
index 6c12611c..7867658b 100644
--- a/src/libs/engine/events/DSSIControlEvent.cpp
+++ b/src/libs/engine/events/DSSIControlEvent.cpp
@@ -25,10 +25,10 @@ namespace Ingen {
DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_port_num(port_num),
- m_val(val),
- m_node(NULL)
+ _node_path(node_path),
+ _port_num(port_num),
+ _val(val),
+ _node(NULL)
{
}
@@ -36,12 +36,12 @@ DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responde
void
DSSIControlEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_node_path);
+ Node* node = _engine.object_store()->find_node(_node_path);
if (node->plugin()->type() != Plugin::DSSI)
- m_node = NULL;
+ _node = NULL;
else
- m_node = (DSSINode*)node;
+ _node = (DSSINode*)node;
QueuedEvent::pre_process();
}
@@ -52,16 +52,16 @@ DSSIControlEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL)
- m_node->set_control(m_port_num, m_val);
+ if (_node != NULL)
+ _node->set_control(_port_num, _val);
}
void
DSSIControlEvent::post_process()
{
- if (m_node == NULL)
- std::cerr << "Unable to find DSSI node " << m_node_path << std::endl;
+ if (_node == NULL)
+ std::cerr << "Unable to find DSSI node " << _node_path << std::endl;
}
diff --git a/src/libs/engine/events/DSSIControlEvent.h b/src/libs/engine/events/DSSIControlEvent.h
index 38114c4e..fa76e61f 100644
--- a/src/libs/engine/events/DSSIControlEvent.h
+++ b/src/libs/engine/events/DSSIControlEvent.h
@@ -39,10 +39,10 @@ public:
void post_process();
private:
- string m_node_path;
- int m_port_num;
- float m_val;
- DSSINode* m_node;
+ string _node_path;
+ int _port_num;
+ float _val;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp
index 5e992cbf..20debca2 100644
--- a/src/libs/engine/events/DSSIProgramEvent.cpp
+++ b/src/libs/engine/events/DSSIProgramEvent.cpp
@@ -30,10 +30,10 @@ namespace Ingen {
DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_bank(bank),
- m_program(program),
- m_node(NULL)
+ _node_path(node_path),
+ _bank(bank),
+ _program(program),
+ _node(NULL)
{
}
@@ -41,10 +41,10 @@ DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responde
void
DSSIProgramEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_node_path);
+ Node* node = _engine.object_store()->find_node(_node_path);
if (node != NULL && node->plugin()->type() == Plugin::DSSI)
- m_node = (DSSINode*)node;
+ _node = (DSSINode*)node;
QueuedEvent::pre_process();
}
@@ -55,21 +55,21 @@ DSSIProgramEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL)
- m_node->program(m_bank, m_program);
+ if (_node != NULL)
+ _node->program(_bank, _program);
}
void
DSSIProgramEvent::post_process()
{
- if (m_node == NULL) {
- cerr << "Unable to find DSSI node " << m_node_path << endl;
+ if (_node == NULL) {
+ cerr << "Unable to find DSSI node " << _node_path << endl;
} else {
// sends program as metadata in the form bank/program
char* temp_buf = new char[16];
- snprintf(temp_buf, 16, "%d/%d", m_bank, m_program);
- _engine.broadcaster()->send_metadata_update(m_node_path, "dssi-program", temp_buf);
+ snprintf(temp_buf, 16, "%d/%d", _bank, _program);
+ _engine.broadcaster()->send_metadata_update(_node_path, "dssi-program", temp_buf);
}
}
diff --git a/src/libs/engine/events/DSSIProgramEvent.h b/src/libs/engine/events/DSSIProgramEvent.h
index e01a2cbf..f9babac7 100644
--- a/src/libs/engine/events/DSSIProgramEvent.h
+++ b/src/libs/engine/events/DSSIProgramEvent.h
@@ -37,10 +37,10 @@ public:
void post_process();
private:
- string m_node_path;
- int m_bank;
- int m_program;
- DSSINode* m_node;
+ string _node_path;
+ int _bank;
+ int _program;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp
index 158d7875..4a5a832d 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.cpp
+++ b/src/libs/engine/events/DSSIUpdateEvent.cpp
@@ -29,9 +29,9 @@ namespace Ingen {
DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_url(url),
- m_node(NULL)
+ _path(path),
+ _url(url),
+ _node(NULL)
{
}
@@ -39,14 +39,14 @@ DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder,
void
DSSIUpdateEvent::pre_process()
{
- Node* node = _engine.object_store()->find_node(m_path);
+ Node* node = _engine.object_store()->find_node(_path);
if (node == NULL || node->plugin()->type() != Plugin::DSSI) {
- m_node = NULL;
+ _node = NULL;
QueuedEvent::pre_process();
return;
} else {
- m_node = (DSSINode*)node;
+ _node = (DSSINode*)node;
}
QueuedEvent::pre_process();
@@ -58,8 +58,8 @@ DSSIUpdateEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_node != NULL) {
- m_node->set_ui_url(m_url);
+ if (_node != NULL) {
+ _node->set_ui_url(_url);
}
}
@@ -67,10 +67,10 @@ DSSIUpdateEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
DSSIUpdateEvent::post_process()
{
- cerr << "DSSI update event: " << m_url << endl;
+ cerr << "DSSI update event: " << _url << endl;
- if (m_node != NULL) {
- m_node->send_update();
+ if (_node != NULL) {
+ _node->send_update();
}
}
diff --git a/src/libs/engine/events/DSSIUpdateEvent.h b/src/libs/engine/events/DSSIUpdateEvent.h
index 752ec5e8..5097ae89 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.h
+++ b/src/libs/engine/events/DSSIUpdateEvent.h
@@ -43,9 +43,9 @@ public:
void post_process();
private:
- string m_path;
- string m_url;
- DSSINode* m_node;
+ string _path;
+ string _url;
+ DSSINode* _node;
};
diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp
index ed0234f7..f347b9b3 100644
--- a/src/libs/engine/events/DisablePatchEvent.cpp
+++ b/src/libs/engine/events/DisablePatchEvent.cpp
@@ -28,8 +28,8 @@ namespace Ingen {
DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(engine, responder, timestamp),
- m_patch_path(patch_path),
- m_patch(NULL)
+ _patch_path(patch_path),
+ _patch(NULL)
{
}
@@ -37,7 +37,7 @@ DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Responder> respon
void
DisablePatchEvent::pre_process()
{
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ _patch = _engine.object_store()->find_patch(_patch_path);
QueuedEvent::pre_process();
}
@@ -48,19 +48,19 @@ DisablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL)
- m_patch->disable();
+ if (_patch != NULL)
+ _patch->disable();
}
void
DisablePatchEvent::post_process()
{
- if (m_patch != NULL) {
+ if (_patch != NULL) {
_responder->respond_ok();
- _engine.broadcaster()->send_patch_disable(m_patch_path);
+ _engine.broadcaster()->send_patch_disable(_patch_path);
} else {
- _responder->respond_error(string("Patch ") + m_patch_path + " not found");
+ _responder->respond_error(string("Patch ") + _patch_path + " not found");
}
}
diff --git a/src/libs/engine/events/DisablePatchEvent.h b/src/libs/engine/events/DisablePatchEvent.h
index 42e04e3b..8b7125c3 100644
--- a/src/libs/engine/events/DisablePatchEvent.h
+++ b/src/libs/engine/events/DisablePatchEvent.h
@@ -41,8 +41,8 @@ public:
void post_process();
private:
- string m_patch_path;
- Patch* m_patch;
+ string _patch_path;
+ Patch* _patch;
};
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index e843e272..dcb69401 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -40,11 +40,11 @@ namespace Ingen {
DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_patch(NULL),
- m_node(NULL),
- m_succeeded(true),
- m_lookup(true)
+ _node_path(node_path),
+ _patch(NULL),
+ _node(NULL),
+ _succeeded(true),
+ _lookup(true)
{
}
@@ -53,18 +53,18 @@ DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> re
*/
DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, Node* node)
: QueuedEvent(engine),
- m_node_path(node->path()),
- m_patch(node->parent_patch()),
- m_node(node),
- m_succeeded(true),
- m_lookup(false)
+ _node_path(node->path()),
+ _patch(node->parent_patch()),
+ _node(node),
+ _succeeded(true),
+ _lookup(false)
{
}
DisconnectNodeEvent::~DisconnectNodeEvent()
{
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
delete (*i);
}
@@ -76,37 +76,37 @@ DisconnectNodeEvent::pre_process()
// cerr << "Preparing disconnection event...\n";
- if (m_lookup) {
- m_patch = _engine.object_store()->find_patch(m_node_path.parent());
+ if (_lookup) {
+ _patch = _engine.object_store()->find_patch(_node_path.parent());
- if (m_patch == NULL) {
- m_succeeded = false;
+ if (_patch == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- m_node = _engine.object_store()->find_node(m_node_path);
+ _node = _engine.object_store()->find_node(_node_path);
- if (m_node == NULL) {
- m_succeeded = false;
+ if (_node == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
}
Connection* c = NULL;
- for (ConnectionListIterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i) {
+ for (ConnectionListIterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
c = (*i);
- if ((c->src_port()->parent_node() == m_node || c->dst_port()->parent_node() == m_node) && !c->pending_disconnection()) {
+ if ((c->src_port()->parent_node() == _node || c->dst_port()->parent_node() == _node) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
ev->pre_process();
- m_disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
+ _disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
c->pending_disconnection(true);
}
}
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -116,8 +116,8 @@ DisconnectNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ if (_succeeded) {
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->execute(nframes, start, end);
}
}
@@ -126,10 +126,10 @@ DisconnectNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
void
DisconnectNodeEvent::post_process()
{
- if (m_succeeded) {
+ if (_succeeded) {
if (_responder)
_responder->respond_ok();
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->post_process();
} else {
if (_responder)
diff --git a/src/libs/engine/events/DisconnectNodeEvent.h b/src/libs/engine/events/DisconnectNodeEvent.h
index 2c706b65..60c8238f 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.h
+++ b/src/libs/engine/events/DisconnectNodeEvent.h
@@ -51,14 +51,14 @@ public:
void post_process();
private:
- Path m_node_path;
- Patch* m_patch;
- Node* m_node;
- List<DisconnectionEvent*> m_disconnection_events;
+ Path _node_path;
+ Patch* _patch;
+ Node* _node;
+ List<DisconnectionEvent*> _disconnection_events;
- bool m_succeeded;
- bool m_lookup;
- bool m_disconnect_parent;
+ bool _succeeded;
+ bool _lookup;
+ bool _disconnect_parent;
};
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index cfd523e0..cdd49b8b 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -40,24 +40,24 @@ namespace Ingen {
DisconnectPortEvent::DisconnectPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(engine, responder, timestamp),
- m_port_path(port_path),
- m_patch(NULL),
- m_port(NULL),
- m_process_order(NULL),
- m_succeeded(true),
- m_lookup(true)
+ _port_path(port_path),
+ _patch(NULL),
+ _port(NULL),
+ _process_order(NULL),
+ _succeeded(true),
+ _lookup(true)
{
}
DisconnectPortEvent::DisconnectPortEvent(Engine& engine, Port* port)
: QueuedEvent(engine),
- m_port_path(port->path()),
- m_patch((port->parent_node() == NULL) ? NULL : port->parent_node()->parent_patch()),
- m_port(port),
- m_process_order(NULL),
- m_succeeded(true),
- m_lookup(false)
+ _port_path(port->path()),
+ _patch((port->parent_node() == NULL) ? NULL : port->parent_node()->parent_patch()),
+ _port(port),
+ _process_order(NULL),
+ _succeeded(true),
+ _lookup(false)
{
//cerr << "DisconnectPortEvent(Engine& engine, )\n";
}
@@ -65,7 +65,7 @@ DisconnectPortEvent::DisconnectPortEvent(Engine& engine, Port* port)
DisconnectPortEvent::~DisconnectPortEvent()
{
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
delete (*i);
}
@@ -75,43 +75,43 @@ DisconnectPortEvent::pre_process()
{
// cerr << "Preparing disconnection event...\n";
- if (m_lookup) {
- m_patch = _engine.object_store()->find_patch(m_port_path.parent().parent());
+ if (_lookup) {
+ _patch = _engine.object_store()->find_patch(_port_path.parent().parent());
- if (m_patch == NULL) {
- m_succeeded = false;
+ if (_patch == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- m_port = _engine.object_store()->find_port(m_port_path);
+ _port = _engine.object_store()->find_port(_port_path);
- if (m_port == NULL) {
- m_succeeded = false;
+ if (_port == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
}
- if (m_patch == NULL) {
- m_succeeded = false;
+ if (_patch == NULL) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
Connection* c = NULL;
- for (List<Connection*>::const_iterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i) {
+ for (List<Connection*>::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) {
c = (*i);
- if ((c->src_port() == m_port || c->dst_port() == m_port) && !c->pending_disconnection()) {
+ if ((c->src_port() == _port || c->dst_port() == _port) && !c->pending_disconnection()) {
DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
ev->pre_process();
- m_disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
+ _disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
c->pending_disconnection(true);
}
}
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -121,8 +121,8 @@ DisconnectPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ if (_succeeded) {
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->execute(nframes, start, end);
}
}
@@ -131,10 +131,10 @@ DisconnectPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end
void
DisconnectPortEvent::post_process()
{
- if (m_succeeded) {
+ if (_succeeded) {
if (_responder)
_responder->respond_ok();
- for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
+ for (List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
(*i)->post_process();
} else {
if (_responder)
diff --git a/src/libs/engine/events/DisconnectPortEvent.h b/src/libs/engine/events/DisconnectPortEvent.h
index 42c0d4e9..57a150ed 100644
--- a/src/libs/engine/events/DisconnectPortEvent.h
+++ b/src/libs/engine/events/DisconnectPortEvent.h
@@ -52,15 +52,15 @@ public:
void post_process();
private:
- Path m_port_path;
- Patch* m_patch;
- Port* m_port;
- List<DisconnectionEvent*> m_disconnection_events;
+ Path _port_path;
+ Patch* _patch;
+ Port* _port;
+ List<DisconnectionEvent*> _disconnection_events;
- Array<Node*>* m_process_order; // Patch's new process order
+ Array<Node*>* _process_order; // Patch's new process order
- bool m_succeeded;
- bool m_lookup;
+ bool _succeeded;
+ bool _lookup;
};
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index 8dc9e617..58a9727d 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -37,28 +37,28 @@ namespace Ingen {
DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(engine, responder, timestamp),
- m_src_port_path(src_port_path),
- m_dst_port_path(dst_port_path),
- m_patch(NULL),
- m_src_port(NULL),
- m_dst_port(NULL),
- m_lookup(true),
- m_typed_event(NULL),
- m_error(NO_ERROR)
+ _src_port_path(src_port_path),
+ _dst_port_path(dst_port_path),
+ _patch(NULL),
+ _src_port(NULL),
+ _dst_port(NULL),
+ _lookup(true),
+ _typed_event(NULL),
+ _error(NO_ERROR)
{
}
DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port)
: QueuedEvent(engine, responder, timestamp),
- m_src_port_path(src_port->path()),
- m_dst_port_path(dst_port->path()),
- m_patch(src_port->parent_node()->parent_patch()),
- m_src_port(src_port),
- m_dst_port(dst_port),
- m_lookup(false),
- m_typed_event(NULL),
- m_error(NO_ERROR)
+ _src_port_path(src_port->path()),
+ _dst_port_path(dst_port->path()),
+ _patch(src_port->parent_node()->parent_patch()),
+ _src_port(src_port),
+ _dst_port(dst_port),
+ _lookup(false),
+ _typed_event(NULL),
+ _error(NO_ERROR)
{
// FIXME: These break for patch ports.. is that ok?
/*assert(src_port->is_output());
@@ -70,63 +70,63 @@ DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> resp
DisconnectionEvent::~DisconnectionEvent()
{
- delete m_typed_event;
+ delete _typed_event;
}
void
DisconnectionEvent::pre_process()
{
- if (m_lookup) {
- if (m_src_port_path.parent().parent() != m_dst_port_path.parent().parent()
- && m_src_port_path.parent() != m_dst_port_path.parent().parent()
- && m_src_port_path.parent().parent() != m_dst_port_path.parent()) {
- m_error = PARENT_PATCH_DIFFERENT;
+ if (_lookup) {
+ if (_src_port_path.parent().parent() != _dst_port_path.parent().parent()
+ && _src_port_path.parent() != _dst_port_path.parent().parent()
+ && _src_port_path.parent().parent() != _dst_port_path.parent()) {
+ _error = PARENT_PATCH_DIFFERENT;
QueuedEvent::pre_process();
return;
}
- /*m_patch = _engine.object_store()->find_patch(m_src_port_path.parent().parent());
+ /*_patch = _engine.object_store()->find_patch(_src_port_path.parent().parent());
- if (m_patch == NULL) {
- m_error = PORT_NOT_FOUND;
+ if (_patch == NULL) {
+ _error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}*/
- m_src_port = _engine.object_store()->find_port(m_src_port_path);
- m_dst_port = _engine.object_store()->find_port(m_dst_port_path);
+ _src_port = _engine.object_store()->find_port(_src_port_path);
+ _dst_port = _engine.object_store()->find_port(_dst_port_path);
}
- if (m_src_port == NULL || m_dst_port == NULL) {
- m_error = PORT_NOT_FOUND;
+ if (_src_port == NULL || _dst_port == NULL) {
+ _error = PORT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
- if (m_src_port->type() != m_dst_port->type() || m_src_port->buffer_size() != m_dst_port->buffer_size()) {
- m_error = TYPE_MISMATCH;
+ if (_src_port->type() != _dst_port->type() || _src_port->buffer_size() != _dst_port->buffer_size()) {
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
// Create the typed event to actually do the work
- const DataType type = m_src_port->type();
+ const DataType type = _src_port->type();
if (type == DataType::FLOAT) {
- m_typed_event = new TypedDisconnectionEvent<Sample>(_engine, _responder, _time,
- dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
+ _typed_event = new TypedDisconnectionEvent<Sample>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<Sample>*>(_src_port), dynamic_cast<InputPort<Sample>*>(_dst_port));
} else if (type == DataType::MIDI) {
- m_typed_event = new TypedDisconnectionEvent<MidiMessage>(_engine, _responder, _time,
- dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
+ _typed_event = new TypedDisconnectionEvent<MidiMessage>(_engine, _responder, _time,
+ dynamic_cast<OutputPort<MidiMessage>*>(_src_port), dynamic_cast<InputPort<MidiMessage>*>(_dst_port));
} else {
- m_error = TYPE_MISMATCH;
+ _error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
- assert(m_typed_event);
- m_typed_event->pre_process();
- assert(m_typed_event->is_prepared());
+ assert(_typed_event);
+ _typed_event->pre_process();
+ assert(_typed_event->is_prepared());
QueuedEvent::pre_process();
}
@@ -137,20 +137,20 @@ DisconnectionEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_error == NO_ERROR)
- m_typed_event->execute(nframes, start, end);
+ if (_error == NO_ERROR)
+ _typed_event->execute(nframes, start, end);
}
void
DisconnectionEvent::post_process()
{
- if (m_error == NO_ERROR) {
- m_typed_event->post_process();
+ if (_error == NO_ERROR) {
+ _typed_event->post_process();
} else {
// FIXME: better error messages
string msg = "Unable to disconnect ";
- msg.append(m_src_port_path + " -> " + m_dst_port_path);
+ msg.append(_src_port_path + " -> " + _dst_port_path);
_responder->respond_error(msg);
}
}
@@ -163,11 +163,11 @@ DisconnectionEvent::post_process()
template <typename T>
TypedDisconnectionEvent<T>::TypedDisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(engine, responder, timestamp),
- m_src_port(src_port),
- m_dst_port(dst_port),
- m_patch(NULL),
- m_process_order(NULL),
- m_succeeded(true)
+ _src_port(src_port),
+ _dst_port(dst_port),
+ _patch(NULL),
+ _process_order(NULL),
+ _succeeded(true)
{
assert(src_port != NULL);
assert(dst_port != NULL);
@@ -178,37 +178,37 @@ template <typename T>
void
TypedDisconnectionEvent<T>::pre_process()
{
- if (!m_dst_port->is_connected_to(m_src_port)) {
- m_succeeded = false;
+ if (!_dst_port->is_connected_to(_src_port)) {
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
- Node* const src_node = m_src_port->parent_node();
- Node* const dst_node = m_dst_port->parent_node();
+ Node* const src_node = _src_port->parent_node();
+ Node* const dst_node = _dst_port->parent_node();
// Connection to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
if (src_node->parent() == dst_node)
- m_patch = dynamic_cast<Patch*>(dst_node);
+ _patch = dynamic_cast<Patch*>(dst_node);
else
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Connection from a patch input to a patch output (pass through)
} else if (src_node == dst_node && dynamic_cast<Patch*>(src_node)) {
- m_patch = dynamic_cast<Patch*>(src_node);
+ _patch = dynamic_cast<Patch*>(src_node);
// Normal connection between nodes with the same parent
} else {
- m_patch = src_node->parent_patch();
+ _patch = src_node->parent_patch();
}
- assert(m_patch);
+ assert(_patch);
if (src_node == NULL || dst_node == NULL) {
- m_succeeded = false;
+ _succeeded = false;
QueuedEvent::pre_process();
return;
}
@@ -225,10 +225,10 @@ TypedDisconnectionEvent<T>::pre_process()
break;
}
- if (m_patch->enabled())
- m_process_order = m_patch->build_process_order();
+ if (_patch->enabled())
+ _process_order = _patch->build_process_order();
- m_succeeded = true;
+ _succeeded = true;
QueuedEvent::pre_process();
}
@@ -239,14 +239,14 @@ TypedDisconnectionEvent<T>::execute(SampleCount nframes, FrameTime start, FrameT
{
QueuedEvent::execute(nframes, start, end);
- if (m_succeeded) {
+ if (_succeeded) {
ListNode<TypedConnection<T>*>* const port_connection
- = m_dst_port->remove_connection(m_src_port);
+ = _dst_port->remove_connection(_src_port);
if (port_connection != NULL) {
ListNode<Connection*>* const patch_connection
- = m_patch->remove_connection(m_src_port, m_dst_port);
+ = _patch->remove_connection(_src_port, _dst_port);
assert(patch_connection);
assert((Connection*)port_connection->elem() == patch_connection->elem());
@@ -256,11 +256,11 @@ TypedDisconnectionEvent<T>::execute(SampleCount nframes, FrameTime start, FrameT
_engine.maid()->push(patch_connection);
_engine.maid()->push(port_connection->elem());
- if (m_patch->process_order() != NULL)
- _engine.maid()->push(m_patch->process_order());
- m_patch->process_order(m_process_order);
+ if (_patch->process_order() != NULL)
+ _engine.maid()->push(_patch->process_order());
+ _patch->process_order(_process_order);
} else {
- m_succeeded = false; // Ports weren't connected
+ _succeeded = false; // Ports weren't connected
}
}
}
@@ -270,11 +270,11 @@ template <typename T>
void
TypedDisconnectionEvent<T>::post_process()
{
- if (m_succeeded) {
+ if (_succeeded) {
_responder->respond_ok();
- _engine.broadcaster()->send_disconnection(m_src_port->path(), m_dst_port->path());
+ _engine.broadcaster()->send_disconnection(_src_port->path(), _dst_port->path());
} else {
_responder->respond_error("Unable to disconnect ports.");
}
diff --git a/src/libs/engine/events/DisconnectionEvent.h b/src/libs/engine/events/DisconnectionEvent.h
index 499799ae..606e7039 100644
--- a/src/libs/engine/events/DisconnectionEvent.h
+++ b/src/libs/engine/events/DisconnectionEvent.h
@@ -58,17 +58,17 @@ private:
enum ErrorType { NO_ERROR, PARENT_PATCH_DIFFERENT, PORT_NOT_FOUND, TYPE_MISMATCH };
- Path m_src_port_path;
- Path m_dst_port_path;
+ Path _src_port_path;
+ Path _dst_port_path;
- Patch* m_patch;
- Port* m_src_port;
- Port* m_dst_port;
+ Patch* _patch;
+ Port* _src_port;
+ Port* _dst_port;
- bool m_lookup;
- QueuedEvent* m_typed_event;
+ bool _lookup;
+ QueuedEvent* _typed_event;
- ErrorType m_error;
+ ErrorType _error;
};
@@ -89,13 +89,13 @@ public:
void post_process();
private:
- OutputPort<T>* m_src_port;
- InputPort<T>* m_dst_port;
+ OutputPort<T>* _src_port;
+ InputPort<T>* _dst_port;
- Patch* m_patch;
- Array<Node*>* m_process_order; ///< New process order for Patch
+ Patch* _patch;
+ Array<Node*>* _process_order; ///< New process order for Patch
- bool m_succeeded;
+ bool _succeeded;
};
diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp
index b4abddf0..599fbbf7 100644
--- a/src/libs/engine/events/EnablePatchEvent.cpp
+++ b/src/libs/engine/events/EnablePatchEvent.cpp
@@ -27,9 +27,9 @@ namespace Ingen {
EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(engine, responder, timestamp),
- m_patch_path(patch_path),
- m_patch(NULL),
- m_process_order(NULL)
+ _patch_path(patch_path),
+ _patch(NULL),
+ _process_order(NULL)
{
}
@@ -37,14 +37,14 @@ EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Responder> responde
void
EnablePatchEvent::pre_process()
{
- m_patch = _engine.object_store()->find_patch(m_patch_path);
+ _patch = _engine.object_store()->find_patch(_patch_path);
- if (m_patch != NULL) {
+ if (_patch != NULL) {
/* Any event that requires a new process order will set the patch's
* process order to NULL if it is executed when the patch is not
* active. So, if the PO is NULL, calculate it here */
- if (m_patch->process_order() == NULL)
- m_process_order = m_patch->build_process_order();
+ if (_patch->process_order() == NULL)
+ _process_order = _patch->build_process_order();
}
QueuedEvent::pre_process();
@@ -56,11 +56,11 @@ EnablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
- if (m_patch != NULL) {
- m_patch->enable();
+ if (_patch != NULL) {
+ _patch->enable();
- if (m_patch->process_order() == NULL)
- m_patch->process_order(m_process_order);
+ if (_patch->process_order() == NULL)
+ _patch->process_order(_process_order);
}
}
@@ -68,11 +68,11 @@ EnablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
EnablePatchEvent::post_process()
{
- if (m_patch != NULL) {
+ if (_patch != NULL) {
_responder->respond_ok();
- _engine.broadcaster()->send_patch_enable(m_patch_path);
+ _engine.broadcaster()->send_patch_enable(_patch_path);
} else {
- _responder->respond_error(string("Patch ") + m_patch_path + " not found");
+ _responder->respond_error(string("Patch ") + _patch_path + " not found");
}
}
diff --git a/src/libs/engine/events/EnablePatchEvent.h b/src/libs/engine/events/EnablePatchEvent.h
index 53d2b779..2c34e3d5 100644
--- a/src/libs/engine/events/EnablePatchEvent.h
+++ b/src/libs/engine/events/EnablePatchEvent.h
@@ -44,9 +44,9 @@ public:
void post_process();
private:
- string m_patch_path;
- Patch* m_patch;
- Array<Node*>* m_process_order; // Patch's new process order
+ string _patch_path;
+ Patch* _patch;
+ Array<Node*>* _process_order; // Patch's new process order
};
diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp
index b36a5363..7d1a25e0 100644
--- a/src/libs/engine/events/MidiLearnEvent.cpp
+++ b/src/libs/engine/events/MidiLearnEvent.cpp
@@ -30,7 +30,7 @@ namespace Ingen {
void
MidiLearnResponseEvent::post_process()
{
- _engine.broadcaster()->send_control_change(m_port_path, m_value);
+ _engine.broadcaster()->send_control_change(_port_path, _value);
}
@@ -39,9 +39,9 @@ MidiLearnResponseEvent::post_process()
MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(engine, responder, timestamp),
- m_node_path(node_path),
- m_node(NULL),
- m_response_event(NULL)
+ _node_path(node_path),
+ _node(NULL),
+ _response_event(NULL)
{
}
@@ -49,8 +49,8 @@ MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, S
void
MidiLearnEvent::pre_process()
{
- m_node = _engine.object_store()->find_node(m_node_path);
- m_response_event = new MidiLearnResponseEvent(_engine, m_node_path + "/Controller_Number", _time);
+ _node = _engine.object_store()->find_node(_node_path);
+ _response_event = new MidiLearnResponseEvent(_engine, _node_path + "/Controller_Number", _time);
QueuedEvent::pre_process();
}
@@ -62,9 +62,9 @@ MidiLearnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
QueuedEvent::execute(nframes, start, end);
// FIXME: this isn't very good at all.
- if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal
- && m_node->plugin()->plug_label() == "midi_control_in") {
- ((MidiControlNode*)m_node)->learn(m_response_event);
+ if (_node != NULL && _node->plugin()->type() == Plugin::Internal
+ && _node->plugin()->plug_label() == "midi_control_in") {
+ ((MidiControlNode*)_node)->learn(_response_event);
}
}
@@ -72,11 +72,11 @@ MidiLearnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
MidiLearnEvent::post_process()
{
- if (m_node != NULL) {
+ if (_node != NULL) {
_responder->respond_ok();
} else {
string msg = "Did not find node '";
- msg.append(m_node_path).append("' for MIDI learn.");
+ msg.append(_node_path).append("' for MIDI learn.");
_responder->respond_error(msg);
}
}
diff --git a/src/libs/engine/events/MidiLearnEvent.h b/src/libs/engine/events/MidiLearnEvent.h
index a6eb7d2d..281f3c03 100644
--- a/src/libs/engine/events/MidiLearnEvent.h
+++ b/src/libs/engine/events/MidiLearnEvent.h
@@ -39,16 +39,16 @@ class MidiLearnResponseEvent : public Event
public:
MidiLearnResponseEvent(Engine& engine, const string& port_path, SampleCount timestamp)
: Event(engine, SharedPtr<Responder>(), timestamp),
- m_port_path(port_path),
- m_value(0.0f)
+ _port_path(port_path),
+ _value(0.0f)
{}
- void set_value(Sample val) { m_value = val; }
+ void set_value(Sample val) { _value = val; }
void post_process();
private:
- string m_port_path;
- Sample m_value;
+ string _port_path;
+ Sample _value;
};
@@ -71,11 +71,11 @@ public:
void post_process();
private:
- string m_node_path;
- Node* m_node;
+ string _node_path;
+ Node* _node;
/// Event to respond with when learned
- MidiLearnResponseEvent* m_response_event;
+ MidiLearnResponseEvent* _response_event;
};
diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp
index adc7ac56..f8dfe8eb 100644
--- a/src/libs/engine/events/NoteOffEvent.cpp
+++ b/src/libs/engine/events/NoteOffEvent.cpp
@@ -29,8 +29,8 @@ namespace Ingen {
*/
NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num)
: Event(engine, responder, timestamp),
- m_node(node),
- m_note_num(note_num)
+ _node(node),
+ _note_num(note_num)
{
}
@@ -39,9 +39,9 @@ NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, Sampl
*/
NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num)
: Event(engine, responder, timestamp),
- m_node(NULL),
- m_node_path(node_path),
- m_note_num(note_num)
+ _node(NULL),
+ _node_path(node_path),
+ _note_num(note_num)
{
}
@@ -52,15 +52,15 @@ NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
Event::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_node == NULL && m_node_path != "")
- m_node = _engine.object_store()->find_node(m_node_path);
+ if (_node == NULL && _node_path != "")
+ _node = _engine.object_store()->find_node(_node_path);
// FIXME: this isn't very good at all.
- if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal) {
- if (m_node->plugin()->plug_label() == "note_in")
- ((MidiNoteNode*)m_node)->note_off(m_note_num, _time, nframes, start, end);
- else if (m_node->plugin()->plug_label() == "trigger_in")
- ((MidiTriggerNode*)m_node)->note_off(m_note_num, _time, nframes, start, end);
+ if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
+ if (_node->plugin()->plug_label() == "note_in")
+ ((MidiNoteNode*)_node)->note_off(_note_num, _time, nframes, start, end);
+ else if (_node->plugin()->plug_label() == "trigger_in")
+ ((MidiTriggerNode*)_node)->note_off(_note_num, _time, nframes, start, end);
}
}
@@ -68,7 +68,7 @@ NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
NoteOffEvent::post_process()
{
- if (m_node != NULL)
+ if (_node != NULL)
_responder->respond_ok();
else
_responder->respond_error("Did not find node for note_off");
diff --git a/src/libs/engine/events/NoteOffEvent.h b/src/libs/engine/events/NoteOffEvent.h
index 35706f26..6b5ee185 100644
--- a/src/libs/engine/events/NoteOffEvent.h
+++ b/src/libs/engine/events/NoteOffEvent.h
@@ -41,9 +41,9 @@ public:
void post_process();
private:
- Node* m_node;
- string m_node_path;
- uchar m_note_num;
+ Node* _node;
+ string _node_path;
+ uchar _note_num;
};
diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp
index f94ebb97..f39a71b6 100644
--- a/src/libs/engine/events/NoteOnEvent.cpp
+++ b/src/libs/engine/events/NoteOnEvent.cpp
@@ -32,10 +32,10 @@ namespace Ingen {
*/
NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity)
: Event(engine, responder, timestamp),
- m_node(patch),
- m_note_num(note_num),
- m_velocity(velocity),
- m_is_osc_triggered(false)
+ _node(patch),
+ _note_num(note_num),
+ _velocity(velocity),
+ _is_osc_triggered(false)
{
}
@@ -46,11 +46,11 @@ NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleC
*/
NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity)
: Event(engine, responder, timestamp),
- m_node(NULL),
- m_node_path(node_path),
- m_note_num(note_num),
- m_velocity(velocity),
- m_is_osc_triggered(true)
+ _node(NULL),
+ _node_path(node_path),
+ _note_num(note_num),
+ _velocity(velocity),
+ _is_osc_triggered(true)
{
}
@@ -62,15 +62,15 @@ NoteOnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
assert(_time >= start && _time <= end);
// Lookup if neccessary
- if (m_is_osc_triggered)
- m_node = _engine.object_store()->find_node(m_node_path);
+ if (_is_osc_triggered)
+ _node = _engine.object_store()->find_node(_node_path);
// FIXME: this isn't very good at all.
- if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal) {
- if (m_node->plugin()->plug_label() == "note_in")
- ((MidiNoteNode*)m_node)->note_on(m_note_num, m_velocity, _time, nframes, start, end);
- else if (m_node->plugin()->plug_label() == "trigger_in")
- ((MidiTriggerNode*)m_node)->note_on(m_note_num, m_velocity, _time, nframes, start, end);
+ if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
+ if (_node->plugin()->plug_label() == "note_in")
+ ((MidiNoteNode*)_node)->note_on(_note_num, _velocity, _time, nframes, start, end);
+ else if (_node->plugin()->plug_label() == "trigger_in")
+ ((MidiTriggerNode*)_node)->note_on(_note_num, _velocity, _time, nframes, start, end);
}
}
@@ -78,8 +78,8 @@ NoteOnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
NoteOnEvent::post_process()
{
- if (m_is_osc_triggered) {
- if (m_node != NULL)
+ if (_is_osc_triggered) {
+ if (_node != NULL)
_responder->respond_ok();
else
_responder->respond_error("Did not find node for note_on");
diff --git a/src/libs/engine/events/NoteOnEvent.h b/src/libs/engine/events/NoteOnEvent.h
index f7bceb4a..0b592548 100644
--- a/src/libs/engine/events/NoteOnEvent.h
+++ b/src/libs/engine/events/NoteOnEvent.h
@@ -41,11 +41,11 @@ public:
void post_process();
private:
- Node* m_node;
- string m_node_path;
- uchar m_note_num;
- uchar m_velocity;
- bool m_is_osc_triggered;
+ Node* _node;
+ string _node_path;
+ uchar _note_num;
+ uchar _velocity;
+ bool _is_osc_triggered;
};
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index f7b9bcf8..3ce22e07 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -29,18 +29,18 @@ namespace Ingen {
RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name)
: QueuedEvent(engine, responder, timestamp),
- m_old_path(path),
- m_name(name),
- m_new_path(m_old_path.parent().base() + name),
- m_parent_patch(NULL),
- m_store_treenode(NULL),
- m_error(NO_ERROR)
+ _old_path(path),
+ _name(name),
+ _new_path(_old_path.parent().base() + name),
+ _parent_patch(NULL),
+ _store_treenode(NULL),
+ _error(NO_ERROR)
{
/*
- if (m_old_path.parent() == "/")
- m_new_path = string("/") + m_name;
+ if (_old_path.parent() == "/")
+ _new_path = string("/") + _name;
else
- m_new_path = m_old_path.parent() +"/"+ m_name;*/
+ _new_path = _old_path.parent() +"/"+ _name;*/
}
@@ -52,36 +52,36 @@ RenameEvent::~RenameEvent()
void
RenameEvent::pre_process()
{
- if (m_name.find("/") != string::npos) {
- m_error = INVALID_NAME;
+ if (_name.find("/") != string::npos) {
+ _error = INVALID_NAME;
QueuedEvent::pre_process();
return;
}
- if (_engine.object_store()->find(m_new_path)) {
- m_error = OBJECT_EXISTS;
+ if (_engine.object_store()->find(_new_path)) {
+ _error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
}
- GraphObject* obj = _engine.object_store()->find(m_old_path);
+ GraphObject* obj = _engine.object_store()->find(_old_path);
if (obj == NULL) {
- m_error = OBJECT_NOT_FOUND;
+ _error = OBJECT_NOT_FOUND;
QueuedEvent::pre_process();
return;
}
// Renaming only works for Nodes and Patches (which are Nodes)
/*if (obj->as_node() == NULL) {
- m_error = OBJECT_NOT_RENAMABLE;
+ _error = OBJECT_NOT_RENAMABLE;
QueuedEvent::pre_process();
return;
}*/
if (obj != NULL) {
- obj->set_path(m_new_path);
- assert(obj->path() == m_new_path);
+ obj->set_path(_new_path);
+ assert(obj->path() == _new_path);
}
QueuedEvent::pre_process();
@@ -101,18 +101,18 @@ RenameEvent::post_process()
{
string msg = "Unable to rename object - ";
- if (m_error == NO_ERROR) {
+ if (_error == NO_ERROR) {
_responder->respond_ok();
- _engine.broadcaster()->send_rename(m_old_path, m_new_path);
+ _engine.broadcaster()->send_rename(_old_path, _new_path);
} else {
- if (m_error == OBJECT_EXISTS)
- msg.append("Object already exists at ").append(m_new_path);
- else if (m_error == OBJECT_NOT_FOUND)
- msg.append("Could not find object ").append(m_old_path);
- else if (m_error == OBJECT_NOT_RENAMABLE)
- msg.append(m_old_path).append(" is not renamable");
- else if (m_error == INVALID_NAME)
- msg.append(m_name).append(" is not a valid name");
+ if (_error == OBJECT_EXISTS)
+ msg.append("Object already exists at ").append(_new_path);
+ else if (_error == OBJECT_NOT_FOUND)
+ msg.append("Could not find object ").append(_old_path);
+ else if (_error == OBJECT_NOT_RENAMABLE)
+ msg.append(_old_path).append(" is not renamable");
+ else if (_error == INVALID_NAME)
+ msg.append(_name).append(" is not a valid name");
_responder->respond_error(msg);
}
diff --git a/src/libs/engine/events/RenameEvent.h b/src/libs/engine/events/RenameEvent.h
index cf866fb9..9c04314b 100644
--- a/src/libs/engine/events/RenameEvent.h
+++ b/src/libs/engine/events/RenameEvent.h
@@ -52,12 +52,12 @@ public:
private:
enum ErrorType { NO_ERROR, OBJECT_NOT_FOUND, OBJECT_EXISTS, OBJECT_NOT_RENAMABLE, INVALID_NAME };
- Path m_old_path;
- string m_name;
- Path m_new_path;
- Patch* m_parent_patch;
- TreeNode<GraphObject*>* m_store_treenode;
- ErrorType m_error;
+ Path _old_path;
+ string _name;
+ Path _new_path;
+ Patch* _parent_patch;
+ TreeNode<GraphObject*>* _store_treenode;
+ ErrorType _error;
};
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp
index 3c164ce2..43974076 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.cpp
+++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp
@@ -33,7 +33,7 @@ RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, SharedPtr<Respond
void
RequestAllObjectsEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
+ _client = _engine.broadcaster()->client(_responder->client_key());
QueuedEvent::pre_process();
}
@@ -42,13 +42,13 @@ RequestAllObjectsEvent::pre_process()
void
RequestAllObjectsEvent::post_process()
{
- if (m_client) {
+ if (_client) {
_responder->respond_ok();
// Everything is a child of the root patch, so this sends it all
Patch* root = _engine.object_store()->find_patch("/");
if (root)
- ObjectSender::send_patch(m_client.get(), root, true);
+ ObjectSender::send_patch(_client.get(), root, true);
} else {
_responder->respond_error("Unable to find client to send all objects");
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.h b/src/libs/engine/events/RequestAllObjectsEvent.h
index 46d22aab..dd89e421 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.h
+++ b/src/libs/engine/events/RequestAllObjectsEvent.h
@@ -41,7 +41,7 @@ public:
void post_process();
private:
- SharedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp
index 9437ccbf..1c7c4578 100644
--- a/src/libs/engine/events/RequestMetadataEvent.cpp
+++ b/src/libs/engine/events/RequestMetadataEvent.cpp
@@ -29,10 +29,10 @@ namespace Ingen {
RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key)
: QueuedEvent(engine, responder, timestamp),
- m_path(node_path),
- m_key(key),
- m_object(NULL),
- m_client(SharedPtr<ClientInterface>())
+ _path(node_path),
+ _key(key),
+ _object(NULL),
+ _client(SharedPtr<ClientInterface>())
{
}
@@ -40,17 +40,17 @@ RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder>
void
RequestMetadataEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
+ _client = _engine.broadcaster()->client(_responder->client_key());
- if (m_client) {
- m_object = _engine.object_store()->find(m_path);
- if (m_object == NULL) {
+ if (_client) {
+ _object = _engine.object_store()->find(_path);
+ if (_object == NULL) {
QueuedEvent::pre_process();
return;
}
}
- m_value = m_object->get_metadata(m_key);
+ _value = _object->get_metadata(_key);
QueuedEvent::pre_process();
}
@@ -59,14 +59,14 @@ RequestMetadataEvent::pre_process()
void
RequestMetadataEvent::post_process()
{
- if (m_client) {
- if (!m_object) {
+ if (_client) {
+ if (!_object) {
string msg = "Unable to find metadata subject ";
- msg += m_path;
+ msg += _path;
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- m_client->metadata_update(m_path, m_key, m_value);
+ _client->metadata_update(_path, _key, _value);
}
} else {
_responder->respond_error("Unknown client");
diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h
index 6b782ed2..0c95b74e 100644
--- a/src/libs/engine/events/RequestMetadataEvent.h
+++ b/src/libs/engine/events/RequestMetadataEvent.h
@@ -43,11 +43,11 @@ public:
void post_process();
private:
- string m_path;
- string m_key;
- Raul::Atom m_value;
- GraphObject* m_object;
- SharedPtr<ClientInterface> m_client;
+ string _path;
+ string _key;
+ Raul::Atom _value;
+ GraphObject* _object;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp
index cd63f28e..72526299 100644
--- a/src/libs/engine/events/RequestObjectEvent.cpp
+++ b/src/libs/engine/events/RequestObjectEvent.cpp
@@ -33,8 +33,8 @@ namespace Ingen {
RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_object(NULL)
+ _path(path),
+ _object(NULL)
{
}
@@ -42,8 +42,8 @@ RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Responder> resp
void
RequestObjectEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
- m_object = _engine.object_store()->find(m_path);
+ _client = _engine.broadcaster()->client(_responder->client_key());
+ _object = _engine.object_store()->find(_path);
QueuedEvent::pre_process();
}
@@ -60,28 +60,28 @@ RequestObjectEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
RequestObjectEvent::post_process()
{
- if (!m_object) {
+ if (!_object) {
_responder->respond_error("Unable to find object requested.");
- } else if (m_client) {
- Patch* const patch = dynamic_cast<Patch*>(m_object);
+ } else if (_client) {
+ Patch* const patch = dynamic_cast<Patch*>(_object);
if (patch) {
_responder->respond_ok();
- ObjectSender::send_patch(m_client.get(), patch, true);
+ ObjectSender::send_patch(_client.get(), patch, true);
return;
}
- Node* const node = dynamic_cast<Node*>(m_object);
+ Node* const node = dynamic_cast<Node*>(_object);
if (node) {
_responder->respond_ok();
- ObjectSender::send_node(m_client.get(), node, true);
+ ObjectSender::send_node(_client.get(), node, true);
return;
}
- Port* const port = dynamic_cast<Port*>(m_object);
+ Port* const port = dynamic_cast<Port*>(_object);
if (port) {
_responder->respond_ok();
- ObjectSender::send_port(m_client.get(), port);
+ ObjectSender::send_port(_client.get(), port);
return;
}
diff --git a/src/libs/engine/events/RequestObjectEvent.h b/src/libs/engine/events/RequestObjectEvent.h
index b6041d2e..e80a9003 100644
--- a/src/libs/engine/events/RequestObjectEvent.h
+++ b/src/libs/engine/events/RequestObjectEvent.h
@@ -44,9 +44,9 @@ public:
void post_process();
private:
- string m_path;
- GraphObject* m_object;
- SharedPtr<ClientInterface> m_client;
+ string _path;
+ GraphObject* _object;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp
index 8663f40a..66093ee8 100644
--- a/src/libs/engine/events/RequestPluginEvent.cpp
+++ b/src/libs/engine/events/RequestPluginEvent.cpp
@@ -32,8 +32,8 @@ namespace Ingen {
RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri)
: QueuedEvent(engine, responder, timestamp),
- m_uri(uri),
- m_plugin(NULL)
+ _uri(uri),
+ _plugin(NULL)
{
}
@@ -41,8 +41,8 @@ RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Responder> resp
void
RequestPluginEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
- m_plugin = _engine.node_factory()->plugin(m_uri);
+ _client = _engine.broadcaster()->client(_responder->client_key());
+ _plugin = _engine.node_factory()->plugin(_uri);
QueuedEvent::pre_process();
}
@@ -59,14 +59,14 @@ RequestPluginEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
RequestPluginEvent::post_process()
{
- if (!m_plugin) {
+ if (!_plugin) {
_responder->respond_error("Unable to find plugin requested.");
- } else if (m_client) {
+ } else if (_client) {
_responder->respond_ok();
- assert(m_plugin->uri() == m_uri);
- m_client->new_plugin(m_uri, m_plugin->type_uri(), m_plugin->name());
+ assert(_plugin->uri() == _uri);
+ _client->new_plugin(_uri, _plugin->type_uri(), _plugin->name());
} else {
_responder->respond_error("Unable to find client to send plugin.");
diff --git a/src/libs/engine/events/RequestPluginEvent.h b/src/libs/engine/events/RequestPluginEvent.h
index 8833f842..cae0aafe 100644
--- a/src/libs/engine/events/RequestPluginEvent.h
+++ b/src/libs/engine/events/RequestPluginEvent.h
@@ -44,9 +44,9 @@ public:
void post_process();
private:
- string m_uri;
- const Plugin* m_plugin;
- SharedPtr<ClientInterface> m_client;
+ string _uri;
+ const Plugin* _plugin;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp
index da726e13..24fb055c 100644
--- a/src/libs/engine/events/RequestPluginsEvent.cpp
+++ b/src/libs/engine/events/RequestPluginsEvent.cpp
@@ -32,11 +32,11 @@ RequestPluginsEvent::RequestPluginsEvent(Engine& engine, SharedPtr<Responder> re
void
RequestPluginsEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
+ _client = _engine.broadcaster()->client(_responder->client_key());
// Take a copy to send in the post processing thread (to avoid problems
// because std::list isn't thread safe)
- m_plugins = _engine.node_factory()->plugins();
+ _plugins = _engine.node_factory()->plugins();
QueuedEvent::pre_process();
}
@@ -45,8 +45,8 @@ RequestPluginsEvent::pre_process()
void
RequestPluginsEvent::post_process()
{
- if (m_client) {
- _engine.broadcaster()->send_plugins_to(m_client, m_plugins);
+ if (_client) {
+ _engine.broadcaster()->send_plugins_to(_client, _plugins);
_responder->respond_ok();
} else {
_responder->respond_error("Unable to find client to send plugins");
diff --git a/src/libs/engine/events/RequestPluginsEvent.h b/src/libs/engine/events/RequestPluginsEvent.h
index 6355c037..d0ba3446 100644
--- a/src/libs/engine/events/RequestPluginsEvent.h
+++ b/src/libs/engine/events/RequestPluginsEvent.h
@@ -44,8 +44,8 @@ public:
void post_process();
private:
- SharedPtr<ClientInterface> m_client;
- std::list<Plugin*> m_plugins;
+ SharedPtr<ClientInterface> _client;
+ std::list<Plugin*> _plugins;
};
diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp
index 8457486f..30daa038 100644
--- a/src/libs/engine/events/RequestPortValueEvent.cpp
+++ b/src/libs/engine/events/RequestPortValueEvent.cpp
@@ -30,9 +30,9 @@ namespace Ingen {
RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(engine, responder, timestamp),
- m_port_path(port_path),
- m_port(NULL),
- m_value(0.0)
+ _port_path(port_path),
+ _port(NULL),
+ _value(0.0)
{
}
@@ -40,8 +40,8 @@ RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Responder
void
RequestPortValueEvent::pre_process()
{
- m_client = _engine.broadcaster()->client(_responder->client_key());
- m_port = _engine.object_store()->find_port(m_port_path);
+ _client = _engine.broadcaster()->client(_responder->client_key());
+ _port = _engine.object_store()->find_port(_port_path);
QueuedEvent::pre_process();
}
@@ -53,10 +53,10 @@ RequestPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime e
QueuedEvent::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_port != NULL && m_port->type() == DataType::FLOAT)
- m_value = ((TypedPort<Sample>*)m_port)->buffer(0)->value_at(0/*_time - start*/);
+ if (_port != NULL && _port->type() == DataType::FLOAT)
+ _value = ((TypedPort<Sample>*)_port)->buffer(0)->value_at(0/*_time - start*/);
else
- m_port = NULL; // triggers error response
+ _port = NULL; // triggers error response
}
@@ -64,11 +64,11 @@ void
RequestPortValueEvent::post_process()
{
string msg;
- if (!m_port) {
+ if (!_port) {
_responder->respond_error("Unable to find port for get_value responder.");
- } else if (m_client) {
+ } else if (_client) {
_responder->respond_ok();
- m_client->control_change(m_port_path, m_value);
+ _client->control_change(_port_path, _value);
} else {
_responder->respond_error("Unable to find client to send port value");
}
diff --git a/src/libs/engine/events/RequestPortValueEvent.h b/src/libs/engine/events/RequestPortValueEvent.h
index 55831f31..aceaaf85 100644
--- a/src/libs/engine/events/RequestPortValueEvent.h
+++ b/src/libs/engine/events/RequestPortValueEvent.h
@@ -44,10 +44,10 @@ public:
void post_process();
private:
- string m_port_path;
- Port* m_port;
- Sample m_value;
- SharedPtr<ClientInterface> m_client;
+ string _port_path;
+ Port* _port;
+ Sample _value;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index ba3d88e9..cc405a89 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -29,10 +29,10 @@ namespace Ingen {
SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value)
: QueuedEvent(engine, responder, timestamp),
- m_path(path),
- m_key(key),
- m_value(value),
- m_object(NULL)
+ _path(path),
+ _key(key),
+ _value(value),
+ _object(NULL)
{
}
@@ -40,13 +40,13 @@ SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responde
void
SetMetadataEvent::pre_process()
{
- m_object = _engine.object_store()->find(m_path);
- if (m_object == NULL) {
+ _object = _engine.object_store()->find(_path);
+ if (_object == NULL) {
QueuedEvent::pre_process();
return;
}
- m_object->set_metadata(m_key, m_value);
+ _object->set_metadata(_key, _value);
QueuedEvent::pre_process();
}
@@ -63,13 +63,13 @@ SetMetadataEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
SetMetadataEvent::post_process()
{
- if (m_object == NULL) {
+ if (_object == NULL) {
string msg = "Unable to find object ";
- msg += m_path;
+ msg += _path;
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _engine.broadcaster()->send_metadata_update(m_path, m_key, m_value);
+ _engine.broadcaster()->send_metadata_update(_path, _key, _value);
}
}
diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h
index adf73878..0b2a4075 100644
--- a/src/libs/engine/events/SetMetadataEvent.h
+++ b/src/libs/engine/events/SetMetadataEvent.h
@@ -42,10 +42,10 @@ public:
void post_process();
private:
- string m_path;
- string m_key;
- Raul::Atom m_value;
- GraphObject* m_object;
+ string _path;
+ string _key;
+ Raul::Atom _value;
+ GraphObject* _object;
};
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index bba5bc3c..11eb91da 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -29,22 +29,22 @@ namespace Ingen {
*/
SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: Event(engine, responder, timestamp),
- m_voice_num(voice_num),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(voice_num),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: Event(engine, responder, timestamp),
- m_voice_num(-1),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(-1),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
@@ -55,19 +55,19 @@ SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
Event::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_port == NULL)
- m_port = _engine.object_store()->find_port(m_port_path);
+ if (_port == NULL)
+ _port = _engine.object_store()->find_port(_port_path);
- if (m_port == NULL) {
- m_error = PORT_NOT_FOUND;
- } else if (!(m_port->type() == DataType::FLOAT)) {
- m_error = TYPE_MISMATCH;
+ if (_port == NULL) {
+ _error = PORT_NOT_FOUND;
+ } else if (!(_port->type() == DataType::FLOAT)) {
+ _error = TYPE_MISMATCH;
} else {
- if (m_voice_num == -1)
- ((TypedPort<Sample>*)m_port)->set_value(m_val, _time - start);
+ if (_voice_num == -1)
+ ((TypedPort<Sample>*)_port)->set_value(_val, _time - start);
else
- ((TypedPort<Sample>*)m_port)->set_value(m_voice_num, m_val, _time - start);
- //((TypedPort<Sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
+ ((TypedPort<Sample>*)_port)->set_value(_voice_num, _val, _time - start);
+ //((TypedPort<Sample>*)_port)->buffer(_voice_num)->set(_val, offset); // FIXME: check range
}
}
@@ -75,20 +75,20 @@ SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
SetPortValueEvent::post_process()
{
- if (m_error == NO_ERROR) {
- assert(m_port != NULL);
+ if (_error == NO_ERROR) {
+ assert(_port != NULL);
_responder->respond_ok();
- _engine.broadcaster()->send_control_change(m_port_path, m_val);
+ _engine.broadcaster()->send_control_change(_port_path, _val);
- } else if (m_error == PORT_NOT_FOUND) {
+ } else if (_error == PORT_NOT_FOUND) {
string msg = "Unable to find port ";
- msg.append(m_port_path).append(" for set_port_value");
+ msg.append(_port_path).append(" for set_port_value");
_responder->respond_error(msg);
- } else if (m_error == TYPE_MISMATCH) {
+ } else if (_error == TYPE_MISMATCH) {
string msg = "Attempt to set ";
- msg.append(m_port_path).append(" to incompatible type");
+ msg.append(_port_path).append(" to incompatible type");
_responder->respond_error(msg);
}
}
diff --git a/src/libs/engine/events/SetPortValueEvent.h b/src/libs/engine/events/SetPortValueEvent.h
index ed4bb86e..63f82a41 100644
--- a/src/libs/engine/events/SetPortValueEvent.h
+++ b/src/libs/engine/events/SetPortValueEvent.h
@@ -43,11 +43,11 @@ public:
private:
enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH };
- int m_voice_num;
- string m_port_path;
- float m_val;
- Port* m_port;
- ErrorType m_error;
+ int _voice_num;
+ string _port_path;
+ float _val;
+ Port* _port;
+ ErrorType _error;
};
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
index 2d7deeef..688455aa 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
@@ -30,22 +30,22 @@ namespace Ingen {
*/
SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: QueuedEvent(engine, responder, timestamp),
- m_voice_num(voice_num),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(voice_num),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: QueuedEvent(engine, responder, timestamp),
- m_voice_num(-1),
- m_port_path(port_path),
- m_val(val),
- m_port(NULL),
- m_error(NO_ERROR)
+ _voice_num(-1),
+ _port_path(port_path),
+ _val(val),
+ _port(NULL),
+ _error(NO_ERROR)
{
}
@@ -53,13 +53,13 @@ SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Respo
void
SetPortValueQueuedEvent::pre_process()
{
- if (m_port == NULL)
- m_port = _engine.object_store()->find_port(m_port_path);
+ if (_port == NULL)
+ _port = _engine.object_store()->find_port(_port_path);
- if (m_port == NULL) {
- m_error = PORT_NOT_FOUND;
- } else if ( !(m_port->type() == DataType::FLOAT) ) {
- m_error = TYPE_MISMATCH;
+ if (_port == NULL) {
+ _error = PORT_NOT_FOUND;
+ } else if ( !(_port->type() == DataType::FLOAT) ) {
+ _error = TYPE_MISMATCH;
}
QueuedEvent::pre_process();
@@ -72,12 +72,12 @@ SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime
QueuedEvent::execute(nframes, start, end);
assert(_time >= start && _time <= end);
- if (m_error == NO_ERROR) {
- assert(m_port != NULL);
- if (m_voice_num == -1)
- ((TypedPort<Sample>*)m_port)->set_value(m_val, _time - start);
+ if (_error == NO_ERROR) {
+ assert(_port != NULL);
+ if (_voice_num == -1)
+ ((TypedPort<Sample>*)_port)->set_value(_val, _time - start);
else
- ((TypedPort<Sample>*)m_port)->buffer(m_voice_num)->set(m_val, _time - start); // FIXME: check range
+ ((TypedPort<Sample>*)_port)->buffer(_voice_num)->set(_val, _time - start); // FIXME: check range
}
}
@@ -85,27 +85,27 @@ SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime
void
SetPortValueQueuedEvent::post_process()
{
- if (m_error == NO_ERROR) {
- assert(m_port != NULL);
+ if (_error == NO_ERROR) {
+ assert(_port != NULL);
_responder->respond_ok();
- _engine.broadcaster()->send_control_change(m_port_path, m_val);
+ _engine.broadcaster()->send_control_change(_port_path, _val);
// Send patch port control change, if this is a bridge port
- /*Port* parent_port = m_port->parent_node()->as_port();
+ /*Port* parent_port = _port->parent_node()->as_port();
if (parent_port != NULL) {
assert(parent_port->type() == DataType::FLOAT);
- _engine.broadcaster()->send_control_change(parent_port->path(), m_val);
+ _engine.broadcaster()->send_control_change(parent_port->path(), _val);
}*/
- } else if (m_error == PORT_NOT_FOUND) {
+ } else if (_error == PORT_NOT_FOUND) {
string msg = "Unable to find port ";
- msg.append(m_port_path).append(" for set_port_value_slow");
+ msg.append(_port_path).append(" for set_port_value_slow");
_responder->respond_error(msg);
- } else if (m_error == TYPE_MISMATCH) {
+ } else if (_error == TYPE_MISMATCH) {
string msg = "Attempt to set ";
- msg.append(m_port_path).append(" to incompatible type");
+ msg.append(_port_path).append(" to incompatible type");
_responder->respond_error(msg);
}
}
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.h b/src/libs/engine/events/SetPortValueQueuedEvent.h
index 118899dd..742f84bb 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.h
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.h
@@ -44,11 +44,11 @@ public:
private:
enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH };
- int m_voice_num;
- string m_port_path;
- float m_val;
- Port* m_port;
- ErrorType m_error;
+ int _voice_num;
+ string _port_path;
+ float _val;
+ Port* _port;
+ ErrorType _error;
};
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 00f4cee4..86f6145c 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -200,7 +200,7 @@ App::event_save_session_as()
if (fin.is_open()) { // File exists
string msg = "File already exists! Are you sure you want to overwrite ";
msg += filename + "?";
- Gtk::MessageDialog confir_dialog(*m_main_window,
+ Gtk::MessageDialog confir_dialog(*_main_window,
msg, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_YES_NO, true);
if (confir_dialog.run() == Gtk::RESPONSE_YES)
confirm = true;
diff --git a/src/progs/ingenuity/ConfigWindow.cpp b/src/progs/ingenuity/ConfigWindow.cpp
index a83bfbac..a3fa6308 100644
--- a/src/progs/ingenuity/ConfigWindow.cpp
+++ b/src/progs/ingenuity/ConfigWindow.cpp
@@ -27,16 +27,16 @@ namespace Ingenuity {
ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_configuration(NULL)
+ _configuration(NULL)
{
- xml->get_widget("config_path_entry", m_path_entry);
- xml->get_widget("config_save_button", m_save_button);
- xml->get_widget("config_cancel_button", m_cancel_button);
- xml->get_widget("config_ok_button", m_ok_button);
+ xml->get_widget("config_path_entry", _path_entry);
+ xml->get_widget("config_save_button", _save_button);
+ xml->get_widget("config_cancel_button", _cancel_button);
+ xml->get_widget("config_ok_button", _ok_button);
- m_save_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::save_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &ConfigWindow::cancel_clicked));
- m_ok_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::ok_clicked));
+ _save_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::save_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &ConfigWindow::cancel_clicked));
+ _ok_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::ok_clicked));
}
@@ -47,8 +47,8 @@ ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
void
ConfigWindow::configuration(Configuration* sm)
{
- m_configuration = sm;
- m_path_entry->set_text(sm->patch_path());
+ _configuration = sm;
+ _path_entry->set_text(sm->patch_path());
}
@@ -59,9 +59,9 @@ ConfigWindow::configuration(Configuration* sm)
void
ConfigWindow::save_clicked()
{
- m_configuration->patch_path(m_path_entry->get_text());
- m_configuration->apply_settings();
- m_configuration->save_settings();
+ _configuration->patch_path(_path_entry->get_text());
+ _configuration->apply_settings();
+ _configuration->save_settings();
}
@@ -75,8 +75,8 @@ ConfigWindow::cancel_clicked()
void
ConfigWindow::ok_clicked()
{
- m_configuration->patch_path(m_path_entry->get_text());
- m_configuration->apply_settings();
+ _configuration->patch_path(_path_entry->get_text());
+ _configuration->apply_settings();
hide();
}
diff --git a/src/progs/ingenuity/ConfigWindow.h b/src/progs/ingenuity/ConfigWindow.h
index 7113416c..63a909ec 100644
--- a/src/progs/ingenuity/ConfigWindow.h
+++ b/src/progs/ingenuity/ConfigWindow.h
@@ -49,12 +49,12 @@ private:
void cancel_clicked();
void ok_clicked();
- Configuration* m_configuration;
+ Configuration* _configuration;
- Gtk::Entry* m_path_entry;
- Gtk::Button* m_save_button;
- Gtk::Button* m_cancel_button;
- Gtk::Button* m_ok_button;
+ Gtk::Entry* _path_entry;
+ Gtk::Button* _save_button;
+ Gtk::Button* _cancel_button;
+ Gtk::Button* _ok_button;
};
diff --git a/src/progs/ingenuity/Configuration.cpp b/src/progs/ingenuity/Configuration.cpp
index c95efca1..dbebcdc4 100644
--- a/src/progs/ingenuity/Configuration.cpp
+++ b/src/progs/ingenuity/Configuration.cpp
@@ -36,10 +36,10 @@ using namespace Ingen::Client;
Configuration::Configuration()
-: m_patch_path("/usr/share/om/patches:/usr/local/share/om/patches"),
- m_audio_port_color( 0x394f66B0),
- m_control_port_color(0x396639B0),
- m_midi_port_color( 0x663939B0)
+: _patch_path("/usr/share/om/patches:/usr/local/share/om/patches"),
+ _audio_port_color( 0x394f66B0),
+ _control_port_color(0x396639B0),
+ _midi_port_color( 0x663939B0)
{
}
@@ -92,7 +92,7 @@ Configuration::load_settings(string filename)
}
is >> s;
- m_patch_path = s;
+ _patch_path = s;
is.close();
}
@@ -118,7 +118,7 @@ Configuration::save_settings(string filename)
}
os << "file_version 1" << endl;
- os << "patch_path " << m_patch_path << endl;
+ os << "patch_path " << _patch_path << endl;
os.close();
}
@@ -131,7 +131,7 @@ void
Configuration::apply_settings()
{
cerr << "FIXME: patch path" << endl;
- //App::instance().loader()->set_patch_path(m_patch_path);
+ //App::instance().loader()->set_patch_path(_patch_path);
}
@@ -141,11 +141,11 @@ Configuration::get_port_color(const PortModel* pi)
assert(pi != NULL);
if (pi->is_control()) {
- return m_control_port_color;
+ return _control_port_color;
} else if (pi->is_audio()) {
- return m_audio_port_color;
+ return _audio_port_color;
} else if (pi->is_midi()) {
- return m_midi_port_color;
+ return _midi_port_color;
}
cerr << "[Configuration] Unknown port type! Port will be bright red, this is an error." << endl;
@@ -156,28 +156,28 @@ Configuration::get_port_color(const PortModel* pi)
Coord
Configuration::get_window_location(const string& id)
{
- return m_window_locations[id];
+ return _window_locations[id];
}
void
Configuration::set_window_location(const string& id, Coord loc)
{
- m_window_locations[id] = loc;
+ _window_locations[id] = loc;
}
Coord
Configuration::get_window_size(const string& id)
{
- return m_window_sizes[id];
+ return _window_sizes[id];
}
void
Configuration::set_window_size(const string& id, Coord size)
{
- m_window_sizes[id] = size;
+ _window_sizes[id] = size;
}*/
diff --git a/src/progs/ingenuity/Configuration.h b/src/progs/ingenuity/Configuration.h
index 9550c41b..8a3b74e3 100644
--- a/src/progs/ingenuity/Configuration.h
+++ b/src/progs/ingenuity/Configuration.h
@@ -48,24 +48,24 @@ public:
void apply_settings();
- string patch_path() { return m_patch_path; }
- void patch_path(const string& path) { m_patch_path = path; }
+ string patch_path() { return _patch_path; }
+ void patch_path(const string& path) { _patch_path = path; }
- const string& patch_folder() { return m_patch_folder; }
- void set_patch_folder(const string& f) { m_patch_folder = f; }
+ const string& patch_folder() { return _patch_folder; }
+ void set_patch_folder(const string& f) { _patch_folder = f; }
int get_port_color(const PortModel* pi);
private:
/** Search path for patch files. Colon delimited, as usual. */
- string m_patch_path;
+ string _patch_path;
/** Most recent patch folder shown in open dialog */
- string m_patch_folder;
+ string _patch_folder;
- int m_audio_port_color;
- int m_control_port_color;
- int m_midi_port_color;
+ int _audio_port_color;
+ int _control_port_color;
+ int _midi_port_color;
};
diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h
index 1681c061..70c82f1d 100644
--- a/src/progs/ingenuity/Connection.h
+++ b/src/progs/ingenuity/Connection.h
@@ -39,15 +39,15 @@ public:
boost::shared_ptr<LibFlowCanvas::Port> src,
boost::shared_ptr<LibFlowCanvas::Port> dst)
: LibFlowCanvas::Connection(canvas, src, dst)
- , m_connection_model(model)
+ , _connection_model(model)
{}
virtual ~Connection() {}
- SharedPtr<ConnectionModel> model() const { return m_connection_model; }
+ SharedPtr<ConnectionModel> model() const { return _connection_model; }
private:
- SharedPtr<ConnectionModel> m_connection_model;
+ SharedPtr<ConnectionModel> _connection_model;
};
diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/progs/ingenuity/ControlGroups.cpp
index bbd83ee8..2e2ded78 100644
--- a/src/progs/ingenuity/ControlGroups.cpp
+++ b/src/progs/ingenuity/ControlGroups.cpp
@@ -33,10 +33,10 @@ namespace Ingenuity {
ControlGroup::ControlGroup(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::VBox(cobject),
- m_control_panel(NULL),
- m_has_separator(false),
- m_separator(NULL),
- m_enable_signal(false)
+ _control_panel(NULL),
+ _has_separator(false),
+ _separator(NULL),
+ _enable_signal(false)
{
}
@@ -44,16 +44,16 @@ ControlGroup::ControlGroup(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
void
ControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
{
- m_control_panel = panel;
- m_port_model = pm,
- m_has_separator = separator,
+ _control_panel = panel;
+ _port_model = pm,
+ _has_separator = separator,
- assert(m_port_model);
+ assert(_port_model);
assert(panel);
/*if (separator) {
- m_separator = new Gtk::VSeparator();
- pack_start(*m_separator, false, false, 4);
+ _separator = new Gtk::VSeparator();
+ pack_start(*_separator, false, false, 4);
}
*/
@@ -67,12 +67,12 @@ ControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
SliderControlGroup::SliderControlGroup(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: ControlGroup(cobject, xml),
- m_enabled(true)
+ _enabled(true)
{
- xml->get_widget("control_strip_name_label", m_name_label);
- xml->get_widget("control_strip_min_spinner", m_min_spinner);
- xml->get_widget("control_strip_max_spinner", m_max_spinner);
- xml->get_widget("control_strip_slider", m_slider);
+ xml->get_widget("control_strip_name_label", _name_label);
+ xml->get_widget("control_strip_min_spinner", _min_spinner);
+ xml->get_widget("control_strip_max_spinner", _max_spinner);
+ xml->get_widget("control_strip_slider", _slider);
}
@@ -81,12 +81,12 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
{
ControlGroup::init(panel, pm, separator);
- assert(m_name_label);
- assert(m_min_spinner);
- assert(m_max_spinner);
- assert(m_slider);
+ assert(_name_label);
+ assert(_min_spinner);
+ assert(_max_spinner);
+ assert(_slider);
- m_slider->set_draw_value(true);
+ _slider->set_draw_value(true);
float min = 0.0f;
float max = 1.0f;
@@ -103,24 +103,24 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
set_name(pm->path().name());
- m_min_spinner->set_value(min);
- m_min_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::min_changed));
- m_max_spinner->set_value(max);
- m_max_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::max_changed));
+ _min_spinner->set_value(min);
+ _min_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::min_changed));
+ _max_spinner->set_value(max);
+ _max_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::max_changed));
- m_slider->set_value(m_port_model->value());
+ _slider->set_value(_port_model->value());
- m_slider->signal_event().connect(
+ _slider->signal_event().connect(
sigc::mem_fun(*this, &SliderControlGroup::slider_pressed));
- m_slider->signal_value_changed().connect(
+ _slider->signal_value_changed().connect(
sigc::mem_fun(*this, &SliderControlGroup::update_value_from_slider));
- m_slider->set_range(min, max);
+ _slider->set_range(min, max);
set_value(pm->value());
- m_enable_signal = true;
+ _enable_signal = true;
show_all();
}
@@ -129,14 +129,14 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
void
SliderControlGroup::metadata_update(const string& key, const Atom& value)
{
- m_enable_signal = false;
+ _enable_signal = false;
if ( (key == "min") && value.type() == Atom::FLOAT)
- m_min_spinner->set_value(value.get_float());
+ _min_spinner->set_value(value.get_float());
else if ( (key == "max") && value.type() == Atom::FLOAT)
- m_max_spinner->set_value(value.get_float());
+ _max_spinner->set_value(value.get_float());
- m_enable_signal = true;
+ _enable_signal = true;
}
@@ -145,49 +145,49 @@ SliderControlGroup::set_name(const string& name)
{
string name_label = "<span weight=\"bold\">";
name_label += name + "</span>";
- m_name_label->set_markup(name_label);
+ _name_label->set_markup(name_label);
}
void
SliderControlGroup::enable()
{
- m_slider->property_sensitive() = true;
- m_min_spinner->property_sensitive() = true;
- m_max_spinner->property_sensitive() = true;
+ _slider->property_sensitive() = true;
+ _min_spinner->property_sensitive() = true;
+ _max_spinner->property_sensitive() = true;
//m_value_spinner.property_sensitive() = true;
- m_name_label->property_sensitive() = true;
+ _name_label->property_sensitive() = true;
}
void
SliderControlGroup::disable()
{
- m_slider->property_sensitive() = false;
- m_min_spinner->property_sensitive() = false;
- m_max_spinner->property_sensitive() = false;
+ _slider->property_sensitive() = false;
+ _min_spinner->property_sensitive() = false;
+ _max_spinner->property_sensitive() = false;
//m_value_spinner.property_sensitive() = false;
- m_name_label->property_sensitive() = false;
+ _name_label->property_sensitive() = false;
}
void
SliderControlGroup::min_changed()
{
- double min = m_min_spinner->get_value();
- const double max = m_max_spinner->get_value();
+ double min = _min_spinner->get_value();
+ const double max = _max_spinner->get_value();
if (min >= max) {
min = max - 1.0;
- m_min_spinner->set_value(min);
+ _min_spinner->set_value(min);
}
- m_slider->set_range(min, max);
+ _slider->set_range(min, max);
- if (m_enable_signal) {
+ if (_enable_signal) {
char temp_buf[16];
snprintf(temp_buf, 16, "%f", min);
- App::instance().engine()->set_metadata(m_port_model->path(), "min", temp_buf);
+ App::instance().engine()->set_metadata(_port_model->path(), "min", temp_buf);
}
}
@@ -195,20 +195,20 @@ SliderControlGroup::min_changed()
void
SliderControlGroup::max_changed()
{
- const double min = m_min_spinner->get_value();
- double max = m_max_spinner->get_value();
+ const double min = _min_spinner->get_value();
+ double max = _max_spinner->get_value();
if (max <= min) {
max = min + 1.0;
- m_max_spinner->set_value(max);
+ _max_spinner->set_value(max);
}
- m_slider->set_range(min, max);
+ _slider->set_range(min, max);
- if (m_enable_signal) {
+ if (_enable_signal) {
char temp_buf[16];
snprintf(temp_buf, 16, "%f", max);
- App::instance().engine()->set_metadata(m_port_model->path(), "max", temp_buf);
+ App::instance().engine()->set_metadata(_port_model->path(), "max", temp_buf);
}
}
@@ -216,14 +216,14 @@ SliderControlGroup::max_changed()
void
SliderControlGroup::update_value_from_slider()
{
- if (m_enable_signal) {
- const float value = m_slider->get_value();
+ if (_enable_signal) {
+ const float value = _slider->get_value();
// Prevent spinner signal from doing all this over again (slow)
- m_enable_signal = false;
+ _enable_signal = false;
- m_control_panel->value_changed(m_port_model, value);
+ _control_panel->value_changed(_port_model, value);
- m_enable_signal = true;
+ _enable_signal = true;
}
}
@@ -232,25 +232,25 @@ SliderControlGroup::update_value_from_slider()
void
SliderControlGroup::update_value_from_spinner()
{
- if (m_enable_signal) {
- m_enable_signal = false;
- const float value = m_value_spinner.get_value();
+ if (_enable_signal) {
+ _enable_signal = false;
+ const float value = _value_spinner.get_value();
- if (value < m_min_spinner->get_value()) {
- m_min_spinner->set_value(value);
- m_slider->set_range(m_min_spinner->get_value(), m_max_spinner->get_value());
+ if (value < _min_spinner->get_value()) {
+ _min_spinner->set_value(value);
+ _slider->set_range(_min_spinner->get_value(), _max_spinner->get_value());
}
- if (value > m_max_spinner->get_value()) {
- m_max_spinner->set_value(value);
- m_slider->set_range(m_min_spinner->get_value(), m_max_spinner->get_value());
+ if (value > _max_spinner->get_value()) {
+ _max_spinner->set_value(value);
+ _slider->set_range(_min_spinner->get_value(), _max_spinner->get_value());
}
- m_slider->set_value(m_value_spinner.get_value());
+ _slider->set_value(_value_spinner.get_value());
- m_control_panel->value_changed(m_port_model, value);
+ _control_panel->value_changed(_port_model, value);
//m_port_model->value(value);
- m_enable_signal = true;
+ _enable_signal = true;
}
}
*/
@@ -263,11 +263,11 @@ SliderControlGroup::slider_pressed(GdkEvent* ev)
{
//cerr << "Pressed: " << ev->type << endl;
if (ev->type == GDK_BUTTON_PRESS) {
- m_enabled = false;
+ _enabled = false;
//cerr << "SLIDER FIXME\n";
- //GtkClientInterface::instance()->set_ignore_port(m_port_model->path());
+ //GtkClientInterface::instance()->set_ignore_port(_port_model->path());
} else if (ev->type == GDK_BUTTON_RELEASE) {
- m_enabled = true;
+ _enabled = true;
//cerr << "SLIDER FIXME\n";
//GtkClientInterface::instance()->clear_ignore_port();
}
@@ -281,24 +281,24 @@ SliderControlGroup::slider_pressed(GdkEvent* ev)
#if 0
IntegerControlGroup::IntegerControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
- m_enable_signal(false),
- m_alignment(0.5, 0.5, 0.0, 0.0),
- m_name_label(pm->path().name()),
- m_spinner(1.0, 0)
+ _enable_signal(false),
+ _alignment(0.5, 0.5, 0.0, 0.0),
+ _name_label(pm->path().name()),
+ _spinner(1.0, 0)
{
set_name(pm->path().name());
- m_spinner.set_range(-99999, 99999);
- m_spinner.set_value(m_port_model->value());
- m_spinner.signal_value_changed().connect(
+ _spinner.set_range(-99999, 99999);
+ _spinner.set_value(_port_model->value());
+ _spinner.signal_value_changed().connect(
sigc::mem_fun(*this, &IntegerControlGroup::update_value));
- m_spinner.set_increments(1, 10);
+ _spinner.set_increments(1, 10);
- m_alignment.add(m_spinner);
- pack_start(m_name_label);
- pack_start(m_alignment);
+ _alignment.add(_spinner);
+ pack_start(_name_label);
+ pack_start(_alignment);
- m_enable_signal = true;
+ _enable_signal = true;
show_all();
}
@@ -309,7 +309,7 @@ IntegerControlGroup::set_name(const string& name)
{
string name_label = "<span weight=\"bold\">";
name_label += name + "</span>";
- m_name_label->set_markup(name_label);
+ _name_label->set_markup(name_label);
}
@@ -317,34 +317,34 @@ void
IntegerControlGroup::set_value(float val)
{
//cerr << "[IntegerControlGroup] Setting value to " << val << endl;
- m_enable_signal = false;
- m_spinner.set_value(val);
- m_enable_signal = true;
+ _enable_signal = false;
+ _spinner.set_value(val);
+ _enable_signal = true;
}
void
IntegerControlGroup::enable()
{
- m_spinner.property_sensitive() = true;
- m_name_label->property_sensitive() = true;
+ _spinner.property_sensitive() = true;
+ _name_label->property_sensitive() = true;
}
void
IntegerControlGroup::disable()
{
- m_spinner.property_sensitive() = false;
- m_name_label->property_sensitive() = false;
+ _spinner.property_sensitive() = false;
+ _name_label->property_sensitive() = false;
}
void
IntegerControlGroup::update_value()
{
- if (m_enable_signal) {
- float value = m_spinner.get_value();
- m_control_panel->value_changed(m_port_model, value);
+ if (_enable_signal) {
+ float value = _spinner.get_value();
+ _control_panel->value_changed(_port_model, value);
//m_port_model->value(value);
}
}
@@ -355,21 +355,21 @@ IntegerControlGroup::update_value()
ToggleControlGroup::ToggleControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
- m_enable_signal(false),
- m_alignment(0.5, 0.5, 0.0, 0.0),
- m_name_label(pm->path().name())
+ _enable_signal(false),
+ _alignment(0.5, 0.5, 0.0, 0.0),
+ _name_label(pm->path().name())
{
set_name(pm->path().name());
- set_value(m_port_model->value());
- m_checkbutton.signal_toggled().connect(
+ set_value(_port_model->value());
+ _checkbutton.signal_toggled().connect(
sigc::mem_fun(*this, &ToggleControlGroup::update_value));
- m_alignment.add(m_checkbutton);
- pack_start(m_name_label);
- pack_start(m_alignment);
+ _alignment.add(_checkbutton);
+ pack_start(_name_label);
+ pack_start(_alignment);
- m_enable_signal = true;
+ _enable_signal = true;
show_all();
}
@@ -380,7 +380,7 @@ ToggleControlGroup::set_name(const string& name)
{
string name_label = "<span weight=\"bold\">";
name_label += name + "</span>";
- m_name_label->set_markup(name_label);
+ _name_label->set_markup(name_label);
}
@@ -388,34 +388,34 @@ void
ToggleControlGroup::set_value(float val)
{
//cerr << "[ToggleControlGroup] Setting value to " << val << endl;
- m_enable_signal = false;
- m_checkbutton.set_active( (val > 0.0f) );
- m_enable_signal = true;
+ _enable_signal = false;
+ _checkbutton.set_active( (val > 0.0f) );
+ _enable_signal = true;
}
void
ToggleControlGroup::enable()
{
- m_checkbutton.property_sensitive() = true;
- m_name_label->property_sensitive() = true;
+ _checkbutton.property_sensitive() = true;
+ _name_label->property_sensitive() = true;
}
void
ToggleControlGroup::disable()
{
- m_checkbutton.property_sensitive() = false;
- m_name_label->property_sensitive() = false;
+ _checkbutton.property_sensitive() = false;
+ _name_label->property_sensitive() = false;
}
void
ToggleControlGroup::update_value()
{
- if (m_enable_signal) {
- float value = m_checkbutton.get_active() ? 1.0f : 0.0f;
- m_control_panel->value_changed(m_port_model, value);
+ if (_enable_signal) {
+ float value = _checkbutton.get_active() ? 1.0f : 0.0f;
+ _control_panel->value_changed(_port_model, value);
//m_port_model->value(value);
}
}
diff --git a/src/progs/ingenuity/ControlGroups.h b/src/progs/ingenuity/ControlGroups.h
index fa43b77e..cb1fb0cb 100644
--- a/src/progs/ingenuity/ControlGroups.h
+++ b/src/progs/ingenuity/ControlGroups.h
@@ -43,12 +43,12 @@ public:
void init(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator);
- ~ControlGroup() { delete m_separator; }
+ ~ControlGroup() { delete _separator; }
- inline const SharedPtr<PortModel> port_model() const { return m_port_model; }
+ inline const SharedPtr<PortModel> port_model() const { return _port_model; }
void remove_separator() {
- assert(m_has_separator); remove(*m_separator); delete m_separator;
+ assert(_has_separator); remove(*_separator); delete _separator;
}
protected:
@@ -56,11 +56,11 @@ protected:
virtual void set_value(float value) = 0;
virtual void metadata_update(const string& key, const Atom& value) = 0;
- ControlPanel* m_control_panel;
- SharedPtr<PortModel> m_port_model;
- bool m_has_separator;
- Gtk::VSeparator* m_separator;
- bool m_enable_signal;
+ ControlPanel* _control_panel;
+ SharedPtr<PortModel> _port_model;
+ bool _has_separator;
+ Gtk::VSeparator* _separator;
+ bool _enable_signal;
};
@@ -95,26 +95,26 @@ private:
bool slider_pressed(GdkEvent* ev);
- bool m_enabled;
+ bool _enabled;
- Gtk::Label* m_name_label;
- Gtk::SpinButton* m_min_spinner;
- Gtk::SpinButton* m_max_spinner;
- //Gtk::SpinButton* m_value_spinner;
- Gtk::VScale* m_slider;
+ Gtk::Label* _name_label;
+ Gtk::SpinButton* _min_spinner;
+ Gtk::SpinButton* _max_spinner;
+ //Gtk::SpinButton* _value_spinner;
+ Gtk::VScale* _slider;
};
inline void
SliderControlGroup::set_value(const float val)
{
- m_enable_signal = false;
- //if (m_enabled) {
- if (m_slider->get_value() != val)
- m_slider->set_value(val);
+ _enable_signal = false;
+ //if (_enabled) {
+ if (_slider->get_value() != val)
+ _slider->set_value(val);
//m_value_spinner->set_value(val);
//}
- m_enable_signal = true;
+ _enable_signal = true;
}
@@ -138,10 +138,10 @@ private:
void update_value();
- bool m_enable_signal;
- Gtk::Alignment m_alignment;
- Gtk::Label m_name_label;
- Gtk::SpinButton m_spinner;
+ bool _enable_signal;
+ Gtk::Alignment _alignment;
+ Gtk::Label _name_label;
+ Gtk::SpinButton _spinner;
};
@@ -163,10 +163,10 @@ private:
void update_value();
- bool m_enable_signal;
- Gtk::Alignment m_alignment;
- Gtk::Label m_name_label;
- Gtk::CheckButton m_checkbutton;
+ bool _enable_signal;
+ Gtk::Alignment _alignment;
+ Gtk::Label _name_label;
+ Gtk::CheckButton _checkbutton;
};
#endif
diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/progs/ingenuity/ControlPanel.cpp
index 4a96b480..1fde42b9 100644
--- a/src/progs/ingenuity/ControlPanel.cpp
+++ b/src/progs/ingenuity/ControlPanel.cpp
@@ -28,17 +28,17 @@ namespace Ingenuity {
ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::HBox(cobject),
- m_callback_enabled(true)
+ _callback_enabled(true)
{
- xml->get_widget("control_panel_controls_box", m_control_box);
- xml->get_widget("control_panel_voice_controls_box", m_voice_control_box);
- xml->get_widget("control_panel_all_voices_radio", m_all_voices_radio);
- xml->get_widget("control_panel_specific_voice_radio", m_specific_voice_radio);
- xml->get_widget("control_panel_voice_spinbutton", m_voice_spinbutton);
+ xml->get_widget("control_panel_controls_box", _control_box);
+ xml->get_widget("control_panel_voice_controls_box", _voice_control_box);
+ xml->get_widget("control_panel_all_voices_radio", _all_voices_radio);
+ xml->get_widget("control_panel_specific_voice_radio", _specific_voice_radio);
+ xml->get_widget("control_panel_voice_spinbutton", _voice_spinbutton);
- m_all_voices_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::all_voices_selected));
- m_specific_voice_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::specific_voice_selected));
- m_voice_spinbutton->signal_value_changed().connect(sigc::mem_fun(this, &ControlPanel::voice_selected));
+ _all_voices_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::all_voices_selected));
+ _specific_voice_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::specific_voice_selected));
+ _voice_spinbutton->signal_value_changed().connect(sigc::mem_fun(this, &ControlPanel::voice_selected));
show_all();
}
@@ -46,7 +46,7 @@ ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
ControlPanel::~ControlPanel()
{
- for (vector<ControlGroup*>::iterator i = m_controls.begin(); i != m_controls.end(); ++i)
+ for (vector<ControlGroup*>::iterator i = _controls.begin(); i != _controls.end(); ++i)
delete (*i);
}
@@ -58,23 +58,23 @@ ControlPanel::init(SharedPtr<NodeModel> node, size_t poly)
assert(poly > 0);
if (poly > 1) {
- m_voice_spinbutton->set_range(0, poly - 1);
+ _voice_spinbutton->set_range(0, poly - 1);
} else {
- remove(*m_voice_control_box);
+ remove(*_voice_control_box);
}
for (PortModelList::const_iterator i = node->ports().begin(); i != node->ports().end(); ++i) {
add_port(*i);
}
- m_callback_enabled = true;
+ _callback_enabled = true;
}
ControlGroup*
ControlPanel::find_port(const Path& path) const
{
- for (vector<ControlGroup*>::const_iterator cg = m_controls.begin(); cg != m_controls.end(); ++cg)
+ for (vector<ControlGroup*>::const_iterator cg = _controls.begin(); cg != _controls.end(); ++cg)
if ((*cg)->port_model()->path() == path)
return (*cg);
@@ -95,7 +95,7 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
// Add port
if (pm->is_control() && pm->is_input()) {
- bool separator = (m_controls.size() > 0);
+ bool separator = (_controls.size() > 0);
SliderControlGroup* cg = NULL;
if (pm->is_integer())
cerr << "FIXME: integer\n";
@@ -109,8 +109,8 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
cg->init(this, pm, separator);
}
- m_controls.push_back(cg);
- m_control_box->pack_start(*cg, false, false, 0);
+ _controls.push_back(cg);
+ _control_box->pack_start(*cg, false, false, 0);
/*if (pm->connected())
cg->disable();
@@ -125,17 +125,17 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
}
Gtk::Requisition controls_size;
- m_control_box->size_request(controls_size);
- m_ideal_size.first = controls_size.width;
- m_ideal_size.second = controls_size.height;
+ _control_box->size_request(controls_size);
+ _ideal_size.first = controls_size.width;
+ _ideal_size.second = controls_size.height;
Gtk::Requisition voice_size;
- m_voice_control_box->size_request(voice_size);
- m_ideal_size.first += voice_size.width;
- m_ideal_size.second += voice_size.height;
+ _voice_control_box->size_request(voice_size);
+ _ideal_size.first += voice_size.width;
+ _ideal_size.second += voice_size.height;
- //cerr << "Setting ideal size to " << m_ideal_size.first
- // << " x " << m_ideal_size.second << endl;
+ //cerr << "Setting ideal size to " << _ideal_size.first
+ // << " x " << _ideal_size.second << endl;
}
@@ -145,18 +145,18 @@ void
ControlPanel::remove_port(const Path& path)
{
bool was_first = false;
- for (vector<ControlGroup*>::iterator cg = m_controls.begin(); cg != m_controls.end(); ++cg) {
+ for (vector<ControlGroup*>::iterator cg = _controls.begin(); cg != _controls.end(); ++cg) {
if ((*cg)->port_model()->path() == path) {
- m_control_box->remove(**cg);
- if (cg == m_controls.begin())
+ _control_box->remove(**cg);
+ if (cg == _controls.begin())
was_first = true;
- m_controls.erase(cg);
+ _controls.erase(cg);
break;
}
}
- if (was_first && m_controls.size() > 0)
- (*m_controls.begin())->remove_separator();
+ if (was_first && _controls.size() > 0)
+ (*_controls.begin())->remove_separator();
}
@@ -166,7 +166,7 @@ ControlPanel::remove_port(const Path& path)
void
ControlPanel::rename_port(const Path& old_path, const Path& new_path)
{
- for (vector<ControlGroup*>::iterator cg = m_controls.begin(); cg != m_controls.end(); ++cg) {
+ for (vector<ControlGroup*>::iterator cg = _controls.begin(); cg != _controls.end(); ++cg) {
if ((*cg)->port_model()->path() == old_path) {
(*cg)->set_name(new_path.name());
return;
@@ -183,7 +183,7 @@ ControlPanel::rename_port(const Path& old_path, const Path& new_path)
void
ControlPanel::enable_port(const Path& path)
{
- for (vector<ControlGroup*>::iterator i = m_controls.begin(); i != m_controls.end(); ++i) {
+ for (vector<ControlGroup*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
if ((*i)->port_model()->path() == path) {
(*i)->enable();
return;
@@ -199,7 +199,7 @@ ControlPanel::enable_port(const Path& path)
void
ControlPanel::disable_port(const Path& path)
{
- for (vector<ControlGroup*>::iterator i = m_controls.begin(); i != m_controls.end(); ++i) {
+ for (vector<ControlGroup*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
if ((*i)->port_model()->path() == path) {
(*i)->disable();
return;
@@ -213,17 +213,17 @@ ControlPanel::disable_port(const Path& path)
void
ControlPanel::value_changed(SharedPtr<PortModel> port, float val)
{
- if (m_callback_enabled) {
+ if (_callback_enabled) {
App::instance().engine()->disable_responses();
/* Send the message, but set the client-side model's value to the new
* setting right away (so the value doesn't need to be echoed back) */
- if (m_all_voices_radio->get_active()) {
+ if (_all_voices_radio->get_active()) {
App::instance().engine()->set_port_value(port->path(), val);
port->value(val);
} else {
- int voice = m_voice_spinbutton->get_value_as_int();
+ int voice = _voice_spinbutton->get_value_as_int();
App::instance().engine()->set_port_value(port->path(), voice, val);
port->value(val);
}
@@ -235,14 +235,14 @@ ControlPanel::value_changed(SharedPtr<PortModel> port, float val)
void
ControlPanel::all_voices_selected()
{
- m_voice_spinbutton->property_sensitive() = false;
+ _voice_spinbutton->property_sensitive() = false;
}
void
ControlPanel::specific_voice_selected()
{
- m_voice_spinbutton->property_sensitive() = true;
+ _voice_spinbutton->property_sensitive() = true;
}
diff --git a/src/progs/ingenuity/ControlPanel.h b/src/progs/ingenuity/ControlPanel.h
index f7a1cc5b..dc48dd8d 100644
--- a/src/progs/ingenuity/ControlPanel.h
+++ b/src/progs/ingenuity/ControlPanel.h
@@ -61,8 +61,8 @@ public:
void enable_port(const Path& path);
void disable_port(const Path& path);
- size_t num_controls() const { return m_controls.size(); }
- pair<int,int> ideal_size() const { return m_ideal_size; }
+ size_t num_controls() const { return _controls.size(); }
+ pair<int,int> ideal_size() const { return _ideal_size; }
// Callback for ControlGroup
void value_changed(SharedPtr<PortModel> port_path, float val);
@@ -72,16 +72,16 @@ private:
void specific_voice_selected();
void voice_selected();
- bool m_callback_enabled;
+ bool _callback_enabled;
- pair<int,int> m_ideal_size;
+ pair<int,int> _ideal_size;
- vector<ControlGroup*> m_controls;
- Gtk::HBox* m_control_box;
- Gtk::Box* m_voice_control_box;
- Gtk::RadioButton* m_all_voices_radio;
- Gtk::RadioButton* m_specific_voice_radio;
- Gtk::SpinButton* m_voice_spinbutton;
+ vector<ControlGroup*> _controls;
+ Gtk::HBox* _control_box;
+ Gtk::Box* _voice_control_box;
+ Gtk::RadioButton* _all_voices_radio;
+ Gtk::RadioButton* _specific_voice_radio;
+ Gtk::SpinButton* _voice_spinbutton;
};
diff --git a/src/progs/ingenuity/DSSIController.cpp b/src/progs/ingenuity/DSSIController.cpp
index c7b84b57..32093660 100644
--- a/src/progs/ingenuity/DSSIController.cpp
+++ b/src/progs/ingenuity/DSSIController.cpp
@@ -29,17 +29,17 @@ namespace Ingenuity {
DSSIController::DSSIController(SharedPtr<NodeModel> model)
-: m_banks_dirty(true)
+: _banks_dirty(true)
{
#if 0
assert(model->plugin()->type() == PluginModel::DSSI);
- Gtk::Menu::MenuList& items = m_menu.items();
+ Gtk::Menu::MenuList& items = _menu.items();
items[0].property_sensitive() = true; // "Show Control Window" item
- Gtk::Menu_Helpers::MenuElem program_elem("Select Program", m_program_menu);
+ Gtk::Menu_Helpers::MenuElem program_elem("Select Program", _program_menu);
items.push_front(program_elem);
- m_program_menu_item = program_elem.get_child();
- m_program_menu_item->set_sensitive(false);
+ _program_menu_item = program_elem.get_child();
+ _program_menu_item->set_sensitive(false);
items.push_front(Gtk::Menu_Helpers::MenuElem("Show Plugin GUI",
sigc::mem_fun(this, &DSSIController::show_gui)));
@@ -77,7 +77,7 @@ DSSIController::update_program_menu()
{
cerr << "FIXME: Program menu\n";
#if 0
- m_program_menu.items().clear();
+ _program_menu.items().clear();
const map<int, map<int, string> >& banks = node_model()->get_programs();
std::ostringstream oss;
@@ -88,7 +88,7 @@ DSSIController::update_program_menu()
if (banks.size() > 1)
bank_menu = manage(new Gtk::Menu());
else
- bank_menu = &m_program_menu;
+ bank_menu = &_program_menu;
map<int, string>::const_iterator j;
for (j = i->second.begin(); j != i->second.end(); ++j) {
oss.str("");
@@ -103,18 +103,18 @@ DSSIController::update_program_menu()
if (banks.size() > 1) {
oss.str("");
oss << "Bank " << i->first;
- m_program_menu.items().push_back(
+ _program_menu.items().push_back(
Gtk::Menu_Helpers::MenuElem(oss.str(), *bank_menu));
}
}
// Disable the program menu if there are no programs
if (banks.size() == 0)
- m_program_menu_item->set_sensitive(false);
+ _program_menu_item->set_sensitive(false);
else
- m_program_menu_item->set_sensitive(true);
+ _program_menu_item->set_sensitive(true);
- m_banks_dirty = false;
+ _banks_dirty = false;
#endif
}
@@ -265,7 +265,7 @@ void
DSSIController::show_menu(GdkEventButton* event)
{
#if 0
- if (m_banks_dirty)
+ if (_banks_dirty)
update_program_menu();
NodeController::show_menu(event);
#endif
diff --git a/src/progs/ingenuity/DSSIController.h b/src/progs/ingenuity/DSSIController.h
index 71c1f536..7fb6bad4 100644
--- a/src/progs/ingenuity/DSSIController.h
+++ b/src/progs/ingenuity/DSSIController.h
@@ -62,10 +62,10 @@ public:
private:
void update_program_menu();
- Gtk::Menu m_program_menu;
- Glib::RefPtr<Gtk::MenuItem> m_program_menu_item;
+ Gtk::Menu _program_menu;
+ Glib::RefPtr<Gtk::MenuItem> _program_menu_item;
- bool m_banks_dirty;
+ bool _banks_dirty;
};
diff --git a/src/progs/ingenuity/DSSIModule.cpp b/src/progs/ingenuity/DSSIModule.cpp
index 350c72aa..cbcdedf8 100644
--- a/src/progs/ingenuity/DSSIModule.cpp
+++ b/src/progs/ingenuity/DSSIModule.cpp
@@ -30,7 +30,7 @@ void
DSSIModule::on_double_click(GdkEventButton* ev)
{
/*
- DSSIController* dc = dynamic_cast<DSSIController*>(m_node);
+ DSSIController* dc = dynamic_cast<DSSIController*>(_node);
if (!dc || ! dc->attempt_to_show_gui())
show_control_window();
*/
diff --git a/src/progs/ingenuity/LashController.cpp b/src/progs/ingenuity/LashController.cpp
index 0fed3cf3..d7f46c2d 100644
--- a/src/progs/ingenuity/LashController.cpp
+++ b/src/progs/ingenuity/LashController.cpp
@@ -31,11 +31,11 @@ namespace Ingenuity {
LashController::LashController(lash_args_t* args)
-: m_client(NULL)
+: _client(NULL)
{
- m_client = lash_init(args, PACKAGE_NAME,
+ _client = lash_init(args, PACKAGE_NAME,
/*LASH_Config_Data_Set|*/LASH_Config_File, LASH_PROTOCOL(2, 0));
- if (m_client == NULL) {
+ if (_client == NULL) {
cerr << "[LashController] Failed to connect to LASH. Session management will not function." << endl;
} else {
cout << "[LashController] Lash initialised" << endl;
@@ -43,15 +43,15 @@ LashController::LashController(lash_args_t* args)
lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
lash_event_set_string(event, "Ingenuity");
- lash_send_event(m_client, event);
+ lash_send_event(_client, event);
}
LashController::~LashController()
{
- if (m_client != NULL) {
+ if (_client != NULL) {
lash_event_t* quit_event = lash_event_new_with_type(LASH_Quit);
- lash_send_event(m_client, quit_event);
+ lash_send_event(_client, quit_event);
}
}
@@ -59,19 +59,19 @@ LashController::~LashController()
void
LashController::process_events()
{
- assert(m_client != NULL);
+ assert(_client != NULL);
lash_event_t* ev = NULL;
lash_config_t* conf = NULL;
// Process events
- while ((ev = lash_get_event(m_client)) != NULL) {
+ while ((ev = lash_get_event(_client)) != NULL) {
handle_event(ev);
lash_event_destroy(ev);
}
// Process configs
- while ((conf = lash_get_config(m_client)) != NULL) {
+ while ((conf = lash_get_config(_client)) != NULL) {
handle_config(conf);
lash_config_destroy(conf);
}
@@ -90,23 +90,23 @@ LashController::handle_event(lash_event_t* ev)
if (type == LASH_Save_File) {
cout << "[LashController] LASH Save File - " << str << endl;
save(str);
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_File));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_File));
} else if (type == LASH_Restore_File) {
cout << "[LashController] LASH Restore File - " << str << endl;
cerr << "LASH RESTORE NOT YET (RE)IMPLEMENTED." << endl;
/*_controller->load_session_blocking(str + "/session");
_controller->lash_restore_finished();
- lash_send_event(m_client, lash_event_new_with_type(LASH_Restore_File));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Restore_File));
*/
/*} else if (type == LASH_Save_Data_Set) {
//cout << "[LashController] LASH Save Data Set - " << endl;
// Tell LASH we're done
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_Data_Set));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_Data_Set));
*/
} else if (type == LASH_Quit) {
cout << "[LashController] LASH Quit" << endl;
- m_client = NULL;
+ _client = NULL;
App::instance().quit();
} else {
cerr << "[LashController] Unhandled LASH event, type: " << static_cast<int>(type) << endl;
@@ -139,15 +139,15 @@ LashController::save(const string& dir)
// Save every patch under dir with it's path as a filename
// (so the dir structure will resemble the patch heirarchy)
- for (map<string,PatchController*>::iterator i = m_app->patches().begin();
- i != m_app->patches().end(); ++i) {
+ for (map<string,PatchController*>::iterator i = _app->patches().begin();
+ i != _app->patches().end(); ++i) {
pc = (*i).second;
pc->model()->filename(dir + pc->model()->path() + ".om");
}
// Create directories
- for (map<string,PatchController*>::iterator i = m_app->patches().begin();
- i != m_app->patches().end(); ++i) {
+ for (map<string,PatchController*>::iterator i = _app->patches().begin();
+ i != _app->patches().end(); ++i) {
pc = (*i).second;
if (pc->model()->parent() != NULL) {
string path = Path::parent(pc->model()->path()).substr(1) + "/";
diff --git a/src/progs/ingenuity/LashController.h b/src/progs/ingenuity/LashController.h
index 0619f32f..21ab5384 100644
--- a/src/progs/ingenuity/LashController.h
+++ b/src/progs/ingenuity/LashController.h
@@ -35,13 +35,13 @@ public:
LashController(lash_args_t* args);
~LashController();
- bool enabled() { return lash_enabled(m_client); }
+ bool enabled() { return lash_enabled(_client); }
void process_events();
private:
void save(const string& dir);
- lash_client_t* m_client;
+ lash_client_t* _client;
void handle_event(lash_event_t* conf);
void handle_config(lash_config_t* conf);
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index 0588c6b1..b3ef4e45 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -31,22 +31,22 @@ namespace Ingenuity {
LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::FileChooserDialog(cobject),
- m_replace(true)
+ _replace(true)
{
- xml->get_widget("load_patch_poly_from_current_radio", m_poly_from_current_radio);
- xml->get_widget("load_patch_poly_from_file_radio", m_poly_from_file_radio);
- xml->get_widget("load_patch_poly_from_user_radio", m_poly_from_user_radio);
- xml->get_widget("load_patch_poly_spinbutton", m_poly_spinbutton);
- xml->get_widget("load_patch_ok_button", m_ok_button);
- xml->get_widget("load_patch_cancel_button", m_cancel_button);
+ xml->get_widget("load_patch_poly_from_current_radio", _poly_from_current_radio);
+ xml->get_widget("load_patch_poly_from_file_radio", _poly_from_file_radio);
+ xml->get_widget("load_patch_poly_from_user_radio", _poly_from_user_radio);
+ xml->get_widget("load_patch_poly_spinbutton", _poly_spinbutton);
+ xml->get_widget("load_patch_ok_button", _ok_button);
+ xml->get_widget("load_patch_cancel_button", _cancel_button);
- m_poly_from_current_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
- m_poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
- m_poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_user_selected));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::ok_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::cancel_clicked));
+ _poly_from_current_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
+ _poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
+ _poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_user_selected));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::cancel_clicked));
- m_poly_from_current_radio->set_active(true);
+ _poly_from_current_radio->set_active(true);
Gtk::FileFilter filt;
filt.add_pattern("*.om");
@@ -68,7 +68,7 @@ void
LoadPatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -80,7 +80,7 @@ LoadPatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
LoadPatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
}
@@ -99,14 +99,14 @@ LoadPatchWindow::on_show()
void
LoadPatchWindow::poly_from_file_selected()
{
- m_poly_spinbutton->property_sensitive() = false;
+ _poly_spinbutton->property_sensitive() = false;
}
void
LoadPatchWindow::poly_from_user_selected()
{
- m_poly_spinbutton->property_sensitive() = true;
+ _poly_spinbutton->property_sensitive() = true;
}
@@ -117,14 +117,14 @@ LoadPatchWindow::ok_clicked()
optional<const string&> name;
optional<size_t> poly;
- if (m_poly_from_user_radio->get_active())
- poly = m_poly_spinbutton->get_value_as_int();
+ if (_poly_from_user_radio->get_active())
+ poly = _poly_spinbutton->get_value_as_int();
- if (m_replace)
- App::instance().engine()->clear_patch(m_patch->path());
+ if (_replace)
+ App::instance().engine()->clear_patch(_patch->path());
App::instance().loader()->load_patch(true, get_filename(), "/",
- m_initial_data, m_patch->parent()->path(), name, poly);
+ _initial_data, _patch->parent()->path(), name, poly);
hide();
}
diff --git a/src/progs/ingenuity/LoadPatchWindow.h b/src/progs/ingenuity/LoadPatchWindow.h
index a1bc228f..113c2a94 100644
--- a/src/progs/ingenuity/LoadPatchWindow.h
+++ b/src/progs/ingenuity/LoadPatchWindow.h
@@ -46,8 +46,8 @@ public:
void set_patch(SharedPtr<PatchModel> patch);
- void set_replace() { m_replace = true; }
- void set_merge() { m_replace = false; }
+ void set_replace() { _replace = true; }
+ void set_merge() { _replace = false; }
void present(SharedPtr<PatchModel> patch, MetadataMap data);
@@ -60,17 +60,17 @@ private:
void ok_clicked();
void cancel_clicked();
- MetadataMap m_initial_data;
+ MetadataMap _initial_data;
- SharedPtr<PatchModel> m_patch;
- bool m_replace;
+ SharedPtr<PatchModel> _patch;
+ bool _replace;
- Gtk::RadioButton* m_poly_from_current_radio;
- Gtk::RadioButton* m_poly_from_file_radio;
- Gtk::RadioButton* m_poly_from_user_radio;
- Gtk::SpinButton* m_poly_spinbutton;
- Gtk::Button* m_ok_button;
- Gtk::Button* m_cancel_button;
+ Gtk::RadioButton* _poly_from_current_radio;
+ Gtk::RadioButton* _poly_from_file_radio;
+ Gtk::RadioButton* _poly_from_user_radio;
+ Gtk::SpinButton* _poly_spinbutton;
+ Gtk::Button* _ok_button;
+ Gtk::Button* _cancel_button;
};
diff --git a/src/progs/ingenuity/LoadPluginWindow.cpp b/src/progs/ingenuity/LoadPluginWindow.cpp
index c5a51d4d..9965470c 100644
--- a/src/progs/ingenuity/LoadPluginWindow.cpp
+++ b/src/progs/ingenuity/LoadPluginWindow.cpp
@@ -34,70 +34,70 @@ namespace Ingenuity {
LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_has_shown(false),
- m_plugin_name_offset(0)
+ _has_shown(false),
+ _plugin_name_offset(0)
{
- xml->get_widget("load_plugin_plugins_treeview", m_plugins_treeview);
- xml->get_widget("load_plugin_polyphonic_checkbutton", m_polyphonic_checkbutton);
- xml->get_widget("load_plugin_name_entry", m_node_name_entry);
- xml->get_widget("load_plugin_clear_button", m_clear_button);
- xml->get_widget("load_plugin_add_button", m_add_button);
- //xml->get_widget("load_plugin_close_button", m_close_button);
- //xml->get_widget("load_plugin_ok_button", m_add_button);
+ xml->get_widget("load_plugin_plugins_treeview", _plugins_treeview);
+ xml->get_widget("load_plugin_polyphonic_checkbutton", _polyphonic_checkbutton);
+ xml->get_widget("load_plugin_name_entry", _node_name_entry);
+ xml->get_widget("load_plugin_clear_button", _clear_button);
+ xml->get_widget("load_plugin_add_button", _add_button);
+ //xml->get_widget("load_plugin_close_button", _close_button);
+ //xml->get_widget("load_plugin_ok_button", _add_button);
- xml->get_widget("load_plugin_filter_combo", m_filter_combo);
- xml->get_widget("load_plugin_search_entry", m_search_entry);
+ xml->get_widget("load_plugin_filter_combo", _filter_combo);
+ xml->get_widget("load_plugin_search_entry", _search_entry);
// Set up the plugins list
- m_plugins_liststore = Gtk::ListStore::create(m_plugins_columns);
- m_plugins_treeview->set_model(m_plugins_liststore);
- m_plugins_treeview->append_column("Name", m_plugins_columns.m_col_name);
- m_plugins_treeview->append_column("Type", m_plugins_columns.m_col_type);
- m_plugins_treeview->append_column("URI", m_plugins_columns.m_col_uri);
- //m_plugins_treeview->append_column("Library", m_plugins_columns.m_col_library);
- //m_plugins_treeview->append_column("Label", m_plugins_columns.m_col_label);
+ _plugins_liststore = Gtk::ListStore::create(_plugins_columns);
+ _plugins_treeview->set_model(_plugins_liststore);
+ _plugins_treeview->append_column("Name", _plugins_columns._col_name);
+ _plugins_treeview->append_column("Type", _plugins_columns._col_type);
+ _plugins_treeview->append_column("URI", _plugins_columns._col_uri);
+ //m_plugins_treeview->append_column("Library", _plugins_columns._col_library);
+ //m_plugins_treeview->append_column("Label", _plugins_columns._col_label);
// This could be nicer.. store the TreeViewColumns locally maybe?
- m_plugins_treeview->get_column(0)->set_sort_column(m_plugins_columns.m_col_name);
- m_plugins_treeview->get_column(1)->set_sort_column(m_plugins_columns.m_col_type);
- m_plugins_treeview->get_column(2)->set_sort_column(m_plugins_columns.m_col_uri);
- //m_plugins_treeview->get_column(3)->set_sort_column(m_plugins_columns.m_col_library);
- //m_plugins_treeview->get_column(4)->set_sort_column(m_plugins_columns.m_col_label);
+ _plugins_treeview->get_column(0)->set_sort_column(_plugins_columns._col_name);
+ _plugins_treeview->get_column(1)->set_sort_column(_plugins_columns._col_type);
+ _plugins_treeview->get_column(2)->set_sort_column(_plugins_columns._col_uri);
+ //m_plugins_treeview->get_column(3)->set_sort_column(_plugins_columns._col_library);
+ //m_plugins_treeview->get_column(4)->set_sort_column(_plugins_columns._col_label);
for (int i=0; i < 3; ++i)
- m_plugins_treeview->get_column(i)->set_resizable(true);
+ _plugins_treeview->get_column(i)->set_resizable(true);
// Set up the search criteria combobox
- m_criteria_liststore = Gtk::ListStore::create(m_criteria_columns);
- m_filter_combo->set_model(m_criteria_liststore);
- Gtk::TreeModel::iterator iter = m_criteria_liststore->append();
+ _criteria_liststore = Gtk::ListStore::create(_criteria_columns);
+ _filter_combo->set_model(_criteria_liststore);
+ Gtk::TreeModel::iterator iter = _criteria_liststore->append();
Gtk::TreeModel::Row row = *iter;
- row[m_criteria_columns.m_col_label] = "Name contains";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::NAME;
- m_filter_combo->set_active(iter);
- iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "Type contains";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::TYPE;
- iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "URI contains";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::URI;
- /*iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "Library contains: ";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::LIBRARY;
- iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "Label contains: ";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::LABEL;*/
-
- m_clear_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::clear_clicked));
- m_add_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
+ row[_criteria_columns._col_label] = "Name contains";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::NAME;
+ _filter_combo->set_active(iter);
+ iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "Type contains";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::TYPE;
+ iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "URI contains";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::URI;
+ /*iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "Library contains: ";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::LIBRARY;
+ iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "Label contains: ";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::LABEL;*/
+
+ _clear_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::clear_clicked));
+ _add_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
//m_close_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::close_clicked));
//m_add_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::ok_clicked));
- m_plugins_treeview->signal_row_activated().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_activated));
- m_search_entry->signal_activate().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
- m_search_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::filter_changed));
- m_node_name_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::name_changed));
+ _plugins_treeview->signal_row_activated().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_activated));
+ _search_entry->signal_activate().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
+ _search_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::filter_changed));
+ _node_name_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::name_changed));
- m_selection = m_plugins_treeview->get_selection();
- m_selection->signal_changed().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_selection_changed));
+ _selection = _plugins_treeview->get_selection();
+ _selection->signal_changed().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_selection_changed));
//m_add_button->grab_default();
}
@@ -107,7 +107,7 @@ void
LoadPluginWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -118,19 +118,19 @@ LoadPluginWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
LoadPluginWindow::name_changed()
{
- string name = m_node_name_entry->get_text();
+ string name = _node_name_entry->get_text();
if (!Path::is_valid_name(name)) {
//m_message_label->set_text("Name contains invalid characters.");
- m_add_button->property_sensitive() = false;
- } else if (m_patch->get_node(name)) {
+ _add_button->property_sensitive() = false;
+ } else if (_patch->get_node(name)) {
//m_message_label->set_text("An object already exists with that name.");
- m_add_button->property_sensitive() = false;
+ _add_button->property_sensitive() = false;
} else if (name.length() == 0) {
//m_message_label->set_text("");
- m_add_button->property_sensitive() = false;
+ _add_button->property_sensitive() = false;
} else {
//m_message_label->set_text("");
- m_add_button->property_sensitive() = true;
+ _add_button->property_sensitive() = true;
}
}
@@ -142,12 +142,12 @@ LoadPluginWindow::name_changed()
void
LoadPluginWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
if (patch->poly() <= 1)
- m_polyphonic_checkbutton->property_sensitive() = false;
+ _polyphonic_checkbutton->property_sensitive() = false;
else
- m_polyphonic_checkbutton->property_sensitive() = true;
+ _polyphonic_checkbutton->property_sensitive() = true;
}
@@ -162,20 +162,20 @@ LoadPluginWindow::set_patch(SharedPtr<PatchModel> patch)
void
LoadPluginWindow::on_show()
{
- if (!m_has_shown) {
+ if (!_has_shown) {
set_plugin_list(App::instance().store()->plugins());
// Center on patch window
- /*int m_w, m_h;
- get_size(m_w, m_h);
+ /*int _w, _h;
+ get_size(_w, _h);
int parent_x, parent_y, parent_w, parent_h;
- m_patch_controller->window()->get_position(parent_x, parent_y);
- m_patch_controller->window()->get_size(parent_w, parent_h);
+ _patch_controller->window()->get_position(parent_x, parent_y);
+ _patch_controller->window()->get_size(parent_w, parent_h);
- move(parent_x + parent_w/2 - m_w/2, parent_y + parent_h/2 - m_h/2);
+ move(parent_x + parent_w/2 - _w/2, parent_y + parent_h/2 - _h/2);
*/
- m_has_shown = true;
+ _has_shown = true;
}
Gtk::Window::on_show();
}
@@ -184,40 +184,40 @@ LoadPluginWindow::on_show()
void
LoadPluginWindow::set_plugin_list(const std::map<string, SharedPtr<PluginModel> >& m)
{
- m_plugins_liststore->clear();
+ _plugins_liststore->clear();
for (std::map<string, SharedPtr<PluginModel> >::const_iterator i = m.begin(); i != m.end(); ++i) {
SharedPtr<PluginModel> plugin = (*i).second;
- Gtk::TreeModel::iterator iter = m_plugins_liststore->append();
+ Gtk::TreeModel::iterator iter = _plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
- row[m_plugins_columns.m_col_name] = plugin->name();
- //row[m_plugins_columns.m_col_label] = plugin->plug_label();
- row[m_plugins_columns.m_col_type] = plugin->type_uri();
- row[m_plugins_columns.m_col_uri] = plugin->uri();
- row[m_plugins_columns.m_col_label] = plugin->name();
- //row[m_plugins_columns.m_col_library] = plugin->lib_name();
- row[m_plugins_columns.m_col_plugin_model] = plugin;
+ row[_plugins_columns._col_name] = plugin->name();
+ //row[_plugins_columns._col_label] = plugin->plug_label();
+ row[_plugins_columns._col_type] = plugin->type_uri();
+ row[_plugins_columns._col_uri] = plugin->uri();
+ row[_plugins_columns._col_label] = plugin->name();
+ //row[_plugins_columns._col_library] = plugin->lib_name();
+ row[_plugins_columns._col_plugin_model] = plugin;
}
- m_plugins_treeview->columns_autosize();
+ _plugins_treeview->columns_autosize();
}
void
LoadPluginWindow::add_plugin(SharedPtr<PluginModel> plugin)
{
- Gtk::TreeModel::iterator iter = m_plugins_liststore->append();
+ Gtk::TreeModel::iterator iter = _plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
- row[m_plugins_columns.m_col_name] = plugin->name();
- //row[m_plugins_columns.m_col_label] = plugin->plug_label();
- row[m_plugins_columns.m_col_type] = plugin->type_uri();
- row[m_plugins_columns.m_col_uri] = plugin->uri();
- row[m_plugins_columns.m_col_label] = plugin->name();
- //row[m_plugins_columns.m_col_library] = plugin->lib_name();
- row[m_plugins_columns.m_col_plugin_model] = plugin;
+ row[_plugins_columns._col_name] = plugin->name();
+ //row[_plugins_columns._col_label] = plugin->plug_label();
+ row[_plugins_columns._col_type] = plugin->type_uri();
+ row[_plugins_columns._col_uri] = plugin->uri();
+ row[_plugins_columns._col_label] = plugin->name();
+ //row[_plugins_columns._col_library] = plugin->lib_name();
+ row[_plugins_columns._col_plugin_model] = plugin;
}
@@ -235,13 +235,13 @@ LoadPluginWindow::plugin_activated(const Gtk::TreeModel::Path& path, Gtk::TreeVi
void
LoadPluginWindow::plugin_selection_changed()
{
- m_plugin_name_offset = 0;
+ _plugin_name_offset = 0;
- m_node_name_entry->set_text(generate_module_name());
+ _node_name_entry->set_text(generate_module_name());
- //Gtk::TreeModel::iterator iter = m_selection->get_selected();
+ //Gtk::TreeModel::iterator iter = _selection->get_selected();
//Gtk::TreeModel::Row row = *iter;
- //const PluginModel* plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
+ //const PluginModel* plugin = row.get_value(_plugins_columns._col_plugin_model);
}
@@ -256,11 +256,11 @@ LoadPluginWindow::generate_module_name(int offset)
{
string name = "";
- Gtk::TreeModel::iterator iter = m_selection->get_selected();
+ Gtk::TreeModel::iterator iter = _selection->get_selected();
if (iter) {
Gtk::TreeModel::Row row = *iter;
- SharedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
+ SharedPtr<PluginModel> plugin = row.get_value(_plugins_columns._col_plugin_model);
char num_buf[3];
for (uint i=0; i < 99; ++i) {
name = plugin->default_node_name();
@@ -271,7 +271,7 @@ LoadPluginWindow::generate_module_name(int offset)
name += "_";
name += num_buf;
}
- if (!m_patch->get_node(name))
+ if (!_patch->get_node(name))
break;
else
name = "";
@@ -285,13 +285,13 @@ LoadPluginWindow::generate_module_name(int offset)
void
LoadPluginWindow::add_clicked()
{
- Gtk::TreeModel::iterator iter = m_selection->get_selected();
- bool polyphonic = m_polyphonic_checkbutton->get_active();
+ Gtk::TreeModel::iterator iter = _selection->get_selected();
+ bool polyphonic = _polyphonic_checkbutton->get_active();
if (iter) { // If anything is selected
Gtk::TreeModel::Row row = *iter;
- SharedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
- string name = m_node_name_entry->get_text();
+ SharedPtr<PluginModel> plugin = row.get_value(_plugins_columns._col_plugin_model);
+ string name = _node_name_entry->get_text();
if (name == "") {
name = generate_module_name();
}
@@ -302,10 +302,10 @@ LoadPluginWindow::add_clicked()
dialog.run();
} else {
- Path path = m_patch->path().base() + Path::nameify(name);
- App::instance().engine()->create_node_with_data(plugin->uri(), path, polyphonic, m_initial_data);
- ++m_plugin_name_offset;
- m_node_name_entry->set_text(generate_module_name(m_plugin_name_offset));
+ Path path = _patch->path().base() + Path::nameify(name);
+ App::instance().engine()->create_node_with_data(plugin->uri(), path, polyphonic, _initial_data);
+ ++_plugin_name_offset;
+ _node_name_entry->set_text(generate_module_name(_plugin_name_offset));
// Set the next module location 20 over, for a cascade effect
cerr << "FIXME: cascade\n";
@@ -335,14 +335,14 @@ LoadPluginWindow::ok_clicked()
void
LoadPluginWindow::filter_changed()
{
- m_plugins_liststore->clear();
+ _plugins_liststore->clear();
- string search = m_search_entry->get_text();
+ string search = _search_entry->get_text();
transform(search.begin(), search.end(), search.begin(), toupper);
// Get selected criteria
- const Gtk::TreeModel::Row row = *(m_filter_combo->get_active());
- CriteriaColumns::Criteria criteria = row[m_criteria_columns.m_col_criteria];
+ const Gtk::TreeModel::Row row = *(_filter_combo->get_active());
+ CriteriaColumns::Criteria criteria = row[_criteria_columns._col_criteria];
string field;
@@ -374,22 +374,22 @@ LoadPluginWindow::filter_changed()
transform(field.begin(), field.end(), field.begin(), toupper);
if (field.find(search) != string::npos) {
- model_iter = m_plugins_liststore->append();
+ model_iter = _plugins_liststore->append();
model_row = *model_iter;
- model_row[m_plugins_columns.m_col_name] = plugin->name();
- //model_row[m_plugins_columns.m_col_label] = plugin->plug_label();
- model_row[m_plugins_columns.m_col_type] = plugin->type_uri();
- model_row[m_plugins_columns.m_col_uri] = plugin->uri();
- model_row[m_plugins_columns.m_col_plugin_model] = plugin;
+ model_row[_plugins_columns._col_name] = plugin->name();
+ //model_row[_plugins_columns._col_label] = plugin->plug_label();
+ model_row[_plugins_columns._col_type] = plugin->type_uri();
+ model_row[_plugins_columns._col_uri] = plugin->uri();
+ model_row[_plugins_columns._col_plugin_model] = plugin;
++num_visible;
}
}
if (num_visible == 1) {
- m_selection->unselect_all();
- m_selection->select(model_iter);
+ _selection->unselect_all();
+ _selection->select(model_iter);
}
}
@@ -397,7 +397,7 @@ LoadPluginWindow::filter_changed()
void
LoadPluginWindow::clear_clicked()
{
- m_search_entry->set_text("");
+ _search_entry->set_text("");
set_plugin_list(App::instance().store()->plugins());
}
diff --git a/src/progs/ingenuity/LoadPluginWindow.h b/src/progs/ingenuity/LoadPluginWindow.h
index ec416f15..8e2d6460 100644
--- a/src/progs/ingenuity/LoadPluginWindow.h
+++ b/src/progs/ingenuity/LoadPluginWindow.h
@@ -42,22 +42,22 @@ class ModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
ModelColumns() {
- add(m_col_name);
- add(m_col_type);
- add(m_col_uri);
- add(m_col_label);
- //add(m_col_library);
- //add(m_col_label);
- add(m_col_plugin_model);
+ add(_col_name);
+ add(_col_type);
+ add(_col_uri);
+ add(_col_label);
+ //add(_col_library);
+ //add(_col_label);
+ add(_col_plugin_model);
}
- Gtk::TreeModelColumn<Glib::ustring> m_col_name;
- Gtk::TreeModelColumn<Glib::ustring> m_col_type;
- Gtk::TreeModelColumn<Glib::ustring> m_col_uri;
+ Gtk::TreeModelColumn<Glib::ustring> _col_name;
+ Gtk::TreeModelColumn<Glib::ustring> _col_type;
+ Gtk::TreeModelColumn<Glib::ustring> _col_uri;
// Not displayed:
- Gtk::TreeModelColumn<Glib::ustring> m_col_label;
- Gtk::TreeModelColumn<SharedPtr<PluginModel> > m_col_plugin_model;
+ Gtk::TreeModelColumn<Glib::ustring> _col_label;
+ Gtk::TreeModelColumn<SharedPtr<PluginModel> > _col_plugin_model;
};
@@ -70,10 +70,10 @@ class CriteriaColumns : public Gtk::TreeModel::ColumnRecord
public:
enum Criteria { NAME, TYPE, URI, };
- CriteriaColumns() { add(m_col_label); add(m_col_criteria); }
+ CriteriaColumns() { add(_col_label); add(_col_criteria); }
- Gtk::TreeModelColumn<Glib::ustring> m_col_label;
- Gtk::TreeModelColumn<Criteria> m_col_criteria;
+ Gtk::TreeModelColumn<Glib::ustring> _col_label;
+ Gtk::TreeModelColumn<Criteria> _col_criteria;
};
@@ -92,7 +92,7 @@ public:
void set_plugin_list(const std::map<string, SharedPtr<PluginModel> >& m);
void add_plugin(SharedPtr<PluginModel> plugin);
- bool has_shown() const { return m_has_shown; }
+ bool has_shown() const { return _has_shown; }
void present(SharedPtr<PatchModel> patch, MetadataMap data);
@@ -112,31 +112,31 @@ private:
void plugin_selection_changed();
string generate_module_name(int offset = 0);
- MetadataMap m_initial_data;
+ MetadataMap _initial_data;
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
- bool m_has_shown; // plugin list only populated on show to speed patch window creation
+ bool _has_shown; // plugin list only populated on show to speed patch window creation
- Glib::RefPtr<Gtk::ListStore> m_plugins_liststore;
- ModelColumns m_plugins_columns;
+ Glib::RefPtr<Gtk::ListStore> _plugins_liststore;
+ ModelColumns _plugins_columns;
- Glib::RefPtr<Gtk::ListStore> m_criteria_liststore;
- CriteriaColumns m_criteria_columns;
+ Glib::RefPtr<Gtk::ListStore> _criteria_liststore;
+ CriteriaColumns _criteria_columns;
- Glib::RefPtr<Gtk::TreeSelection> m_selection;
+ Glib::RefPtr<Gtk::TreeSelection> _selection;
- int m_plugin_name_offset; // see comments for generate_plugin_name
+ int _plugin_name_offset; // see comments for generate_plugin_name
- Gtk::TreeView* m_plugins_treeview;
- Gtk::CheckButton* m_polyphonic_checkbutton;
- Gtk::Entry* m_node_name_entry;
- Gtk::Button* m_clear_button;
- Gtk::Button* m_add_button;
- //Gtk::Button* m_close_button;
- //Gtk::Button* m_ok_button;
- Gtk::ComboBox* m_filter_combo;
- Gtk::Entry* m_search_entry;
+ Gtk::TreeView* _plugins_treeview;
+ Gtk::CheckButton* _polyphonic_checkbutton;
+ Gtk::Entry* _node_name_entry;
+ Gtk::Button* _clear_button;
+ Gtk::Button* _add_button;
+ //Gtk::Button* _close_button;
+ //Gtk::Button* _ok_button;
+ Gtk::ComboBox* _filter_combo;
+ Gtk::Entry* _search_entry;
};
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp
index 9255bcf1..4cbe92f5 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.cpp
+++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp
@@ -34,23 +34,23 @@ namespace Ingenuity {
LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::FileChooserDialog(cobject)
{
- xml->get_widget("load_subpatch_name_from_file_radio", m_name_from_file_radio);
- xml->get_widget("load_subpatch_name_from_user_radio", m_name_from_user_radio);
- xml->get_widget("load_subpatch_name_entry", m_name_entry);
- xml->get_widget("load_subpatch_poly_from_file_radio", m_poly_from_file_radio);
- xml->get_widget("load_subpatch_poly_from_parent_radio", m_poly_from_parent_radio);
- xml->get_widget("load_subpatch_poly_from_user_radio", m_poly_from_user_radio);
- xml->get_widget("load_subpatch_poly_spinbutton", m_poly_spinbutton);
- xml->get_widget("load_subpatch_ok_button", m_ok_button);
- xml->get_widget("load_subpatch_cancel_button", m_cancel_button);
-
- m_name_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_name_entry));
- m_name_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_name_entry));
- m_poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
- m_poly_from_parent_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
- m_poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_poly_spinner));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::ok_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::cancel_clicked));
+ xml->get_widget("load_subpatch_name_from_file_radio", _name_from_file_radio);
+ xml->get_widget("load_subpatch_name_from_user_radio", _name_from_user_radio);
+ xml->get_widget("load_subpatch_name_entry", _name_entry);
+ xml->get_widget("load_subpatch_poly_from_file_radio", _poly_from_file_radio);
+ xml->get_widget("load_subpatch_poly_from_parent_radio", _poly_from_parent_radio);
+ xml->get_widget("load_subpatch_poly_from_user_radio", _poly_from_user_radio);
+ xml->get_widget("load_subpatch_poly_spinbutton", _poly_spinbutton);
+ xml->get_widget("load_subpatch_ok_button", _ok_button);
+ xml->get_widget("load_subpatch_cancel_button", _cancel_button);
+
+ _name_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_name_entry));
+ _name_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_name_entry));
+ _poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
+ _poly_from_parent_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
+ _poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_poly_spinner));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::cancel_clicked));
Gtk::FileFilter filt;
filt.add_pattern("*.om");
@@ -72,7 +72,7 @@ void
LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -84,13 +84,13 @@ LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
LoadSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
char temp_buf[4];
snprintf(temp_buf, 4, "%zd", patch->poly());
Glib::ustring txt = "Same as parent (";
txt.append(temp_buf).append(")");
- m_poly_from_parent_radio->set_label(txt);
+ _poly_from_parent_radio->set_label(txt);
}
@@ -110,53 +110,53 @@ LoadSubpatchWindow::on_show()
void
LoadSubpatchWindow::disable_name_entry()
{
- m_name_entry->property_sensitive() = false;
+ _name_entry->property_sensitive() = false;
}
void
LoadSubpatchWindow::enable_name_entry()
{
- m_name_entry->property_sensitive() = true;
+ _name_entry->property_sensitive() = true;
}
void
LoadSubpatchWindow::disable_poly_spinner()
{
- m_poly_spinbutton->property_sensitive() = false;
+ _poly_spinbutton->property_sensitive() = false;
}
void
LoadSubpatchWindow::enable_poly_spinner()
{
- m_poly_spinbutton->property_sensitive() = true;
+ _poly_spinbutton->property_sensitive() = true;
}
void
LoadSubpatchWindow::ok_clicked()
{
- assert(m_patch);
+ assert(_patch);
// If unset load_patch will load values
optional<const string&> name;
optional<size_t> poly;
string name_str = "";
- if (m_name_from_user_radio->get_active()) {
- name_str = m_name_entry->get_text();
+ if (_name_from_user_radio->get_active()) {
+ name_str = _name_entry->get_text();
name = name_str;
}
- if (m_poly_from_user_radio->get_active())
- poly = m_poly_spinbutton->get_value_as_int();
- else if (m_poly_from_parent_radio->get_active())
- poly = m_patch->poly();
+ if (_poly_from_user_radio->get_active())
+ poly = _poly_spinbutton->get_value_as_int();
+ else if (_poly_from_parent_radio->get_active())
+ poly = _patch->poly();
App::instance().loader()->load_patch(false, get_filename(), "/",
- m_initial_data, m_patch->path(), name, poly);
+ _initial_data, _patch->path(), name, poly);
hide();
}
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.h b/src/progs/ingenuity/LoadSubpatchWindow.h
index db178091..ba4f60a9 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.h
+++ b/src/progs/ingenuity/LoadSubpatchWindow.h
@@ -55,19 +55,19 @@ private:
void ok_clicked();
void cancel_clicked();
- MetadataMap m_initial_data;
+ MetadataMap _initial_data;
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
- Gtk::RadioButton* m_name_from_file_radio;
- Gtk::RadioButton* m_name_from_user_radio;
- Gtk::Entry* m_name_entry;
- Gtk::RadioButton* m_poly_from_file_radio;
- Gtk::RadioButton* m_poly_from_parent_radio;
- Gtk::RadioButton* m_poly_from_user_radio;
- Gtk::SpinButton* m_poly_spinbutton;
- Gtk::Button* m_ok_button;
- Gtk::Button* m_cancel_button;
+ Gtk::RadioButton* _name_from_file_radio;
+ Gtk::RadioButton* _name_from_user_radio;
+ Gtk::Entry* _name_entry;
+ Gtk::RadioButton* _poly_from_file_radio;
+ Gtk::RadioButton* _poly_from_parent_radio;
+ Gtk::RadioButton* _poly_from_user_radio;
+ Gtk::SpinButton* _poly_spinbutton;
+ Gtk::Button* _ok_button;
+ Gtk::Button* _cancel_button;
};
diff --git a/src/progs/ingenuity/MessagesWindow.cpp b/src/progs/ingenuity/MessagesWindow.cpp
index 002fb814..8da6e53e 100644
--- a/src/progs/ingenuity/MessagesWindow.cpp
+++ b/src/progs/ingenuity/MessagesWindow.cpp
@@ -24,24 +24,24 @@ using std::string;
MessagesWindow::MessagesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("messages_textview", m_textview);
- glade_xml->get_widget("messages_clear_button", m_clear_button);
- glade_xml->get_widget("messages_close_button", m_close_button);
+ glade_xml->get_widget("messages_textview", _textview);
+ glade_xml->get_widget("messages_clear_button", _clear_button);
+ glade_xml->get_widget("messages_close_button", _close_button);
- m_clear_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::clear_clicked));
- m_close_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::close_clicked));
+ _clear_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::clear_clicked));
+ _close_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::close_clicked));
}
void
MessagesWindow::post(const string& msg)
{
- Glib::RefPtr<Gtk::TextBuffer> text_buf = m_textview->get_buffer();
+ Glib::RefPtr<Gtk::TextBuffer> text_buf = _textview->get_buffer();
text_buf->insert(text_buf->end(), msg);
text_buf->insert(text_buf->end(), "\n");
- if (!m_clear_button->is_sensitive())
- m_clear_button->set_sensitive(true);
+ if (!_clear_button->is_sensitive())
+ _clear_button->set_sensitive(true);
}
@@ -55,9 +55,9 @@ MessagesWindow::close_clicked()
void
MessagesWindow::clear_clicked()
{
- Glib::RefPtr<Gtk::TextBuffer> text_buf = m_textview->get_buffer();
+ Glib::RefPtr<Gtk::TextBuffer> text_buf = _textview->get_buffer();
text_buf->erase(text_buf->begin(), text_buf->end());
- m_clear_button->set_sensitive(false);
+ _clear_button->set_sensitive(false);
}
diff --git a/src/progs/ingenuity/MessagesWindow.h b/src/progs/ingenuity/MessagesWindow.h
index e9d836f3..50da2d9e 100644
--- a/src/progs/ingenuity/MessagesWindow.h
+++ b/src/progs/ingenuity/MessagesWindow.h
@@ -44,9 +44,9 @@ private:
void clear_clicked();
void close_clicked();
- Gtk::TextView* m_textview;
- Gtk::Button* m_clear_button;
- Gtk::Button* m_close_button;
+ Gtk::TextView* _textview;
+ Gtk::Button* _clear_button;
+ Gtk::Button* _close_button;
};
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index ae609744..2b13e39e 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -27,24 +27,24 @@ namespace Ingenuity {
NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject)
{
- xml->get_widget("new_subpatch_name_entry", m_name_entry);
- xml->get_widget("new_subpatch_message_label", m_message_label);
- xml->get_widget("new_subpatch_polyphony_spinbutton", m_poly_spinbutton);
- xml->get_widget("new_subpatch_ok_button", m_ok_button);
- xml->get_widget("new_subpatch_cancel_button", m_cancel_button);
-
- m_name_entry->signal_changed().connect(sigc::mem_fun(this, &NewSubpatchWindow::name_changed));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::ok_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::cancel_clicked));
+ xml->get_widget("new_subpatch_name_entry", _name_entry);
+ xml->get_widget("new_subpatch_message_label", _message_label);
+ xml->get_widget("new_subpatch_polyphony_spinbutton", _poly_spinbutton);
+ xml->get_widget("new_subpatch_ok_button", _ok_button);
+ xml->get_widget("new_subpatch_cancel_button", _cancel_button);
+
+ _name_entry->signal_changed().connect(sigc::mem_fun(this, &NewSubpatchWindow::name_changed));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::cancel_clicked));
- m_ok_button->property_sensitive() = false;
+ _ok_button->property_sensitive() = false;
}
void
NewSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -55,7 +55,7 @@ NewSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
NewSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
}
@@ -65,19 +65,19 @@ NewSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
void
NewSubpatchWindow::name_changed()
{
- string name = m_name_entry->get_text();
+ string name = _name_entry->get_text();
if (!Path::is_valid_name(name)) {
- m_message_label->set_text("Name contains invalid characters.");
- m_ok_button->property_sensitive() = false;
- } else if (m_patch->get_node(name)) {
- m_message_label->set_text("An object already exists with that name.");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("Name contains invalid characters.");
+ _ok_button->property_sensitive() = false;
+ } else if (_patch->get_node(name)) {
+ _message_label->set_text("An object already exists with that name.");
+ _ok_button->property_sensitive() = false;
} else if (name.length() == 0) {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = false;
} else {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = true;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = true;
}
}
@@ -85,10 +85,10 @@ NewSubpatchWindow::name_changed()
void
NewSubpatchWindow::ok_clicked()
{
- const Path path = m_patch->path().base() + Path::nameify(m_name_entry->get_text());
- const size_t poly = m_poly_spinbutton->get_value_as_int();
+ const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
+ const size_t poly = _poly_spinbutton->get_value_as_int();
- App::instance().engine()->create_patch_with_data(path, poly, m_initial_data);
+ App::instance().engine()->create_patch_with_data(path, poly, _initial_data);
App::instance().engine()->enable_patch(path);
hide();
diff --git a/src/progs/ingenuity/NewSubpatchWindow.h b/src/progs/ingenuity/NewSubpatchWindow.h
index 031fa9fd..2208aafc 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.h
+++ b/src/progs/ingenuity/NewSubpatchWindow.h
@@ -48,14 +48,14 @@ private:
void ok_clicked();
void cancel_clicked();
- MetadataMap m_initial_data;
- SharedPtr<PatchModel> m_patch;
+ MetadataMap _initial_data;
+ SharedPtr<PatchModel> _patch;
- Gtk::Entry* m_name_entry;
- Gtk::Label* m_message_label;
- Gtk::SpinButton* m_poly_spinbutton;
- Gtk::Button* m_ok_button;
- Gtk::Button* m_cancel_button;
+ Gtk::Entry* _name_entry;
+ Gtk::Label* _message_label;
+ Gtk::SpinButton* _poly_spinbutton;
+ Gtk::Button* _ok_button;
+ Gtk::Button* _cancel_button;
};
diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp
index 7ee62bc4..f9c3b835 100644
--- a/src/progs/ingenuity/NodeControlWindow.cpp
+++ b/src/progs/ingenuity/NodeControlWindow.cpp
@@ -32,65 +32,65 @@ namespace Ingenuity {
/** Create a node control window and load a new ControlPanel for it.
*/
NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, size_t poly)
-: m_node(node),
- m_position_stored(false),
- m_x(0), m_y(0)
+: _node(node),
+ _position_stored(false),
+ _x(0), _y(0)
{
- assert(m_node != NULL);
+ assert(_node != NULL);
property_resizable() = true;
set_border_width(5);
- set_title(m_node->path() + " Controls");
+ set_title(_node->path() + " Controls");
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("warehouse_win");
- xml->get_widget_derived("control_panel_vbox", m_control_panel);
- m_control_panel->reparent(*this);
+ xml->get_widget_derived("control_panel_vbox", _control_panel);
+ _control_panel->reparent(*this);
- m_control_panel->init(m_node, poly);
+ _control_panel->init(_node, poly);
show_all_children();
resize();
- m_callback_enabled = true;
+ _callback_enabled = true;
}
/** Create a node control window and with an existing ControlPanel.
*/
NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* panel)
-: m_node(node),
- m_control_panel(panel)
+: _node(node),
+ _control_panel(panel)
{
- assert(m_node);
+ assert(_node);
property_resizable() = true;
set_border_width(5);
- set_title(m_node->path() + " Controls");
+ set_title(_node->path() + " Controls");
- m_control_panel->reparent(*this);
+ _control_panel->reparent(*this);
show_all_children();
resize();
- m_callback_enabled = true;
+ _callback_enabled = true;
}
NodeControlWindow::~NodeControlWindow()
{
- delete m_control_panel;
+ delete _control_panel;
}
void
NodeControlWindow::resize()
{
- pair<int,int> controls_size = m_control_panel->ideal_size();
+ pair<int,int> controls_size = _control_panel->ideal_size();
/*int width = 400;
int height = controls_size.second
- + ((m_node->polyphonic()) ? 4 : 40);*/
+ + ((_node->polyphonic()) ? 4 : 40);*/
int width = controls_size.first;
int height = controls_size.second;
@@ -108,14 +108,14 @@ NodeControlWindow::resize()
void
NodeControlWindow::on_show()
{
- for (PortModelList::const_iterator i = m_node->ports().begin();
- i != m_node->ports().end(); ++i)
+ for (PortModelList::const_iterator i = _node->ports().begin();
+ i != _node->ports().end(); ++i)
if ((*i)->is_control() && (*i)->is_input())
App::instance().engine()->request_port_value((*i)->path());
- if (m_position_stored)
- move(m_x, m_y);
+ if (_position_stored)
+ move(_x, _y);
Gtk::Window::on_show();
}
@@ -124,8 +124,8 @@ NodeControlWindow::on_show()
void
NodeControlWindow::on_hide()
{
- m_position_stored = true;
- get_position(m_x, m_y);
+ _position_stored = true;
+ get_position(_x, _y);
Gtk::Window::on_hide();
}
diff --git a/src/progs/ingenuity/NodeControlWindow.h b/src/progs/ingenuity/NodeControlWindow.h
index f975f8c8..d496f230 100644
--- a/src/progs/ingenuity/NodeControlWindow.h
+++ b/src/progs/ingenuity/NodeControlWindow.h
@@ -47,9 +47,9 @@ public:
NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* panel);
virtual ~NodeControlWindow();
- SharedPtr<NodeModel> node() { return m_node; }
+ SharedPtr<NodeModel> node() { return _node; }
- ControlPanel* control_panel() const { return m_control_panel; }
+ ControlPanel* control_panel() const { return _control_panel; }
void resize();
@@ -58,13 +58,13 @@ protected:
void on_hide();
private:
- SharedPtr<NodeModel> m_node;
- ControlPanel* m_control_panel;
- bool m_callback_enabled;
+ SharedPtr<NodeModel> _node;
+ ControlPanel* _control_panel;
+ bool _callback_enabled;
- bool m_position_stored;
- int m_x;
- int m_y;
+ bool _position_stored;
+ int _x;
+ int _y;
};
diff --git a/src/progs/ingenuity/NodeMenu.cpp b/src/progs/ingenuity/NodeMenu.cpp
index 7811e3de..f28b39dc 100644
--- a/src/progs/ingenuity/NodeMenu.cpp
+++ b/src/progs/ingenuity/NodeMenu.cpp
@@ -90,7 +90,7 @@ void
NodeMenu::destroy()
{
cerr << "FIXME: NODE DESTROYED\n";
- //SharedPtr<ObjectModel> model = m_model;
+ //SharedPtr<ObjectModel> model = _model;
//m_model.reset();
}
#endif
@@ -107,15 +107,15 @@ NodeMenu::set_path(const Path& new_path)
i != _node->ports().end(); ++i) {
ObjectController* const pc = (*i)->controller();
assert(pc != NULL);
- pc->set_path(m_model->path().base() + pc->model()->name());
+ pc->set_path(_model->path().base() + pc->model()->name());
}
// Handle bridge port, if this node represents one
- if (m_bridge_port != NULL)
- m_bridge_port->set_path(new_path);
+ if (_bridge_port != NULL)
+ _bridge_port->set_path(new_path);
- if (m_module != NULL)
- m_module->canvas()->rename_module(_node->path().name(), new_path.name());
+ if (_module != NULL)
+ _module->canvas()->rename_module(_node->path().name(), new_path.name());
ObjectController::set_path(new_path);
@@ -127,19 +127,19 @@ NodeMenu::set_path(const Path& new_path)
void
NodeMenu::destroy()
{
- PatchController* pc = ((PatchController*)m_model->parent()->controller());
+ PatchController* pc = ((PatchController*)_model->parent()->controller());
assert(pc != NULL);
//remove_from_store();
- //pc->remove_node(m_model->path().name());
+ //pc->remove_node(_model->path().name());
cerr << "FIXME: remove node\n";
- if (m_bridge_port != NULL)
- m_bridge_port->destroy();
- m_bridge_port = NULL;
+ if (_bridge_port != NULL)
+ _bridge_port->destroy();
+ _bridge_port = NULL;
- //if (m_module != NULL)
- // delete m_module;
+ //if (_module != NULL)
+ // delete _module;
}
#endif
@@ -154,10 +154,10 @@ NodeMenu::add_port(SharedPtr<PortModel> pm)
//cout << "[NodeMenu] Adding port " << pm->path() << endl;
/*
- if (m_module != NULL) {
+ if (_module != NULL) {
// (formerly PortController)
- pc->create_port(m_module);
- m_module->resize();
+ pc->create_port(_module);
+ _module->resize();
// Enable "Controls" menu item on module
if (has_control_inputs())
@@ -179,8 +179,8 @@ NodeMenu::on_menu_clone()
cerr << "FIXME: clone broken\n";
/*
assert(_node);
- //assert(m_parent != NULL);
- //assert(m_parent->model() != NULL);
+ //assert(_parent != NULL);
+ //assert(_parent->model() != NULL);
string clone_name = _node->name();
int i = 2; // postfix number (ie oldname_2)
@@ -249,8 +249,8 @@ NodeMenu::disable_controls_menuitem()
{
_controls_menuitem->property_sensitive() = false;
- //if (m_control_window != NULL)
- // m_control_window->hide();
+ //if (_control_window != NULL)
+ // _control_window->hide();
}
diff --git a/src/progs/ingenuity/NodeMenu.h b/src/progs/ingenuity/NodeMenu.h
index 46b4d2b3..d3b5f94e 100644
--- a/src/progs/ingenuity/NodeMenu.h
+++ b/src/progs/ingenuity/NodeMenu.h
@@ -50,7 +50,7 @@ public:
bool has_control_inputs();
//virtual void show_menu(GdkEventButton* event)
- //{ m_menu.popup(event->button, event->time); }
+ //{ _menu.popup(event->button, event->time); }
protected:
@@ -64,7 +64,7 @@ protected:
void on_menu_learn();
void on_menu_disconnect_all();
- //Gtk::Menu m_menu;
+ //Gtk::Menu _menu;
SharedPtr<NodeModel> _node;
Glib::RefPtr<Gtk::MenuItem> _controls_menuitem;
};
diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp
index 41041b0e..e6cf212e 100644
--- a/src/progs/ingenuity/NodeModule.cpp
+++ b/src/progs/ingenuity/NodeModule.cpp
@@ -35,10 +35,10 @@ namespace Ingenuity {
NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
: LibFlowCanvas::Module(canvas, node->path().name()),
- m_node(node),
- m_menu(node)
+ _node(node),
+ _menu(node)
{
- assert(m_node);
+ assert(_node);
if (node->polyphonic()) {
set_border_width(2.0);
@@ -52,7 +52,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
NodeModule::~NodeModule()
{
- NodeControlWindow* win = App::instance().window_factory()->control_window(m_node);
+ NodeControlWindow* win = App::instance().window_factory()->control_window(_node);
if (win) {
// Should remove from window factory via signal
@@ -104,7 +104,7 @@ NodeModule::remove_port(SharedPtr<PortModel> port)
void
NodeModule::show_control_window()
{
- App::instance().window_factory()->present_controls(m_node);
+ App::instance().window_factory()->present_controls(_node);
}
@@ -114,13 +114,13 @@ NodeModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = m_node->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = m_node->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _node->get_metadata("ingenuity:canvas-x");
+ const Atom& existing_y = _node->get_metadata("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(m_node->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(m_node->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-y", Atom(y));
}
}
@@ -128,7 +128,7 @@ NodeModule::store_location()
void
NodeModule::on_right_click(GdkEventButton* event)
{
- m_menu.popup(event->button, event->time);
+ _menu.popup(event->button, event->time);
}
diff --git a/src/progs/ingenuity/NodeModule.h b/src/progs/ingenuity/NodeModule.h
index 2d6802ff..92878288 100644
--- a/src/progs/ingenuity/NodeModule.h
+++ b/src/progs/ingenuity/NodeModule.h
@@ -66,7 +66,7 @@ public:
void show_control_window();
- SharedPtr<NodeModel> node() const { return m_node; }
+ SharedPtr<NodeModel> node() const { return _node; }
protected:
NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node);
@@ -79,8 +79,8 @@ protected:
void add_port(SharedPtr<PortModel> port, bool resize=true);
void remove_port(SharedPtr<PortModel> port);
- SharedPtr<NodeModel> m_node;
- NodeMenu m_menu;
+ SharedPtr<NodeModel> _node;
+ NodeMenu _menu;
};
diff --git a/src/progs/ingenuity/NodePropertiesWindow.cpp b/src/progs/ingenuity/NodePropertiesWindow.cpp
index 5772a608..35f84ea8 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.cpp
+++ b/src/progs/ingenuity/NodePropertiesWindow.cpp
@@ -27,11 +27,11 @@ using std::string;
NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("node_properties_path_label", m_node_path_label);
- glade_xml->get_widget("node_properties_polyphonic_checkbutton", m_node_polyphonic_toggle);
- glade_xml->get_widget("node_properties_plugin_type_label", m_plugin_type_label);
- glade_xml->get_widget("node_properties_plugin_uri_label", m_plugin_uri_label);
- glade_xml->get_widget("node_properties_plugin_name_label", m_plugin_name_label);
+ glade_xml->get_widget("node_properties_path_label", _node_path_label);
+ glade_xml->get_widget("node_properties_polyphonic_checkbutton", _node_polyphonic_toggle);
+ glade_xml->get_widget("node_properties_plugin_type_label", _plugin_type_label);
+ glade_xml->get_widget("node_properties_plugin_uri_label", _plugin_uri_label);
+ glade_xml->get_widget("node_properties_plugin_name_label", _plugin_name_label);
}
@@ -43,19 +43,19 @@ NodePropertiesWindow::set_node(SharedPtr<NodeModel> node_model)
{
assert(node_model);
- m_node_model = node_model;
+ _node_model = node_model;
set_title(node_model->path() + " Properties");
- m_node_path_label->set_text(node_model->path());
- m_node_polyphonic_toggle->set_active(node_model->polyphonic());
+ _node_path_label->set_text(node_model->path());
+ _node_polyphonic_toggle->set_active(node_model->polyphonic());
SharedPtr<PluginModel> pm = node_model->plugin();
if (pm) {
- m_plugin_type_label->set_text(pm->type_uri());
- m_plugin_uri_label->set_text(pm->uri());
- m_plugin_name_label->set_text(pm->name());
+ _plugin_type_label->set_text(pm->type_uri());
+ _plugin_uri_label->set_text(pm->uri());
+ _plugin_name_label->set_text(pm->name());
}
}
diff --git a/src/progs/ingenuity/NodePropertiesWindow.h b/src/progs/ingenuity/NodePropertiesWindow.h
index 3c9322e7..3637597c 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.h
+++ b/src/progs/ingenuity/NodePropertiesWindow.h
@@ -42,12 +42,12 @@ public:
private:
- SharedPtr<NodeModel> m_node_model;
- Gtk::Label* m_node_path_label;
- Gtk::CheckButton* m_node_polyphonic_toggle;
- Gtk::Label* m_plugin_type_label;
- Gtk::Label* m_plugin_uri_label;
- Gtk::Label* m_plugin_name_label;
+ SharedPtr<NodeModel> _node_model;
+ Gtk::Label* _node_path_label;
+ Gtk::CheckButton* _node_polyphonic_toggle;
+ Gtk::Label* _plugin_type_label;
+ Gtk::Label* _plugin_uri_label;
+ Gtk::Label* _plugin_name_label;
};
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 056d25a6..aab57a4e 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -40,55 +40,55 @@ namespace Ingenuity {
PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
: FlowCanvas(width, height),
- m_patch(patch),
- m_last_click_x(0),
- m_last_click_y(0)
+ _patch(patch),
+ _last_click_x(0),
+ _last_click_y(0)
{
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
- xml->get_widget("canvas_menu", m_menu);
+ xml->get_widget("canvas_menu", _menu);
- xml->get_widget("canvas_menu_add_audio_input", m_menu_add_audio_input);
- xml->get_widget("canvas_menu_add_audio_output", m_menu_add_audio_output);
- xml->get_widget("canvas_menu_add_control_input", m_menu_add_control_input);
- xml->get_widget("canvas_menu_add_control_output", m_menu_add_control_output);
- xml->get_widget("canvas_menu_add_midi_input", m_menu_add_midi_input);
- xml->get_widget("canvas_menu_add_midi_output", m_menu_add_midi_output);
- xml->get_widget("canvas_menu_load_plugin", m_menu_load_plugin);
- xml->get_widget("canvas_menu_load_patch", m_menu_load_patch);
- xml->get_widget("canvas_menu_new_patch", m_menu_new_patch);
+ xml->get_widget("canvas_menu_add_audio_input", _menu_add_audio_input);
+ xml->get_widget("canvas_menu_add_audio_output", _menu_add_audio_output);
+ xml->get_widget("canvas_menu_add_control_input", _menu_add_control_input);
+ xml->get_widget("canvas_menu_add_control_output", _menu_add_control_output);
+ xml->get_widget("canvas_menu_add_midi_input", _menu_add_midi_input);
+ xml->get_widget("canvas_menu_add_midi_output", _menu_add_midi_output);
+ xml->get_widget("canvas_menu_load_plugin", _menu_load_plugin);
+ xml->get_widget("canvas_menu_load_patch", _menu_load_patch);
+ xml->get_widget("canvas_menu_new_patch", _menu_new_patch);
// Add port menu items
- m_menu_add_audio_input->signal_activate().connect(
+ _menu_add_audio_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"audio_input", "ingen:audio", false));
- m_menu_add_audio_output->signal_activate().connect(
+ _menu_add_audio_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"audio_output", "ingen:audio", true));
- m_menu_add_control_input->signal_activate().connect(
+ _menu_add_control_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"control_input", "ingen:control", false));
- m_menu_add_control_output->signal_activate().connect(
+ _menu_add_control_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"control_output", "ingen:control", true));
- m_menu_add_midi_input->signal_activate().connect(
+ _menu_add_midi_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"midi_input", "ingen:midi", false));
- m_menu_add_midi_output->signal_activate().connect(
+ _menu_add_midi_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"midi_output", "ingen:midi", true));
// Connect to model signals to track state
- m_patch->new_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_node));
- m_patch->removed_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_node));
- m_patch->new_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_port));
- m_patch->removed_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_port));
- m_patch->new_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::connection));
- m_patch->removed_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::disconnection));
+ _patch->new_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_node));
+ _patch->removed_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_node));
+ _patch->new_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_port));
+ _patch->removed_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_port));
+ _patch->new_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::connection));
+ _patch->removed_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::disconnection));
// Connect widget signals to do things
- m_menu_load_plugin->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_plugin));
- m_menu_load_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_patch));
- m_menu_new_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_new_patch));
+ _menu_load_plugin->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_plugin));
+ _menu_load_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_patch));
+ _menu_new_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_new_patch));
}
@@ -99,20 +99,20 @@ PatchCanvas::build()
boost::dynamic_pointer_cast<PatchCanvas>(shared_from_this());
// Create modules for nodes
- for (NodeModelMap::const_iterator i = m_patch->nodes().begin();
- i != m_patch->nodes().end(); ++i) {
+ for (NodeModelMap::const_iterator i = _patch->nodes().begin();
+ i != _patch->nodes().end(); ++i) {
add_node((*i).second);
}
// Create pseudo modules for ports (ports on this canvas, not on our module)
- for (PortModelList::const_iterator i = m_patch->ports().begin();
- i != m_patch->ports().end(); ++i) {
+ for (PortModelList::const_iterator i = _patch->ports().begin();
+ i != _patch->ports().end(); ++i) {
add_module(PatchPortModule::create(shared_this, *i));
}
// Create connections
- for (list<SharedPtr<ConnectionModel> >::const_iterator i = m_patch->connections().begin();
- i != m_patch->connections().end(); ++i) {
+ for (list<SharedPtr<ConnectionModel> >::const_iterator i = _patch->connections().begin();
+ i != _patch->connections().end(); ++i) {
connection(*i);
}
}
@@ -163,11 +163,11 @@ PatchCanvas::connection(SharedPtr<ConnectionModel> cm)
const Path& src_parent_path = cm->src_port_path().parent();
const Path& dst_parent_path = cm->dst_port_path().parent();
- const string& src_parent_name = (src_parent_path == m_patch->path())
+ const string& src_parent_name = (src_parent_path == _patch->path())
? cm->src_port_path().name()
: src_parent_path.name();
- const string& dst_parent_name = (dst_parent_path == m_patch->path())
+ const string& dst_parent_name = (dst_parent_path == _patch->path())
? cm->dst_port_path().name()
: dst_parent_path.name();
@@ -192,11 +192,11 @@ PatchCanvas::disconnection(const Path& src_port_path, const Path& dst_port_path)
const Path& src_parent_path = src_port_path.parent();
const Path& dst_parent_path = dst_port_path.parent();
- const string& src_parent_name = (src_parent_path == m_patch->path())
+ const string& src_parent_name = (src_parent_path == _patch->path())
? src_port_path.name()
: src_parent_path.name();
- const string& dst_parent_name = (dst_parent_path == m_patch->path())
+ const string& dst_parent_name = (dst_parent_path == _patch->path())
? dst_port_path.name()
: dst_parent_path.name();
@@ -242,7 +242,7 @@ PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::sha
cerr << "FIXME: MIDI binding" << endl;
#if 0
SharedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
- SharedPtr<NodeModel> nm(new NodeModel(pm, m_patch->path().base()
+ SharedPtr<NodeModel> nm(new NodeModel(pm, _patch->path().base()
+ src->name() + "-" + dst->name(), false));
nm->set_metadata("canvas-x", Atom((float)
(dst->module()->property_x() - dst->module()->width() - 20)));
@@ -289,8 +289,8 @@ PatchCanvas::canvas_event(GdkEvent* event)
case GDK_BUTTON_PRESS:
if (event->button.button == 3) {
- m_last_click_x = (int)event->button.x;
- m_last_click_y = (int)event->button.y;
+ _last_click_x = (int)event->button.x;
+ _last_click_y = (int)event->button.y;
show_menu(event);
}
break;
@@ -312,7 +312,7 @@ PatchCanvas::canvas_event(GdkEvent* event)
void
PatchCanvas::destroy_selection()
{
- for (list<boost::shared_ptr<Module> >::iterator m = m_selected_modules.begin(); m != m_selected_modules.end(); ++m) {
+ for (list<boost::shared_ptr<Module> >::iterator m = _selected_modules.begin(); m != _selected_modules.end(); ++m) {
boost::shared_ptr<NodeModule> module = boost::dynamic_pointer_cast<NodeModule>(*m);
if (module) {
App::instance().engine()->destroy(module->node()->path());
@@ -332,7 +332,7 @@ PatchCanvas::copy_selection()
Serializer serializer;
serializer.start_to_string();
- for (list<boost::shared_ptr<Module> >::iterator m = m_selected_modules.begin(); m != m_selected_modules.end(); ++m) {
+ for (list<boost::shared_ptr<Module> >::iterator m = _selected_modules.begin(); m != _selected_modules.end(); ++m) {
boost::shared_ptr<NodeModule> module = boost::dynamic_pointer_cast<NodeModule>(*m);
if (module) {
serializer.serialize(module->node());
@@ -343,8 +343,8 @@ PatchCanvas::copy_selection()
}
}
- for (list<boost::shared_ptr<LibFlowCanvas::Connection> >::iterator c = m_selected_connections.begin();
- c != m_selected_connections.end(); ++c) {
+ for (list<boost::shared_ptr<LibFlowCanvas::Connection> >::iterator c = _selected_connections.begin();
+ c != _selected_connections.end(); ++c) {
boost::shared_ptr<Connection> connection = boost::dynamic_pointer_cast<Connection>(*c);
if (connection)
serializer.serialize_connection(connection->model());
@@ -366,7 +366,7 @@ PatchCanvas::generate_port_name(const string& base) {
snprintf(num_buf, 5, "%u", i);
name = base + "_";
name += num_buf;
- if (!m_patch->get_port(name))
+ if (!_patch->get_port(name))
break;
}
@@ -379,7 +379,7 @@ PatchCanvas::generate_port_name(const string& base) {
void
PatchCanvas::menu_add_port(const string& name, const string& type, bool is_output)
{
- const Path& path = m_patch->path().base() + generate_port_name(name);
+ const Path& path = _patch->path().base() + generate_port_name(name);
App::instance().engine()->create_port_with_data(path, type, is_output, get_initial_data());
}
@@ -402,8 +402,8 @@ PatchCanvas::get_initial_data()
{
MetadataMap result;
- result["ingenuity:canvas-x"] = Atom((float)m_last_click_x);
- result["ingenuity:canvas-y"] = Atom((float)m_last_click_y);
+ result["ingenuity:canvas-x"] = Atom((float)_last_click_x);
+ result["ingenuity:canvas-y"] = Atom((float)_last_click_y);
return result;
}
@@ -411,21 +411,21 @@ PatchCanvas::get_initial_data()
void
PatchCanvas::menu_load_plugin()
{
- App::instance().window_factory()->present_load_plugin(m_patch, get_initial_data());
+ App::instance().window_factory()->present_load_plugin(_patch, get_initial_data());
}
void
PatchCanvas::menu_load_patch()
{
- App::instance().window_factory()->present_load_subpatch(m_patch, get_initial_data());
+ App::instance().window_factory()->present_load_subpatch(_patch, get_initial_data());
}
void
PatchCanvas::menu_new_patch()
{
- App::instance().window_factory()->present_new_subpatch(m_patch, get_initial_data());
+ App::instance().window_factory()->present_new_subpatch(_patch, get_initial_data());
}
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index 72f79a9b..5d622f08 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -73,7 +73,7 @@ public:
void copy_selection();
void show_menu(GdkEvent* event)
- { m_menu->popup(event->button.button, event->button.time); }
+ { _menu->popup(event->button.button, event->button.time); }
private:
string generate_port_name(const string& base);
@@ -92,21 +92,21 @@ private:
void disconnect(boost::shared_ptr<LibFlowCanvas::Port> src,
boost::shared_ptr<LibFlowCanvas::Port> dst);
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
- int m_last_click_x;
- int m_last_click_y;
+ int _last_click_x;
+ int _last_click_y;
- Gtk::Menu* m_menu;
- Gtk::MenuItem* m_menu_add_audio_input;
- Gtk::MenuItem* m_menu_add_audio_output;
- Gtk::MenuItem* m_menu_add_control_input;
- Gtk::MenuItem* m_menu_add_control_output;
- Gtk::MenuItem* m_menu_add_midi_input;
- Gtk::MenuItem* m_menu_add_midi_output;
- Gtk::MenuItem* m_menu_load_plugin;
- Gtk::MenuItem* m_menu_load_patch;
- Gtk::MenuItem* m_menu_new_patch;
+ Gtk::Menu* _menu;
+ Gtk::MenuItem* _menu_add_audio_input;
+ Gtk::MenuItem* _menu_add_audio_output;
+ Gtk::MenuItem* _menu_add_control_input;
+ Gtk::MenuItem* _menu_add_control_output;
+ Gtk::MenuItem* _menu_add_midi_input;
+ Gtk::MenuItem* _menu_add_midi_output;
+ Gtk::MenuItem* _menu_load_plugin;
+ Gtk::MenuItem* _menu_load_patch;
+ Gtk::MenuItem* _menu_new_patch;
};
diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp
index 53b56854..832ebcf5 100644
--- a/src/progs/ingenuity/PatchPortModule.cpp
+++ b/src/progs/ingenuity/PatchPortModule.cpp
@@ -31,7 +31,7 @@ namespace Ingenuity {
PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port)
: LibFlowCanvas::Module(canvas, port->path().name(), 0, 0, false), // FIXME: coords?
- m_port(port)
+ _port(port)
{
/*if (port_model()->polyphonic() && port_model()->parent() != NULL
&& port_model()->parent_patch()->poly() > 1) {
@@ -68,8 +68,8 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
new PatchPortModule(canvas, port));
assert(ret);
- ret->m_patch_port = boost::shared_ptr<Port>(new Port(ret, port, true, true));
- ret->add_port(ret->m_patch_port);
+ ret->_patch_port = boost::shared_ptr<Port>(new Port(ret, port, true, true));
+ ret->add_port(ret->_patch_port);
ret->resize();
@@ -86,13 +86,13 @@ PatchPortModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = m_port->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = m_port->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _port->get_metadata("ingenuity:canvas-x");
+ const Atom& existing_y = _port->get_metadata("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(m_port->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(m_port->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-y", Atom(y));
}
}
diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h
index e6f30bec..3cfccae1 100644
--- a/src/progs/ingenuity/PatchPortModule.h
+++ b/src/progs/ingenuity/PatchPortModule.h
@@ -54,9 +54,9 @@ public:
virtual void store_location();
- //void on_right_click(GdkEventButton* event) { m_port->show_menu(event); }
+ //void on_right_click(GdkEventButton* event) { _port->show_menu(event); }
- SharedPtr<PortModel> port() const { return m_port; }
+ SharedPtr<PortModel> port() const { return _port; }
protected:
PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port);
@@ -66,8 +66,8 @@ protected:
void metadata_update(const string& key, const Raul::Atom& value);
- SharedPtr<PortModel> m_port;
- boost::shared_ptr<Port> m_patch_port; ///< Port on this 'anonymous' module
+ SharedPtr<PortModel> _port;
+ boost::shared_ptr<Port> _patch_port; ///< Port on this 'anonymous' module
};
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.cpp b/src/progs/ingenuity/PatchPropertiesWindow.cpp
index 86d7ccd3..ac021cda 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PatchPropertiesWindow.cpp
@@ -25,13 +25,13 @@ using std::string;
PatchPropertiesWindow::PatchPropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("properties_author_entry", m_author_entry);
- glade_xml->get_widget("properties_description_textview", m_textview);
- glade_xml->get_widget("properties_cancel_button", m_cancel_button);
- glade_xml->get_widget("properties_ok_button", m_ok_button);
+ glade_xml->get_widget("properties_author_entry", _author_entry);
+ glade_xml->get_widget("properties_description_textview", _textview);
+ glade_xml->get_widget("properties_cancel_button", _cancel_button);
+ glade_xml->get_widget("properties_ok_button", _ok_button);
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::cancel_clicked));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::cancel_clicked));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::ok_clicked));
}
@@ -44,14 +44,14 @@ void
PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
{
property_title() = patch_model->path() + " Properties";
- m_patch_model = patch_model;
+ _patch_model = patch_model;
- const Atom& author_atom = m_patch_model->get_metadata("author");
- m_author_entry->set_text(
+ const Atom& author_atom = _patch_model->get_metadata("author");
+ _author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = m_patch_model->get_metadata("description");
- m_textview->get_buffer()->set_text(
+ const Atom& desc_atom = _patch_model->get_metadata("description");
+ _textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
}
@@ -59,12 +59,12 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
void
PatchPropertiesWindow::cancel_clicked()
{
- const Atom& author_atom = m_patch_model->get_metadata("author");
- m_author_entry->set_text(
+ const Atom& author_atom = _patch_model->get_metadata("author");
+ _author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = m_patch_model->get_metadata("description");
- m_textview->get_buffer()->set_text(
+ const Atom& desc_atom = _patch_model->get_metadata("description");
+ _textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
hide();
@@ -76,8 +76,8 @@ PatchPropertiesWindow::ok_clicked()
{
cerr << "FIXME: properties\n";
- //m_patch_model->set_metadata("author", Atom(m_author_entry->get_text().c_str()));
- //m_patch_model->set_metadata("description", Atom(m_textview->get_buffer()->get_text().c_str()));
+ //m_patch_model->set_metadata("author", Atom(_author_entry->get_text().c_str()));
+ //m_patch_model->set_metadata("description", Atom(_textview->get_buffer()->get_text().c_str()));
hide();
}
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.h b/src/progs/ingenuity/PatchPropertiesWindow.h
index 54e8391a..0b6909b5 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.h
+++ b/src/progs/ingenuity/PatchPropertiesWindow.h
@@ -47,12 +47,12 @@ public:
void ok_clicked();
private:
- SharedPtr<PatchModel> m_patch_model;
+ SharedPtr<PatchModel> _patch_model;
- Gtk::Entry* m_author_entry;
- Gtk::TextView* m_textview;
- Gtk::Button* m_cancel_button;
- Gtk::Button* m_ok_button;
+ Gtk::Entry* _author_entry;
+ Gtk::TextView* _textview;
+ Gtk::Button* _cancel_button;
+ Gtk::Button* _ok_button;
};
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 5fd17abd..c39349d0 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -31,36 +31,36 @@ namespace Ingenuity {
PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_enable_signal(true)
+ _enable_signal(true)
{
- xml->get_widget_derived("patches_treeview", m_patches_treeview);
+ xml->get_widget_derived("patches_treeview", _patches_treeview);
- m_patch_treestore = Gtk::TreeStore::create(m_patch_tree_columns);
- m_patches_treeview->set_window(this);
- m_patches_treeview->set_model(m_patch_treestore);
+ _patch_treestore = Gtk::TreeStore::create(_patch_tree_columns);
+ _patches_treeview->set_window(this);
+ _patches_treeview->set_model(_patch_treestore);
Gtk::TreeViewColumn* name_col = Gtk::manage(new Gtk::TreeViewColumn(
- "Patch", m_patch_tree_columns.name_col));
+ "Patch", _patch_tree_columns.name_col));
Gtk::TreeViewColumn* enabled_col = Gtk::manage(new Gtk::TreeViewColumn(
- "Run", m_patch_tree_columns.enabled_col));
+ "Run", _patch_tree_columns.enabled_col));
name_col->set_resizable(true);
name_col->set_expand(true);
- m_patches_treeview->append_column(*name_col);
- m_patches_treeview->append_column(*enabled_col);
+ _patches_treeview->append_column(*name_col);
+ _patches_treeview->append_column(*enabled_col);
Gtk::CellRendererToggle* enabled_renderer = dynamic_cast<Gtk::CellRendererToggle*>(
- m_patches_treeview->get_column_cell_renderer(1));
+ _patches_treeview->get_column_cell_renderer(1));
enabled_renderer->property_activatable() = true;
- m_patch_tree_selection = m_patches_treeview->get_selection();
+ _patch_tree_selection = _patches_treeview->get_selection();
//m_patch_tree_selection->signal_changed().connect(
// sigc::mem_fun(this, &PatchTreeWindow::event_patch_selected));
- m_patches_treeview->signal_row_activated().connect(
+ _patches_treeview->signal_row_activated().connect(
sigc::mem_fun(this, &PatchTreeWindow::event_patch_activated));
enabled_renderer->signal_toggled().connect(
sigc::mem_fun(this, &PatchTreeWindow::event_patch_enabled_toggled));
- m_patches_treeview->columns_autosize();
+ _patches_treeview->columns_autosize();
}
@@ -84,7 +84,7 @@ void
PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
{
if (!pm->parent()) {
- Gtk::TreeModel::iterator iter = m_patch_treestore->append();
+ Gtk::TreeModel::iterator iter = _patch_treestore->append();
Gtk::TreeModel::Row row = *iter;
if (pm->path() == "/") {
SharedPtr<OSCEngineSender> osc_sender = PtrCast<OSCEngineSender>(App::instance().engine());
@@ -93,24 +93,24 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
//if (root_name.substr(root_name.length()-1,1) == "/")
// root_name = root_name.substr(0, root_name.length()-1);
//root_name.append(":/");
- row[m_patch_tree_columns.name_col] = root_name;
+ row[_patch_tree_columns.name_col] = root_name;
} else {
- row[m_patch_tree_columns.name_col] = pm->path().name();
+ row[_patch_tree_columns.name_col] = pm->path().name();
}
- row[m_patch_tree_columns.enabled_col] = false;
- row[m_patch_tree_columns.patch_model_col] = pm;
- m_patches_treeview->expand_row(m_patch_treestore->get_path(iter), true);
+ row[_patch_tree_columns.enabled_col] = false;
+ row[_patch_tree_columns.patch_model_col] = pm;
+ _patches_treeview->expand_row(_patch_treestore->get_path(iter), true);
} else {
- Gtk::TreeModel::Children children = m_patch_treestore->children();
+ Gtk::TreeModel::Children children = _patch_treestore->children();
Gtk::TreeModel::iterator c = find_patch(children, pm->parent()->path());
if (c != children.end()) {
- Gtk::TreeModel::iterator iter = m_patch_treestore->append(c->children());
+ Gtk::TreeModel::iterator iter = _patch_treestore->append(c->children());
Gtk::TreeModel::Row row = *iter;
- row[m_patch_tree_columns.name_col] = pm->path().name();
- row[m_patch_tree_columns.enabled_col] = false;
- row[m_patch_tree_columns.patch_model_col] = pm;
- m_patches_treeview->expand_row(m_patch_treestore->get_path(iter), true);
+ row[_patch_tree_columns.name_col] = pm->path().name();
+ row[_patch_tree_columns.enabled_col] = false;
+ row[_patch_tree_columns.patch_model_col] = pm;
+ _patches_treeview->expand_row(_patch_treestore->get_path(iter), true);
}
}
@@ -122,9 +122,9 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
void
PatchTreeWindow::remove_patch(const Path& path)
{
- Gtk::TreeModel::iterator i = find_patch(m_patch_treestore->children(), path);
- if (i != m_patch_treestore->children().end())
- m_patch_treestore->erase(i);
+ Gtk::TreeModel::iterator i = find_patch(_patch_treestore->children(), path);
+ if (i != _patch_treestore->children().end())
+ _patch_treestore->erase(i);
}
@@ -132,7 +132,7 @@ Gtk::TreeModel::iterator
PatchTreeWindow::find_patch(Gtk::TreeModel::Children root, const Path& path)
{
for (Gtk::TreeModel::iterator c = root.begin(); c != root.end(); ++c) {
- SharedPtr<PatchModel> pm = (*c)[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = (*c)[_patch_tree_columns.patch_model_col];
if (pm->path() == path) {
return c;
} else if ((*c)->children().size() > 0) {
@@ -148,10 +148,10 @@ PatchTreeWindow::find_patch(Gtk::TreeModel::Children root, const Path& path)
void
PatchTreeWindow::event_patch_selected()
{
- Gtk::TreeModel::iterator active = m_patch_tree_selection->get_selected();
+ Gtk::TreeModel::iterator active = _patch_tree_selection->get_selected();
if (active) {
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
}
}
*/
@@ -162,10 +162,10 @@ PatchTreeWindow::event_patch_selected()
void
PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
{
- Gtk::TreeModel::iterator active = m_patch_tree_selection->get_selected();
+ Gtk::TreeModel::iterator active = _patch_tree_selection->get_selected();
if (active) {
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
if (pm)
cerr << "FIXME: patch menu\n";
//pm->show_menu(ev);
@@ -176,9 +176,9 @@ PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
void
PatchTreeWindow::event_patch_activated(const Gtk::TreeModel::Path& path, Gtk::TreeView::Column* col)
{
- Gtk::TreeModel::iterator active = m_patch_treestore->get_iter(path);
+ Gtk::TreeModel::iterator active = _patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
App::instance().window_factory()->present_patch(pm);
}
@@ -188,22 +188,22 @@ void
PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
{
Gtk::TreeModel::Path path(path_str);
- Gtk::TreeModel::iterator active = m_patch_treestore->get_iter(path);
+ Gtk::TreeModel::iterator active = _patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
Glib::ustring patch_path = pm->path();
assert(pm);
if ( ! pm->enabled()) {
- if (m_enable_signal)
+ if (_enable_signal)
App::instance().engine()->enable_patch(patch_path);
- //row[m_patch_tree_columns.enabled_col] = true;
+ //row[_patch_tree_columns.enabled_col] = true;
} else {
- if (m_enable_signal)
+ if (_enable_signal)
App::instance().engine()->disable_patch(patch_path);
- //row[m_patch_tree_columns.enabled_col] = false;
+ //row[_patch_tree_columns.enabled_col] = false;
}
}
@@ -211,57 +211,57 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
void
PatchTreeWindow::patch_enabled(const Path& path)
{
- m_enable_signal = false;
+ _enable_signal = false;
Gtk::TreeModel::iterator i
- = find_patch(m_patch_treestore->children(), path);
+ = find_patch(_patch_treestore->children(), path);
- if (i != m_patch_treestore->children().end()) {
+ if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
- row[m_patch_tree_columns.enabled_col] = true;
+ row[_patch_tree_columns.enabled_col] = true;
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << path << endl;
}
- m_enable_signal = true;
+ _enable_signal = true;
}
void
PatchTreeWindow::patch_disabled(const Path& path)
{
- m_enable_signal = false;
+ _enable_signal = false;
Gtk::TreeModel::iterator i
- = find_patch(m_patch_treestore->children(), path);
+ = find_patch(_patch_treestore->children(), path);
- if (i != m_patch_treestore->children().end()) {
+ if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
- row[m_patch_tree_columns.enabled_col] = false;
+ row[_patch_tree_columns.enabled_col] = false;
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << path << endl;
}
- m_enable_signal = true;
+ _enable_signal = true;
}
void
PatchTreeWindow::patch_renamed(const Path& old_path, const Path& new_path)
{
- m_enable_signal = false;
+ _enable_signal = false;
Gtk::TreeModel::iterator i
- = find_patch(m_patch_treestore->children(), old_path);
+ = find_patch(_patch_treestore->children(), old_path);
- if (i != m_patch_treestore->children().end()) {
+ if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
- row[m_patch_tree_columns.name_col] = new_path.name();
+ row[_patch_tree_columns.name_col] = new_path.name();
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << old_path << endl;
}
- m_enable_signal = true;
+ _enable_signal = true;
}
diff --git a/src/progs/ingenuity/PatchTreeWindow.h b/src/progs/ingenuity/PatchTreeWindow.h
index ab18d526..83236d1a 100644
--- a/src/progs/ingenuity/PatchTreeWindow.h
+++ b/src/progs/ingenuity/PatchTreeWindow.h
@@ -60,7 +60,7 @@ protected:
Gtk::TreeModel::iterator find_patch(Gtk::TreeModel::Children root, const Path& path);
- PatchTreeView* m_patches_treeview;
+ PatchTreeView* _patches_treeview;
struct PatchTreeModelColumns : public Gtk::TreeModel::ColumnRecord
{
@@ -72,10 +72,10 @@ protected:
Gtk::TreeModelColumn<SharedPtr<PatchModel> > patch_model_col;
};
- bool m_enable_signal;
- PatchTreeModelColumns m_patch_tree_columns;
- Glib::RefPtr<Gtk::TreeStore> m_patch_treestore;
- Glib::RefPtr<Gtk::TreeSelection> m_patch_tree_selection;
+ bool _enable_signal;
+ PatchTreeModelColumns _patch_tree_columns;
+ Glib::RefPtr<Gtk::TreeStore> _patch_treestore;
+ Glib::RefPtr<Gtk::TreeSelection> _patch_tree_selection;
};
@@ -87,19 +87,19 @@ public:
: Gtk::TreeView(cobject)
{}
- void set_window(PatchTreeWindow* win) { m_window = win; }
+ void set_window(PatchTreeWindow* win) { _window = win; }
bool on_button_press_event(GdkEventButton* ev) {
bool ret = Gtk::TreeView::on_button_press_event(ev);
if ((ev->type == GDK_BUTTON_PRESS) && (ev->button == 3))
- m_window->show_patch_menu(ev);
+ _window->show_patch_menu(ev);
return ret;
}
private:
- PatchTreeWindow* m_window;
+ PatchTreeWindow* _window;
}; // struct PatchTreeView
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index 06693735..a095dd5b 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -43,81 +43,81 @@ namespace Ingenuity {
PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_enable_signal(true),
- m_position_stored(false),
- m_x(0),
- m_y(0),
- m_breadcrumb_box(NULL)
+ _enable_signal(true),
+ _position_stored(false),
+ _x(0),
+ _y(0),
+ _breadcrumb_box(NULL)
{
property_visible() = false;
- xml->get_widget("patch_win_vbox", m_vbox);
- xml->get_widget("patch_win_viewport", m_viewport);
- //xml->get_widget("patch_win_status_bar", m_status_bar);
- //xml->get_widget("patch_open_menuitem", m_menu_open);
- xml->get_widget("patch_import_menuitem", m_menu_import);
- //xml->get_widget("patch_open_into_menuitem", m_menu_open_into);
- xml->get_widget("patch_save_menuitem", m_menu_save);
- xml->get_widget("patch_save_as_menuitem", m_menu_save_as);
- xml->get_widget("patch_cut_menuitem", m_menu_cut);
- xml->get_widget("patch_copy_menuitem", m_menu_copy);
- xml->get_widget("patch_paste_menuitem", m_menu_paste);
- xml->get_widget("patch_delete_menuitem", m_menu_delete);
- xml->get_widget("patch_close_menuitem", m_menu_close);
- xml->get_widget("patch_configuration_menuitem", m_menu_configuration);
- xml->get_widget("patch_quit_menuitem", m_menu_quit);
- xml->get_widget("patch_view_control_window_menuitem", m_menu_view_control_window);
- xml->get_widget("patch_view_engine_window_menuitem", m_menu_view_engine_window);
- xml->get_widget("patch_properties_menuitem", m_menu_view_patch_properties);
- xml->get_widget("patch_fullscreen_menuitem", m_menu_fullscreen);
- xml->get_widget("patch_clear_menuitem", m_menu_clear);
- xml->get_widget("patch_destroy_menuitem", m_menu_destroy_patch);
- xml->get_widget("patch_view_messages_window_menuitem", m_menu_view_messages_window);
- xml->get_widget("patch_view_patch_tree_window_menuitem", m_menu_view_patch_tree_window);
- xml->get_widget("patch_help_about_menuitem", m_menu_help_about);
-
- m_menu_view_control_window->property_sensitive() = false;
+ xml->get_widget("patch_win_vbox", _vbox);
+ xml->get_widget("patch_win_viewport", _viewport);
+ //xml->get_widget("patch_win_status_bar", _status_bar);
+ //xml->get_widget("patch_open_menuitem", _menu_open);
+ xml->get_widget("patch_import_menuitem", _menu_import);
+ //xml->get_widget("patch_open_into_menuitem", _menu_open_into);
+ xml->get_widget("patch_save_menuitem", _menu_save);
+ xml->get_widget("patch_save_as_menuitem", _menu_save_as);
+ xml->get_widget("patch_cut_menuitem", _menu_cut);
+ xml->get_widget("patch_copy_menuitem", _menu_copy);
+ xml->get_widget("patch_paste_menuitem", _menu_paste);
+ xml->get_widget("patch_delete_menuitem", _menu_delete);
+ xml->get_widget("patch_close_menuitem", _menu_close);
+ xml->get_widget("patch_configuration_menuitem", _menu_configuration);
+ xml->get_widget("patch_quit_menuitem", _menu_quit);
+ xml->get_widget("patch_view_control_window_menuitem", _menu_view_control_window);
+ xml->get_widget("patch_view_engine_window_menuitem", _menu_view_engine_window);
+ xml->get_widget("patch_properties_menuitem", _menu_view_patch_properties);
+ xml->get_widget("patch_fullscreen_menuitem", _menu_fullscreen);
+ xml->get_widget("patch_clear_menuitem", _menu_clear);
+ xml->get_widget("patch_destroy_menuitem", _menu_destroy_patch);
+ xml->get_widget("patch_view_messages_window_menuitem", _menu_view_messages_window);
+ xml->get_widget("patch_view_patch_tree_window_menuitem", _menu_view_patch_tree_window);
+ xml->get_widget("patch_help_about_menuitem", _menu_help_about);
+
+ _menu_view_control_window->property_sensitive() = false;
//m_status_bar->push(App::instance().engine()->engine_url());
//m_status_bar->pack_start(*Gtk::manage(new Gtk::Image(Gtk::Stock::CONNECT, Gtk::ICON_SIZE_MENU)), false, false);
- /*m_menu_open->signal_activate().connect(
+ /*_menu_open->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_open));*/
- m_menu_import->signal_activate().connect(
+ _menu_import->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_import));
- m_menu_save->signal_activate().connect(
+ _menu_save->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_save));
- m_menu_save_as->signal_activate().connect(
+ _menu_save_as->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_save_as));
- m_menu_copy->signal_activate().connect(
+ _menu_copy->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_copy));
- m_menu_delete->signal_activate().connect(
+ _menu_delete->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_delete));
- m_menu_quit->signal_activate().connect(
+ _menu_quit->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_quit));
- m_menu_configuration->signal_activate().connect(
+ _menu_configuration->signal_activate().connect(
sigc::mem_fun(App::instance().configuration_dialog(), &ConfigWindow::show));
- m_menu_fullscreen->signal_activate().connect(
+ _menu_fullscreen->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_fullscreen_toggled));
- m_menu_view_engine_window->signal_activate().connect(
+ _menu_view_engine_window->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_show_engine));
- m_menu_view_control_window->signal_activate().connect(
+ _menu_view_control_window->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_show_controls));
- m_menu_view_patch_properties->signal_activate().connect(
+ _menu_view_patch_properties->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_show_properties));
- m_menu_destroy_patch->signal_activate().connect(
+ _menu_destroy_patch->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_destroy));
- m_menu_clear->signal_activate().connect(
+ _menu_clear->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_clear));
- m_menu_view_messages_window->signal_activate().connect(
+ _menu_view_messages_window->signal_activate().connect(
sigc::mem_fun<void>(App::instance().messages_dialog(), &MessagesWindow::present));
- m_menu_view_patch_tree_window->signal_activate().connect(
+ _menu_view_patch_tree_window->signal_activate().connect(
sigc::mem_fun<void>(App::instance().patch_tree(), &PatchTreeWindow::present));
- m_menu_help_about->signal_activate().connect(
+ _menu_help_about->signal_activate().connect(
sigc::mem_fun<void>(App::instance().about_dialog(), &Gtk::Dialog::present));
- m_breadcrumb_box = new BreadCrumbBox();
- m_breadcrumb_box->signal_patch_selected.connect(sigc::mem_fun(this, &PatchWindow::set_patch_from_path));
+ _breadcrumb_box = new BreadCrumbBox();
+ _breadcrumb_box->signal_patch_selected.connect(sigc::mem_fun(this, &PatchWindow::set_patch_from_path));
}
@@ -126,7 +126,7 @@ PatchWindow::~PatchWindow()
// Prevents deletion
//m_patch->claim_patch_view();
- delete m_breadcrumb_box;
+ delete _breadcrumb_box;
}
@@ -153,67 +153,67 @@ PatchWindow::set_patch_from_path(const Path& path, SharedPtr<PatchView> view)
void
PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
{
- if (!patch || patch == m_patch)
+ if (!patch || patch == _patch)
return;
- m_enable_signal = false;
+ _enable_signal = false;
- m_patch = patch;
+ _patch = patch;
- m_view = m_breadcrumb_box->view(patch->path());
+ _view = _breadcrumb_box->view(patch->path());
- if (!m_view)
- m_view = PatchView::create(patch);
+ if (!_view)
+ _view = PatchView::create(patch);
else
- assert(!view || m_view == view);
+ assert(!view || _view == view);
- assert(m_view);
+ assert(_view);
// Add view to ourself
- if (m_view->get_parent())
- m_view->get_parent()->remove(*m_view);
+ if (_view->get_parent())
+ _view->get_parent()->remove(*_view);
- m_viewport->remove();
- m_viewport->add(*m_view.get());
+ _viewport->remove();
+ _viewport->add(*_view.get());
// Add our breadcrumbs to the view
- if (m_breadcrumb_box->get_parent())
- m_breadcrumb_box->get_parent()->remove(*m_breadcrumb_box);
+ if (_breadcrumb_box->get_parent())
+ _breadcrumb_box->get_parent()->remove(*_breadcrumb_box);
- m_view->breadcrumb_container()->remove();
- m_view->breadcrumb_container()->add(*m_breadcrumb_box);
+ _view->breadcrumb_container()->remove();
+ _view->breadcrumb_container()->add(*_breadcrumb_box);
- m_breadcrumb_box->build(patch->path(), m_view);
- m_breadcrumb_box->show();
+ _breadcrumb_box->build(patch->path(), _view);
+ _breadcrumb_box->show();
//m_menu_view_control_window->property_sensitive() = patch->has_control_inputs();
int width, height;
get_size(width, height);
- m_view->canvas()->scroll_to(
- ((int)m_view->canvas()->width() - width)/2,
- ((int)m_view->canvas()->height() - height)/2);
+ _view->canvas()->scroll_to(
+ ((int)_view->canvas()->width() - width)/2,
+ ((int)_view->canvas()->height() - height)/2);
- set_title(m_patch->path());
+ set_title(_patch->path());
//m_properties_window->patch_model(pc->patch_model());
if (patch->path() == "/")
- m_menu_destroy_patch->set_sensitive(false);
+ _menu_destroy_patch->set_sensitive(false);
else
- m_menu_destroy_patch->set_sensitive(true);
+ _menu_destroy_patch->set_sensitive(true);
show_all();
- m_enable_signal = true;
+ _enable_signal = true;
}
void
PatchWindow::event_show_engine()
{
- if (m_patch)
+ if (_patch)
App::instance().connect_window()->show();
}
@@ -221,31 +221,31 @@ PatchWindow::event_show_engine()
void
PatchWindow::event_show_controls()
{
- App::instance().window_factory()->present_controls(m_patch);
+ App::instance().window_factory()->present_controls(_patch);
}
void
PatchWindow::event_show_properties()
{
- App::instance().window_factory()->present_properties(m_patch);
+ App::instance().window_factory()->present_properties(_patch);
}
void
PatchWindow::event_import()
{
- App::instance().window_factory()->present_load_patch(m_patch);
+ App::instance().window_factory()->present_load_patch(_patch);
}
void
PatchWindow::event_save()
{
- if (m_patch->filename() == "")
+ if (_patch->filename() == "")
event_save_as();
else
- App::instance().loader()->save_patch(m_patch, m_patch->filename(), false);
+ App::instance().loader()->save_patch(_patch, _patch->filename(), false);
}
@@ -266,7 +266,7 @@ PatchWindow::event_save_as()
dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
// Set current folder to most sensible default
- const string& current_filename = m_patch->filename();
+ const string& current_filename = _patch->filename();
if (current_filename.length() > 0)
dialog.set_filename(current_filename);
else if (App::instance().configuration()->patch_folder().length() > 0)
@@ -300,7 +300,7 @@ PatchWindow::event_save_as()
fin.close();
if (confirm) {
- App::instance().loader()->save_patch(m_patch, filename, recursive);
+ App::instance().loader()->save_patch(_patch, filename, recursive);
//m_patch->set_metadata("filename", Atom(filename.c_str()));
}
}
@@ -311,24 +311,24 @@ PatchWindow::event_save_as()
void
PatchWindow::event_copy()
{
- if (m_view)
- m_view->canvas()->copy_selection();
+ if (_view)
+ _view->canvas()->copy_selection();
}
void
PatchWindow::event_delete()
{
- if (m_view)
- m_view->canvas()->destroy_selection();
+ if (_view)
+ _view->canvas()->destroy_selection();
}
void
PatchWindow::on_show()
{
- if (m_position_stored)
- move(m_x, m_y);
+ if (_position_stored)
+ move(_x, _y);
Gtk::Window::on_show();
}
@@ -337,8 +337,8 @@ PatchWindow::on_show()
void
PatchWindow::on_hide()
{
- m_position_stored = true;
- get_position(m_x, m_y);
+ _position_stored = true;
+ get_position(_x, _y);
Gtk::Window::on_hide();
}
@@ -349,9 +349,9 @@ PatchWindow::on_key_press_event(GdkEventKey* event)
if (event->keyval == GDK_Delete) {
cerr << "FIXME: delete key\n";
/*
- if (m_patch && m_patch->get_view()) {
- assert(m_patch->get_view()->canvas());
- m_patch->get_view()->canvas()->destroy_selected();
+ if (_patch && _patch->get_view()) {
+ assert(_patch->get_view()->canvas());
+ _patch->get_view()->canvas()->destroy_selected();
}*/
return true;
} else {
@@ -391,14 +391,14 @@ PatchWindow::event_quit()
void
PatchWindow::event_destroy()
{
- App::instance().engine()->destroy(m_patch->path());
+ App::instance().engine()->destroy(_patch->path());
}
void
PatchWindow::event_clear()
{
- App::instance().engine()->clear_patch(m_patch->path());
+ App::instance().engine()->clear_patch(_patch->path());
}
void
diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h
index 2cfbbb9b..1f848bd7 100644
--- a/src/progs/ingenuity/PatchWindow.h
+++ b/src/progs/ingenuity/PatchWindow.h
@@ -68,9 +68,9 @@ public:
void set_patch_from_path(const Path& path, SharedPtr<PatchView> view);
void set_patch(SharedPtr<PatchModel> pc, SharedPtr<PatchView> view);
- SharedPtr<PatchModel> patch() const { return m_patch; }
+ SharedPtr<PatchModel> patch() const { return _patch; }
- Gtk::MenuItem* menu_view_control_window() { return m_menu_view_control_window; }
+ Gtk::MenuItem* menu_view_control_window() { return _menu_view_control_window; }
protected:
void on_show();
@@ -91,42 +91,42 @@ private:
void event_show_controls();
void event_show_engine();
- SharedPtr<PatchModel> m_patch;
- SharedPtr<PatchView> m_view;
+ SharedPtr<PatchModel> _patch;
+ SharedPtr<PatchView> _view;
- bool m_enable_signal;
- bool m_position_stored;
- int m_x;
- int m_y;
+ bool _enable_signal;
+ bool _position_stored;
+ int _x;
+ int _y;
- Gtk::MenuItem* m_menu_import;
- Gtk::MenuItem* m_menu_save;
- Gtk::MenuItem* m_menu_save_as;
- Gtk::MenuItem* m_menu_cut;
- Gtk::MenuItem* m_menu_copy;
- Gtk::MenuItem* m_menu_paste;
- Gtk::MenuItem* m_menu_delete;
- Gtk::MenuItem* m_menu_configuration;
- Gtk::MenuItem* m_menu_close;
- Gtk::MenuItem* m_menu_quit;
- Gtk::MenuItem* m_menu_fullscreen;
- Gtk::MenuItem* m_menu_clear;
- Gtk::MenuItem* m_menu_destroy_patch;
- Gtk::MenuItem* m_menu_view_engine_window;
- Gtk::MenuItem* m_menu_view_control_window;
- Gtk::MenuItem* m_menu_view_patch_properties;
- Gtk::MenuItem* m_menu_view_messages_window;
- Gtk::MenuItem* m_menu_view_patch_tree_window;
- Gtk::MenuItem* m_menu_help_about;
+ Gtk::MenuItem* _menu_import;
+ Gtk::MenuItem* _menu_save;
+ Gtk::MenuItem* _menu_save_as;
+ Gtk::MenuItem* _menu_cut;
+ Gtk::MenuItem* _menu_copy;
+ Gtk::MenuItem* _menu_paste;
+ Gtk::MenuItem* _menu_delete;
+ Gtk::MenuItem* _menu_configuration;
+ Gtk::MenuItem* _menu_close;
+ Gtk::MenuItem* _menu_quit;
+ Gtk::MenuItem* _menu_fullscreen;
+ Gtk::MenuItem* _menu_clear;
+ Gtk::MenuItem* _menu_destroy_patch;
+ Gtk::MenuItem* _menu_view_engine_window;
+ Gtk::MenuItem* _menu_view_control_window;
+ Gtk::MenuItem* _menu_view_patch_properties;
+ Gtk::MenuItem* _menu_view_messages_window;
+ Gtk::MenuItem* _menu_view_patch_tree_window;
+ Gtk::MenuItem* _menu_help_about;
- Gtk::VBox* m_vbox;
- Gtk::Viewport* m_viewport;
- BreadCrumbBox* m_breadcrumb_box;
+ Gtk::VBox* _vbox;
+ Gtk::Viewport* _viewport;
+ BreadCrumbBox* _breadcrumb_box;
- //Gtk::Statusbar* m_status_bar;
+ //Gtk::Statusbar* _status_bar;
/** Invisible bin used to store breadcrumbs when not shown by a view */
- Gtk::Alignment m_breadcrumb_bin;
+ Gtk::Alignment _breadcrumb_bin;
};
diff --git a/src/progs/ingenuity/Port.cpp b/src/progs/ingenuity/Port.cpp
index e8e795d0..625d0d71 100644
--- a/src/progs/ingenuity/Port.cpp
+++ b/src/progs/ingenuity/Port.cpp
@@ -43,7 +43,7 @@ Port::Port(boost::shared_ptr<LibFlowCanvas::Module> module, SharedPtr<PortModel>
assert(_port_model);
if (destroyable)
- m_menu.items().push_back(Gtk::Menu_Helpers::MenuElem("Destroy",
+ _menu.items().push_back(Gtk::Menu_Helpers::MenuElem("Destroy",
sigc::mem_fun(this, &Port::on_menu_destroy)));
}
diff --git a/src/progs/ingenuity/RenameWindow.cpp b/src/progs/ingenuity/RenameWindow.cpp
index ba08fef6..33071a45 100644
--- a/src/progs/ingenuity/RenameWindow.cpp
+++ b/src/progs/ingenuity/RenameWindow.cpp
@@ -29,16 +29,16 @@ namespace Ingenuity {
RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("rename_name_entry", m_name_entry);
- glade_xml->get_widget("rename_message_label", m_message_label);
- glade_xml->get_widget("rename_cancel_button", m_cancel_button);
- glade_xml->get_widget("rename_ok_button", m_ok_button);
+ glade_xml->get_widget("rename_name_entry", _name_entry);
+ glade_xml->get_widget("rename_message_label", _message_label);
+ glade_xml->get_widget("rename_cancel_button", _cancel_button);
+ glade_xml->get_widget("rename_ok_button", _ok_button);
- m_name_entry->signal_changed().connect(sigc::mem_fun(this, &RenameWindow::name_changed));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::cancel_clicked));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::ok_clicked));
+ _name_entry->signal_changed().connect(sigc::mem_fun(this, &RenameWindow::name_changed));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::cancel_clicked));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::ok_clicked));
- m_ok_button->property_sensitive() = false;
+ _ok_button->property_sensitive() = false;
}
@@ -48,8 +48,8 @@ RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
void
RenameWindow::set_object(SharedPtr<ObjectModel> object)
{
- m_object = object;
- m_name_entry->set_text(object->path().name());
+ _object = object;
+ _name_entry->set_text(object->path().name());
}
@@ -59,25 +59,25 @@ RenameWindow::set_object(SharedPtr<ObjectModel> object)
void
RenameWindow::name_changed()
{
- assert(m_name_entry);
- assert(m_message_label);
- assert(m_object);
- assert(m_object->parent());
+ assert(_name_entry);
+ assert(_message_label);
+ assert(_object);
+ assert(_object->parent());
- string name = m_name_entry->get_text();
+ string name = _name_entry->get_text();
if (name.find("/") != string::npos) {
- m_message_label->set_text("Name may not contain '/'");
- m_ok_button->property_sensitive() = false;
- //} else if (m_object->parent()->patch_model()->get_node(name) != NULL) {
- } else if (App::instance().store()->object(m_object->parent()->path().base() + name)) {
- m_message_label->set_text("An object already exists with that name.");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("Name may not contain '/'");
+ _ok_button->property_sensitive() = false;
+ //} else if (_object->parent()->patch_model()->get_node(name) != NULL) {
+ } else if (App::instance().store()->object(_object->parent()->path().base() + name)) {
+ _message_label->set_text("An object already exists with that name.");
+ _ok_button->property_sensitive() = false;
} else if (name.length() == 0) {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = false;
} else {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = true;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = true;
}
}
@@ -86,7 +86,7 @@ void
RenameWindow::cancel_clicked()
{
cout << "cancel\n";
- m_name_entry->set_text("");
+ _name_entry->set_text("");
hide();
}
@@ -100,11 +100,11 @@ RenameWindow::cancel_clicked()
void
RenameWindow::ok_clicked()
{
- string name = m_name_entry->get_text();
+ string name = _name_entry->get_text();
assert(name.length() > 0);
assert(name.find("/") == string::npos);
- App::instance().engine()->rename(m_object->path(), name);
+ App::instance().engine()->rename(_object->path(), name);
hide();
}
diff --git a/src/progs/ingenuity/RenameWindow.h b/src/progs/ingenuity/RenameWindow.h
index a00e1e73..3bb430a3 100644
--- a/src/progs/ingenuity/RenameWindow.h
+++ b/src/progs/ingenuity/RenameWindow.h
@@ -44,12 +44,12 @@ private:
void cancel_clicked();
void ok_clicked();
- SharedPtr<ObjectModel> m_object;
+ SharedPtr<ObjectModel> _object;
- Gtk::Entry* m_name_entry;
- Gtk::Label* m_message_label;
- Gtk::Button* m_cancel_button;
- Gtk::Button* m_ok_button;
+ Gtk::Entry* _name_entry;
+ Gtk::Label* _message_label;
+ Gtk::Button* _cancel_button;
+ Gtk::Button* _ok_button;
};
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/SubpatchModule.cpp b/src/progs/ingenuity/SubpatchModule.cpp
index d67f7e26..cead93e4 100644
--- a/src/progs/ingenuity/SubpatchModule.cpp
+++ b/src/progs/ingenuity/SubpatchModule.cpp
@@ -33,7 +33,7 @@ namespace Ingenuity {
SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PatchModel> patch)
: NodeModule(canvas, patch),
- m_patch(patch)
+ _patch(patch)
{
assert(canvas);
assert(patch);
@@ -43,15 +43,15 @@ SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<
void
SubpatchModule::on_double_click(GdkEventButton* event)
{
- assert(m_patch);
+ assert(_patch);
- SharedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
+ SharedPtr<PatchModel> parent = PtrCast<PatchModel>(_patch->parent());
PatchWindow* const preferred = ( (parent && (event->state & GDK_SHIFT_MASK))
? NULL
: App::instance().window_factory()->patch_window(parent) );
- App::instance().window_factory()->present_patch(m_patch, preferred);
+ App::instance().window_factory()->present_patch(_patch, preferred);
}
@@ -62,15 +62,15 @@ SubpatchModule::on_double_click(GdkEventButton* event)
void
SubpatchModule::browse_to_patch()
{
- assert(m_patch->parent());
+ assert(_patch->parent());
- SharedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
+ SharedPtr<PatchModel> parent = PtrCast<PatchModel>(_patch->parent());
PatchWindow* const preferred = ( (parent)
? App::instance().window_factory()->patch_window(parent)
: NULL );
- App::instance().window_factory()->present_patch(m_patch, preferred);
+ App::instance().window_factory()->present_patch(_patch, preferred);
}
@@ -86,7 +86,7 @@ SubpatchModule::show_dialog()
void
SubpatchModule::menu_remove()
{
- App::instance().engine()->destroy(m_patch->path());
+ App::instance().engine()->destroy(_patch->path());
}
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/SubpatchModule.h b/src/progs/ingenuity/SubpatchModule.h
index 9ae1bea3..7c80f27a 100644
--- a/src/progs/ingenuity/SubpatchModule.h
+++ b/src/progs/ingenuity/SubpatchModule.h
@@ -56,10 +56,10 @@ public:
void browse_to_patch();
void menu_remove();
- SharedPtr<PatchModel> patch() { return m_patch; }
+ SharedPtr<PatchModel> patch() { return _patch; }
protected:
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
};
diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade
index de785fad..b0cd6684 100644
--- a/src/progs/ingenuity/ingenuity.glade
+++ b/src/progs/ingenuity/ingenuity.glade
@@ -2092,7 +2092,7 @@
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">1 0 99999 1 10 10</property>
+ <property name="adjustment">1 -99999 99999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -2181,7 +2181,7 @@
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">1 0 99999 1 10 10</property>
+ <property name="adjustment">1 -99999 99999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>