FreeStick  0.3
Cross Platform Open Sorce Joystick Lib
FSBaseEvent.h
Go to the documentation of this file.
1 /**************************************************************************
2 Created by Alan Uthoff on 10/24/2013
3 Copyright (C) 2013
4 
5 This Code is free software; you can redistribute it and/or
6 modify it under the terms of the zlib/libpng License as published
7 by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 This software is provided 'as-is', without any express or implied warranty.
10 
11 In no event will the authors be held liable for any damages arising from the use of this software.
12 
13 Permission is granted to anyone to use this software for any purpose,
14 including commercial applications, and to alter it and redistribute
15 it freely, subject to the following restrictions:
16 
17 1. The origin of this software must not be misrepresented;
18 you must not claim that you wrote the original software.
19 If you use this software in a product, an acknowledgment
20 in the product documentation would be appreciated but is not required.
21 
22 2. Altered source versions must be plainly marked as such,
23 and must not be misrepresented as being the original software.
24 
25 3. This notice may not be removed or altered from any source distribution.
26 **************************************************************************/
27 
28 #pragma once
29 #include "../Interfaces/IFSEvent.h"
30 
31 namespace freestick
32 {
33  class FSBaseEvent : public IFSEvent
34  {
35  private:
36  unsigned int _timeStamp;
37  idNumber _deviceID;
38  FreeStickEventType _eventType;
39  FSEventAction _eventAction;
40  protected:
41  FSBaseEvent();
42  public:
43 
44  FSBaseEvent(FreeStickEventType eventType,FSEventAction eventAction,unsigned int timeStamp,idNumber deviceID);
45  virtual unsigned int getTimeStamp() {return _timeStamp;}
46  virtual FSEventAction getEventAction() {return _eventAction;}
47  virtual FreeStickEventType getEventType() {return _eventType;}
48  unsigned int getDeviceID() const {return _deviceID;}
49  };
50 
51 }
virtual FreeStickEventType getEventType()
Definition: FSBaseEvent.h:47
FSEventAction
Definition: IFSEvent.h:46
virtual unsigned int getTimeStamp()
Definition: FSBaseEvent.h:45
Definition: IFSEvent.h:55
unsigned int getDeviceID() const
Definition: FSBaseEvent.h:48
uint32_t idNumber
Definition: FSTypes.h:33
FreeStickEventType
Definition: IFSEvent.h:36
Definition: FSBaseDevice.h:32
Definition: FSBaseEvent.h:33
FSBaseEvent()
Definition: FSBaseEvent.cpp:38
uint64_t deviceID
Definition: FSTypes.h:37
virtual FSEventAction getEventAction()
Definition: FSBaseEvent.h:46