diff options
Diffstat (limited to 'comIvy/Expression.h')
-rw-r--r-- | comIvy/Expression.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/comIvy/Expression.h b/comIvy/Expression.h new file mode 100644 index 0000000..e60bbd2 --- /dev/null +++ b/comIvy/Expression.h @@ -0,0 +1,77 @@ +// Expression.h : déclaration de CExpression
+
+#pragma once
+#include "resource.h" // symboles principaux
+
+#include "Ivy.h"
+#include "IvyCallback.h"
+
+// IExpression
+[
+ object,
+ uuid("65B2CF08-0B15-4752-AEEA-655157A87367"),
+ dual, helpstring("Interface IExpression"),
+ pointer_default(unique)
+]
+__interface IExpression : IDispatch
+{
+ [id(1), helpstring("method Unbind")] HRESULT Unbind(void);
+};
+
+
+// _IExpressionEvents
+[
+ dispinterface,
+ uuid("74C250EC-2393-452D-9CC4-042313AB7268"),
+ helpstring("Interface _IExpressionEvents")
+]
+__interface _IExpressionEvents
+{
+ [id(1), helpstring("method Received")] void Received([in] BSTR applicationName, [in] VARIANT arguments);
+};
+
+
+// CExpression
+
+[
+ coclass,
+ threading("apartment"),
+ event_source("com"),
+ vi_progid("comIvy.Expression"),
+ progid("comIvy.Expression.1"),
+ version(1.0),
+ uuid("FAD2AFA6-44F7-430A-9344-F20C804DA97B"),
+ helpstring("Expression Class")
+]
+class ATL_NO_VTABLE CExpression :
+ public IExpression,
+ public IvyMessageCallback
+{
+public:
+ CExpression();
+ ~CExpression();
+
+ __event __interface _IExpressionEvents;
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ HRESULT FinalConstruct()
+ {
+ return S_OK;
+ }
+
+ void FinalRelease()
+ {
+ }
+
+public:
+
+ STDMETHOD(Unbind)(void);
+ friend class CBus;
+
+protected:
+ CBus* bus;
+ int id;
+ virtual void OnMessage(IvyApplication * app, int argc, const char ** argv);
+};
+
|