org.extex.interpreter.context.impl.extension
Class ContextExtensionImpl

java.lang.Object
  extended by org.extex.interpreter.max.context.ContextImpl
      extended by org.extex.interpreter.context.impl.extension.ContextExtensionImpl
All Implemented Interfaces:
java.io.Serializable, DocumentWriterOptions, Context, ContextCode, ContextCount, ContextDimen, ContextErrorCount, ContextExtension, ContextFile, ContextFont, ContextGroup, ContextInteraction, ContextInternals, ContextMark, ContextTokens, CodeObservable, ConditionalObservable, CountObservable, DimenObservable, GlueObservable, GroupObservable, InteractionObservable, LoadedObservable, TokensObservable, LanguageManagerCarrier, Tokenizer, TokenStreamOptions, PageContext, TypesetterOptions

public class ContextExtensionImpl
extends ContextImpl
implements Context, ContextExtension, java.io.Serializable

This is a reference implementation for an interpreter context with ExTeX functions.

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

Constructor Summary
ContextExtensionImpl(Configuration config)
          Creates a new object.
 
Method Summary
 Bool getBool(java.lang.String name)
          Getter for the bool register.
 HashToks getHashToks(java.lang.String name)
          Getter for the hashtoks register.
 Pair getPair(java.lang.String name)
          Getter for the pair register.
 Real getReal(java.lang.String name)
          Getter for the real register.
 Transform getTransform(java.lang.String name)
          Getter for the transform register.
 void setBool(java.lang.String name, Bool value)
          Setter for the bool register in the current group.
 void setBool(java.lang.String name, Bool value, boolean global)
          Setter for the bool register in all requested groups.
 void setHashToks(java.lang.String name, HashToks value)
          Setter for the hashtoks register in the current group.
 void setHashToks(java.lang.String name, HashToks value, boolean global)
          Setter for the hashtoks register in all requested groups.
 void setPair(java.lang.String name, Pair value)
          Setter for the pair register in the current group.
 void setPair(java.lang.String name, Pair value, boolean global)
          Setter for the pair register in all requested groups.
 void setReal(java.lang.String name, Real value)
          Setter for the real register in the current group.
 void setReal(java.lang.String name, Real value, boolean global)
          Setter for the real register in all requested groups.
 void setTransform(java.lang.String name, Transform value)
          Setter for the transform register in the current group.
 void setTransform(java.lang.String name, Transform value, boolean global)
          Setter for the transform register in all requested groups.
 
Methods inherited from class org.extex.interpreter.max.context.ContextImpl
addUnit, afterGroup, afterGroup, clearSplitMarks, closeGroup, configure, enableLogging, esc, esc, escapechar, get, getAfterassignment, getBottomMark, getBox, getCatcode, getCode, getConditional, getCount, getCountOption, getDelcode, getDimen, getDimenOption, getErrorCount, getFirstMark, getFont, getFontFactory, getGlue, getGlueOption, getGroup, getGroupInfos, getGroupLevel, getGroupType, getId, getIfLevel, getInFile, getInteraction, getLanguage, getLanguageManager, getLccode, getLocalizer, getMagnification, getMathcode, getMuskip, getNamespace, getOutFile, getParshape, getSfcode, getSplitBottomMark, getSplitFirstMark, getStandardTokenStream, getTokenFactory, getTokenizer, getTokensOption, getToks, getToksOption, getToksOrNull, getTopMark, getTypesettingContext, getTypesettingContextFactory, getUccode, incrementErrorCount, isGlobalGroup, openGroup, popConditional, popDirection, pushConditional, pushDirection, readResolve, receiveLoad, registerCodeChangeObserver, registerConditionalObserver, registerCountObserver, registerDimenObserver, registerGlueObserver, registerGroupObserver, registerInteractionObserver, registerLoadObserver, registerTokensObserver, set, set, set, set, set, set, setAfterassignment, setBox, setCatcode, setCode, setCount, setCountOption, setDelcode, setDimen, setDimen, setFont, setFontFactory, setGlue, setId, setInFile, setInteraction, setLanguageManager, setLccode, setMagnification, setMark, setMathcode, setMuskip, setNamespace, setOutFile, setParshape, setSfcode, setSplitMark, setStandardTokenStream, setTokenFactory, setToks, setUccode, startMarks, unitIterator, unregisterCodeChangeObserver, unregisterConditionalObserver, unregisterCountObserver, unregisterDimenObserver, unregisterGlueObserver, unregisterGroupObserver, unregisterInteractionObserver, unregisterLoadObserver, unregisterTokensChangeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.extex.interpreter.context.Context
addUnit, esc, esc, escapechar, get, getAfterassignment, getBox, getConditional, getDelcode, getGlue, getId, getIfLevel, getLanguage, getLanguageManager, getLccode, getMagnification, getMathcode, getMuskip, getNamespace, getParshape, getSfcode, getStandardTokenStream, getTokenFactory, getTokenizer, getTypesettingContext, getUccode, popConditional, popDirection, pushConditional, pushDirection, set, set, set, set, set, set, setAfterassignment, setBox, setCatcode, setDelcode, setGlue, setId, setLanguageManager, setLccode, setMagnification, setMathcode, setMuskip, setNamespace, setParshape, setSfcode, setStandardTokenStream, setTokenFactory, setUccode, unitIterator
 
