Debian Codegraph @

3rdparty/osgXR/src/OpenXR/ActionSet.h

raw symbols SCIP
1 // SPDX-License-Identifier: LGPL-2.1-only
2 // Copyright (C) 2021 James Hogan <[email protected]>
3
4 #ifndef OSGXR_OPENXR_ACTION_SET
5 #define OSGXR_OPENXR_ACTION_SET 1
6
7 #include "Instance.h"
8
9 #include <osg/ref_ptr>
10
11 #include <cstdint>
12 #include <string>
13
14 namespace osgXR {
15
16 namespace OpenXR {
17
18 class ActionSet : public osg::Referenced
19 {
20 public:
21
22 ActionSet(Instance *instance,
23 const std::string &name,
24 const std::string &localizedName,
25 uint32_t priority);
26 virtual ~ActionSet();
27
28 // Error checking
29
30 inline bool valid() const
31 {
32 return _actionSet != XR_NULL_HANDLE;
33 }
34
35 inline bool check(XrResult result, const char *actionMsg) const
36 {
37 return _instance->check(result, actionMsg);
38 }
39
40 // Conversions
41
42 inline const osg::ref_ptr<Instance> getInstance() const
43 {
44 return _instance;
45 }
46
47 inline XrInstance getXrInstance() const
48 {
49 return _instance->getXrInstance();
50 }
51
52 inline XrActionSet getXrActionSet() const
53 {
54 return _actionSet;
55 }
56
57
58 protected:
59
60 // Action set data
61 osg::ref_ptr<Instance> _instance;
62 XrActionSet _actionSet;
63 };
64
65 } // osgXR::OpenXR
66
67 } // osgXR
68
69 #endif