|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.interpreter.max.context.GroupImpl
public class GroupImpl
This is a simple implementation for a group. The whole stack of groups is implemented as a linked list. The list itself is mixed within the pure elements of the linked list.
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
GroupImpl(Group nextGroup)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
afterGroup(AfterGroupObserver observer)
Register an observer to be invoked after the group has been closed. |
void |
afterGroup(Token t)
Add the token to the tokens to be inserted after the group is closed. |
java.lang.Object |
get(java.lang.Object extension,
java.lang.Object key)
Get some extension object stored in the group. |
Tokens |
getAfterGroup()
Getter for the tokens which are inserted after the group has been closed. |
Box |
getBox(java.lang.String name)
Getter for the boxregister. |
Catcode |
getCatcode(UnicodeChar c)
Getter for the category code of a character. |
Code |
getCode(CodeToken token)
Getter for the definition of an active character or macro. |
protected Code |
getCodeForToken(CodeToken token)
Recurse down the group stack and search for the definition of a token. |
Count |
getCount(java.lang.String name)
Getter for the named count register in the current group. |
MathDelimiter |
getDelcode(UnicodeChar c)
Getter for the delimiter code of a character. |
Dimen |
getDimen(java.lang.String name)
Getter for the named dimen register in the current group. |
Font |
getFont(java.lang.String name)
Getter for the current font. |
boolean |
getIf(java.lang.String name)
Getter for the boolean value. |
InFile |
getInFile(java.lang.String name)
Getter for a input file register. |
UnicodeChar |
getLccode(UnicodeChar lc)
Getter for the lccode mapping of upper case characters to their lower case equivalent. |
long |
getLevel()
Getter for the group level. |
Locator |
getLocator()
Getter for the locator describing where the group started. |
MathCode |
getMathcode(UnicodeChar c)
Getter for the math code of a character. |
Muskip |
getMuskip(java.lang.String name)
Getter for the named muskip register in the current group. |
java.lang.String |
getNamespace()
Getter for the name space. |
Group |
getNext()
Getter for the next group in the linked list. |
OutFile |
getOutFile(java.lang.String name)
Getter for the output file descriptor. |
FixedCount |
getSfcode(UnicodeChar c)
Getter for the space factor code of a character. |
Glue |
getSkip(java.lang.String name)
Getter for the named skip register in the current group. |
TokenStream |
getStandardTokenStream()
Getter for standardTokenStream. |
Token |
getStart()
Getter for the token which started the group. |
Tokens |
getToks(java.lang.String name)
Getter for the named toks register in the current group. |
Tokens |
getToksOrNull(java.lang.String name)
Getter for the named toks register in the current group. |
GroupType |
getType()
Getter for the group type. |
TypesettingContext |
getTypesettingContext()
Getter for the typesetting context. |
UnicodeChar |
getUccode(UnicodeChar uc)
Getter for the uccode mapping of lower case characters to their upper case equivalent. |
void |
runAfterGroup()
Invoke all registered observers for the end-of-group event. |
void |
set(java.lang.Object extension,
java.lang.Object key,
java.lang.Object value,
boolean global)
Store some extension object in the group. |
void |
setBox(java.lang.String name,
Box value,
boolean global)
Setter for the box
register in all requested groups. |
void |
setCatcode(UnicodeChar uc,
Catcode code,
boolean global)
Setter for the catcode of a character in the specified groups. |
void |
setCode(Token token,
Code code,
boolean global)
Setter for active characters or macros in the requested group. |
void |
setCount(java.lang.String name,
Count value,
boolean global)
Setter for a count register in the requested groups. |
void |
setDelcode(UnicodeChar uc,
MathDelimiter code,
boolean global)
Setter for the delimiter code of a character. |
void |
setDimen(java.lang.String name,
Dimen value,
boolean global)
Setter for a dimen register in the requested groups. |
void |
setFont(java.lang.String name,
Font font,
boolean global)
Setter for the font with a given name. |
void |
setIf(java.lang.String name,
boolean value,
boolean global)
Setter for the value of the booleans in all groups. |
void |
setInFile(java.lang.String name,
InFile file,
boolean global)
Setter for an input file. |
void |
setLccode(UnicodeChar lc,
UnicodeChar uc,
boolean global)
Declare the translation from an upper case character to a lower case character. |
void |
setLocator(Locator locator)
Setter for locator. |
void |
setMathcode(UnicodeChar uc,
MathCode code,
boolean global)
Setter for the math code of a character. |
void |
setMuskip(java.lang.String name,
Muskip value,
boolean global)
Setter for the muskip register in the requested groups. |
void |
setNamespace(java.lang.String theNamespace,
boolean global)
Setter for the name space. |
void |
setOutFile(java.lang.String name,
OutFile file,
boolean global)
Setter for the output file for a given name. |
void |
setSfcode(UnicodeChar uc,
Count code,
boolean global)
Setter for the space factor code of a character. |
void |
setSkip(java.lang.String name,
Glue value,
boolean global)
Setter for a skip register in all groups. |
void |
setStandardTokenStream(TokenStream standardTokenStream)
Setter for standard Token stream. |
void |
setStart(Token start)
Setter for start token. |
void |
setToks(java.lang.String name,
Tokens value,
boolean global)
Setter for a toks register in all groups. |
void |
setType(GroupType type)
Setter for the type. |
void |
setTypesettingContext(TypesettingContext context,
boolean global)
Setter for the typesetting context in the specified groups. |
void |
setUccode(UnicodeChar uc,
UnicodeChar lc,
boolean global)
Declare the translation from a lower case character to an upper case character. |
java.lang.String |
toString()
Get the string representation of this object for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
public GroupImpl(Group nextGroup)
nextGroup - the next group in the stack. If the value is
null then this is the global base| Method Detail |
|---|
public void afterGroup(AfterGroupObserver observer)
afterGroup in interface Groupobserver - the observer to registerGroup.afterGroup(
AfterGroupObserver)public void afterGroup(Token t)
afterGroup in interface Groupt - the token to addGroup.afterGroup(
org.extex.scanner.type.token.Token)
public java.lang.Object get(java.lang.Object extension,
java.lang.Object key)
get in interface Groupextension - the reference for the extensionkey - the key of the object
null if none is thereGroup.get( java.lang.Object,
java.lang.Object)public Tokens getAfterGroup()
getAfterGroup in interface GroupGroup.getAfterGroup()public Box getBox(java.lang.String name)
boxregister.
Count registers are named, either with a number or an arbitrary string.
The numbered registers where limited to 256 in
getBox in interface Groupname - the name or number of the count register
null if it is not definedGroup.getBox( java.lang.String)public Catcode getCatcode(UnicodeChar c)
getCatcode in interface GroupgetCatcode in interface Tokenizerc - the Unicode character to analyze
Tokenizer.getCatcode( org.extex.core.UnicodeChar)public Code getCode(CodeToken token)
getCode in interface Grouptoken - the name of the active character or macro
null if none is
defined yetGroup.getCode( CodeToken)protected Code getCodeForToken(CodeToken token)
token - the token to look-up the definition for
null if none is
found.public Count getCount(java.lang.String name)
Note: The number of count registers is not limited to 256 as in
As a default value 0 is returned.
getCount in interface Groupname - the name of the count register
Group.getCount( java.lang.String)public MathDelimiter getDelcode(UnicodeChar c)
getDelcode in interface Groupc - the character to get the delimiter code for
Group.getDelcode(
org.extex.core.UnicodeChar)public Dimen getDimen(java.lang.String name)
Note: The number of dimen registers is not limited to 256 as in
As a default value 0 is returned.
getDimen in interface Groupname - the name of the dimen register
Group.getDimen( java.lang.String)public Font getFont(java.lang.String name)
getFont in interface Groupname - the name of the font
Group.getFont( java.lang.String)public boolean getIf(java.lang.String name)
getIf in interface Groupname - the name of the boolean
Group.getIf( java.lang.String)public InFile getInFile(java.lang.String name)
null is returned. If the name is
null then the default input stream is used.
getInFile in interface Groupname - the name or the number of the file register
Group.getInFile( java.lang.String)public UnicodeChar getLccode(UnicodeChar lc)
getLccode in interface Grouplc - the upper case character
Group.getLccode(
org.extex.core.UnicodeChar)public long getLevel()
getLevel in interface GroupGroup.getLevel()public Locator getLocator()
getLocator in interface GroupGroup.getLocator()public MathCode getMathcode(UnicodeChar c)
getMathcode in interface Groupc - the character to get the math code for
Group.getMathcode(
org.extex.core.UnicodeChar)public Muskip getMuskip(java.lang.String name)
As a default value 0 is returned.
getMuskip in interface Groupname - the name of the count register
Group.getMuskip( java.lang.String)public java.lang.String getNamespace()
getNamespace in interface GroupgetNamespace in interface TokenizerGroup.getNamespace()public Group getNext()
getNext in interface GroupGroup.getNext()public OutFile getOutFile(java.lang.String name)
getOutFile in interface Groupname - the name of the descriptor to get
Group.getOutFile(
java.lang.String)public FixedCount getSfcode(UnicodeChar c)
getSfcode in interface Groupc - the character for which the sfcode is requested
Group.getSfcode(
org.extex.core.UnicodeChar)public Glue getSkip(java.lang.String name)
As a default value 0 is returned.
getSkip in interface Groupname - the name of the count register
Group.getSkip( java.lang.String)public TokenStream getStandardTokenStream()
getStandardTokenStream in interface GroupGroup.getStandardTokenStream()public Token getStart()
getStart in interface GroupGroup.getStart()public Tokens getToks(java.lang.String name)
As a default value the empty toks register is returned.
getToks in interface Groupname - the name of the toks register
Group.getToks( java.lang.String)public Tokens getToksOrNull(java.lang.String name)
getToksOrNull in interface Groupname - the name of the toks register
null if none is
definedGroup.getToksOrNull(java.lang.String)public GroupType getType()
getType in interface GroupGroup.getType()public TypesettingContext getTypesettingContext()
getTypesettingContext in interface GroupGroup.getTypesettingContext()public UnicodeChar getUccode(UnicodeChar uc)
getUccode in interface Groupuc - the upper case character
Group.getUccode(
org.extex.core.UnicodeChar)
public void runAfterGroup()
throws HelpingException
runAfterGroup in interface GroupHelpingException - in case of an errorGroup.runAfterGroup()
public void set(java.lang.Object extension,
java.lang.Object key,
java.lang.Object value,
boolean global)
set in interface Groupextension - the reference for the extensionkey - the key of the objectvalue - the value to storeglobal - the indicator that the assignment should be performed
globallyGroup.set( java.lang.Object,
java.lang.Object, java.lang.Object, boolean)
public void setBox(java.lang.String name,
Box value,
boolean global)
box
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
setBox in interface Groupname - 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 onlyGroup.setBox( java.lang.String,
org.extex.interpreter.type.box.Box, boolean)
public void setCatcode(UnicodeChar uc,
Catcode code,
boolean global)
setCatcode in interface Groupuc - the charactercode - the catcodeglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setCatcode(
org.extex.core.UnicodeChar, org.extex.scanner.type.Catcode, boolean)
public void setCode(Token token,
Code code,
boolean global)
setCode in interface Grouptoken - the name of the active character, i.e. a single letter
stringcode - the new codeglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setCode(
org.extex.scanner.type.token.Token, org.extex.interpreter.type.Code,
boolean)
public void setCount(java.lang.String name,
Count value,
boolean global)
setCount in interface Groupname - the name of the count registervalue - the value of the count registerglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setCount( java.lang.String,
org.extex.core.count.Count, boolean)
public void setDelcode(UnicodeChar uc,
MathDelimiter code,
boolean global)
setDelcode in interface Groupuc - the character to set the delimiter code forcode - the new delimiter codeglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setDelcode(
org.extex.core.UnicodeChar, MathDelimiter, boolean)
public void setDimen(java.lang.String name,
Dimen value,
boolean global)
setDimen in interface Groupname - the name of the count registervalue - the value of the count registerglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setDimen( java.lang.String,
org.extex.core.dimen.Dimen, boolean)
public void setFont(java.lang.String name,
Font font,
boolean global)
setFont in interface Groupname - the name of the fontfont - the new fontglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setFont( java.lang.String,
org.extex.typesetter.tc.font.Font, boolean)
public void setIf(java.lang.String name,
boolean value,
boolean global)
setIf in interface Groupname - the name of the booleanvalue - the truth valueglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setIf( java.lang.String,
boolean, boolean)
public void setInFile(java.lang.String name,
InFile file,
boolean global)
setInFile in interface Groupname - the name of the input filefile - the input file specificationglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setInFile( java.lang.String,
org.extex.scanner.type.file.InFile, boolean)
public void setLccode(UnicodeChar lc,
UnicodeChar uc,
boolean global)
setLccode in interface Groupuc - upper case characterlc - lower case equivalentglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setLccode(
org.extex.core.UnicodeChar, org.extex.core.UnicodeChar, boolean)public void setLocator(Locator locator)
setLocator in interface Grouplocator - the locator to set
public void setMathcode(UnicodeChar uc,
MathCode code,
boolean global)
setMathcode in interface Groupuc - the character to set the math code forcode - the new math codeglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setMathcode(
org.extex.core.UnicodeChar, MathCode, boolean)
public void setMuskip(java.lang.String name,
Muskip value,
boolean global)
setMuskip in interface Groupname - the name of the registervalue - the value of the registerglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setMuskip( java.lang.String,
org.extex.core.muskip.Muskip, boolean)
public void setNamespace(java.lang.String theNamespace,
boolean global)
setNamespace in interface GrouptheNamespace - the new name spaceglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setNamespace(
java.lang.String, boolean)
public void setOutFile(java.lang.String name,
OutFile file,
boolean global)
setOutFile in interface Groupname - the name of the output filefile - the output file specificationglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setOutFile(
java.lang.String, org.extex.scanner.type.file.OutFile, boolean)
public void setSfcode(UnicodeChar uc,
Count code,
boolean global)
setSfcode in interface Groupuc - the character to set the space factor code forcode - the new space factor codeglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setSfcode(
org.extex.core.UnicodeChar, org.extex.core.count.Count, boolean)
public void setSkip(java.lang.String name,
Glue value,
boolean global)
setSkip in interface Groupname - the name of the count registervalue - the value of the count registerglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setSkip( java.lang.String,
org.extex.core.glue.Glue, boolean)public void setStandardTokenStream(TokenStream standardTokenStream)
setStandardTokenStream in interface GroupstandardTokenStream - the standardTokenStream to set.Group.setStandardTokenStream(
org.extex.scanner.api.TokenStream)public void setStart(Token start)
setStart in interface Groupstart - the start token to set
public void setToks(java.lang.String name,
Tokens value,
boolean global)
setToks in interface Groupname - the name of the toks registervalue - the value of the toks registerglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setToks( java.lang.String,
org.extex.scanner.type.tokens.Tokens, boolean)public void setType(GroupType type)
setType in interface Grouptype - the type of the groupGroup.setType(
org.extex.interpreter.context.group.GroupType)
public void setTypesettingContext(TypesettingContext context,
boolean global)
setTypesettingContext in interface Groupcontext - the new typesetting contextglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setTypesettingContext(
org.extex.typesetter.tc.TypesettingContext, boolean)
public void setUccode(UnicodeChar uc,
UnicodeChar lc,
boolean global)
setUccode in interface Groupuc - lower case characterlc - uppercase equivalentglobal - the indicator for the scope; true means all
groups; otherwise the current group is affected onlyGroup.setUccode(
org.extex.core.UnicodeChar, org.extex.core.UnicodeChar, boolean)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||