3#include "../global.hpp"
5#include "selector_node.hpp"
15 class IntegerBaseNode :
public SelectorNode
18 explicit IntegerBaseNode(HandleGuard<Node> &&guard)
85 virtual void SetUnit(
const String & ) {}
94 return static_cast<std::int64_t>(NativeCall<CExports::cvbint64_t>(
95 [&](CExports::cvbint64_t &value) {
return CVB_CALL_CAPI(GSNGetAsInteger(
Handle(), value)); }));
106 [&]() {
return CVB_CALL_CAPI(GSNSetAsInteger(
Handle(),
static_cast<CExports::cvbint64_t
>(value))); });
115 NativeCall([&]() {
return CExports::GSNSetAsStringTyped(
Handle(), value.data()); });
126 size_t nameLength = 0;
127 auto resultNameLength = CExports::GSNGetAsStringTyped(
Handle(),
reinterpret_cast<Char *
>(0), nameLength);
128 if (resultNameLength < 0)
130 CvbException::FromCvbResult(resultNameLength,
"failed to get string representation name length"));
132 nameLength +=
sizeof(
Char);
135 auto resultBuffer = CExports::GSNGetAsStringTyped(
Handle(), buffer.data(), nameLength);
136 if (resultBuffer < 0)
138 CvbException::FromCvbResult(resultBuffer,
"failed to get string representation of this node"));
140 return buffer.data();
15 class IntegerBaseNode :
public SelectorNode {
…};
void SetRepresentation(const GenApi::NumberRepresentation &representation)
Sets how the value is to be represented.
Definition integer_base_node.hpp:70
std::int64_t Min() const
Gets the minimal allowed number for this value.
Definition integer_base_node.hpp:51
std::int64_t Max() const
Gets the maximal allowed number for this value.
Definition integer_base_node.hpp:41
void FromString(const String &value) override
Sets this node's value from the string value .
Definition integer_base_node.hpp:113
std::int64_t Value() const
Gets the value of this integer node.
Definition integer_base_node.hpp:92
virtual String Unit() const
Gets the unit of this node's value.
Definition integer_base_node.hpp:80
std::int64_t Increment() const
Gets the increment of this value.
Definition integer_base_node.hpp:31
void SetValue(const std::int64_t &value)
Sets the value of this integer node.
Definition integer_base_node.hpp:103
String ToString() const override
Gets the string representation of this node.
Definition integer_base_node.hpp:124
GenApi::NumberRepresentation Representation() const
Gets how the value is to be represented.
Definition integer_base_node.hpp:61
void * Handle() const noexcept
Classic API node handle.
Definition decl_node.hpp:102
NumberRepresentation
Defines how a number is to be interpreted/displayed in a graphical user interface.
Definition genapi.hpp:138
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition decl_int_swiss_knife_node.hpp:11
@ Max
Gets the maximum value.
Definition gevserver.hpp:195
@ Increment
Gets the increment.
Definition gevserver.hpp:197
@ Min
Gets the minimum value.
Definition gevserver.hpp:196
@ NumberRepresentation
Accesses the representation of a number.
Definition gevserver.hpp:209
@ String
Node is a string node (no reg).
Definition gevserver.hpp:168
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
char Char
Character type for wide characters or unicode characters.
Definition string.hpp:63
T rethrow_exception(T... args)