OSVR-Core
PureClientContext.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_PureClientContext_h_GUID_0A40DCCB_0451_4DB0_855B_7ECE66C52D07
26 #define INCLUDED_PureClientContext_h_GUID_0A40DCCB_0451_4DB0_855B_7ECE66C52D07
27 
28 // Internal Includes
36 #include <osvr/Common/PathTree.h>
39 #include <osvr/Common/Transform.h>
41 
42 // Library/third-party includes
43 #include <json/value.h>
44 #include <vrpn_ConnectionPtr.h>
45 
46 // Standard includes
47 #include <string>
48 
49 namespace osvr {
50 namespace client {
51 
53  public:
54  PureClientContext(const char appId[], common::ClientContextDeleter del)
55  : PureClientContext(appId, "localhost", del) {}
56  PureClientContext(const char appId[], const char host[],
57  common::ClientContextDeleter del);
58  virtual ~PureClientContext();
59  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
60  private:
61  void m_update() override;
62  void m_sendRoute(std::string const &route) override;
63 
66  void
67  m_handleNewInterface(common::ClientInterfacePtr const &iface) override;
68 
72  void m_handleReleasingInterface(
73  common::ClientInterfacePtr const &iface) override;
74 
75  common::PathTree const &m_getPathTree() const override;
76 
77  common::Transform const &m_getRoomToWorldTransform() const override;
78 
79  void m_setRoomToWorldTransform(common::Transform const &xform) override;
80 
81  bool m_getStatus() const override;
82 
84  std::string m_host;
85 
87  vrpn_ConnectionPtr m_mainConn;
88 
90  common::BaseDevicePtr m_systemDevice;
91 
94  common::SystemComponent *m_systemComponent;
95 
97  VRPNConnectionCollection m_vrpnConns;
98 
100  common::PathTreeOwner m_pathTreeOwner;
101 
103  RemoteHandlerFactory m_factory;
104 
106  common::NetworkingSupport m_network;
107 
109  bool m_gotConnection = false;
110 
112  common::Transform m_roomToWorld;
113 
116  ClientInterfaceObjectManager m_ifaceMgr;
117  };
118 } // namespace client
119 } // namespace osvr
120 #endif // INCLUDED_PureClientContext_h_GUID_0A40DCCB_0451_4DB0_855B_7ECE66C52D07
Definition: RemoteHandlerFactory.h:47
shared_ptr< ClientInterface > ClientInterfacePtr
Pointer for holding ClientInterface objects safely.
Definition: ClientInterfacePtr.h:43
A tree representation, with path/url syntax, of the known OSVR system.
Definition: PathTree.h:43
Header.
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
RAII class wrapping networking system startup.
Definition: NetworkingSupport.h:43
Class hiding the details of the interaction of the path tree and interface objects/osvr::client::Inte...
Definition: ClientInterfaceObjectManager.h:59
Object responsible for owning a path tree (specifically a "downstream"/client path tree)...
Definition: PathTreeOwner.h:48
Header.
Definition: PureClientContext.h:52
Definition: ClientContext.h:50
Definition: VRPNConnectionCollection.h:42
BaseDevice component, to be used only with the "OSVR" special device.
Definition: SystemComponent.h:76
Header forward-declaring TimeValue C++ API.
Spatial transformation, consisting of both pre and post components.
Definition: Transform.h:44