6#include "../../global.hpp"
7#include "../../string.hpp"
9#include "../driver.hpp"
36 void *
Data() const noexcept
73 "CVB: Unsupported notify data type!");
77 mutable void *data_ =
nullptr;
91 return *
reinterpret_cast<double *
>(data_);
97 std::string ansiString(
reinterpret_cast<char *
>(data_));
98 return String(ansiString.begin(), ansiString.end());
104 return *
reinterpret_cast<bool *
>(data_);
110 std::vector<std::uint8_t> data(
static_cast<std::size_t
>(size_));
111 std::memcpy(&data[0], data_, data.size());
117 class NotifyObservable
121 NotifyObservable(
const NotifyObservable &other) =
delete;
122 NotifyObservable &operator=(
const NotifyObservable &other) =
delete;
123 NotifyObservable(NotifyObservable &&other) =
delete;
124 NotifyObservable &operator=(NotifyObservable &&other) =
delete;
127 NotifyObservable(
const DevicePtr &parent,
int index);
134 int ID() const noexcept
134 int ID() const noexcept {
…}
172 static void __stdcall Callback(CExports::CVNotifyEvent_t,
void *Buf,
size_t Size,
173 CExports::CVNotifyDatatype_t
DataType,
void *UserData)
178 notifyObservable->carrierContainer_.Call<void(
NotifyArgs)>(
189 int eventNumber_ = 0;
193 std::intptr_t cookie_ = 0;
195 Internal::CarrierContainer carrierContainer_;
117 class NotifyObservable {
…};
Data type description for an image plane.
Definition data_type.hpp:23
Event argument for notification events.
Definition decl_notify_observable.hpp:22
T Data() const noexcept
The typed data of the event.
Definition decl_notify_observable.hpp:68
int Size() const noexcept
Size of the data delivered with the event.
Definition decl_notify_observable.hpp:46
NotifyDataType DataType() const noexcept
The data type of the data delivered with the event.
Definition decl_notify_observable.hpp:56
void * Data() const noexcept
The raw data of the event.
Definition decl_notify_observable.hpp:36
Single notify event observable.
Definition decl_notify_observable.hpp:118
String Description() const noexcept
The string identifier of this event.
Definition decl_notify_observable.hpp:144
bool IsAvailable() const
Gets whether the current device can actually handle this event.
Definition detail_notify_observable.hpp:51
int ID() const noexcept
Get the native ID.
Definition decl_notify_observable.hpp:134
void UnregisterEvent(EventCookie eventCookie) noexcept
Manually unregister a listener to this observable.
Definition detail_notify_observable.hpp:68
EventCookie RegisterEvent(std::function< void(NotifyArgs)> handler)
Register a listener to this observable.
Definition detail_notify_observable.hpp:62
Cookie used to unregister event handlers.
Definition global.hpp:591
void * Data() const noexcept
The raw data of the event.
Definition decl_notify_observable.hpp:36
Namespace for driver or device related operations.
Definition decl_composite.hpp:28
NotifyDataType
Data type delivered by the event.
Definition driver.hpp:358
@ String
String value.
Definition driver.hpp:366
@ Void
No data.
Definition driver.hpp:360
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