diff options
author | fcolin | 2007-02-01 13:03:30 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:03:30 +0000 |
commit | adc074b0e7619caac2f0edbfc9ee058e16f0b6da (patch) | |
tree | 837e1f1040e0d898893bf6bf0ac2d77823c01ca8 /Bus/Ivy | |
parent | f3ccc01117c86d0e389ce129a4dccbf68ed440a4 (diff) | |
download | ivy-cplusplus-adc074b0e7619caac2f0edbfc9ee058e16f0b6da.zip ivy-cplusplus-adc074b0e7619caac2f0edbfc9ee058e16f0b6da.tar.gz ivy-cplusplus-adc074b0e7619caac2f0edbfc9ee058e16f0b6da.tar.bz2 ivy-cplusplus-adc074b0e7619caac2f0edbfc9ee058e16f0b6da.tar.xz |
Utilisateur : Fcolin Date : 21/07/00 Heure : 10:48 Archivé dans $/Ivy Commentaire: separation file cb de la file de message windows (vss 3)
Diffstat (limited to 'Bus/Ivy')
-rw-r--r-- | Bus/Ivy/IvySynchroWnd.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Bus/Ivy/IvySynchroWnd.h b/Bus/Ivy/IvySynchroWnd.h index 5abd3ff..fba864e 100644 --- a/Bus/Ivy/IvySynchroWnd.h +++ b/Bus/Ivy/IvySynchroWnd.h @@ -12,6 +12,8 @@ #include "IvyApplication.h"
+class IvySynchronousCallback;
+
class IvySynchroWnd //: public CWnd
{
// Construction
@@ -21,12 +23,10 @@ public: // Attributes
public:
+
// Operations
public:
- void PostMessageCB (IvyMessageCallback *target, IvyApplication *app, int argc, const char **argv );
- void PostApplicationConnectedCB( IvyApplicationCallback *target, IvyApplication *app);
- void PostApplicationDisconnectedCB( IvyApplicationCallback *target, IvyApplication *app);
-
+ void PostIvyCB( IvySynchronousCallback *cb );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(IvySynchroWnd)
@@ -48,12 +48,13 @@ protected: WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
+ // Buffer Emission
+ CRITICAL_SECTION m_CritSection;
+ std::list<IvySynchronousCallback*> callbacklist;
protected:
- LRESULT OnMessageCB(WPARAM wParam, LPARAM lParam);
- LRESULT OnApplicationConnectedCB(WPARAM wParam, LPARAM lParam);
- LRESULT OnApplicationDisconnectedCB(WPARAM wParam, LPARAM lParam);
+ LRESULT OnIvyCB(WPARAM wParam, LPARAM lParam);
friend class IvySynchronousMessageCallback;
friend class IvySynchronousApplicationCallback;
@@ -64,12 +65,16 @@ protected: IvyApplication *app;
static IvySynchroWnd *m_synchro;
friend class Ivy;
+public:
+ virtual void CallCallback() = 0;
+
};
class IvySynchronousMessageCallback: public IvySynchronousCallback, public IvyMessageCallback
{
public:
IvySynchronousMessageCallback( IvyMessageCallback *cb );
virtual ~IvySynchronousMessageCallback();
+ virtual void CallCallback();
virtual void OnMessage (IvyApplication *app, int argc, const char **argv );
protected:
@@ -83,11 +88,14 @@ class IvySynchronousApplicationCallback: public IvySynchronousCallback, public {
public:
IvySynchronousApplicationCallback( IvyApplicationCallback *cb );
+ virtual void CallCallback();
virtual void OnApplicationConnected (IvyApplication *app);
virtual void OnApplicationDisconnected (IvyApplication *app);
protected:
IvyApplicationCallback *target;
-
+ typedef enum { CONNECTED_CB, DISCONNECTED_CB } CallbackType;
+ CallbackType type;
+
friend class IvySynchroWnd;
};
/////////////////////////////////////////////////////////////////////////////
|