CVB++ 15.0
selector_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
23 class SelectorNode : public ValueNode
24 {
25 public:
26 explicit SelectorNode(HandleGuard<Node> &&guard) noexcept
27 : ValueNode(std::move(guard))
28 {
29 }
30
32
36 bool IsSelector() const
37 {
38 if (selector_ == Selector::Undefined)
39 {
40 selector_ = (GetDependentNodeCount(NodeList::Selected)) ? Selector::Yes : Selector::No;
41 }
42 return (selector_ == Selector::Yes) ? true : false;
43 }
44
46
51 {
52 return GetDependentNodes<ValueNode>(NodeList::Selected);
53 }
54
55 private:
56 enum class Selector
57 {
58 Yes,
59 No,
61 };
62
63 mutable Selector selector_ = Selector::Undefined;
64 };
65
66 } // namespace GenApi
67
69
70 CVB_END_INLINE_NS
71
72} // namespace Cvb
Groups nodes, that are dependent on this one.
Definition selector_node.hpp:24
bool IsSelector() const
Returns whether this node selects at least one other node.
Definition selector_node.hpp:36
std::vector< ValueNodePtr > SelectedNodes() const
Gets all nodes selected by this one.
Definition selector_node.hpp:50
T move(T... args)
Namespace for GenApi based device configuration.
Definition decl_fw_updater.hpp:29
@ Undefined
Not set in XML (treated as linear)
Definition genapi.hpp:145
@ No
No verification while reading or writing values.
Definition genapi.hpp:174
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17