Methods inherited from interface org.extex.interpreter.context.ContextCode
getCode, setCode
 
Methods inherited from interface org.extex.interpreter.context.ContextCount
getCount, setCount
 
Methods inherited from interface org.extex.interpreter.context.ContextDimen
getDimen, setDimen, setDimen
 
Methods inherited from interface org.extex.interpreter.context.ContextFile
getInFile, getOutFile, setInFile, setOutFile
 
Methods inherited from interface org.extex.interpreter.context.ContextFont
getFont, getFontFactory, setFont, setFontFactory
 
Methods inherited from interface org.extex.interpreter.context.ContextGroup
afterGroup, afterGroup, closeGroup, getGroupInfos, getGroupLevel, getGroupType, isGlobalGroup, openGroup
 
Methods inherited from interface org.extex.interpreter.context.ContextErrorCount
getErrorCount, incrementErrorCount
 
Methods inherited from interface org.extex.interpreter.context.ContextInteraction
getInteraction, setInteraction
 
Methods inherited from interface org.extex.interpreter.context.ContextTokens
getToks, getToksOrNull, setToks
 
Methods inherited from interface org.extex.interpreter.context.ContextMark
clearSplitMarks, getBottomMark, getFirstMark, getSplitBottomMark, getSplitFirstMark, getTopMark, setMark, setSplitMark, startMarks
 
Methods inherited from interface org.extex.scanner.api.Tokenizer
getCatcode
 
Methods inherited from interface org.extex.typesetter.PageContext
getCountOption, getDimenOption, getFont, getGlueOption, getOutFile, getTypesettingContextFactory, setCountOption, setMark, setOutFile
 

Constructor Detail

ContextExtensionImpl

public ContextExtensionImpl(Configuration config)
                     throws ConfigurationException,
                            GeneralException
Creates a new object.

Parameters:
config - the configuration
Throws:
ConfigurationException - ...
GeneralException - ...
Method Detail

getReal

public Real getReal(java.lang.String name)
Description copied from interface: ContextExtension
Getter for the real register. Real registers are named, either with a number or an arbitrary string.

Specified by:
getReal in interface ContextExtension
Parameters:
name - the name or number of the real register
Returns:
the real register or null if it is not defined
See Also:
ContextExtension.getReal( java.lang.String)

setReal

public void setReal(java.lang.String name,
                    Real value,
                    boolean global)
Description copied from interface: ContextExtension
Setter for the real register in all requested groups. Real registers are named, either with a number or an arbitrary string.

Specified by:
setReal in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextExtension.setReal( java.lang.String, org.extex.interpreter.primitives.register.real.Real, boolean)

setReal

public void setReal(java.lang.String name,
                    Real value)
Description copied from interface: ContextExtension
Setter for the real register in the current group. Real registers are named, either with a number or an arbitrary string.

Specified by:
setReal in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
See Also:
ContextExtension.setReal( java.lang.String, org.extex.interpreter.primitives.register.real.Real)

getBool

public Bool getBool(java.lang.String name)
Description copied from interface: ContextExtension
Getter for the bool register. Bool registers are named, either with a number or an arbitrary string.

