IDS peak genericC++ v1.17.0
Loading...
Searching...
No Matches
peak_buffer_converter.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
10
12
13
14namespace peak
15{
16
39
40template <class OutType>
41PEAK_COMMON_NO_DISCARD OutType BufferTo(const std::shared_ptr<peak::core::Buffer>& buffer)
42{
43 (void)buffer;
44 // static_assert that's always false, so we get a compiler error when using a not-implemented specialization
45 static_assert(sizeof(OutType) == 0,
46 "BufferTo<>() not implemented for this type. Implement a specialization for your own type or include one from "
47 "the 'converters' folder.");
48}
49
73
74template <class OutType>
75PEAK_COMMON_NO_DISCARD OutType BufferPartTo(const std::shared_ptr<peak::core::BufferPart>& bufferPart)
76{
77 (void)bufferPart;
78 // static_assert that's always false, so we get a compiler error when using a not-implemented specialization
79 static_assert(sizeof(OutType) == 0,
80 "BufferPartTo<>() not implemented for this type. Implement a specialization for your own type or include one "
81 "from "
82 "the 'converters' folder.");
83}
84
85} /* namespace peak */
PEAK_COMMON_NO_DISCARD OutType BufferTo(const std::shared_ptr< peak::core::Buffer > &buffer)
Converts a core::Buffer into a different type.
Definition peak_buffer_converter.hpp:41
PEAK_COMMON_NO_DISCARD peak::icv::Image BufferPartTo(const std::shared_ptr< peak::core::BufferPart > &part)
Converts a core::BufferPart into a peak::ipl::Image.
Definition peak_bufferpart_converter_icv.hpp:42
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_buffer.hpp:29
#define PEAK_COMMON_NO_DISCARD
Definition peak_common_defines.h:89