tagging release
[dasher.git] / trunk / Src / DasherCore / DasherModule.cpp
blob00799d316ce8599e23ed0df4327dfac8b22008db
1 #include "DasherModule.h"
3 #include <iostream>
5 // Types:
6 // 0 = Input method
7 // 1 = Input filter
9 // IDs:
10 // 0 = Mouse input
11 // 1 = Socket input
12 // 2 = 1D mouse input
13 // 3 = Default filter
14 // 4 = 1D mode
15 // 5 = Eyetracker mode
16 // 6 = Dynamic Filter
17 // 7 = Click Mode
18 // 8 = Button mode (menu)
19 // 9 = One button filter (obsolete?)
20 // 10 = Button mode (static 3)
21 // 11 = Button mode (static 4)
22 // 12 = Button mode (alternating)
23 // 13 = Button mode (compass)
24 // 14 = Two button dynamic filter (Radford mode)
25 // 15 = Stylus input filter
26 // 16 = Joystick input
27 // 17 = Discrete joystick
28 // 18 = 1D joystick
30 CDasherModule::CDasherModule(Dasher::CEventHandler * pEventHandler, CSettingsStore * pSettingsStore, ModuleID_t iID, int iType, const char *szName)
31 : CDasherComponent(pEventHandler, pSettingsStore) {
32 m_iID = iID;
33 m_iType = iType;
34 m_iRefCount = 0;
35 m_szName = szName;
38 ModuleID_t CDasherModule::GetID() {
39 return m_iID;
42 int CDasherModule::GetType() {
43 return m_iType;
46 const char *CDasherModule::GetName() {
47 return m_szName;
50 void CDasherModule::Ref() {
51 ++m_iRefCount;
54 void CDasherModule::Unref() {
55 --m_iRefCount;
57 if(m_iRefCount == 0)
58 delete this;