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
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 StreamBase(const StreamBase& otehr) = delete;
33 StreamBase& operator=(const StreamBase& otehr) = delete;
34 StreamBase(StreamBase&& otehr) = delete;
35 StreamBase& operator=(StreamBase&& otehr) = delete;
36 virtual ~StreamBase() = default;
37
39
43 DevicePtr Parent() const noexcept
44 {
45 return parent_;
46 }
47
49
54
56
61 virtual void Start() = 0;
62
64
72 virtual void Stop() = 0;
73
75
81 virtual bool TryStop() noexcept = 0;
82
84
94 virtual void Abort() = 0;
95
97
103 virtual bool TryAbort() noexcept = 0;
104
106
113 virtual bool IsIndexed() const noexcept = 0;
114
115
116 private:
117
118 DevicePtr parent_;
119
120};
121
122}
123
124using Driver::StreamBase;
125
126CVB_END_INLINE_NS
127
128}
129
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:43
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:436
Root namespace for the Image Manager interface.
Definition: c_barcode.h:15