de.dante.extex.interpreter.type.arithmetic
Interface Multiplyable

All Known Implementing Classes:
CountPrimitive, Delcode, DimenPrimitive, IntegerCode, LeftHyphenmin, Mag, MuskipParameter, NamedReal, Odelcode, RightHyphenmin, ScaledCode, SkipPrimitive

public interface Multiplyable

This is a interface to mark those classes which are able to multiply something.

Extending \multiply

The primitive \multiply is designed to be expanded. It is fairly simple to write a multiplyable primitive. The associated code simply has to implement the interface Multiplyable. Whenever \multiply is encountered immediately followed by a token which has the proper code associated, the method multiply is invoked. It is up to this method to gather further arguments and perform the multiplication.

With this interface the multiplication is in fact tied to the implementing code and not to the primitive \multiply. Each primitive can be made aware for multiplication without touching the code for \multiply.

Version:
$Revision: 1.6 $
Author:
Gerd Neugebauer

Method Summary
 void multiply(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method is called when the macro \multiply has been seen.
 

Method Detail

multiply

public void multiply(Flags prefix,
                     Context context,
                     TokenSource source,
                     Typesetter typesetter)
              throws InterpreterException
This method is called when the macro \multiply has been seen. It performs the remaining tasks for the expansion.

Parameters:
prefix - the prefix for the command
context - the processor context
source - the token source to parse
typesetter - the typesetter
Throws:
InterpreterException - in case of an error