CVB++ 15.0
enum_entry_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
20 class EnumEntryNode : public ValueNode
21 {
22 public:
23 explicit EnumEntryNode(HandleGuard<Node> &&guard) noexcept
24 : ValueNode(std::move(guard))
25 {
26 }
27
29
34 {
35 return static_cast<std::int64_t>(NativeCall<CExports::cvbint64_t>(
36 [&](CExports::cvbint64_t &value) { return CExports::NGetAsInteger(Handle(), value); }));
37 }
38
40
45 {
46 return ToString();
47 }
48
49 void FromString(const String &) override
50 {
51 throw std::runtime_error("not supported for enum entry node");
52 }
53 };
54
55 } // namespace GenApi
56
57 using GenApi::EnumEntryNode;
58
59 CVB_END_INLINE_NS
60
61} // namespace Cvb
void FromString(const String &) override
Sets the value of this node from the string value.
Definition enum_entry_node.hpp:49
std::int64_t NumericValue() const
Gets the numeric value of this entry.
Definition enum_entry_node.hpp:33
String SymbolicValue() const
Gets the symbolic value of this entry.
Definition enum_entry_node.hpp:44
void * Handle() const noexcept
Classic API node handle.
Definition decl_node.hpp:71
virtual String ToString() const
Returns this node's value as a string representation.
Definition value_node.hpp:52
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
std::string String
String for wide characters or unicode characters.
Definition string.hpp:49