Function valveOf
Go down the chain of valves until you find a valve of the given type. This is useful if you know there is a pipe you are looking for in the chain of valves.
auto valveOf(T, Chain)
(
ref Chain pipe
)
if (isType!T && isIopipe!Chain && hasValve!Chain);
auto valveOf(alias X, Chain)
(
ref Chain pipe
)
if (!isType!X && isIopipe!Chain && hasValve!Chain);
Parameters
Name | Description |
---|---|
T | type or template of valve you are looking for |
pipe | iopipe you are searching |
Returns
a valve of the specified type or template. If such a valve doesn't exist, a static error occurs.