de.dante.extex.interpreter.primitives.register.count
Class Prevgraf

java.lang.Object
  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.type.AbstractAssignment
          extended byde.dante.extex.interpreter.primitives.register.count.AbstractCount
              extended byde.dante.extex.interpreter.primitives.register.count.CountPrimitive
                  extended byde.dante.extex.interpreter.primitives.register.count.Prevgraf
All Implemented Interfaces:
Advanceable, Code, CountConvertible, Divideable, ExpandableCode, InitializableCode, Localizable, Multiplyable, java.io.Serializable, Theable

public class Prevgraf
extends CountPrimitive

This class provides an implementation for the primitive \prevgraf.

The Primitive \prevgraf

TODO missing documentation

The formal description of this primitive is the following:

    ⟨prevgraf⟩
       → \prevgraf  

Examples:

    \prevgraf  

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
Prevgraf(java.lang.String name)
          Creates a new object.
 
Method Summary
 void advance(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method is called when the macro \advance has been seen.
 void assign(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          The method assign is the core of the functionality of execute().
 void divide(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method is called when the macro \divide has been seen.
protected  java.lang.String getKey(Context context, TokenSource source, Typesetter typesetter)
          Return the key (the name of the primitive) for the numbered count register.
 void multiply(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method is called when the macro \multiply has been seen.
 
Methods inherited from class de.dante.extex.interpreter.primitives.register.count.CountPrimitive
convertCount, expand, the
 
Methods inherited from class de.dante.extex.interpreter.primitives.register.count.AbstractCount
init
 
Methods inherited from class de.dante.extex.interpreter.type.AbstractAssignment
execute
 
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, getLocalizer, getName, isIf, isOuter, printable, printableControlSequence, readResolve, setName, toString
 
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

Prevgraf

public Prevgraf(java.lang.String name)
Creates a new object.

Parameters:
name - the name for tracing and debugging
Method Detail

getKey

protected java.lang.String getKey(Context context,
                                  TokenSource source,
                                  Typesetter typesetter)
Description copied from class: AbstractCount
Return the key (the name of the primitive) for the numbered count register.

Overrides:
getKey in class AbstractCount
Parameters:
context - the interpreter context to use
source - the source for new tokens
typesetter - the typesetter
Returns:
the key for the current register
See Also:
AbstractCount.getKey( de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

advance

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

Specified by:
advance in interface Advanceable
Overrides:
advance in class CountPrimitive
Throws:
InterpreterException
See Also:
Advanceable.advance( de.dante.extex.interpreter.Flags, de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

assign

public void assign(Flags prefix,
                   Context context,
                   TokenSource source,
                   Typesetter typesetter)
            throws InterpreterException
Description copied from class: AbstractAssignment
The method assign is the core of the functionality of execute(). This method is preferable to execute() since the execute() method provided in this class takes care of \afterassignment and \globaldefs as well.

Overrides:
assign in class CountPrimitive
Throws:
InterpreterException
See Also:
AbstractAssignment.assign( de.dante.extex.interpreter.Flags, de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

divide

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

Specified by:
divide in interface Divideable
Overrides:
divide in class CountPrimitive
Throws:
InterpreterException
See Also:
Divideable.divide( de.dante.extex.interpreter.Flags, de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

multiply

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

Specified by:
multiply in interface Multiplyable
Overrides:
multiply in class CountPrimitive
Throws:
InterpreterException
See Also:
Multiplyable.multiply( de.dante.extex.interpreter.Flags, de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)