Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/openvr/src/src/vrcommon/vrpathregistry_public.h

Issue 2754253003: Add OpenVR SDK to third_party (Closed)
Patch Set: rebase and fix copyright Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //========= Copyright Valve Corporation ============//
2 #pragma once
3
4 #include <string>
5 #include <vector>
6 #include <stdint.h>
7
8 static const char *k_pchRuntimeOverrideVar = "VR_OVERRIDE";
9 static const char *k_pchConfigOverrideVar = "VR_CONFIG_PATH";
10 static const char *k_pchLogOverrideVar = "VR_LOG_PATH";
11
12 class CVRPathRegistry_Public
13 {
14 public:
15 static std::string GetVRPathRegistryFilename();
16 static std::string GetOpenVRConfigPath();
17
18 public:
19 CVRPathRegistry_Public();
20
21 /** Returns paths using the path registry and the provided override valu es. Pass NULL for any paths you don't care about.
22 * Returns false if the path registry could not be read. Valid paths migh t still be returned based on environment variables. */
23 static bool GetPaths( std::string *psRuntimePath, std::string *psConfigP ath, std::string *psLogPath, const char *pchConfigPathOverride, const char *pchL ogPathOverride, std::vector<std::string> *pvecExternalDrivers = NULL );
24
25 bool BLoadFromFile();
26 bool BSaveToFile() const;
27
28 bool ToJsonString( std::string &sJsonString );
29
30 // methods to get the current values
31 std::string GetRuntimePath() const;
32 std::string GetConfigPath() const;
33 std::string GetLogPath() const;
34
35 protected:
36 typedef std::vector< std::string > StringVector_t;
37
38 // index 0 is the current setting
39 StringVector_t m_vecRuntimePath;
40 StringVector_t m_vecLogPath;
41 StringVector_t m_vecConfigPath;
42
43 // full list of external drivers
44 StringVector_t m_vecExternalDrivers;
45 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698