Overte C++ Documentation
AnyEndpoint.h
1 //
2 // Created by Bradley Austin Davis 2015/10/23
3 // Copyright 2015 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 //
8 
9 #pragma once
10 #ifndef hifi_Controllers_AnyEndpoint_h
11 #define hifi_Controllers_AnyEndpoint_h
12 
13 #include "../Endpoint.h"
14 
15 namespace controller {
16 
17 class AnyEndpoint : public Endpoint {
18  friend class UserInputMapper;
19 public:
20  static std::shared_ptr<Endpoint> newEndpoint(Endpoint::List children) {
21  return std::shared_ptr<Endpoint>(new AnyEndpoint(children));
22  };
23 
24  using Endpoint::apply;
25  virtual AxisValue peek() const override;
26  virtual AxisValue value() override;
27  virtual void apply(AxisValue newValue, const Endpoint::Pointer& source) override;
28  virtual bool writeable() const override;
29  virtual bool readable() const override;
30 
31 private:
32  AnyEndpoint(Endpoint::List children);
33 
34  Endpoint::List _children;
35 };
36 
37 }
38 
39 #endif