A Helper class to construct a NetworkVisitor from a set of lambda functions.
More...
#include <lambdanetworkvisitor.h>
|
template<typename T> |
using | ProcessorOverload = decltype(std::declval<T>()(std::declval<Processor&>())) |
|
template<typename T> |
using | ProcessorEnter |
|
template<typename T> |
using | ProcessorExit |
|
template<typename T> |
using | CompositeOverload = decltype(std::declval<T>()(std::declval<CompositeProperty&>())) |
|
template<typename T> |
using | CompositeEnter |
|
template<typename T> |
using | CompositeExit |
|
template<typename T> |
using | PropertyOverload = decltype(std::declval<T>()(std::declval<Property&>())) |
|
|
| LambdaNetworkVisitor (Funcs &&... args) |
|
virtual bool | enter (Processor &processor) override |
| Visit a Processor Adding or removing processors while visiting is not supported Called before visiting children.
|
|
virtual void | exit (Processor &processor) override |
| Visit a Processor Adding and removing processors while visiting are not supported Called after visiting children.
|
|
virtual bool | enter (CompositeProperty &compositeProperty) override |
| Visit a CompositeProperty Adding or removing properties while visiting is not supported Called before visiting children.
|
|
virtual void | exit (CompositeProperty &compositeProperty) override |
| Visit a CompositeProperty Adding and removing properties while visiting are not supported Called after visiting children.
|
|
virtual void | visit (Property &property) override |
| Visit a Property Adding and removing properties while visiting are not supported.
|
|
template<typename... Funcs>
struct inviwo::LambdaNetworkVisitor< Funcs >
A Helper class to construct a NetworkVisitor from a set of lambda functions.
A number of different overloads can be given. Processors will be visited before children in order of priority:
Processors will be visited after children:
CompositeProperties will be visited before children in order of priority:
CompositeProperties will be visited after children:
Properties will be visited by:
LambdaNetworkVisitor visitor{[](
Property& property) {
return true;
},
return true;
},
[](Processor&, NetworkVisitorExit) {
}};
processorNetwork->accept(visitor);
Definition lambdanetworkvisitor.h:43
A processor generally performs operation on input data and outputs the new result.
Definition processor.h:171
A Property represents a parameter to a processor.
Definition property.h:123
◆ CompositeEnter
template<typename... Funcs>
template<typename T>
Initial value: decltype(std::declval<T>()(std::declval<CompositeProperty&>(),
std::declval<NetworkVisitorEnter>()))
◆ CompositeExit
template<typename... Funcs>
template<typename T>
Initial value: decltype(std::declval<T>()(std::declval<CompositeProperty&>(),
std::declval<NetworkVisitorExit>()))
◆ ProcessorEnter
template<typename... Funcs>
template<typename T>
Initial value: decltype(std::declval<T>()(std::declval<Processor&>(),
std::declval<NetworkVisitorEnter>()))
◆ ProcessorExit
template<typename... Funcs>
template<typename T>
Initial value:
decltype(std::declval<T>()(std::declval<Processor&>(), std::declval<NetworkVisitorExit>()))
◆ enter() [1/2]
template<typename... Funcs>
◆ enter() [2/2]
template<typename... Funcs>
Visit a Processor Adding or removing processors while visiting is not supported Called before visiting children.
- Returns
- visit all child properties if true else go to next processor
Reimplemented from inviwo::NetworkVisitor.
◆ exit() [1/2]
template<typename... Funcs>
◆ exit() [2/2]
template<typename... Funcs>
Visit a Processor Adding and removing processors while visiting are not supported Called after visiting children.
Reimplemented from inviwo::NetworkVisitor.
◆ visit()
template<typename... Funcs>
◆ isOverloadCalled
template<typename... Funcs>
template<typename T>
Initial value:=
util::is_detected_v<ProcessorOverload, T> || util::is_detected_v<ProcessorEnter, T> ||
util::is_detected_v<ProcessorExit, T> || util::is_detected_v<CompositeOverload, T> ||
util::is_detected_v<CompositeEnter, T> || util::is_detected_v<CompositeExit, T> ||
util::is_detected_v<PropertyOverload, T>
The documentation for this struct was generated from the following file: