aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/dyn/dyn_conn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/dyn/dyn_conn.cpp')
-rw-r--r--externals/grill/dyn/dyn_conn.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/externals/grill/dyn/dyn_conn.cpp b/externals/grill/dyn/dyn_conn.cpp
new file mode 100644
index 00000000..4300062c
--- /dev/null
+++ b/externals/grill/dyn/dyn_conn.cpp
@@ -0,0 +1,40 @@
+/*
+dyn - dynamical object management
+
+Copyright (c)2003-2004 Thomas Grill (gr@grrrr.org)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+*/
+
+#include "dyn_proto.h"
+
+dyn_conn::~dyn_conn()
+{
+ dyn_patchable *sobj = NULL,*dobj = NULL;
+ if(src != DYN_ID_NONE && (sobj = src->Patchable()))
+ sobj->RmvOutlet(this);
+
+ if(dst != DYN_ID_NONE && (dobj = dst->Patchable()))
+ dobj->RmvInlet(this);
+
+ if(sobj || dobj) {
+ src = dst = DYN_ID_NONE;
+ ident->Callback(DYN_SIGNAL_DISCONN);
+ }
+
+ if(sobj && dobj) {
+// sys_lock();
+ obj_disconnect((t_object *)sobj->pdobj,slet,(t_object *)dobj->pdobj,dlet);
+// sys_unlock();
+ }
+}
+
+/*
+void dyn_conn::Invalidate()
+{
+ if(src != DYN_ID_NONE || dst != DYN_ID_NONE) {
+ src = dst = DYN_ID_NONE;
+ ident->Callback(DYN_SIGNAL_DISCONN);
+ }
+}
+*/ \ No newline at end of file