Overte C++ Documentation
CompositeEndpoint.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_CompositeEndpoint_h
11 #define hifi_Controllers_CompositeEndpoint_h
12 
13 #include "../Endpoint.h"
14 
15 namespace controller {
16  class CompositeEndpoint : public Endpoint, Endpoint::Pair {
17  public:
18  static std::shared_ptr<Endpoint> newEndpoint(Endpoint::Pointer first, Endpoint::Pointer second) {
19  return std::shared_ptr<Endpoint>(new CompositeEndpoint(first, second));
20  };
21 
22  using Endpoint::apply;
23 
24  virtual AxisValue peek() const override;
25  virtual AxisValue value() override;
26  virtual void apply(AxisValue newValue, const Pointer& source) override;
27  virtual bool readable() const override;
28 
29  private:
30  CompositeEndpoint(Endpoint::Pointer first, Endpoint::Pointer second);
31  };
32 
33 }
34 
35 #endif