OSVR-Core
Viewers.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_Viewers_h_GUID_64108A5C_E8CF_409D_0757_C0A142678C5A
26 #define INCLUDED_Viewers_h_GUID_64108A5C_E8CF_409D_0757_C0A142678C5A
27 
28 // Internal Includes
29 #include <osvr/Client/Export.h>
32 #include <osvr/Client/Viewer.h>
35 
36 // Library/third-party includes
37 
38 // Standard includes
39 #include <vector>
40 #include <stdexcept>
41 #include <utility>
42 
43 namespace osvr {
44 namespace client {
45 
46  namespace detail {
47  typedef util::ContainerWrapper<
48  std::vector<Viewer>, util::container_policies::const_iterators,
49  util::container_policies::subscript> ViewerContainerBase;
50  } // namespace detail
51 
52  class Viewers : public detail::ViewerContainerBase {
53  public:
54  Viewers(Viewers const &) = delete;
55  Viewers &operator=(Viewers const &) = delete;
56  Viewers();
57  inline OSVR_EyeCount size() const {
58  return static_cast<OSVR_EyeCount>(container().size());
59  }
60 
61  private:
62  friend class DisplayConfigFactory;
63  };
64 
65 } // namespace client
66 } // namespace osvr
67 #endif // INCLUDED_Viewers_h_GUID_64108A5C_E8CF_409D_0757_C0A142678C5A
Header.
Header declaring opaque types used by Client and ClientKit.
Header providing a class template suitable for inheritance that wraps an arbitrary STL-like container...
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
Definition: DisplayConfig.h:50
Definition: newuoa.h:1888
Definition: Viewers.h:52
uint8_t OSVR_EyeCount
The integer type specifying the number of eyes (viewpoints) of a viewer.
Definition: RenderingTypesC.h:92
detail::ContainerWrapper_t< Container, Args... > ContainerWrapper
Parent class to inherit from to get a container with some functionality exposed.
Definition: ContainerWrapper.h:232