All Classes Functions Variables Typedefs Friends Pages
IEventSink.h
1 //------------------------------------------------------------------------------
2 //
3 // Copyright (c) 2012 Glympse Inc. All rights reserved.
4 //
5 //------------------------------------------------------------------------------
6 
7 #ifndef IEVENTSINK_H__GLYMPSE__
8 #define IEVENTSINK_H__GLYMPSE__
9 
10 namespace Glympse
11 {
12 
13 /*C*/
14 struct IEventSink;
15 typedef O< IEventSink > GEventSink;
16 
17 
25 /*O*public**/ struct IEventSink : public IEventListener
26 {
31  public: virtual bool addListener(const GEventListener& eventListener) = 0;
32 
36  public: virtual bool removeListener(const GEventListener& eventListener) = 0;
37 
43  public: virtual GArray<GEventListener>::ptr getListeners() = 0;
44 
48  public: virtual bool hasContext(int64 key) = 0;
49 
54  public: virtual void associateContext(int64 key, const GCommonObj& value) = 0;
55 
59  public: virtual GCommonObj getContext(int64 key) = 0;
60 
64  public: virtual void clearContext(int64 key) = 0;
65 
69  public: virtual GEnumeration<GLong>::ptr getContextKeys() = 0;
70 
74  public: virtual void deriveContext(const GEventSink& sink) = 0;
75 };
76 
77 }
78 
79 #endif // !IEVENTLISTENER_H__GLYMPSE__