From 0ee4adee860c77ba82c1e360657b8442f6f61ab7 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:56:28 +0000 Subject: Utilisateur : Fcolin Date : 1/06/06 Heure : 15:54 Archivé dans $/Bus/Ivy Commentaire: Separation module de traitement regexp (vss 26) --- Bus/Ivy/Ivy.cxx | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'Bus/Ivy') diff --git a/Bus/Ivy/Ivy.cxx b/Bus/Ivy/Ivy.cxx index 2da3766..60ba574 100644 --- a/Bus/Ivy/Ivy.cxx +++ b/Bus/Ivy/Ivy.cxx @@ -9,7 +9,7 @@ #include "IvyWatcher.h" #include "IvyApplication.h" #include "IvySynchroWnd.h" - +#include "IvyBinding.h" #define DEFAULT_ADDR "127.255.255.255" #define SEPARATOR ":" @@ -62,8 +62,7 @@ Ivy::Ivy(const char* name, const char * ready, IvyApplicationCallback *callback, IvySynchronousCallback::m_synchro = new IvySynchroWnd(); ready_message = ready; ApplicationName = name; - messages_classes_count = 0; - messages_classes = NULL; + binding_callback = NULL; application_callback = synchronous ? new IvySynchronousApplicationCallback(callback) : callback; direct_callback = NULL; @@ -364,22 +363,6 @@ void Ivy::SendDirectMsg(IvyApplication * app, int id, const char *message) app->SendMsg( IvyApplication::DirectMsg, id, message ); } -bool Ivy::CheckRegexp(const char * exp) -{ - /* accepte tout par default */ - int i; - bool regexp_ok = true; - if ( *exp =='^' && messages_classes_count !=0 ) - { - regexp_ok = false; - for ( i = 0 ; i < messages_classes_count; i++ ) - { - if (strncmp( messages_classes[i], exp+1, strlen( messages_classes[i] )) == 0) - return 1; - } - } - return regexp_ok; -} void Ivy::SetBindCallback( IvyBindingCallback* bind_callback ) { binding_callback = synchronous ? new IvySynchronousBindingCallback(bind_callback) : bind_callback; @@ -387,8 +370,7 @@ void Ivy::SetBindCallback( IvyBindingCallback* bind_callback ) void Ivy::SetFilter(int argc, const char **argv ) { - messages_classes_count = argc; - messages_classes = argv; + IvyBinding::SetFilter(argc, argv ); } bool Ivy::CheckConnected(IvyApplication * app) -- cgit v1.1