|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dante.extex.interpreter.context.impl.ContextImpl
This is a reference implementation for an interpreter context.
The groups are implemented as a linked list of single groups. In contrast to
the Knuthian implementation in
Several operations have to be dealt with:
Group
is created
with the old one as next group.
Field Summary | |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
Constructor Summary | |
ContextImpl()
Creates a new object. |
Method Summary | |
void |
addUnit(UnitInfo info)
Add a unit to the list of loaded units. |
void |
afterGroup(AfterGroupObserver observer)
Register a observer to be called at the end of the group. |
void |
afterGroup(Token t)
Add a token to the tokens inserted after the group has been closed. |
void |
clearSplitMarks()
This method clears all split marks. |
void |
closeGroup(Typesetter typesetter,
TokenSource source)
Perform all actions required upon the closing of a group. |
void |
configure(Configuration configuration)
Configure an object according to a given Configuration. |
void |
enableLocalization(Localizer theLocalizer)
Setter for the localizer. |
void |
enableLogging(java.util.logging.Logger theLogger)
Setter for the logger. |
java.lang.String |
esc(java.lang.String name)
Attach the current escape character in front of a name and return the result. |
java.lang.String |
esc(Token token)
This method is meant to produce a printable version of a control sequence for error messages. |
UnicodeChar |
escapechar()
Return the current escape character or \0 |
java.lang.Object |
get(java.lang.Object extension,
java.lang.Object key)
Getter for a value from an extended section of the context. |
Token |
getAfterassignment()
Getter for the afterassignment token. |
Tokens |
getBottomMark(java.lang.Object name)
Getter for the bottom mark. |
Box |
getBox(java.lang.String name)
Getter for the box
register. |
Catcode |
getCatcode(UnicodeChar uc)
Get the Catcode for a given Unicode character. |
Code |
getCode(CodeToken t)
Convenience method to get the code assigned to a Token. |
Conditional |
getConditional()
Getter for the currently active conditional. |
Count |
getCount(java.lang.String name)
Getter for the count
register. |
FixedCount |
getCountOption(java.lang.String name)
Getter for a count register. |
MathDelimiter |
getDelcode(UnicodeChar c)
Getter for the delimiter code mapping. |
Dimen |
getDimen(java.lang.String name)
Get the current value of the dimen register with a given name. |
FixedDimen |
getDimenOption(java.lang.String name)
Getter for a dimen register. |
int |
getErrorCount()
Getter for the error count. |
Tokens |
getFirstMark(java.lang.Object name)
Getter for the first mark. |
Font |
getFont(java.lang.String name)
Getter for a current font register. |
FontFactory |
getFontFactory()
Getter for the font factory. |
Glue |
getGlue(java.lang.String name)
Getter for a glue register. |
FixedGlue |
getGlueOption(java.lang.String name)
Getter for a glue register. |
protected Group |
getGroup()
Getter for group. |
GroupInfo[] |
getGroupInfos()
Getter for the array of group information describing the currently open groups. |
long |
getGroupLevel()
Getter for the group level. |
GroupType |
getGroupType()
Getter for the group type. |
java.lang.String |
getId()
Getter for the id string. |
long |
getIfLevel()
Getter for the current if level. |
InFile |
getInFile(java.lang.String name)
Getter for a input file register. |
Interaction |
getInteraction()
Getter for the interaction. |
Language |
getLanguage(java.lang.String language)
Getter for the hyphenation record for a given language. |
LanguageManager |
getLanguageManager()
Getter for the language manager. |
UnicodeChar |
getLccode(UnicodeChar uc)
Getter for the lccode mapping of upper case characters to their lower case equivalent. |
long |
getMagnification()
Getter for the magnification of the document. |
MathCode |
getMathcode(UnicodeChar c)
Getter for the math code of a character. |
Muskip |
getMuskip(java.lang.String name)
Getter for a muskip register. |
java.lang.String |
getNamespace()
Getter for the name space. |
OutFile |
getOutFile(java.lang.String name)
Getter for an output file descriptor. |
ParagraphShape |
getParshape()
Getter for the parshape. |
Count |
getSfcode(UnicodeChar c)
Getter for the space factor code of a character. |
Tokens |
getSplitBottomMark(java.lang.Object name)
Getter for the split bottom mark. |
Tokens |
getSplitFirstMark(java.lang.Object name)
Getter for the split first mark. |
TokenStream |
getStandardTokenStream()
Getter for standardTokenStream. |
TokenFactory |
getTokenFactory()
Getter for the token factory. |
Tokenizer |
getTokenizer()
Getter for the tokenizer. |
Tokens |
getTokensOption(java.lang.String name)
Getter for a dimen register. |
Tokens |
getToks(java.lang.String name)
Getter for the Tokens
register. |
FixedTokens |
getToksOption(java.lang.String name)
Getter for a toks register. |
Tokens |
getToksOrNull(java.lang.String name)
Getter for the toks
register. |
Tokens |
getTopMark(java.lang.Object name)
Getter for the top mark. |
TypesettingContext |
getTypesettingContext()
Getter for the typesetting context. |
TypesettingContextFactory |
getTypesettingContextFactory()
Getter for the typesetting context factory. |
UnicodeChar |
getUccode(UnicodeChar lc)
Getter for the uccode mapping of lower case characters to their upper case equivalent. |
int |
incrementErrorCount()
Increment the error count by 1. |
boolean |
isGlobalGroup()
Test whether this group is the first one, which means that there is no group before and closing this group would fail. |
void |
openGroup(GroupType type,
Locator locator,
Token start)
This method can be used to open another group. |
Conditional |
popConditional()
Pop the management information for a conditional from the stack and return it. |
Direction |
popDirection()
Pop a direction from the direction stack. |
void |
pushConditional(Locator locator,
boolean isIfThenElse,
Code primitive,
long branch,
boolean neg)
Put a value onto the conditional stack. |
void |
pushDirection(Direction dir)
Push a direction onto the direction stack. |
java.lang.Object |
readResolve()
This method maps instances to their normal representations if required. |
void |
receiveLoad(TokenSource source)
Receive a notification about a load event. |
void |
registerCodeChangeObserver(Token name,
CodeObserver observer)
Register an observer for code change events. |
void |
registerConditionalObserver(ConditionalObserver observer)
Register an observer for conditional events. |
void |
registerCountObserver(java.lang.String name,
CountObserver observer)
Register an observer for count change events. |
void |
registerDimenObserver(java.lang.String name,
DimenObserver observer)
Register an observer for dimen change events. |
void |
registerGlueObserver(java.lang.String name,
GlueObserver observer)
Register an observer for glue change events. |
void |
registerGroupObserver(GroupObserver observer)
Register an observer for group change events. |
void |
registerInteractionObserver(InteractionObserver observer)
Register an observer for interaction mode change events. |
void |
registerLoadObserver(LoadedObserver observer)
Register an observer for load events. |
void |
registerTokensObserver(java.lang.String name,
TokensObserver observer)
Register an observer for tokens change events. |
void |
set(Color color,
boolean global)
Setter for the color in the current typesetting context. |
void |
set(Direction direction,
boolean global)
Setter for the direction in the current typesetting context. |
void |
set(Font font,
boolean global)
Setter for the font in the current typesetting context. |
void |
set(Language language,
boolean global)
Setter for the language in the current typesetting context. |
void |
set(java.lang.Object extension,
java.lang.Object key,
java.lang.Object value,
boolean global)
Setter for a value from an extended section of the context. |
void |
set(TypesettingContext context,
boolean global)
Setter for the typesetting context in the specified groups. |
void |
setAfterassignment(Token token)
Setter for the afterassignment token. |
void |
setBox(java.lang.String name,
Box value,
boolean global)
Setter for the box
register in the current group. |
void |
setCatcode(UnicodeChar c,
Catcode cc,
boolean global)
Setter for the catcode of a character in the specified groups. |
void |
setCode(CodeToken t,
Code code,
boolean global)
Setter for the code assigned to a Token. |
void |
setCount(java.lang.String name,
long value,
boolean global)
Setter for the count
register in all requested groups. |
void |
setCountOption(java.lang.String name,
long value)
Setter for a count register. |
void |
setDelcode(UnicodeChar c,
MathDelimiter delimiter,
boolean global)
Setter for the delimiter code mapping. |
void |
setDimen(java.lang.String name,
Dimen value,
boolean global)
Setter for the Dimen
register in all requested groups. |
void |
setDimen(java.lang.String name,
long value,
boolean global)
Setter for the Dimen
register in all requested groups. |
void |
setFont(java.lang.String name,
Font font,
boolean global)
Setter for font registers. |
void |
setFontFactory(FontFactory factory)
Setter for the font factory. |
void |
setGlue(java.lang.String name,
Glue value,
boolean global)
Setter for a glue register. |
void |
setId(java.lang.String theId)
Setter for the id string. |
void |
setInFile(java.lang.String name,
InFile file,
boolean global)
Setter for the InFile
register in all requested groups. |
void |
setInteraction(Interaction interaction)
Setter for the interaction in all requested groups. |
void |
setLanguageManager(LanguageManager manager)
Setter for the language manager. |
void |
setLccode(UnicodeChar uc,
UnicodeChar lc,
boolean global)
Declare the translation from an upper case character to a lower case character. |
void |
setMagnification(long mag,
boolean lock)
Setter for the magnification. |
void |
setMark(java.lang.Object name,
Tokens mark)
Setter for a mark. |
void |
setMathcode(UnicodeChar c,
MathCode code,
boolean global)
Setter for the math code of a character |
void |
setMuskip(java.lang.String name,
Muskip value,
boolean global)
Setter for a muskip register. |
void |
setNamespace(java.lang.String namespace,
boolean global)
Setter for the name space. |
void |
setOutFile(java.lang.String name,
OutFile file,
boolean global)
Setter for a outfile descriptor. |
void |
setParshape(ParagraphShape shape)
Setter for the paragraph shape. |
void |
setSfcode(UnicodeChar c,
Count code,
boolean global)
Setter for the space factor code in the specified groups. |
void |
setSplitMark(java.lang.Object name,
Tokens mark)
Setter for a split mark. |
void |
setStandardTokenStream(TokenStream standardTokenStream)
Setter for standardTokenStream. |
void |
setTokenFactory(TokenFactory factory)
Setter for the token factory |
void |
setToks(java.lang.String name,
Tokens toks,
boolean global)
Setter for the Tokens
register in the specified groups. |
void |
setUccode(UnicodeChar lc,
UnicodeChar uc,
boolean global)
Declare the translation from a lower case character to an upper case character. |
void |
startMarks()
This method indicated that a new page is started. |
java.util.Iterator |
unitIterator()
Get an iterator to enumerate all unit infos. |
void |
unregisterCodeChangeObserver(Token name,
CodeObserver observer)
Remove a registered observer for code change events. |
void |
unregisterConditionalObserver(ConditionalObserver observer)
Remove a registered observer for conditional events. |
void |
unregisterCountObserver(java.lang.String name,
CountObserver observer)
Remove a registered observer for count change events. |
void |
unregisterDimenObserver(java.lang.String name,
DimenObserver observer)
Remove a registered observer for dimen change events. |
void |
unregisterGlueObserver(java.lang.String name,
GlueObserver observer)
Remove a registered observer for glue change events. |
void |
unregisterGroupObserver(GroupObserver observer)
Remove a registered observer for group change events. |
void |
unregisterInteractionObserver(InteractionObserver observer)
Remove a registered observer for interaction mode change events. |
void |
unregisterLoadObserver(LoadedObserver observer)
Remove a registered observer for load events. |
void |
unregisterTokensChangeObserver(java.lang.String name,
TokensObserver observer)
Remove a registered observer for toks change events. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
Constructor Detail |
public ContextImpl()
Method Detail |
public void addUnit(UnitInfo info)
Context
addUnit
in interface Context
info
- the info of the unit loadedContext.addUnit(
de.dante.extex.interpreter.unit.UnitInfo)
public void afterGroup(AfterGroupObserver observer)
ContextGroup
afterGroup
in interface ContextGroup
observer
- the observer to registerContextGroup.afterGroup(
AfterGroupObserver)
public void afterGroup(Token t)
ContextGroup
afterGroup
in interface ContextGroup
t
- the token to addContextGroup.afterGroup(
de.dante.extex.scanner.type.token.Token)
public void clearSplitMarks()
ContextMark
clearSplitMarks
in interface ContextMark
ContextMark.clearSplitMarks()
public void closeGroup(Typesetter typesetter, TokenSource source) throws InterpreterException
ContextGroup
closeGroup
in interface ContextGroup
typesetter
- the typesetter to invoke if neededsource
- the source to get Tokens from if needed
InterpreterException
- in case of an errorContextGroup.closeGroup(
de.dante.extex.typesetter.Typesetter,
de.dante.extex.interpreter.TokenSource)
public void configure(Configuration configuration) throws ConfigurationException
Configurable
configure
in interface Configurable
configuration
- the configuration object to consider
ConfigurationException
- in case that something went wrongConfigurable.configure(
de.dante.util.framework.configuration.Configuration)
public void enableLocalization(Localizer theLocalizer)
enableLocalization
in interface Localizable
theLocalizer
- the localizer to useLocalizable.enableLocalization(
de.dante.util.framework.i18n.Localizer)
public void enableLogging(java.util.logging.Logger theLogger)
LogEnabled
enableLogging
in interface LogEnabled
theLogger
- the logger to useLogEnabled.enableLogging(
java.util.logging.Logger)
public java.lang.String esc(java.lang.String name)
Context
This method is meant to produce a printable version of a control sequence for error messages.
esc
in interface Context
name
- the name of the macro
Context.esc(java.lang.String)
public java.lang.String esc(Token token)
Context
esc
in interface Context
token
- the token
Context.esc(
de.dante.extex.scanner.type.token.Token)
public UnicodeChar escapechar()
Context
\0 if it is undefined.
The escape character is retrieved from the count register
\escapechar.
This is a convenience method.
The Count Parameter \escapechar
The count register \escapechar contains code point of the
escape character. This character is used whenever an control sequence
is about to be printed and it has to be prefixed by the escape character.
If the value is less than zero then the escape character is assumed to
be undefined. In this case the control sequence is not prefixed by any
character.
Note that the escape character does not need to be in sync with the
definition of the category codes. In fact they are independent. Usually
they should coincide, but some interesting effects can be achieved with
controlled disagreement.
Syntax
The formal description of this primitive is the following:
〈escapechar〉
→ \escapechar 〈equals〉 〈number〉
Examples
\escapechar=-1
- Specified by:
escapechar
in interface Context
- Returns:
- the escape character
- See Also:
Context.escapechar()
public java.lang.Object get(java.lang.Object extension, java.lang.Object key)
Context
get
in interface Context
extension
- the name of the extensionkey
- the key for the value
Context.get(
java.lang.Object,
java.lang.Object)
public Token getAfterassignment()
Context
getAfterassignment
in interface Context
Context.getAfterassignment()
public Tokens getBottomMark(java.lang.Object name)
ContextMark
getBottomMark
in interface ContextMark
name
- the name of the mark
ContextMark.getBottomMark(
java.lang.Object)
public Box getBox(java.lang.String name)
Context
box
register. Count registers are named, either with a number or an
arbitrary string. The numbered registers where limited to 256 in
getBox
in interface Context
name
- the name or number of the count register
null
if it is voidContext.getBox(java.lang.String)
public Catcode getCatcode(UnicodeChar uc)
Catcode
for a given Unicode character.
getCatcode
in interface Tokenizer
uc
- the Unicode character to get the catcode for.
Tokenizer.getCatcode(de.dante.util.UnicodeChar)
public Code getCode(CodeToken t) throws InterpreterException
ContextCode
getCode
in interface ContextCode
t
- the Token to differentiate on
InterpreterException
- in case of an errorContextCode.getCode(
de.dante.extex.scanner.type.token.CodeToken)
public Conditional getConditional()
Context
getConditional
in interface Context
null
if noneContext.getConditional()
public Count getCount(java.lang.String name)
ContextCount
count
register. Count registers are named, either with a number or an
arbitrary string.
The numbered registers where limited to 256 in
The return value is guaranteed to be a valid object. null
will never be returned.
getCount
in interface ContextCount
name
- the name or number of the count register
null
if it is not definedContextCount.getCount(
java.lang.String)
public FixedCount getCountOption(java.lang.String name)
DocumentWriterOptions
getCountOption
in interface DocumentWriterOptions
name
- the name of the register
TypesetterOptions.getCountOption(java.lang.String)
public MathDelimiter getDelcode(UnicodeChar c)
Context
getDelcode
in interface Context
c
- the character to which the delcode is assigned
Context.getDelcode(
de.dante.util.UnicodeChar)
public Dimen getDimen(java.lang.String name)
ContextDimen
getDimen
in interface ContextDimen
name
- the name or the number of the register
ContextDimen.getDimen(
java.lang.String)
public FixedDimen getDimenOption(java.lang.String name)
DocumentWriterOptions
getDimenOption
in interface DocumentWriterOptions
name
- the name of the register
TypesetterOptions.getDimenOption(java.lang.String)
public int getErrorCount()
ContextErrorCount
getErrorCount
in interface ContextErrorCount
ContextErrorCount.getErrorCount()
public Tokens getFirstMark(java.lang.Object name)
ContextMark
getFirstMark
in interface ContextMark
name
- the name of the mark
ContextMark.getFirstMark(
java.lang.Object)
public Font getFont(java.lang.String name)
TypesetterOptions
getFont
in interface ContextFont
name
- the name or the number of the register
null
if none is setContextFont.getFont(java.lang.String)
public FontFactory getFontFactory()
ContextFont
getFontFactory
in interface ContextFont
ContextFont.getFontFactory()
public Glue getGlue(java.lang.String name)
Context
getGlue
in interface Context
name
- the name of the glue register to acquire.
null
if none is setContext.getGlue(java.lang.String)
public FixedGlue getGlueOption(java.lang.String name)
TypesetterOptions
getGlueOption
in interface TypesetterOptions
name
- the name of the register
TypesetterOptions.getGlueOption(java.lang.String)
protected Group getGroup()
public GroupInfo[] getGroupInfos()
ContextGroup
getGroupInfos
in interface ContextGroup
ContextGroup.getGroupInfos()
public long getGroupLevel()
getGroupLevel
in interface ContextGroup
ContextGroup.getGroupLevel()
public GroupType getGroupType()
ContextGroup
getGroupType
in interface ContextGroup
ContextGroup.getGroupType()
public java.lang.String getId()
null
if not known yet.
getId
in interface Context
Context.getId()
public long getIfLevel()
Context
getIfLevel
in interface Context
Context.getIfLevel()
public InFile getInFile(java.lang.String name)
ContextFile
null
then the default input stream is used.
getInFile
in interface ContextFile
name
- the name or the number of the file register
ContextFile.getInFile(
java.lang.String)
public Interaction getInteraction()
ContextInteraction
getInteraction
in interface ContextInteraction
ContextInteraction.getInteraction()
public Language getLanguage(java.lang.String language) throws InterpreterException
Context
getLanguage
in interface Context
language
- the name of the language to use
InterpreterException
- in case of an errorContext.getLanguage(String)
public LanguageManager getLanguageManager()
Context
getLanguageManager
in interface Context
Context.getLanguageManager()
public UnicodeChar getLccode(UnicodeChar uc)
TypesetterOptions
getLccode
in interface Context
uc
- the upper case character
Context.getLccode(
de.dante.util.UnicodeChar)
public long getMagnification()
DocumentWriterOptions
getMagnification
in interface Context
Context.getMagnification()
public MathCode getMathcode(UnicodeChar c)
Context
getMathcode
in interface Context
c
- the character index
Context.getMathcode(
de.dante.util.UnicodeChar)
public Muskip getMuskip(java.lang.String name)
TypesetterOptions
getMuskip
in interface Context
name
- the name or the number of the register
null
if none is setContext.getMuskip(
java.lang.String)
public java.lang.String getNamespace()
Tokenizer
getNamespace
in interface Context
Context.getNamespace()
public OutFile getOutFile(java.lang.String name)
ContextFile
getOutFile
in interface ContextFile
name
- the name or the number of the file register
ContextFile.getOutFile(
java.lang.String)
public ParagraphShape getParshape()
getParshape
in interface Context
null
if no special shape
is presentContext.getParshape()
public Count getSfcode(UnicodeChar c)
Context
getSfcode
in interface Context
c
- the Unicode character
Context.getSfcode(
de.dante.util.UnicodeChar)
public Tokens getSplitBottomMark(java.lang.Object name)
ContextMark
getSplitBottomMark
in interface ContextMark
name
- the name of the mark
ContextMark.getSplitBottomMark(
java.lang.Object)
public Tokens getSplitFirstMark(java.lang.Object name)
ContextMark
getSplitFirstMark
in interface ContextMark
name
- the name of the mark
ContextMark.getSplitFirstMark(
java.lang.Object)
public TokenStream getStandardTokenStream()
Context
getStandardTokenStream
in interface Context
Context.getStandardTokenStream()
public TokenFactory getTokenFactory()
getTokenFactory
in interface Context
Context.setTokenFactory(TokenFactory)
public Tokenizer getTokenizer()
getTokenizer
in interface Context
Context.setCatcode(UnicodeChar, Catcode, boolean)
public Tokens getTokensOption(java.lang.String name)
DocumentWriterOptions
getTokensOption
in interface DocumentWriterOptions
name
- the name of the register
DocumentWriterOptions.getTokensOption(java.lang.String)
public Tokens getToks(java.lang.String name)
ContextTokens
Tokens
register. Tokens registers are named, either with a number or an
arbitrary string. The numbered registers where limited to 256 in
getToks
in interface ContextTokens
name
- the name or number of the token register
ContextTokens.getToks(java.lang.String)
public FixedTokens getToksOption(java.lang.String name)
TokenStreamOptions
getToksOption
in interface TokenStreamOptions
name
- the name of the register
TokenStreamOptions.getToksOption(
java.lang.String)
public Tokens getToksOrNull(java.lang.String name)
ContextTokens
toks
register. Tokens registers are named, either with a number or an
arbitrary string. The numbered registers where limited to 256 in
getToksOrNull
in interface ContextTokens
name
- the name or number of the token register
null
if it is not definedContextTokens.getToksOrNull(java.lang.String)
public Tokens getTopMark(java.lang.Object name)
ContextMark
getTopMark
in interface ContextMark
name
- the name of the mark
ContextMark.getTopMark(
java.lang.Object)
public TypesettingContext getTypesettingContext()
getTypesettingContext
in interface Context
TypesetterOptions.getTypesettingContext()
public TypesettingContextFactory getTypesettingContextFactory()
ContextInternals
getTypesettingContextFactory
in interface ContextInternals
ContextInternals.getTypesettingContextFactory()
public UnicodeChar getUccode(UnicodeChar lc)
Context
getUccode
in interface Context
lc
- the upper case character
Context.getUccode(
de.dante.util.UnicodeChar)
public int incrementErrorCount()
ContextErrorCount
incrementErrorCount
in interface ContextErrorCount
ContextErrorCount.incrementErrorCount()
public boolean isGlobalGroup()
ContextGroup
isGlobalGroup
in interface ContextGroup
true
iff this is the first groupContextGroup.isGlobalGroup()
public void openGroup(GroupType type, Locator locator, Token start) throws ConfigurationException, InterpreterException
ContextGroup
openGroup
in interface ContextGroup
type
- the type of the grouplocator
- the locator for the startstart
- the token which started the group
ConfigurationException
- in case of an error in the configuration,
e.g. the class for the group can not be determined.
InterpreterException
- in case of an errorContextGroup.openGroup(
de.dante.extex.interpreter.context.group.GroupType,
de.dante.util.Locator,
de.dante.extex.scanner.type.token.Token)
public Conditional popConditional()
Context
null
is returned.
popConditional
in interface Context
Context.popConditional()
public Direction popDirection()
Context
popDirection
in interface Context
null
if the
stack is emptyContext.popDirection()
public void pushConditional(Locator locator, boolean isIfThenElse, Code primitive, long branch, boolean neg)
Context
pushConditional
in interface Context
locator
- the locator for the start of the if statementisIfThenElse
- the value to pushprimitive
- the name of the primitive which triggered this
operationbranch
- the branch numberneg
- negation indicatorContext.pushConditional(
de.dante.util.Locator,
boolean,
de.dante.extex.interpreter.type.Code,
long,
boolean)
public void pushDirection(Direction dir)
Context
pushDirection
in interface Context
dir
- the directionde.dante.extex.interpreter.context.Context#pushDirection(de.dante.extex.interpreter.context.Direction)
public java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
- in case of an errorpublic void receiveLoad(TokenSource source) throws InterpreterException
LoadedObservable
receiveLoad
in interface LoadedObservable
source
- the token source
InterpreterException
- in case of an errorLoadedObservable.receiveLoad(
de.dante.extex.interpreter.TokenSource)
public void registerCodeChangeObserver(Token name, CodeObserver observer)
CodeObservable
registerCodeChangeObserver
in interface CodeObservable
name
- the token to be observed. This should be a macro or
active character token.observer
- the observer to receive the eventsCodeObservable.registerCodeChangeObserver(
de.dante.extex.scanner.type.token.Token,
de.dante.extex.interpreter.context.observer.code.CodeObserver)
public void registerConditionalObserver(ConditionalObserver observer)
ConditionalObservable
registerConditionalObserver
in interface ConditionalObservable
observer
- the observer to receive the eventsConditionalObservable.registerConditionalObserver(
de.dante.extex.interpreter.context.observer.conditional.ConditionalObserver)
public void registerCountObserver(java.lang.String name, CountObserver observer)
CountObservable
A single count register can be observed by giving a name of the count
register to observe. Only changes to this register trigger the
notification. If this name is null
the changes to all
registers are reported to the observer.
registerCountObserver
in interface CountObservable
name
- the name or the number of the registerobserver
- the observer to receive the eventsCountObservable.registerCountObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.count.CountObserver)
public void registerDimenObserver(java.lang.String name, DimenObserver observer)
DimenObservable
A single dimen register can be observed by giving a name of the dimen
register to observe. Only changes to this register trigger the
notification. If this name is null
the changes to all
registers are reported to the observer.
registerDimenObserver
in interface DimenObservable
name
- the name or the number of the registerobserver
- the observer to receive the eventsDimenObservable.registerDimenObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.dimen.DimenObserver)
public void registerGlueObserver(java.lang.String name, GlueObserver observer)
GlueObservable
A single glue register can be observed by giving a name of the glue
register to observe. Only changes to this register trigger the
notification. If this name is null
the changes to all
registers are reported to the observer.
registerGlueObserver
in interface GlueObservable
name
- the name or the number of the registerobserver
- the observer to receive the eventsGlueObservable.registerGlueObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.glue.GlueObserver)
public void registerGroupObserver(GroupObserver observer)
GroupObservable
registerGroupObserver
in interface GroupObservable
observer
- the observer to receive the eventsGroupObservable.registerGroupObserver(
de.dante.extex.interpreter.context.observer.group.GroupObserver)
public void registerInteractionObserver(InteractionObserver observer)
InteractionObservable
A single count register can be observed by giving a name of the count
register to observe. Only changes to this register trigger the
notification. If this name is null
the changes to all
registers are reported to the observer.
registerInteractionObserver
in interface InteractionObservable
observer
- the observer to receive the eventsde.dante.extex.interpreter.context.ContextInteraction#registerInteractionObserver(
de.dante.extex.interpreter.context.observer.InteractionObserver)
public void registerLoadObserver(LoadedObserver observer)
LoadedObservable
registerLoadObserver
in interface LoadedObservable
observer
- the observer to receive the eventsLoadedObservable.registerLoadObserver(
de.dante.extex.interpreter.context.observer.load.LoadedObserver)
public void registerTokensObserver(java.lang.String name, TokensObserver observer)
TokensObservable
registerTokensObserver
in interface TokensObservable
name
- the token to be observed. This should be a macro or
active character token.observer
- the observer to receive the eventsTokensObservable.registerTokensObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.tokens.TokensObserver)
public void set(Color color, boolean global) throws ConfigurationException
Context
set
in interface Context
color
- the new colorglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
ConfigurationException
- in case of an error in the configuration.Context.set(
de.dante.extex.interpreter.context.Color,
boolean)
public void set(Direction direction, boolean global) throws ConfigurationException
Context
set
in interface Context
direction
- the new directionglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
ConfigurationException
- in case of an error in the configuration.de.dante.extex.interpreter.context.Context#set(
de.dante.extex.interpreter.context.Direction,
boolean)
public void set(Font font, boolean global) throws ConfigurationException
Context
set
in interface Context
font
- the new fontglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
ConfigurationException
- in case of an error in the configuration.Context.set(
de.dante.extex.interpreter.type.font.Font,
boolean)
public void set(Language language, boolean global) throws ConfigurationException
Context
set
in interface Context
language
- the new languageglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
ConfigurationException
- in case of an error in the configuration.Context.set(
de.dante.extex.language.Language,
boolean)
public void set(java.lang.Object extension, java.lang.Object key, java.lang.Object value, boolean global)
Context
set
in interface Context
extension
- the name of the extensionkey
- the key for the valuevalue
- the value to storeglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.set(
java.lang.Object,
java.lang.Object,
java.lang.Object,
boolean)
public void set(TypesettingContext context, boolean global)
set
in interface Context
context
- the new context to useglobal
- if true
then the new value is set in all
groups, otherwise only in the current group.Context.getTypesettingContext()
public void setAfterassignment(Token token)
Context
setAfterassignment
in interface Context
token
- the afterassignment token.Context.setAfterassignment(
de.dante.extex.scanner.type.token.Token)
public void setBox(java.lang.String name, Box value, boolean global)
Context
box
register in the current group. Count registers are named, either with a
number or an arbitrary string. The numbered registers where limited to
256 in
setBox
in interface Context
name
- the name or the number of the registervalue
- the new value of the registerglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setBox(java.lang.String,
de.dante.extex.interpreter.type.box.Box, boolean)
public void setCatcode(UnicodeChar c, Catcode cc, boolean global)
Context
setCatcode
in interface Context
c
- the character to assign a catcode forcc
- the catcode of the characterglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setCatcode(
de.dante.util.UnicodeChar,
de.dante.extex.scanner.type.Catcode, boolean)
public void setCode(CodeToken t, Code code, boolean global) throws InterpreterException
ContextCode
ActiveCharacterToken
or a
ControlSequenceToken
.
setCode
in interface ContextCode
t
- the Token to set the code forcode
- the code for the tokenglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
InterpreterException
- in case of an errorContextCode.setCode(
de.dante.extex.scanner.type.token.CodeToken,
de.dante.extex.interpreter.type.Code, boolean)
public void setCount(java.lang.String name, long value, boolean global) throws InterpreterException
ContextCount
count
register in all requested groups. Count registers are named, either with
a number or an arbitrary string. The numbered registers where limited to
256 in
setCount
in interface ContextCount
name
- the name or the number of the registervalue
- the new value of the registerglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
InterpreterException
- in case if an exception in a registered
observerContextCount.setCount(
java.lang.String,
long, boolean)
public void setCountOption(java.lang.String name, long value) throws GeneralException
TypesetterOptions
setCountOption
in interface TypesetterOptions
name
- the name of the registervalue
- the value
GeneralException
- in case of an errorTypesetterOptions.setCountOption(
java.lang.String,
long)
public void setDelcode(UnicodeChar c, MathDelimiter delimiter, boolean global)
Context
setDelcode
in interface Context
c
- the character to which the delcode is assigneddelimiter
- the delimiter codeglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyde.dante.extex.interpreter.context.Context#setDelcode(
de.dante.util.UnicodeChar,
de.dante.extex.typesetter.type.math.MathDelimiter,
boolean)
public void setDimen(java.lang.String name, Dimen value, boolean global) throws InterpreterException
ContextDimen
Dimen
register in all requested groups. Dimen registers are named, either with
a number or an arbitrary string. The numbered registers where limited to
256 in
setDimen
in interface ContextDimen
name
- the name or the number of the registervalue
- the new value of the registerglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
InterpreterException
- in case of problems in an observerContextDimen.setDimen(
java.lang.String,
de.dante.extex.interpreter.type.dimen.Dimen,
boolean)
public void setDimen(java.lang.String name, long value, boolean global) throws InterpreterException
ContextDimen
Dimen
register in all requested groups. Dimen registers are named, either with
a number or an arbitrary string. The numbered registers where limited to
256 in
setDimen
in interface ContextDimen
name
- the name or the number of the registervalue
- the new value of the registerglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
InterpreterException
- in case of problems in an observerContextDimen.setDimen(
java.lang.String,
long, boolean)
public void setFont(java.lang.String name, Font font, boolean global)
ContextFont
setFont
in interface ContextFont
name
- the name or the number of the registerfont
- the new Font valueglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContextFont.setFont(
java.lang.String,
de.dante.extex.interpreter.type.font.Font,
boolean)
public void setFontFactory(FontFactory factory)
ContextFont
setFontFactory
in interface ContextFont
factory
- the font factory to set.ContextFont.setFontFactory(
de.dante.extex.font.FontFactory)
public void setGlue(java.lang.String name, Glue value, boolean global) throws InterpreterException
Context
setGlue
in interface Context
name
- the name of the glue registervalue
- the glue value to setglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
InterpreterException
- in case of an errorContext.setGlue(java.lang.String,
de.dante.extex.interpreter.type.glue.Glue, boolean)
public void setId(java.lang.String theId)
setId
in interface Context
theId
- the id stringContext.setId(java.lang.String)
public void setInFile(java.lang.String name, InFile file, boolean global)
ContextFile
InFile
register in all requested groups. InFile registers are named, either with
a number or an arbitrary string. The numbered registers where limited to
16 in
setInFile
in interface ContextFile
name
- the name or the number of the file registerfile
- the input file descriptorglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContextFile.setInFile(
java.lang.String,
de.dante.extex.interpreter.type.file.InFile, boolean)
public void setInteraction(Interaction interaction) throws InterpreterException
ContextInteraction
setInteraction
in interface ContextInteraction
interaction
- the new value of the interaction
InterpreterException
- in case of an errorContextInteraction.setInteraction(
de.dante.extex.interpreter.interaction.Interaction)
public void setLanguageManager(LanguageManager manager) throws ConfigurationException
Context
setLanguageManager
in interface Context
manager
- the language manager
ConfigurationException
- in case of an configuration errorLanguageManagerCarrier.setLanguageManager(
de.dante.extex.language.LanguageManager)
public void setLccode(UnicodeChar uc, UnicodeChar lc, boolean global)
Context
setLccode
in interface Context
uc
- upper case characterlc
- lower case equivalentglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setLccode(
de.dante.util.UnicodeChar,
de.dante.util.UnicodeChar,
boolean)
public void setMagnification(long mag, boolean lock) throws HelpingException
setMagnification
in interface Context
mag
- the new magnification factorlock
- lock the new value. Thus it can not be alterd afterwards.
HelpingException
- in case that the magnification factor is
not in the allowed range or that the magnification has been
set to a different value earlier.Context.setMagnification(long, boolean)
public void setMark(java.lang.Object name, Tokens mark)
ContextMark
setMark
in interface ContextMark
name
- the name of the markmark
- the vale of the markContextMark.setMark(
java.lang.Object,
de.dante.extex.interpreter.type.tokens.Tokens)
public void setMathcode(UnicodeChar c, MathCode code, boolean global)
Context
setMathcode
in interface Context
c
- the character indexcode
- the new math codeglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setMathcode(
de.dante.util.UnicodeChar,
MathCode, boolean)
public void setMuskip(java.lang.String name, Muskip value, boolean global)
Context
setMuskip
in interface Context
name
- the name or the number of the registervalue
- the new valueglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setMuskip(
java.lang.String,
de.dante.extex.interpreter.type.muskip.Muskip, boolean)
public void setNamespace(java.lang.String namespace, boolean global)
Context
setNamespace
in interface Context
namespace
- the new name spaceglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setNamespace(
java.lang.String, boolean)
public void setOutFile(java.lang.String name, OutFile file, boolean global)
ContextFile
setOutFile
in interface ContextFile
name
- the name or the number of the file registerfile
- the descriptor of the output fileglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContextFile.setOutFile(
java.lang.String,
de.dante.extex.interpreter.type.file.OutFile, boolean)
public void setParshape(ParagraphShape shape)
TypesetterOptions
setParshape
in interface Context
shape
- the new paragraph shapeContext.setParshape(
de.dante.extex.typesetter.paragraphBuilder.ParagraphShape)
public void setSfcode(UnicodeChar c, Count code, boolean global)
Context
setSfcode
in interface Context
c
- the Unicode character to assign the sfcode tocode
- the new sfcodeglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setSfcode(
de.dante.util.UnicodeChar,
de.dante.extex.interpreter.type.count.Count, boolean)
public void setSplitMark(java.lang.Object name, Tokens mark)
ContextMark
setSplitMark
in interface ContextMark
name
- the name of the markmark
- the vale of the markContextMark.setSplitMark(
java.lang.Object,
de.dante.extex.interpreter.type.tokens.Tokens)
public void setStandardTokenStream(TokenStream standardTokenStream)
setStandardTokenStream
in interface Context
standardTokenStream
- the standardTokenStream to set.Context.getStandardTokenStream()
public void setTokenFactory(TokenFactory factory)
setTokenFactory
in interface Context
factory
- the new value of the factoryContext.setTokenFactory(
de.dante.extex.scanner.type.token.TokenFactory)
public void setToks(java.lang.String name, Tokens toks, boolean global) throws InterpreterException
ContextTokens
Tokens
register in the specified groups. Tokens registers are named, either with
a number or an arbitrary string. The numbered registers where limited to
256 in
setToks
in interface ContextTokens
name
- the name or the number of the registertoks
- the new value of the registerglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected only
InterpreterException
- in case of a problem in an observerContextTokens.setToks(java.lang.String,
de.dante.extex.interpreter.type.tokens.Tokens, boolean)
public void setUccode(UnicodeChar lc, UnicodeChar uc, boolean global)
Context
setUccode
in interface Context
lc
- lower case characteruc
- uppercase equivalentglobal
- the indicator for the scope; true
means all
groups; otherwise the current group is affected onlyContext.setUccode(
de.dante.util.UnicodeChar,
de.dante.util.UnicodeChar,
boolean)
public void startMarks()
ContextMark
startMarks
in interface ContextMark
ContextMark.startMarks()
public java.util.Iterator unitIterator()
Context
unitIterator
in interface Context
Context.unitIterator()
public void unregisterCodeChangeObserver(Token name, CodeObserver observer)
CodeObservable
unregisterCodeChangeObserver
in interface CodeObservable
name
- the token to be observed. This should be a macro or
active character token.observer
- the observer to receive the eventsCodeObservable.unregisterCodeChangeObserver(
de.dante.extex.scanner.type.token.Token,
de.dante.extex.interpreter.context.observer.code.CodeObserver)
public void unregisterConditionalObserver(ConditionalObserver observer)
ConditionalObservable
unregisterConditionalObserver
in interface ConditionalObservable
observer
- the observer to receive the eventsConditionalObservable.unregisterConditionalObserver(
de.dante.extex.interpreter.context.observer.conditional.ConditionalObserver)
public void unregisterCountObserver(java.lang.String name, CountObserver observer)
CountObservable
A single count register can be observed by giving a name of the count register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.
If this name is null
then the observer for all registers
is removed. Note that the observers for named registers are not
effected. They have to be unregistered individually.
unregisterCountObserver
in interface CountObservable
name
- the name or the number of the registerobserver
- the observer to receive the eventsCountObservable.unregisterCountObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.count.CountObserver)
public void unregisterDimenObserver(java.lang.String name, DimenObserver observer)
DimenObservable
A single dimen register can be observed by giving a name of the dimen register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.
If this name is null
then the observer for all registers
is removed. Note that the observers for named registers are not
effected. They have to be unregistered individually.
unregisterDimenObserver
in interface DimenObservable
name
- the name or the number of the registerobserver
- the observer to receive the eventsDimenObservable.unregisterDimenObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.dimen.DimenObserver)
public void unregisterGlueObserver(java.lang.String name, GlueObserver observer)
GlueObservable
A single glue register can be observed by giving a name of the glue register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.
If this name is null
then the observer for all registers
is removed. Note that the observers for named registers are not
effected. They have to be unregistered individually.
unregisterGlueObserver
in interface GlueObservable
name
- the name or the number of the registerobserver
- the observer to receive the eventsGlueObservable.unregisterGlueObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.glue.GlueObserver)
public void unregisterGroupObserver(GroupObserver observer)
GroupObservable
unregisterGroupObserver
in interface GroupObservable
observer
- the observer to receive the eventsGroupObservable.unregisterGroupObserver(
de.dante.extex.interpreter.context.observer.group.GroupObserver)
public void unregisterInteractionObserver(InteractionObserver observer)
InteractionObservable
unregisterInteractionObserver
in interface InteractionObservable
observer
- the observer to receive the eventsInteractionObservable.unregisterInteractionObserver(
de.dante.extex.interpreter.context.observer.interaction.InteractionObserver)
public void unregisterLoadObserver(LoadedObserver observer)
LoadedObservable
unregisterLoadObserver
in interface LoadedObservable
observer
- the observer to receive the eventsLoadedObservable.unregisterLoadObserver(
de.dante.extex.interpreter.context.observer.load.LoadedObserver)
public void unregisterTokensChangeObserver(java.lang.String name, TokensObserver observer)
TokensObservable
unregisterTokensChangeObserver
in interface TokensObservable
name
- the token to be observed. This should be a macro or
active character token.observer
- the observer to receive the eventsTokensObservable.unregisterTokensChangeObserver(
java.lang.String,
de.dante.extex.interpreter.context.observer.tokens.TokensObserver)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |