summaryrefslogtreecommitdiff
path: root/Ivy/Ivy.cxx
diff options
context:
space:
mode:
authorfcolin2007-02-01 12:56:26 +0000
committerfcolin2007-02-01 12:56:26 +0000
commit3e928d698cf896b413b894a5c2df83562872ec4f (patch)
treee63b858fcbc3c92031a1da4067bec8e46b9aa86a /Ivy/Ivy.cxx
parent4012d9d589b8063a57be612b913dfa7270f5a017 (diff)
downloadivy-cplusplus-3e928d698cf896b413b894a5c2df83562872ec4f.zip
ivy-cplusplus-3e928d698cf896b413b894a5c2df83562872ec4f.tar.gz
ivy-cplusplus-3e928d698cf896b413b894a5c2df83562872ec4f.tar.bz2
ivy-cplusplus-3e928d698cf896b413b894a5c2df83562872ec4f.tar.xz
Utilisateur : Fcolin Date : 1/06/06 Heure : 10:14 Archivé dans $/Bus/Ivy Commentaire: ajout Binding Callback et SetFilter (vss 25)
Diffstat (limited to 'Ivy/Ivy.cxx')
-rw-r--r--Ivy/Ivy.cxx30
1 files changed, 28 insertions, 2 deletions
diff --git a/Ivy/Ivy.cxx b/Ivy/Ivy.cxx
index 66c1715..2da3766 100644
--- a/Ivy/Ivy.cxx
+++ b/Ivy/Ivy.cxx
@@ -64,6 +64,7 @@ Ivy::Ivy(const char* name, const char * ready, IvyApplicationCallback *callback,
ApplicationName = name;
messages_classes_count = 0;
messages_classes = NULL;
+ binding_callback = NULL;
application_callback = synchronous ? new IvySynchronousApplicationCallback(callback) : callback;
direct_callback = NULL;
die_callback = NULL;
@@ -337,6 +338,27 @@ void Ivy::CallApplicationDisconnectedCallback(IvyApplication * app)
application_callback->OnApplicationDisconnected( app );
}
}
+void Ivy::CallBindingAddCallback(IvyApplication * app, int id, const char * regexp)
+{
+ if ( binding_callback )
+ {
+ binding_callback->OnAddBind( app, id, regexp );
+ }
+}
+void Ivy::CallBindingRemoveCallback(IvyApplication * app, int id, const char * regexp)
+{
+ if ( binding_callback )
+ {
+ binding_callback->OnRemoveBind( app, id, regexp );
+ }
+}
+void Ivy::CallBindingFilterCallback(IvyApplication * app, int id, const char * regexp)
+{
+ if ( binding_callback )
+ {
+ binding_callback->OnFilterBind( app, id, regexp );
+ }
+}
void Ivy::SendDirectMsg(IvyApplication * app, int id, const char *message)
{
app->SendMsg( IvyApplication::DirectMsg, id, message );
@@ -358,8 +380,12 @@ bool Ivy::CheckRegexp(const char * exp)
}
return regexp_ok;
}
-
-void Ivy::Classes(int argc, const char **argv )
+void Ivy::SetBindCallback( IvyBindingCallback* bind_callback )
+{
+ binding_callback = synchronous ? new IvySynchronousBindingCallback(bind_callback) : bind_callback;
+}
+
+void Ivy::SetFilter(int argc, const char **argv )
{
messages_classes_count = argc;
messages_classes = argv;