CVB++ 15.0
integer_node.hpp
1#pragma once
2
3#include "../global.hpp"
4
5#include "selector_node.hpp"
6
7namespace Cvb
8{
9
10 CVB_BEGIN_INLINE_NS
11
12 namespace GenApi
13 {
14
16
18 class IntegerNode : public SelectorNode
19 {
20 public:
21 explicit IntegerNode(HandleGuard<Node> &&guard) noexcept
22 : SelectorNode(std::move(guard))
23 {
24 }
25
27
32 {
33 return static_cast<std::int64_t>(NativeCall<CExports::cvbint64_t>(
34 [&](CExports::cvbint64_t &value) { return CExports::NGetAsInteger(Handle(), value); }));
35 }
36
38
43 {
44 NativeCall([&]() { return CExports::NSetAsInteger(Handle(), static_cast<CExports::cvbint64_t>(value)); });
45 }
46
48
53 {
54 return GetInfoAsInt(NodeInfo::Min);
55 }
56
58
63 {
64 return GetInfoAsInt(NodeInfo::Max);
65 }
66
68
76 {
77 return GetInfoAsInt(NodeInfo::Increment);
78 }
79
81
86 {
87 return static_cast<NumberRepresentation>(GetInfoAsInt(NodeInfo::Representation));
88 }
89
91
95 String Unit() const
96 {
97 return GetInfoAsString(NodeInfo::Unit);
98 }
99 };
100
101 } // namespace GenApi
102
103 using GenApi::IntegerNode;
104
105 CVB_END_INLINE_NS
106
107} // namespace Cvb
void SetValue(std::int64_t value)
Sets the value of this integer node.
Definition integer_node.hpp:42
NumberRepresentation Representation() const
Gets how the value is to be represented.
Definition integer_node.hpp:85
std::int64_t Min() const
Gets the minimal allowed number for this value.
Definition integer_node.hpp:52
std::int64_t Max() const
Gets the maximal allowed number for this value.
Definition integer_node.hpp:62
String Unit() const
Gets the unit of this node's value.
Definition integer_node.hpp:95
std::int64_t Value() const
Gets the value of this integer node.
Definition integer_node.hpp:31
std::int64_t Increment() const
Gets the increment of this value.
Definition integer_node.hpp:75
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
NumberRepresentation
Defines how a number is to be interpreted/displayed in a graphical user interface.
Definition genapi.hpp:143
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::string String
String for wide characters or unicode characters.
Definition string.hpp:49