ae.utils.meta.chain

ae.utils.meta.chain

Members

Aliases

chainAll
alias chainAll = chainControl!false
Undocumented in source.
chainFirst
alias chainFirst = chainControl!true
Undocumented in source.

Functions

chainFunctor
auto chainFunctor()
Undocumented in source. Be warned that the author may not have intended to support it.
chainIterator
auto chainIterator(Next next)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

ChainControl
struct ChainControl(bool result, Next)
Undocumented in source.
ChainFilter
struct ChainFilter(alias pred, Next)

Calls next only if pred(value) is true.

ChainFunctor
struct ChainFunctor(alias fun)

Wraps a function template into a concrete value type functor.

ChainIterator
struct ChainIterator(Next)

Starts the chain by iterating over a tuple.

ChainMap
struct ChainMap(alias pred, Next)

Calls next with pred(value).

Templates

chainControl
template chainControl(bool result)
Undocumented in source.
chainFilter
template chainFilter(alias pred)
Undocumented in source.
chainMap
template chainMap(alias pred)
Undocumented in source.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net> Chains are a concept a bit like ranges, but which operate on heterogenous types (e.g. a tuple of values). Composition is done by a chain of functors. To allow state, each functor can be represented as a struct. Functors return a bool (true if iteration should stop, false if it should continue).