OIS  1.5
Object-oriented Input System
OISLIRCFactoryCreator.h
Go to the documentation of this file.
1 #include "OISConfig.h"
2 #ifdef OIS_LIRC_SUPPORT
3 /*
4 The zlib/libpng License
5 
6 Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
7 
8 This software is provided 'as-is', without any express or implied warranty. In no event will
9 the authors be held liable for any damages arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose, including commercial
12 applications, and to alter it and redistribute it freely, subject to the following
13 restrictions:
14 
15  1. The origin of this software must not be misrepresented; you must not claim that
16  you wrote the original software. If you use this software in a product,
17  an acknowledgment in the product documentation would be appreciated but is
18  not required.
19 
20  2. Altered source versions must be plainly marked as such, and must not be
21  misrepresented as being the original software.
22 
23  3. This notice may not be removed or altered from any source distribution.
24 */
25 #ifndef OIS_LIRCFactoryCreator_H
26 #define OIS_LIRCFactoryCreator_H
27 
28 #include "OISPrereqs.h"
29 #include "OISFactoryCreator.h"
30 #include "OISLIRC.h"
31 
32 namespace OIS
33 {
34  //Forward declare local classes
35  class LIRCControl;
36 
38  class _OISExport LIRCFactoryCreator : public FactoryCreator
39  {
40  public:
41  LIRCFactoryCreator();
42  ~LIRCFactoryCreator();
43 
44  //FactoryCreator Overrides
46  DeviceList freeDeviceList();
47 
49  int totalDevices(Type iType);
50 
52  int freeDevices(Type iType);
53 
55  bool vendorExist(Type iType, const std::string& vendor);
56 
58  Object* createObject(InputManager* creator, Type iType, bool bufferMode, const std::string& vendor = "");
59 
61  void destroyObject(Object* obj);
62 
63  protected:
65  void discoverRemotes();
66 
68  void enableConnection(bool enable, bool blocking = true);
69 
71  void enableConnectionThread(bool enable);
72 
73  void threadUpdate();
74 
75  std::string mIP;
76  std::string mPort;
77  bool mConnected;
78  volatile bool mThreadRunning;
79  std::map<std::string, LIRCControl*> mUpdateRemotes;
80 
82  std::vector<std::string> mUnusedRemotes;
83 
85  std::map<std::string, RemoteInfo> mJoyStickInformation;
86 
88  int mCount;
89 
91  class BoostWrapper;
92 
94  BoostWrapper* mWrapped;
95  };
96 }
97 #endif //OIS_LIRCFactoryCreator_H
98 #endif
#define _OISExport
Definition: OISPrereqs.h:40
Type
Each Input class has a General Type variable, a form of RTTI.
Definition: OISPrereqs.h:159
std::multimap< Type, std::string > DeviceList
Map of device objects connected and their respective vendors.
Definition: OISPrereqs.h:170
Definition: OISEffect.h:28