Programming Reference:SubchainFilter
Function
The SubchainFilter class is a class that wraps up an entire chain of filters. Typically, it is used with the ParallelCombination filter template to represent one of the parallel combination branches.
To use the SubchainFilter, you need to derive a child class and define a constructor in which you add the desired filters, in the order in which they appear in the subchain:
#include "SubchainFilter.h"
#include "Filter1.h"
#include "Filter2.h"
#include "Filter3.h"
struct MySubchain : SubchainFilter
{
MySubchain()
{
Add<Filter1>();
Add<Filter2>();
Add<Filter3>();
}
};
As expected for a subchain, the chain's input is fed to the first filter's input, then the first filter's output is processed by the second filter, etc. Finally, the last filter's output is taken to be the output of the entire subchain filter.
Any of the filters in the subchain may be a ParallelCombination, which allows to split up the subchain into two parallel chains of filters, which allows to build more complex topologies.
Parameters
None.
States
None.
See also
Programming Reference:ParallelCombination, Programming Reference:LinearCombination, Programming Reference:ChoiceCombination