Ocean
platform/meta/quest/platformsdk/Utilities.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_PLATFORM_META_QUEST_PLATFORMSDK_UTILITIES_H
9 #define META_OCEAN_PLATFORM_META_QUEST_PLATFORMSDK_UTILITIES_H
10 
12 
13 #include <OVR_Platform.h>
14 
15 namespace Ocean
16 {
17 
18 namespace Platform
19 {
20 
21 namespace Meta
22 {
23 
24 namespace Quest
25 {
26 
27 namespace PlatformSDK
28 {
29 
30 /**
31  * This class implements utility functions for PlatformSDK.
32  * @ingroup platformmetaquestplatformsdk
33  */
34 class OCEAN_PLATFORM_META_QUEST_PLATFORMSDK_EXPORT Utilities
35 {
36  public:
37 
38  /**
39  * Extracts the relevant information from a user array.
40  * @param userArrayHandle The handle to the user array, must be valid
41  * @param userNames Optional resulting readable names of the users, one for each extracted user id
42  * @return The resulting ids of the extracted users
43  */
44  static Indices64 extractUsers(ovrUserArrayHandle userArrayHandle, std::vector<std::string>* userNames = nullptr);
45 
46  /**
47  * Returns the error of a given message.
48  * @param message The message for which the error will be returned, must be valid
49  * @return The resulting error
50  */
51  static std::string errorMessage(ovrMessage* message);
52 };
53 
54 }
55 
56 }
57 
58 }
59 
60 }
61 
62 }
63 
64 #endif // META_OCEAN_PLATFORM_META_QUEST_PLATFORMSDK_UTILITIES_H
This class implements utility functions for PlatformSDK.
Definition: platform/meta/quest/platformsdk/Utilities.h:35
static std::string errorMessage(ovrMessage *message)
Returns the error of a given message.
static Indices64 extractUsers(ovrUserArrayHandle userArrayHandle, std::vector< std::string > *userNames=nullptr)
Extracts the relevant information from a user array.
std::vector< Index64 > Indices64
Definition of a vector holding 64 bit index values.
Definition: Base.h:108
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15