00001 00002 #ifndef FSAMGR_H 00003 #define FSAMGR_H 00004 00005 #include "IS3DCommon.H" 00006 #include "Fsa.H" 00007 #include "EventFilter.H" 00008 00009 namespace IS3D { 00010 00011 00012 class FsaMgr 00013 { 00014 public: 00017 static void addFsaRef(FsaRef fsa); 00018 00020 static void removeFsaRef(FsaRef fsa); 00021 00027 static void addDeviceLevelFsaRef(FsaRef fsa); 00028 00031 static void queueEvent(EventRef event); 00032 static void queueEventWithoutFilter(EventRef event); 00033 00034 00035 static int numFsas(); 00036 static FsaRef getFsa(int i); 00037 00041 static void addEventAliases(const std::string &eventName, 00042 const Array<std::string> &newEventNames); 00043 00049 static void addEventFilter(EventFilterRef f) { _filters.append(f); } 00050 00051 static void removeEventFilter(EventFilterRef f) { 00052 _filters.remove(_filters.findIndex(f)); 00053 } 00054 00056 static void setFullDebug(bool debug); 00058 static void setPrintAsQueued(bool debug) { _printAsQueued = debug; } 00060 static void setPrintAsProcessed(bool debug) { _printAsProcessed = debug; } 00061 00064 static void processEventQueue(); 00065 00068 static void processEvent(EventRef event); 00069 static void processEventDeviceLevel(EventRef event); 00070 00071 private: 00072 00073 static Array<EventRef> _eventQueue; 00074 static Array<FsaRef> _fsas; 00075 static Array<FsaRef> _deviceLevelFsas; 00076 static Array<EventFilterRef> _filters; 00077 static bool _fullDebug; 00078 static bool _printAsQueued; 00079 static bool _printAsProcessed; 00080 static Table< std::string, Array<std::string> > _eventAliases; 00081 }; 00082 00083 } 00084 00085 #endif 00086