de.dante.extex.interpreter.primitives.register.count
Class AbstractCount
java.lang.Object
de.dante.extex.interpreter.type.AbstractCode
de.dante.extex.interpreter.type.AbstractAssignment
de.dante.extex.interpreter.primitives.register.count.AbstractCount
- All Implemented Interfaces:
- Code, InitializableCode, Localizable, java.io.Serializable
- Direct Known Subclasses:
- Countdef, CountPrimitive, Mag
- public abstract class AbstractCount
- extends AbstractAssignment
- implements InitializableCode
This abstract base class provides the methods to compute the keys for
numbered count registers.
- Version:
- $Revision: 1.15 $
- Author:
- Gerd Neugebauer
- See Also:
- Serialized Form
Constructor Summary |
AbstractCount(java.lang.String name)
Creates a new object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractCount
public AbstractCount(java.lang.String name)
- Creates a new object.
- Parameters:
name
- the name for debugging
getKey
protected java.lang.String getKey(Context context,
TokenSource source,
Typesetter typesetter)
throws InterpreterException
- Return the key (the name of the primitive) for the numbered count
register.
- Parameters:
context
- the interpreter context to usesource
- the source for new tokenstypesetter
- the typesetter
- Returns:
- the key for the current register
- Throws:
InterpreterException
- in case that a derived class need to throw
an Exception this one is declared.
init
public void init(Context context,
TokenSource source,
Typesetter typesetter)
throws InterpreterException
- Description copied from interface:
InitializableCode
- Initialize the Code with some value coming from a String.
- Specified by:
init
in interface InitializableCode
- Parameters:
context
- the interpreter contextsource
- the source of information for the initializationtypesetter
- the typesetter
- Throws:
InterpreterException
- in case of an error- See Also:
InitializableCode.init(
de.dante.extex.interpreter.context.Context,
de.dante.extex.interpreter.TokenSource,
de.dante.extex.typesetter.Typesetter)