3#include "../global.hpp"
5#include "selector_node.hpp"
15 class FloatBaseNode :
public SelectorNode
18 explicit FloatBaseNode(HandleGuard<Node> &&guard)
82 return NativeCall<double>([&](
double &value) {
return CVB_CALL_CAPI(GSNGetAsFloat(
Handle(), value)); });
92 NativeCall([&]() {
return CVB_CALL_CAPI(GSNSetAsFloat(
Handle(), value)); });
101 NativeCall([&]() {
return CExports::GSNSetAsStringTyped(
Handle(), value.data()); });
112 size_t nameLength = 0;
113 auto resultNameLength = CExports::GSNGetAsStringTyped(
Handle(),
reinterpret_cast<Char *
>(0), nameLength);
114 if (resultNameLength < 0)
116 CvbException::FromCvbResult(resultNameLength,
"failed to get string representation name length"));
118 nameLength +=
sizeof(
Char);
121 auto resultBuffer = CExports::GSNGetAsStringTyped(
Handle(), buffer.data(), nameLength);
122 if (resultBuffer < 0)
124 CvbException::FromCvbResult(resultBuffer,
"failed to get string representation of this node"));
126 return buffer.data();
15 class FloatBaseNode :
public SelectorNode {
…};
void SetRepresentation(const GenApi::NumberRepresentation &representation)
Sets how the value is to be represented.
Definition float_base_node.hpp:70
double Increment() const
Gets the increment of this value.
Definition float_base_node.hpp:31
void SetValue(double value)
Sets the value of this float node.
Definition float_base_node.hpp:90
double Value() const
Gets the value of this float node.
Definition float_base_node.hpp:80
void FromString(const String &value) override
Sets this node's value from the string value .
Definition float_base_node.hpp:99
double Min() const
Gets the minimal allowed number for this value.
Definition float_base_node.hpp:51
double Max() const
Gets the maximal allowed number for this value.
Definition float_base_node.hpp:41
String ToString() const override
Gets the string representation of this node.
Definition float_base_node.hpp:110
GenApi::NumberRepresentation Representation() const
Gets how the value is to be represented.
Definition float_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:143
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:204
@ Increment
Gets the increment.
Definition gevserver.hpp:206
@ Min
Gets the minimum value.
Definition gevserver.hpp:205
@ NumberRepresentation
Accesses the representation of a number.
Definition gevserver.hpp:218
@ String
Node is a string node (no reg).
Definition gevserver.hpp:177
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)