|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.unit.omega.ocp.util.Ocp
public class Ocp
This class represents a loaded OCP instance. It encapsulates an ΩCP program.
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The field serialVersionUID contains the version number for serialization. |
| Constructor Summary | |
|---|---|
Ocp(java.lang.String resource,
OcpProgram program)
Creates a new object. |
|
| Method Summary | |
|---|---|
Ocp |
convertOcp(Context context,
TokenSource source,
Typesetter typesetter)
Convert the value into an ΩPC. |
void |
execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
This method takes the first token and executes it. |
java.lang.String |
getName()
Getter for the name. |
OcpProgram |
getProgram()
Getter for program. |
CodeToken |
getToken()
Getter for the token. |
boolean |
isIf()
This simple little method distinguishes the conditionals from the other primitives. |
boolean |
isOuter()
Getter for the outer flag. |
static Ocp |
load(java.lang.String resource,
ResourceFinder finder)
This is a factory method for OCPs. |
void |
setName(java.lang.String name)
Setter for the name. |
void |
setProgram(OcpProgram program)
Setter for program. |
Tokens |
show(Context context)
This method is the getter for the description of the primitive. |
| 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 Ocp(java.lang.String resource,
OcpProgram program)
throws HelpingException
resource - the name of the resourceprogram - the program
HelpingException - in case of an error| Method Detail |
|---|
public static Ocp load(java.lang.String resource,
ResourceFinder finder)
throws HelpingException,
ConfigurationException
resource - the name of the resourcefinder - the resource finder
null if none is found
HelpingException - in case of an error
ConfigurationException - in case of an configuration error
public Ocp convertOcp(Context context,
TokenSource source,
Typesetter typesetter)
convertOcp in interface OcpConvertiblecontext - the interpreter contextsource - the source for new tokenstypesetter - the typesetter
OcpConvertible.convertOcp(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
public void execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
execute in interface Codeprefix - 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 typesetterCode.execute(
org.extex.interpreter.Flags, org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)public java.lang.String getName()
getName in interface CodeCode.getName()public OcpProgram getProgram()
public boolean isIf()
isIf in interface Codetrue iff this is some sort if \if.Code.isIf()public boolean isOuter()
isOuter in interface Codetrue iff the code is defined outer.Code.isOuter()public void setName(java.lang.String name)
name - the name to setpublic void setProgram(OcpProgram program)
program - the program to set
public Tokens show(Context context)
throws HelpingException
show in interface Showablecontext - the interpreter context
HelpingException - in case of an errorShowable.show(
org.extex.interpreter.context.Context)public CodeToken getToken()
getToken in interface CodeCode.getToken()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||