diff options
author | fcolin | 2007-02-01 13:01:25 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:01:25 +0000 |
commit | f3dc6507209093d953eaab2f844ed13594465d05 (patch) | |
tree | 9d0b5dbbd9ee07591e0830f9b5c70a32db1ebef0 | |
parent | 609e3c74cce2b30d0b4f58b1355100e5a3a1ac87 (diff) | |
download | ivy-cplusplus-f3dc6507209093d953eaab2f844ed13594465d05.zip ivy-cplusplus-f3dc6507209093d953eaab2f844ed13594465d05.tar.gz ivy-cplusplus-f3dc6507209093d953eaab2f844ed13594465d05.tar.bz2 ivy-cplusplus-f3dc6507209093d953eaab2f844ed13594465d05.tar.xz |
Utilisateur : Fcolin Date : 25/10/01 Heure : 18:39 Archivé dans $/Ivy (vss 8)
-rw-r--r-- | Bus/Ivy/IvyCallback.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Bus/Ivy/IvyCallback.h b/Bus/Ivy/IvyCallback.h index 68b286a..25368f0 100644 --- a/Bus/Ivy/IvyCallback.h +++ b/Bus/Ivy/IvyCallback.h @@ -19,22 +19,24 @@ public: };
class IvyMessageCallbackFunction: public IvyMessageCallback {
public:
- typedef void ( *IvyMessageCallback_fun )( IvyApplication *app, int argc, const char **argv );
+ typedef void ( *IvyMessageCallback_fun )( IvyApplication *app, void *user_data, int argc, const char **argv );
IvyMessageCallback_fun MessageCb;
+ void *data;
public:
- IvyMessageCallbackFunction ( IvyMessageCallback_fun m_cb ) : MessageCb( m_cb )
+ IvyMessageCallbackFunction ( IvyMessageCallback_fun m_cb, void *udata = NULL ) : MessageCb( m_cb )
{
+ data = udata;
}
~IvyMessageCallbackFunction ()
{
}
void OnMessage (IvyApplication *app, int argc, const char **argv)
{
- (*MessageCb) (app, argc, argv);
+ (*MessageCb) (app, data, argc, argv);
}
/* raccourci d'ecriture */
-#define BUS_CALLBACK( m ) new IvyMessageCallbackFunction( m )
+#define BUS_CALLBACK( m , d ) new IvyMessageCallbackFunction( m, d )
};
/* template Class Callback for the normal bus Message */
template <class T> class IvyMessageCallbackOf : public IvyMessageCallback {
|