Specified by:
getBool in interface ContextExtension
Parameters:
name - the name or number of the register
Returns:
the bool register or null if it is not defined
See Also:
ContextExtension.getBool(java.lang.String)

setBool

public void setBool(java.lang.String name,
                    Bool value,
                    boolean global)
Description copied from interface: ContextExtension
Setter for the bool register in all requested groups. Bool registers are named, either with a number or an arbitrary string.

Specified by:
setBool in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextExtension.setBool( java.lang.String, org.extex.interpreter.primitives.register.bool.Bool, boolean)

setBool

public void setBool(java.lang.String name,
                    Bool value)
Description copied from interface: ContextExtension
Setter for the bool register in the current group. Bool registers are named, either with a number or an arbitrary string.

Specified by:
setBool in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
See Also:
ContextExtension.setBool( java.lang.String, org.extex.interpreter.primitives.register.bool.Bool)

getPair

public Pair getPair(java.lang.String name)
Description copied from interface: ContextExtension
Getter for the pair register. Pair registers are named, either with a number or an arbitrary string.

Specified by:
getPair in interface ContextExtension
Parameters:
name - the name or number of the register
Returns:
the bool register or null if it is not defined
See Also:
ContextExtension.getPair( java.lang.String)

setPair

public void setPair(java.lang.String name,
                    Pair value,
                    boolean global)
Description copied from interface: ContextExtension
Setter for the pair register in all requested groups. Pair registers are named, either with a number or an arbitrary string.

Specified by:
setPair in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextExtension.setPair( java.lang.String, org.extex.interpreter.primitives.register.pair.Pair, boolean)

setPair

public void setPair(java.lang.String name,
                    Pair value)
Description copied from interface: ContextExtension
Setter for the pair register in the current group. Pair registers are named, either with a number or an arbitrary string.

Specified by:
setPair in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
See Also:
ContextExtension.setPair( java.lang.String, org.extex.interpreter.primitives.register.pair.Pair)

getTransform

public Transform getTransform(java.lang.String name)
Description copied from interface: ContextExtension
Getter for the transform register. Transform registers are named, either with a number or an arbitrary string.

Specified by:
getTransform in interface ContextExtension
Parameters:
name - the name or number of the register
Returns:
the bool register or null if it is not defined
See Also:
ContextExtension.getTransform( java.lang.String)

setTransform

public void setTransform(java.lang.String name,
                         Transform value,
                         boolean global)
Description copied from interface: ContextExtension
Setter for the transform register in all requested groups. Transform registers are named, either with a number or an arbitrary string.

Specified by:
setTransform in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextExtension.setTransform( java.lang.String, org.extex.interpreter.primitives.register.transform.Transform, boolean)

setTransform

public void setTransform(java.lang.String name,
                         Transform value)
Description copied from interface: ContextExtension
Setter for the transform register in the current group. Transform registers are named, either with a number or an arbitrary string.

Specified by:
setTransform in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
See Also:
ContextExtension.setTransform( java.lang.String, org.extex.interpreter.primitives.register.transform.Transform)

getHashToks

public HashToks getHashToks(java.lang.String name)
Description copied from interface: ContextExtension
Getter for the hashtoks register. Transform registers are named, either with a number or an arbitrary string.

Specified by:
getHashToks in interface ContextExtension
Parameters:
name - the name or number of the register
Returns:
the bool register or null if it is not defined
See Also:
ContextExtension.getHashToks( java.lang.String)

setHashToks

public void setHashToks(java.lang.String name,
                        HashToks value,
                        boolean global)
Description copied from interface: ContextExtension
Setter for the hashtoks register in all requested groups. Transform registers are named, either with a number or an arbitrary string.

Specified by:
setHashToks in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
See Also:
ContextExtension.setHashToks( java.lang.String, org.extex.interpreter.primitives.register.hash.HashToks, boolean)

setHashToks

public void setHashToks(java.lang.String name,
                        HashToks value)
Description copied from interface: ContextExtension
Setter for the hashtoks register in the current group. Hashtoks registers are named, either with a number or an arbitrary string.

Specified by:
setHashToks in interface ContextExtension
Parameters:
name - the name or the number of the register
value - the new value of the register
See Also:
ContextExtension.setHashToks( java.lang.String, org.extex.interpreter.primitives.register.hash.HashToks)