org.extex.unit.tex.math
Class AbstractMathCode

java.lang.Object
  extended by org.extex.interpreter.type.AbstractCode
      extended by org.extex.unit.tex.math.AbstractMathCode
All Implemented Interfaces:
java.io.Serializable, Code
Direct Known Subclasses:
Above, AbstractOmegaDelimiter, AbstractOmegaMathCode, AbstractTeXDelimiter, AbstractTeXMathCode, Atop, Displaylimits, Displaystyle, Eqno, Leqno, Limits, Mathbin, Mathchoice, Mathclose, Mathinner, Mathop, Mathopen, Mathord, Mathpunct, Mathrel, Mkern, Mskip, Nolimits, Nonscript, Over, Overline, Scriptscriptstyle, Scriptstyle, Textstyle, Underline, Vcenter

public abstract class AbstractMathCode
extends AbstractCode

This is the base class for all math primitives using the TeX encoding. It tries to ensure that the primitive is invoked in math mode only.

Version:
$Revision: 4732 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
AbstractMathCode(CodeToken token)
          Creates a new object.
 
Method Summary
protected  NoadConsumer getListMaker(Context context, Typesetter typesetter)
          Get the current list maker as Noad consumer.
 
Methods inherited from class org.extex.interpreter.type.AbstractCode
execute, getLocalizer, getName, getToken, isIf, isOuter, readResolve, toString, toText, toText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

AbstractMathCode

public AbstractMathCode(CodeToken token)
Creates a new object.

Parameters:
token - the initial token for the primitive
Method Detail

getListMaker

protected NoadConsumer getListMaker(Context context,
                                    Typesetter typesetter)
                             throws MissingMathException
Get the current list maker as Noad consumer. If the current list maker is not of the proper type then an exception is thrown.

Parameters:
context - the interpreter context
typesetter - the master typesetter
Returns:
the current list maker
Throws:
MissingMathException - in case that the current mode is not a math mode