org.extex.interpreter.primitives.register.bool
Class NumberedBool

java.lang.Object
  extended by org.extex.interpreter.type.AbstractCode
      extended by org.extex.interpreter.type.AbstractAssignment
          extended by org.extex.interpreter.primitives.register.bool.NamedBool
              extended by org.extex.interpreter.primitives.register.bool.NumberedBool
All Implemented Interfaces:
java.io.Serializable, BoolConvertible, Code, Theable

public class NumberedBool
extends NamedBool

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

All features are inherited from NamedBool. Just the key has to be provided under which this Bool has to be stored. This key is constructed from the name, a hash mark and the running number.

Example

 \bool12=true
 

Version:
$Revision: 6447 $
Author:
Michael Niedermair
See Also:
Serialized Form

Constructor Summary
NumberedBool(CodeToken token)
          Creates a new object.
 
Method Summary
protected  java.lang.String getKey(Context context, TokenSource source, Typesetter typesetter)
          Return the key (the name of the primitive) for the register.
 
Methods inherited from class org.extex.interpreter.primitives.register.bool.NamedBool
assign, convertBool, set, set, the
 
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
 

Constructor Detail

NumberedBool

public NumberedBool(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)
                           throws HelpingException,
                                  TypesetterException
Return the key (the name of the primitive) for the register.

Overrides:
getKey in class NamedBool
Parameters:
context - the context
source - the token source
typesetter - the typesetter
Returns:
the key
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
See Also:
NamedBool.getKey( org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)