CVB++ 15.0
decl_device_image.hpp
1#pragma once
2
3#include "../../global.hpp"
4
5#include "../../_decl/decl_image.hpp"
6
7namespace Cvb
8{
9
10 CVB_BEGIN_INLINE_NS
11
12 namespace Driver
13 {
14
16
23 class DeviceImage : public Image
24 {
26 friend Cvb::Device;
28
29 public:
30 explicit DeviceImage(const DevicePtr &device);
31
32 DeviceImage(const DeviceImage &other) = delete;
33 DeviceImage &operator=(const DeviceImage &other) = delete;
34 DeviceImage(DeviceImage &&other) = delete;
35 DeviceImage &operator=(DeviceImage &&other) = delete;
36 virtual ~DeviceImage()
37 {
38 if (!isDisconected_)
39 Detach();
40 }
41
43
47 DevicePtr Parent() const noexcept
48 {
49 return parent_;
50 }
51
53
60 bool IsDisconnected() const noexcept
61 {
62 return isDisconected_;
63 }
64
65 private:
66 void Disconnect() noexcept
67 {
68 isDisconected_ = true;
69 }
70
71 DevicePtr parent_;
72
73 bool isDisconected_;
74 };
75
76 } // namespace Driver
77
79
80 CVB_END_INLINE_NS
81
82} // namespace Cvb
Generic CVB physical device.
Definition decl_device.hpp:78
Special device image.
Definition decl_device_image.hpp:24
bool IsDisconnected() const noexcept
Gets whether this image is now standalone (not connected to a device anymore).
Definition decl_device_image.hpp:60
DevicePtr Parent() const noexcept
Gets the parent device of this image.
Definition decl_device_image.hpp:47
Image(Size2D< int > size, int numPlanes=1, DataType dataType=DataType::Int8BppUnsigned())
Constructs an uninitialized image with the given parameters.
Definition decl_image.hpp:197
Namespace for driver or device related operations.
Definition decl_composite.hpp:28
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::shared_ptr< Device > DevicePtr
Convenience shared pointer for Device.
Definition global.hpp:98