OSVR-Core
DeviceWrapper.h
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_DeviceWrapper_h_GUID_3524C649_2276_4C87_C116_663BABDC23C6
26 #define INCLUDED_DeviceWrapper_h_GUID_3524C649_2276_4C87_C116_663BABDC23C6
27 
28 // Internal Includes
29 #include <osvr/Common/BaseDevice.h>
30 #include <osvr/Util/UniquePtr.h>
31 
32 // Library/third-party includes
33 #include <vrpn_BaseClass.h>
34 #include <vrpn_ConnectionPtr.h>
35 
36 // Standard includes
37 #include <string>
38 
39 namespace osvr {
40 namespace common {
43  class DeviceWrapper : public vrpn_BaseClass, public BaseDevice {
44  public:
45  DeviceWrapper(std::string const &name, vrpn_ConnectionPtr const &conn,
46  bool client);
47  virtual ~DeviceWrapper();
48 
49  private:
52  virtual void mainloop();
53  virtual int register_types();
57  virtual void m_update();
59  vrpn_ConnectionPtr m_conn;
60  bool m_client;
61  };
62 } // namespace common
63 } // namespace osvr
64 
65 #endif // INCLUDED_DeviceWrapper_h_GUID_3524C649_2276_4C87_C116_663BABDC23C6
Handles spatial transformations.
Definition: SerializationTraitExample_Complicated.h:40
Class used as an interface for underlying devices that can have device components (corresponding to i...
Definition: BaseDevice.h:51
Base class used to implement BaseDevice/DeviceComponent-based devices on top of VRPN.
Definition: DeviceWrapper.h:43
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Header to bring unique_ptr into the osvr namespace.
Header.