2 Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
4 Governed by the TrueCrypt License 3.0 the full text of which is contained in
5 the file License.txt included in TrueCrypt binary and source code distribution
9 #ifndef TC_HEADER_Platform_Event
10 #define TC_HEADER_Platform_Event
12 #include "PlatformBase.h"
15 #include "SharedPtr.h"
21 virtual ~EventArgs () { }
24 class EventConnectorBase
27 virtual ~EventConnectorBase () { }
28 virtual void operator() (EventArgs &args) = 0;
30 virtual EventConnectorBase *CloneNew () const = 0;
31 virtual void *GetHandler () const = 0;
34 typedef list < shared_ptr <EventConnectorBase> > EventHandlerList;
37 class EventConnector : public EventConnectorBase
40 typedef void (T::*EventHandlerFunction) (EventArgs &);
42 EventConnector (T *handler, EventHandlerFunction function)
43 : Handler (handler), Function (function) { }
45 virtual void operator() (EventArgs &args) { (Handler->*Function) (args); }
47 virtual EventConnectorBase *CloneNew () const { return new EventConnector <T> (*this); }
48 virtual void *GetHandler () const { return Handler; }
52 EventHandlerFunction Function;
61 void Connect (const EventConnectorBase &connector);
62 void Disconnect (void *handler);
64 void Raise (EventArgs &args);
67 EventHandlerList ConnectedHandlers;
71 Event (const Event &);
72 Event &operator= (const Event &);
75 struct ExceptionEventArgs : public EventArgs
77 ExceptionEventArgs (exception &ex) : mException (ex) { }
78 exception &mException;
81 ExceptionEventArgs (const ExceptionEventArgs &);
82 ExceptionEventArgs &operator= (const ExceptionEventArgs &);
86 #endif // TC_HEADER_Platform_Event
This page took
0.039504 seconds and
3 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at
this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.