summaryrefslogtreecommitdiff
path: root/Bus/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:01:17 +0000
committerfcolin2007-02-01 13:01:17 +0000
commit2bacb9804b52fe8cc55b9ae18b67304d80e39c9e (patch)
tree724a3379c1c854ccd13daface095b7cfb8c9f0ff /Bus/Ivy
parent5e9a97547a22cb3816721bf9aaca5015f22cdd68 (diff)
downloadivy-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)
Diffstat (limited to 'Bus/Ivy')
-rw-r--r--Bus/Ivy/IvyCallback.h19
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 {