de.dante.extex.interpreter.primitives.register.dimen
Class DimenParameter

java.lang.Object
  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.type.AbstractAssignment
          extended byde.dante.extex.interpreter.primitives.register.dimen.AbstractDimen
              extended byde.dante.extex.interpreter.primitives.register.dimen.DimenPrimitive
                  extended byde.dante.extex.interpreter.primitives.register.dimen.DimenParameter
All Implemented Interfaces:
Advanceable, Code, Configurable, CountConvertible, DimenConvertible, Divideable, ExpandableCode, InitializableCode, Localizable, Multiplyable, java.io.Serializable, Theable

public class DimenParameter
extends DimenPrimitive
implements InitializableCode, Configurable

This class provides an implementation for the primitive \dimen. It sets the named length register to the value given, and as a side effect all prefixes are zeroed.

Example

 \day=345
 

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
DimenParameter(java.lang.String name)
          Creates a new object.
 
Method Summary
 void configure(Configuration config)
          Configure an object according to a given Configuration.
protected  java.lang.String getKey(Context context, TokenSource source, Typesetter typesetter)
          Return the key (the name of the primitive) for the register.
 void init(Context context, TokenSource source, Typesetter typesetter)
          Initialize the Code with some value coming from a Token source.
 
Methods inherited from class de.dante.extex.interpreter.primitives.register.dimen.DimenPrimitive
advance, assign, convertCount, convertDimen, divide, expand, multiply, the
 
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

DimenParameter

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

Parameters:
name - the name for debugging
Method Detail

configure

public void configure(Configuration config)
               throws ConfigurationException
Description copied from interface: Configurable
Configure an object according to a given Configuration.

Specified by:
configure in interface Configurable
Parameters:
config - the configuration object to consider
Throws:
ConfigurationException - in case that something went wrong
See Also:
Configurable.configure( de.dante.util.framework.configuration.Configuration)

getKey

protected java.lang.String getKey(Context context,
                                  TokenSource source,
                                  Typesetter typesetter)
Return the key (the name of the primitive) for the register.

Overrides:
getKey in class AbstractDimen
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:
AbstractDimen.getKey( de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

init

public void init(Context context,
                 TokenSource source,
                 Typesetter typesetter)
          throws InterpreterException
Initialize the Code with some value coming from a Token source.

Specified by:
init in interface InitializableCode
Parameters:
context - the interpreter context
source - the source of information for the initialization
typesetter - the typesetter
Throws:
InterpreterException - in case of an error
See Also:
InitializableCode.init( de.dante.extex.interpreter.context.Context, TokenSource, Typesetter)