CVB++ 15.0
boolean_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 BooleanNode : public ValueNode
19 {
20 public:
21 explicit BooleanNode(HandleGuard<Node> &&guard) noexcept
22 : ValueNode(std::move(guard))
23 {
24 }
25
27
31 bool Value() 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
44 void SetValue(bool value)
45 {
46 NativeCall([&]() { return CExports::NSetAsBoolean(Handle(), static_cast<CExports::cvbbool_t>(value)); });
47 }
48 };
49
50 } // namespace GenApi
51
52 using GenApi::BooleanNode;
53
54 CVB_END_INLINE_NS
55
56} // namespace Cvb
void SetValue(bool value)
Sets the value of this boolean node.
Definition boolean_node.hpp:44
bool Value() const
Gets the value of this boolean node.
Definition boolean_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