diff options
author | fcolin | 2007-02-01 13:01:17 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:01:17 +0000 |
commit | 2bacb9804b52fe8cc55b9ae18b67304d80e39c9e (patch) | |
tree | 724a3379c1c854ccd13daface095b7cfb8c9f0ff | |
parent | 5e9a97547a22cb3816721bf9aaca5015f22cdd68 (diff) | |
download | ivy-cplusplus-2bacb9804b52fe8cc55b9ae18b67304d80e39c9e.zip ivy-cplusplus-2bacb9804b52fe8cc55b9ae18b67304d80e39c9e.tar.gz ivy-cplusplus-2bacb9804b52fe8cc55b9ae18b67304d80e39c9e.tar.bz2 ivy-cplusplus-2bacb9804b52fe8cc55b9ae18b67304d80e39c9e.tar.xz |
Utilisateur : Fcolin Date : 14/11/00 Heure : 18:58 Archivé dans $/Ivy (vss 4)
-rw-r--r-- | Bus/Ivy/IvyCallback.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Bus/Ivy/IvyCallback.h b/Bus/Ivy/IvyCallback.h index e311f58..f1075dc 100644 --- a/Bus/Ivy/IvyCallback.h +++ b/Bus/Ivy/IvyCallback.h @@ -43,6 +43,25 @@ public: {
}
};
+class IvyMessageCallbackFunction: public IvyMessageCallback {
+public:
+ typedef void ( *IvyMessageCallback_fun )( IvyApplication *app, int argc, const char **argv );
+ IvyMessageCallback_fun MessageCb;
+
+public:
+ IvyMessageCallbackFunction ( IvyMessageCallback_fun m_cb ) : MessageCb( m_cb )
+ {
+ }
+ ~IvyMessageCallbackFunction ()
+ {
+ }
+ void OnMessage (IvyApplication *app, int argc, const char **argv)
+ {
+ (*MessageCb) (app, argc, argv);
+ }
+/* raccourci d'ecriture */
+#define BUS_CALLBACK( m ) new IvyMessageCallbackFunction( m )
+};
/* template Class Callback for the normal bus Message */
template <class T> class IvyMessageCallbackOf : public IvyMessageCallback {
|