00001 00002 #ifndef DEVICEMGR_H 00003 #define DEVICEMGR_H 00004 00005 00006 #include "IS3DCommon.H" 00007 #include "PolledDevice.H" 00008 #include "TrackerDevice.H" 00009 00010 namespace IS3D { 00011 00012 class DeviceMgr 00013 { 00014 public: 00015 00016 static void addPolledDevice(PolledDevice* dev); 00017 static void addTrackerDevice(TrackerDevice *dev) { _trackerDevs.append(dev); } 00018 00019 static void initFromConfigVals(); 00020 00021 static void runPolls(); 00022 00023 static int getNumTrackerDevices() { return _trackerDevs.size(); } 00024 static TrackerDevice* getTrackerDevice(int i) { return _trackerDevs[i]; } 00025 00026 // Return the device that produces this event 00027 static TrackerDevice* getTrackerDevice(const std::string &eventName); 00028 00029 private: 00030 static Array<PolledDevice*> _polledDevs; 00031 static Array<TrackerDevice*> _trackerDevs; 00032 }; 00033 00034 } 00035 00036 #endif 00037