|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.interpreter.type.AbstractCode
org.extex.interpreter.type.AbstractAssignment
org.extex.unit.base.register.toks.AbstractToks
org.extex.unit.base.register.toks.ToksParameter
public class ToksParameter
This class provides an implementation for the primitive \toks.
It sets the numbered toks register to the value given, and as a side effect
all prefixes are zeroed.
Example:
\toks12{123}
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
ToksParameter(CodeToken token)
Creates a new object. |
|
ToksParameter(CodeToken token,
java.lang.String key)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
assign(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
The method assign is the core of the functionality of execute(). |
void |
configure(Configuration config)
Configure an object according to a given Configuration. |
Tokens |
convertTokens(Context context,
TokenSource source,
Typesetter typesetter)
This method converts a register into tokens. |
protected void |
expand(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter,
java.lang.String key)
Scan the tokens between { and } and store
them in the named tokens register. |
protected java.lang.String |
getKey(Context context,
TokenSource source,
Typesetter typesetter)
Return the key (the name of the primitive) for the numbered tokens register. |
static java.lang.String |
getKey(java.lang.String name,
Context context)
Return the key for a named toks register. |
void |
init(Context context,
TokenSource source,
Typesetter typesetter)
Initialize the Code with some value coming from a String. |
Tokens |
the(Context context,
TokenSource source,
Typesetter typesetter)
Return the register value as Tokens for \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 |
| Field Detail |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
public ToksParameter(CodeToken token)
token - the initial token for the primitive
public ToksParameter(CodeToken token,
java.lang.String key)
token - the initial token for the primitivekey - the key| Method Detail |
|---|
public static java.lang.String getKey(java.lang.String name,
Context context)
name - the name of the registercontext - the interpreter context to use
public void configure(Configuration config)
config - the configuration object to considerorg.extex.framework.configuration.Configurable#configure(
org.extex.framework.configuration.Configuration)
protected java.lang.String getKey(Context context,
TokenSource source,
Typesetter typesetter)
throws TypesetterException
getKey in class AbstractTokscontext - the interpreter context to usesource - the source for new tokenstypesetter - the typesetter
TypesetterException - in case of an error in the typesetterAbstractToks.getKey(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
public void init(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
init in interface InitializableCodecontext - the interpreter contextsource - the source of information for the initializationtypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterInitializableCode.init(
org.extex.interpreter.context.Context, TokenSource, Typesetter)
public void assign(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
execute().
This method is preferable to execute() since the
execute() method provided in this class takes care of
\afterassignment and \globaldefs as well.
assign in class AbstractAssignmentprefix - the prefix controlling the executioncontext - the interpreter contextsource - the token sourcetypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterAbstractAssignment.assign(
org.extex.interpreter.Flags, org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
public Tokens convertTokens(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
convertTokens in interface TokensConvertiblecontext - the interpreter contextsource - the source for new tokenstypesetter - the typesetter to use for conversion
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterTokensConvertible.convertTokens(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
protected void expand(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter,
java.lang.String key)
throws GeneralException
{ and } and store
them in the named tokens register.
prefix - the prefix flagscontext - the interpreter contextsource - the token sourcetypesetter - the typesetterkey - the key
GeneralException - in case of an error
public Tokens the(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
Tokens for \the.
the in interface Theablecontext - the interpreter contextsource - the source for further tokens to qualify the requesttypesetter - the typesetter to use
HelpingException - in case of an error
TypesetterException - in case of an errorTheable.the(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, Typesetter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||