DD::Image::MultiTileIop Class Reference

Inherits DD::Image::Iop.

Inherited by DD::Image::UpRez, and DD::Image::VConvolve.

List of all members.

Public Member Functions

virtual void engine_BufferIopTile (int y, int x, int r, ChannelMask m, Row &row)=0
virtual void engine_DirectGeneralTile (int y, int x, int r, ChannelMask m, Row &row)=0
virtual void engine_RawGeneralTile (int y, int x, int r, ChannelMask m, Row &row)=0
virtual void engine_RowCacheTile (int y, int x, int r, ChannelMask m, Row &row)=0
virtual IopinputToRead () const =0
virtual void force_validate (bool for_real=true)
virtual void engine (int y, int x, int r, ChannelMask m, Row &row)

Protected Member Functions

 MultiTileIop (Node *node)

Detailed Description

Base class for an Iop which efficiently handles inputs of multiple different tile types.

In addition to implementing the inputToRead() function detailed below;

Subclass definitions should:

1. Include the macro mFnDDImageMultiTileIop_Template_DeclareFunction_DoEngine or declare the function template<class TileType> inline void doEngine(params) where the params match the engine() function.

2. Include the macro mFnDDImageMultiTileIop_DeclareFunctions_engine to declare the engine() replacement functions (see below).

Subclass implementations should:

1. Include the macro mFnDDImageMultiTileIop_DefineFunctions_engine from MultiTileIopEngineDefinitions.h to define the engine() replacement functions AFTER the implementation of the doEngine() template function (to allow inlining).


Constructor & Destructor Documentation

DD::Image::MultiTileIop::MultiTileIop ( Node *  node) [inline, protected]

The constructor is protected so only subclasses can create the base class. The info() is filled in with default values for an empty image with no channels and format Format::None.


Member Function Documentation

virtual void DD::Image::MultiTileIop::engine_BufferIopTile ( int  y,
int  x,
int  r,
ChannelMask  m,
Row row 
) [pure virtual]

engine() replacement functions.

It is recommended that these are implemented in subclasses using the mFnDDImageMultiTileIop_DefineFunctions_engine() macro defined in MultiTileIopEngineDefinitions.h, allowing engine() to be implemented as a template function for all the available input tile types.

virtual Iop* DD::Image::MultiTileIop::inputToRead ( ) const [pure virtual]

Callback function which returns the input whose tile will be read in the engine() call.

Note that this function will be called directly after the inputs are validated so it can be assumed that all inputs are available.

Referenced by force_validate().

void MultiTileIop::force_validate ( bool  for_real = true) [virtual]

force_validate() may be called in the same way as Op::force_validate().

This function has the additional effect of setting the tile type of the input so that calls are made to the correct _engine*() function.

Reimplemented from DD::Image::Iop.

References DD::Image::Iop::getPlanarI(), inputToRead(), and DD::Image::Iop::iop().

void MultiTileIop::engine ( int  y,
int  x,
int  r,
ChannelMask  m,
Row row 
) [virtual]

Implementation of engine(). DO NOT OVERRIDE.

This calls through to the appropriate _engine*() function dependent on the tile type of the validated input.

Implements DD::Image::Iop.