IDS peak genericC++ v1.17.0
Loading...
Searching...
No Matches
peak_environment_inspector.hpp
Go to the documentation of this file.
1
7
8#pragma once
9
11
13#include <peak/dll_interface/peak_dll_interface_util.hpp>
14
15#include <string>
16#include <vector>
17
18
19namespace peak
20{
24namespace core
25{
26
31{
32public:
39
58 PEAK_COMMON_NO_DISCARD static std::vector<std::string> CollectCTIPaths();
59};
60
61} /* namespace core */
62} /* namespace peak */
63
64/* Implementation */
65namespace peak
66{
67namespace core
68{
69
70inline std::vector<std::string> EnvironmentInspector::CollectCTIPaths()
71{
72 CallAndCheckCInterfaceFunction([&] { return PEAK_C_ABI_PREFIX PEAK_EnvironmentInspector_UpdateCTIPaths(); });
73
74 auto ctiPaths = QueryStringArrayFromCInterfaceFunction(
75 [&](size_t* numCtiPaths) {
77 },
78 [&](size_t index, char* ctiPath, size_t* ctiPathSize) {
79 return PEAK_C_ABI_PREFIX PEAK_EnvironmentInspector_GetCTIPath(index, ctiPath, ctiPathSize);
80 });
81
82 return ctiPaths;
83}
84
85} /* namespace core */
86} /* namespace peak */
EnvironmentInspector & operator=(EnvironmentInspector &&other)=delete
EnvironmentInspector(EnvironmentInspector &&other)=delete
EnvironmentInspector & operator=(const EnvironmentInspector &other)=delete
EnvironmentInspector(const EnvironmentInspector &other)=delete
static PEAK_COMMON_NO_DISCARD std::vector< std::string > CollectCTIPaths()
Collects producer library paths found in the current environment.
Definition peak_environment_inspector.hpp:70
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:32
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_buffer.hpp:29
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_COMMON_NO_DISCARD
Definition peak_common_defines.h:89
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:13