VR-Vantage API Documentation
DtEventLoop.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtEventLoop.h,v $ $Revision: 1.14 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtEventLoop_H_
14 #define DtEventLoop_H_
15 
16 #include <vrvCore/vrvCore.h>
18 
19 class DtTimedSection;
20 
21 namespace makVrv
22 {
23  class DtDe;
24 
28  {
29 
30  public:
32  typedef void (*RunFunction)(DtDe&);
33 
34  public:
35 
39  static void runOnce(DtDe&);
40 
45  static DtEventLoop* create(DtDe& theIG);
46 
48  virtual ~DtEventLoop();
49 
55  void setAlternateRunFunction(RunFunction aFunction);
56 
59  void run();
60 
61 
62  protected:
63 
65  DtEventLoop(DtDe& de);
66 
70  void defaultRun();
71 
72  protected:
73 
75  DtTimedSection* myTimer;
76  RunFunction myRunnerFunction;
77 
78  };
79 
83  {
84 
85  public:
86 
89  static DtEventLoopCreator& instance(DtDe& theIG);
90 
92  static void registerInstance(DtDe& theIG, DtEventLoopCreator* anInstance);
93 
95  virtual DtEventLoop* create(DtDe& theIG) = 0;
96 
97  };
98 }
99 
100 #endif
101 


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)