CVB++ 14.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
11CVB_BEGIN_INLINE_NS
12
13namespace Driver
14{
15
17
19 : public std::enable_shared_from_this<StreamBase>
20{
21 protected:
22
23 struct PrivateTag {};
24
25 explicit StreamBase(const DevicePtr& device)
26 : parent_(device)
27 {
28 }
29
30 public:
31
32 virtual ~StreamBase() = default;
33
35
39 DevicePtr Parent() const noexcept
40 {
41 return parent_;
42 }
43
45
50
52
57 virtual void Start() = 0;
58
60
68 virtual void Stop() = 0;
69
71
77 virtual bool TryStop() noexcept = 0;
78
80
90 virtual void Abort() = 0;
91
93
99 virtual bool TryAbort() noexcept = 0;
100
102
109 virtual bool IsIndexed() const noexcept = 0;
110
111
112 private:
113
114 DevicePtr parent_;
115
116};
117
118}
119
120using Driver::StreamBase;
121
122CVB_END_INLINE_NS
123
124}
125
Base class of all streams.
Definition: stream_base.hpp:20
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:39
virtual bool TryStop() noexcept=0
Stops the acquisition.
virtual bool IsIndexed() const noexcept=0
Gets whether this stream is an indexed stream.
AcquisitionInterface
Known acquisition CVB interfaces.
Definition: driver.hpp:431
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24