CVB++ 15.0
stream_base.hpp
1#pragma once
2
3#include <memory>
4
5#include "../namespace.hpp"
6#include "driver.hpp"
7
8namespace Cvb
9{
10
11 CVB_BEGIN_INLINE_NS
12
13 namespace Driver
14 {
15
17
18 class StreamBase : public std::enable_shared_from_this<StreamBase>
19 {
20 protected:
21 struct PrivateTag
22 {
23 };
24
25 explicit StreamBase(const DevicePtr &device)
26 : parent_(device)
27 {
28 }
29
30 public:
31 StreamBase(const StreamBase &otehr) = delete;
32 StreamBase &operator=(const StreamBase &otehr) = delete;
33 StreamBase(StreamBase &&otehr) = delete;
34 StreamBase &operator=(StreamBase &&otehr) = delete;
35 virtual ~StreamBase() = default;
36
38
42 DevicePtr Parent() const noexcept
43 {
44 return parent_;
45 }
46
48
53
55
60 virtual void Start() = 0;
61
63
71 virtual void Stop() = 0;
72
74
80 virtual bool TryStop() noexcept = 0;
81
83
93 virtual void Abort() = 0;
94
96
102 virtual bool TryAbort() noexcept = 0;
103
105
112 virtual bool IsIndexed() const noexcept = 0;
113
114 private:
115 DevicePtr parent_;
116 };
117
118 } // namespace Driver
119
120 using Driver::StreamBase;
121
122 CVB_END_INLINE_NS
123
124} // namespace Cvb
virtual Cvb::Driver::AcquisitionInterface AcquisitionInterface() const noexcept=0
Gets the interface of this implementation.
virtual void Abort()=0
Stops the acquisition of images immediately.
virtual void Stop()=0
Stops the acquisition.
virtual void Start()=0
Starts the acquisition.
virtual bool TryAbort() noexcept=0
Stops the acquisition of images immediately.
DevicePtr Parent() const noexcept
Gets the parent device of this stream.
Definition stream_base.hpp:42
virtual bool TryStop() noexcept=0
Stops the acquisition.
virtual bool IsIndexed() const noexcept=0
Gets whether this stream is an indexed stream.
Namespace for driver or device related operations.
Definition decl_composite.hpp:27
AcquisitionInterface
Known acquisition CVB interfaces.
Definition driver.hpp:437
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