summaryrefslogtreecommitdiffstats
path: root/src/gui/App.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-18 04:42:31 -0400
committerDavid Robillard <d@drobilla.net>2016-09-18 04:42:31 -0400
commitce6dc3d549bc58515d5d55db1d0a009a92887f3c (patch)
tree2cde2929903e30ec6272a79bd0877dd435aa83c2 /src/gui/App.cpp
parent758543f6dbb56755d3239c0ed68f1083384f0e96 (diff)
downloadingen-ce6dc3d549bc58515d5d55db1d0a009a92887f3c.tar.gz
ingen-ce6dc3d549bc58515d5d55db1d0a009a92887f3c.tar.bz2
ingen-ce6dc3d549bc58515d5d55db1d0a009a92887f3c.zip
Add fancy communication logging
Diffstat (limited to 'src/gui/App.cpp')
-rw-r--r--src/gui/App.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index fad2f195..c023fe8c 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -27,6 +27,7 @@
#include "ingen/EngineBase.hpp"
#include "ingen/Interface.hpp"
#include "ingen/Log.hpp"
+#include "ingen/StreamWriter.hpp"
#include "ingen/World.hpp"
#include "ingen/client/ClientStore.hpp"
#include "ingen/client/GraphModel.hpp"
@@ -163,6 +164,29 @@ App::attach(SPtr<SigClientInterface> client)
_world->set_store(_store);
}
+ if (_world->conf().option("dump").get<int32_t>()) {
+ _dumper = SPtr<StreamWriter>(new StreamWriter(_world->uri_map(),
+ _world->uris(),
+ Raul::URI("ingen:/client"),
+ stderr,
+ ColorContext::Color::CYAN));
+
+#define DUMP_CONNECT(signal, method) \
+ client->signal_##signal().connect( \
+ sigc::mem_fun(*_dumper.get(), &StreamWriter::method));
+
+ DUMP_CONNECT(object_deleted, del);
+ DUMP_CONNECT(object_moved, move);
+ DUMP_CONNECT(put, put);
+ DUMP_CONNECT(delta, delta);
+ DUMP_CONNECT(connection, connect);
+ DUMP_CONNECT(disconnection, disconnect);
+ DUMP_CONNECT(disconnect_all, disconnect_all);
+ DUMP_CONNECT(property_change, set_property);
+
+#undef DUMP_CONNECT
+ }
+
_graph_tree_window->init(*this, *_store);
_client->signal_response().connect(