IDS peak genericC++ v1.17.0
Loading...
Searching...
No Matches
peak_module_descriptor.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
10
12#include <peak/dll_interface/peak_dll_interface_util.hpp>
13
14#include <cstddef>
15#include <string>
16
17
18namespace peak
19{
20namespace core
21{
22
28{
29public:
30 ModuleDescriptor() = default;
31 virtual ~ModuleDescriptor() = default;
32 ModuleDescriptor(const ModuleDescriptor& other) = delete;
36
46 PEAK_COMMON_NO_DISCARD std::string ID() const;
47
48protected:
50};
51
52} /* namespace core */
53} /* namespace peak */
54
55/* Implementation */
56namespace peak
57{
58namespace core
59{
60
61inline std::string ModuleDescriptor::ID() const
62{
63 auto moduleDescriptorHandle = ModuleDescriptorHandle();
64
65 return QueryStringFromCInterfaceFunction([&](char* id, size_t* idSize) {
66 return PEAK_C_ABI_PREFIX PEAK_ModuleDescriptor_GetID(moduleDescriptorHandle, id, idSize);
67 });
68}
69
70} /* namespace core */
71} /* namespace peak */
ModuleDescriptor & operator=(ModuleDescriptor &&other)=delete
ModuleDescriptor(ModuleDescriptor &&other)=delete
ModuleDescriptor & operator=(const ModuleDescriptor &other)=delete
ModuleDescriptor(const ModuleDescriptor &other)=delete
PEAK_COMMON_NO_DISCARD std::string ID() const
Returns the ID of the described module.
Definition peak_module_descriptor.hpp:61
virtual PEAK_MODULE_DESCRIPTOR_HANDLE ModuleDescriptorHandle() const =0
virtual ~ModuleDescriptor()=default
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
struct PEAK_MODULE_DESCRIPTOR * PEAK_MODULE_DESCRIPTOR_HANDLE
Definition peak_backend.h:415
PEAK_C_API PEAK_ModuleDescriptor_GetID(PEAK_MODULE_DESCRIPTOR_HANDLE moduleDescriptorHandle, char *id, size_t *idSize)
Asks the given module descriptor for its ID.
#define PEAK_COMMON_NO_DISCARD
Definition peak_common_defines.h:89
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:13