Patch clearing.
git-svn-id: http://svn.drobilla.net/lad@141 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
parent
5354222fbc
commit
1d67c116f6
|
@ -32,12 +32,15 @@ namespace Client {
|
|||
* This simply emits an sigc signal for every event (eg OSC message) coming from
|
||||
* the engine. Use Store (which extends this) if you want a nice client-side
|
||||
* model of the engine.
|
||||
*
|
||||
* The signals here match the calls to ClientInterface exactly. See the
|
||||
* documentation for ClientInterface for meanings of signal parameters.
|
||||
*/
|
||||
class SigClientInterface : virtual public Ingen::Shared::ClientInterface, public sigc::trackable
|
||||
{
|
||||
public:
|
||||
|
||||
// See the corresponding emitting functions below for parameter meanings
|
||||
// Signal parameters math up directly with ClientInterface calls
|
||||
|
||||
sigc::signal<void, int32_t, bool, string> response_sig;
|
||||
sigc::signal<void> bundle_begin_sig;
|
||||
|
|
|
@ -38,6 +38,7 @@ Store::Store(CountedPtr<SigClientInterface> emitter)
|
|||
emitter->new_port_sig.connect(sigc::mem_fun(this, &Store::new_port_event));
|
||||
emitter->patch_enabled_sig.connect(sigc::mem_fun(this, &Store::patch_enabled_event));
|
||||
emitter->patch_disabled_sig.connect(sigc::mem_fun(this, &Store::patch_disabled_event));
|
||||
emitter->patch_cleared_sig.connect(sigc::mem_fun(this, &Store::patch_cleared_event));
|
||||
emitter->connection_sig.connect(sigc::mem_fun(this, &Store::connection_event));
|
||||
emitter->disconnection_sig.connect(sigc::mem_fun(this, &Store::disconnection_event));
|
||||
emitter->metadata_update_sig.connect(sigc::mem_fun(this, &Store::metadata_update_event));
|
||||
|
@ -264,8 +265,8 @@ Store::destruction_event(const Path& path)
|
|||
|
||||
removed.reset();
|
||||
|
||||
cerr << "Store removed object " << path
|
||||
<< ", count: " << removed.use_count();
|
||||
//cerr << "Store removed object " << path
|
||||
// << ", count: " << removed.use_count();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -338,6 +339,19 @@ Store::patch_disabled_event(const Path& path)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
Store::patch_cleared_event(const Path& path)
|
||||
{
|
||||
CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
|
||||
if (patch) {
|
||||
NodeModelMap children = patch->nodes(); // take a copy
|
||||
for (NodeModelMap::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
destruction_event(i->second->path());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Store::metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value)
|
||||
{
|
||||
|
|
|
@ -83,6 +83,7 @@ private:
|
|||
void new_port_event(const Path& path, const string& data_type, bool is_output);
|
||||
void patch_enabled_event(const Path& path);
|
||||
void patch_disabled_event(const Path& path);
|
||||
void patch_cleared_event(const Path& path);
|
||||
void metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value);
|
||||
void control_change_event(const Path& port_path, float value);
|
||||
void connection_event(const Path& src_port_path, const Path& dst_port_path);
|
||||
|
|
Loading…
Reference in New Issue