Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebGLViewportsRegistry.h @ 1235:e71ee3e88448 broker
WebGLViewportsRegistry in milliseconds, and Clear()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Dec 2019 20:25:22 +0100 |
parents | a28861abf888 |
children | b9b5d4378874 |
comparison
equal
deleted
inserted
replaced
1234:e99e09143c64 | 1235:e71ee3e88448 |
---|---|
36 class WebGLViewportsRegistry : public boost::noncopyable | 36 class WebGLViewportsRegistry : public boost::noncopyable |
37 { | 37 { |
38 private: | 38 private: |
39 typedef std::map<std::string, WebGLViewport*> Viewports; | 39 typedef std::map<std::string, WebGLViewport*> Viewports; |
40 | 40 |
41 unsigned int timeoutSeconds_; | 41 double timeoutMS_; |
42 Viewports viewports_; | 42 Viewports viewports_; |
43 | 43 |
44 void LaunchTimer(); | 44 void LaunchTimer(); |
45 | 45 |
46 void OnTimeout(); | 46 void OnTimeout(); |
47 | 47 |
48 static void OnTimeoutCallback(void *userData); | 48 static void OnTimeoutCallback(void *userData); |
49 | 49 |
50 public: | 50 public: |
51 WebGLViewportsRegistry(unsigned int timeoutSeconds); | 51 WebGLViewportsRegistry(double timeoutMS /* in milliseconds */); |
52 | 52 |
53 ~WebGLViewportsRegistry(); | 53 ~WebGLViewportsRegistry() |
54 { | |
55 Clear(); | |
56 } | |
54 | 57 |
55 void Add(const std::string& canvasId); | 58 void Add(const std::string& canvasId); |
56 | 59 |
57 void Remove(const std::string& canvasId); | 60 void Remove(const std::string& canvasId); |
61 | |
62 void Clear(); | |
58 | 63 |
59 class Accessor : public boost::noncopyable | 64 class Accessor : public boost::noncopyable |
60 { | 65 { |
61 private: | 66 private: |
62 WebGLViewportsRegistry& that_; | 67 WebGLViewportsRegistry& that_; |