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 CVB_BEGIN_INLINE_NS
10 namespace GevServer
11 {
13
20 class SelectorNode : public ValueNode
21 {
22 public:
23 explicit SelectorNode(HandleGuard<Node> &&guard)
24 : ValueNode(std::move(guard))
25 {
26 }
27
29
33 bool IsSelector() const
34 {
35 if (selector_ == Selector::Undefined)
36 {
37 selector_ = (GetDependentNodeCount(NodeList::Selected)) ? Selector::Yes : Selector::No;
38 }
39 return (selector_ == Selector::Yes) ? true : false;
40 }
41
43
51
52 private:
53 enum class Selector
54 {
55 Yes,
56 No,
58 };
59
60 mutable Selector selector_ = Selector::Undefined;
61 };
62 } // namespace GevServer
63 CVB_END_INLINE_NS
64} // namespace Cvb
std::vector< std::shared_ptr< T > > GetDependentNodes(const NodeList &type) const
Gets the nodes categorized by this node.
Definition detail_node.hpp:410
bool IsSelector() const
Gets whether this node selects at least one other.
Definition selector_node.hpp:33
std::vector< ValueNodePtr > SelectedNodes() const
Gets all nodes selected by this one.
Definition selector_node.hpp:47
T move(T... args)
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition decl_int_swiss_knife_node.hpp:11
@ Selected
Node accesses the selected nodes.
Definition gevserver.hpp:254
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
@ Undefined
Definition global.hpp:155