IDS peak genericC++ v1.13.0
Loading...
Searching...
No Matches
peak_environment_inspector.hpp
Go to the documentation of this file.
1
10
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
60 static std::vector<std::string> CollectCTIPaths();
61};
62
63} /* namespace core */
64} /* namespace peak */
65
66/* Implementation */
67namespace peak
68{
69namespace core
70{
71
72inline std::vector<std::string> EnvironmentInspector::CollectCTIPaths()
73{
74 CallAndCheckCInterfaceFunction([&] { return PEAK_C_ABI_PREFIX PEAK_EnvironmentInspector_UpdateCTIPaths(); });
75
76 auto ctiPaths = QueryStringArrayFromCInterfaceFunction(
77 [&](size_t* numCtiPaths) {
79 },
80 [&](size_t index, char* ctiPath, size_t* ctiPathSize) {
81 return PEAK_C_ABI_PREFIX PEAK_EnvironmentInspector_GetCTIPath(index, ctiPath, ctiPathSize);
82 });
83
84 return ctiPaths;
85}
86
87} /* namespace core */
88} /* namespace peak */
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:72
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:34
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33
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