InterfaceFilter

Given a range of objects filter them by Interface they are implementing.

  1. InterfaceFilter!(Range, Interface) filterByInterface(Range range)
  2. struct InterfaceFilter(Range, Interface)
    @safe
    struct InterfaceFilter (
    Range
    Interface
    ) if (
    isForwardRange!Range &&
    (
    is(ElementType!Range == class) ||
    is(ElementType!Range == interface)
    )
    ) {}

Constructors

this
this(Range range)

Constructor for interface filtering range

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

empty
bool empty()

Whether there are more elements that implement interface or not.

front
Interface front()

Get current implementing element

popFront
void popFront()

Move to next element implementing interface.

save
typeof(this) save()

Save range at current point.

Parameters

Interface

interface by which to filter the range

Return Value

InterfaceFilter!(Range, Interface) a range of filtered objects by Interface

Meta