IDS peak genericC++ v1.7.3
Loading...
Searching...
No Matches
peak_environment_inspector.hpp
Go to the documentation of this file.
1
11#pragma once
12
13
15#include <peak/dll_interface/peak_dll_interface_util.hpp>
16
17#include <string>
18#include <vector>
19
20
21namespace peak
22{
26namespace core
27{
28
33{
34public:
41
59 static std::vector<std::string> CollectCTIPaths();
60};
61
62} /* namespace core */
63} /* namespace peak */
64
65/* Implementation */
66namespace peak
67{
68namespace core
69{
70
71inline std::vector<std::string> EnvironmentInspector::CollectCTIPaths()
72{
73 CallAndCheckCInterfaceFunction([&] { return PEAK_C_ABI_PREFIX PEAK_EnvironmentInspector_UpdateCTIPaths(); });
74
75 auto ctiPaths = QueryStringArrayFromCInterfaceFunction(
76 [&](size_t* numCtiPaths) {
78 },
79 [&](size_t index, char* ctiPath, size_t* ctiPathSize) {
80 return PEAK_C_ABI_PREFIX PEAK_EnvironmentInspector_GetCTIPath(index, ctiPath, ctiPathSize);
81 });
82
83 return ctiPaths;
84}
85
86} /* namespace core */
87} /* namespace peak */
Allows to inspect the environment the application is running in.
Definition peak_environment_inspector.hpp:33
EnvironmentInspector & operator=(EnvironmentInspector &&other)=delete
EnvironmentInspector(EnvironmentInspector &&other)=delete
EnvironmentInspector & operator=(const EnvironmentInspector &other)=delete
EnvironmentInspector(const EnvironmentInspector &other)=delete
static std::vector< std::string > CollectCTIPaths()
Collects producer library paths found in the current environment.
Definition peak_environment_inspector.hpp:71
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:32
PEAK_C_API PEAK_EnvironmentInspector_GetCTIPath(size_t index, char *ctiPath, size_t *ctiPathSize)
Asks for the CTI path with the given index.
PEAK_C_API PEAK_EnvironmentInspector_UpdateCTIPaths()
Collects the paths to the CTIs installed on the system.
PEAK_C_API PEAK_EnvironmentInspector_GetNumCTIPaths(size_t *numCtiPaths)
Asks for the number of CTI paths.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16