de.dante.extex.interpreter.context
Interface ContextCode

All Known Subinterfaces:
Context, ContextInternals
All Known Implementing Classes:
ContextExtensionImpl, ContextImpl

public interface ContextCode

This interface describes the container for code of an interpreter context.

Version:
$Revision: 1.9 $
Author:
Gerd Neugebauer, Michael Niedermair

Method Summary
 Code getCode(CodeToken t)
          Convenience method to get the code assigned to a Token.
 void setCode(CodeToken t, Code code, boolean global)
          Setter for the code assigned to a Token.
 

Method Detail

getCode

public Code getCode(CodeToken t)
             throws InterpreterException
Convenience method to get the code assigned to a Token. If the Token is a ControlSequenceToken then the macro is returned. If the Token is a ActiveCharacterToken then the active value is returned.

Parameters:
t - the Token to differentiate on
Returns:
the code for the token
Throws:
InterpreterException - in case of an error
See Also:
setCode(CodeToken, Code, boolean)

setCode

public void setCode(CodeToken t,
                    Code code,
                    boolean global)
             throws InterpreterException
Setter for the code assigned to a Token. The Token has to be either a ActiveCharacterToken or a ControlSequenceToken.

Parameters:
t - the Token to set the code for
code - the code for the token
global - the indicator for the scope; true means all groups; otherwise the current group is affected only
Throws:
InterpreterException - in case of an error
See Also:
getCode(CodeToken)