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

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

public interface Divideable

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

Extending \divide

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

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

Version:
$Revision: 1.7 $
Author:
Gerd Neugebauer

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

Method Detail

divide

public void divide(Flags prefix,
                   Context context,
                   TokenSource source,
                   Typesetter typesetter)
            throws InterpreterException
This method is called when the macro \divide 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