Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoSensorManager.h
1#ifndef COIN_SOSENSORMANAGER_H
2#define COIN_SOSENSORMANAGER_H
3
4/**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25\**************************************************************************/
26
27#include <Inventor/SbBasic.h>
28
31class SoTimerSensor;
32class SbTime;
33
34class COIN_DLL_API SoSensorManager {
35public:
36 SoSensorManager(void);
38
39 void insertDelaySensor(SoDelayQueueSensor * s);
40 void insertTimerSensor(SoTimerQueueSensor * s);
41 void removeDelaySensor(SoDelayQueueSensor * s);
42 void removeTimerSensor(SoTimerQueueSensor * s);
43
44 void setChangedCallback(void (*sensorQueueChangedCB)(void *), void * data);
45
46 void rescheduleTimer(SoTimerSensor * s);
47 void removeRescheduledTimer(SoTimerQueueSensor * s);
48
49 void processDelayQueue(SbBool isidle);
50 void processImmediateQueue(void);
51 void processTimerQueue(void);
52
53 SbBool isDelaySensorPending(void);
54 SbBool isTimerSensorPending(SbTime & tm);
55
56 void setDelaySensorTimeout(const SbTime & t);
57 const SbTime & getDelaySensorTimeout(void);
58
59 int doSelect(int nfds, void * readfds, void * writefds,
60 void * exceptfds, struct timeval * userTimeOut);
61
62private:
63 void notifyChanged(void);
64
65 int mergeTimerQueues(void);
66 int mergeDelayQueues(void);
67
68 class SoSensorManagerP * pimpl;
69 friend class SoSensorManagerP;
70};
71
72#endif // !COIN_SOSENSORMANAGER_H
The SbTime class instances represents time values.
Definition SbTime.h:41
The SoDelayQueueSensor class is the abstract base class for priority scheduled sensors.
Definition SoDelayQueueSensor.h:31
The SoSensorManager class handles the sensor queues.
Definition SoSensorManager.h:34
The SoTimerQueueSensor class is the abstract base class for sensors triggering on certain timer event...
Definition SoTimerQueueSensor.h:30
The SoTimerSensor class is a sensor which will trigger at given intervals.
Definition SoTimerSensor.h:29

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.