CVB++ 15.0
command_node.hpp
1#pragma once
2
3#include "../global.hpp"
4
5#include "value_node.hpp"
6
7namespace Cvb
8{
9
10 CVB_BEGIN_INLINE_NS
11
12 namespace GenApi
13 {
14
16
18 class CommandNode : public ValueNode
19 {
20 public:
21 explicit CommandNode(HandleGuard<Node> &&guard) noexcept
22 : ValueNode(std::move(guard))
23 {
24 }
25
27
31 bool IsDone() const
32 {
33 return (NativeCall<CExports::cvbbool_t>(
34 [&](CExports::cvbbool_t &value) { return CExports::NGetAsBoolean(Handle(), value); }))
35 ? true
36 : false;
37 }
38
40
43 void Execute()
44 {
45 NativeCall([&]() { return CExports::NSetAsBoolean(Handle(), static_cast<CExports::cvbbool_t>(true)); });
46 }
47 };
48
49 } // namespace GenApi
50
51 using GenApi::CommandNode;
52
53 CVB_END_INLINE_NS
54
55} // namespace Cvb
void Execute()
Executes this command.
Definition command_node.hpp:43
bool IsDone() const
If this command is readable, the execution state can be queried.
Definition command_node.hpp:31
void * Handle() const noexcept
Classic API node handle.
Definition decl_node.hpp:71
T move(T... args)
Namespace for GenApi based device configuration.
Definition decl_fw_updater.hpp:29
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17