VR-Forces 4.1 Class Documentation
eventHandlerFactory.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: eventHandlerFactory.h,v $ $Revision: 1.4 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef EVENTHANDLERFACTORY_H
13 #define EVENTHANDLERFACTORY_H
14 
15 #include "tmqt/tmqtDefines.h"
16 #include <QtCore/QHash>
17 
18 class DtEventHandler;
19 class DtEventController;
20 
21 typedef DtEventHandler* (*DtHandlerCreate)(DtEventController* controller, void* use);
23 {
24 public:
26  DtHandlerCreateInfo(DtHandlerCreate fcn, void *usr, bool appLevel = false);
28  myCallback(orig.myCallback), myUserData(orig.myUserData), myAppLevel(orig.myAppLevel) {};
29 
30  virtual ~DtHandlerCreateInfo();
31 
32  virtual DtHandlerCreate callback();
33  virtual void* usertoLatin1();
34  virtual bool appLevel();
35 
36 protected:
38  void* myUserData;
39 
41  bool myAppLevel;
42 };
43 
47 {
48 public:
50  virtual ~DtEventHandlerFactory();
51 
52 public:
55  virtual void addHandlerCreate(int type, DtHandlerCreate fcn, void* usr = NULL);
56  virtual void removeHandlerCreate(int type);
57 
59  virtual DtEventHandler* createHandler(int type);
60 
62  virtual DtEventController* eventController() const;
63 
64 protected:
65  QHash<int, DtHandlerCreateInfo> myHandlers;
67 };
68 
69 #endif

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)