org.extex.unit.tex.register.count
Class Prevgraf

java.lang.Object
  extended by org.extex.interpreter.type.AbstractCode
      extended by org.extex.interpreter.type.AbstractAssignment
          extended by org.extex.unit.tex.register.count.AbstractCount
              extended by org.extex.unit.tex.register.count.CountPrimitive
                  extended by org.extex.unit.tex.register.count.Prevgraf
All Implemented Interfaces:
java.io.Serializable, CountConvertible, Code, Advanceable, Divideable, Multiplyable, ExpandableCode, InitializableCode, 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: 4732 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
Prevgraf(CodeToken token)
          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(). This method is preferable to execute() since the execute() method provided in this class takes care of \afterassignment and \globaldefs as well.
 void divide(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method is called when the macro \divide has been seen. It performs the remaining tasks for the expansion.
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. It performs the remaining tasks for the expansion.
 
Methods inherited from class org.extex.unit.tex.register.count.CountPrimitive
convertCount, expand, the
 
Methods inherited from class org.extex.unit.tex.register.count.AbstractCount
init
 
Methods inherited from class org.extex.interpreter.type.AbstractAssignment
execute
 
Methods inherited from class org.extex.interpreter.type.AbstractCode
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

Prevgraf

public Prevgraf(CodeToken token)
Creates a new object.

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

getKey

protected java.lang.String getKey(Context context,
                                  TokenSource source,
                                  Typesetter typesetter)
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( org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)

advance

public void advance(Flags prefix,
                    Context context,
                    TokenSource source,
                    Typesetter typesetter)
             throws HelpingException,
                    TypesetterException
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
Parameters:
prefix - the prefix for the command
context - the processor context
source - the token source to parse
typesetter - the typesetter
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
See Also:
Advanceable.advance( org.extex.interpreter.Flags, org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)

assign

public void assign(Flags prefix,
                   Context context,
                   TokenSource source,
                   Typesetter typesetter)
            throws HelpingException,
                   TypesetterException
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
Parameters:
prefix - the prefix controlling the execution
context - the interpreter context
source - the token source
typesetter - the typesetter
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
See Also:
CountPrimitive.assign( org.extex.interpreter.Flags, org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)

divide

public void divide(Flags prefix,
                   Context context,
                   TokenSource source,
                   Typesetter typesetter)
            throws HelpingException,
                   TypesetterException
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
Parameters:
prefix - the prefix for the command
context - the processor context
source - the token source to parse
typesetter - the typesetter
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
See Also:
CountPrimitive.divide( org.extex.interpreter.Flags, org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)

multiply

public void multiply(Flags prefix,
                     Context context,
                     TokenSource source,
                     Typesetter typesetter)
              throws HelpingException,
                     TypesetterException
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
Parameters:
prefix - the prefix for the command
context - the processor context
source - the token source to parse
typesetter - the typesetter
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
See Also:
CountPrimitive.multiply( org.extex.interpreter.Flags, org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)