org.extex.unit.tex
Class TexUnitInfo

java.lang.Object
  extended by org.extex.interpreter.unit.UnitInfo
      extended by org.extex.unit.tex.TexUnitInfo
All Implemented Interfaces:
java.io.Serializable, Configurable, LogEnabled, LoadedObserver, Loader

public class TexUnitInfo
extends UnitInfo
implements Configurable, Loader, LoadedObserver, LogEnabled

This class provides the setup for the unit tex.

Tracing

Tracing is TeX is controlled by some count registers. The implementation in ExTeX is based on observers. In the first stage a CountObserver for the controlling count is registered. In this observer the observer for the real event is registered if this as not been done before and the value of the controlling count is greater than 0.

This strategies tries to achieve that the overhead for the normal mode of operation is minimized. Here only the controlling cont has to be watched. The observer list for the event to be traced is empty and does not impose any performance overhead.

The Count Parameter \tracingonline

This count register \tracingonline determines whether the tracing should go into the log file only or put on the standard output stream as well. If the value is less than 1 then the tracing goes to the log file only. Otherwise logging is duplicated to the console as well.

The Parameter \tracingcommands

This count register determines whether the execution of commands should be traced. If the value is less or equal than 0 then no tracing is performed. If the value is greater than 0 then the tokens are logged before they are executed.

Version:
$Revision:4431 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The field serialVersionUID contains the version number for serialization.
 
Constructor Summary
TexUnitInfo()
          Creates a new object.
 
Method Summary
 void configure(Configuration config)
          Configure an object according to a given Configuration.
 void enableLogging(java.util.logging.Logger log)
          Setter for the logger.
 void load(Context context, TokenSource source, Typesetter typesetter)
          Perform a load operation.
protected  java.lang.Object readResolve()
          Return the singleton constant object after the serialized instance has been read back in.
 void receiveLoaded(Context context, TokenSource source, Typesetter typesetter)
          Receive a notification on the loading of a context.
 
Methods inherited from class org.extex.interpreter.unit.UnitInfo
getName, setName, setTypesetter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The field serialVersionUID contains the version number for serialization.

See Also:
Constant Field Values
Constructor Detail

TexUnitInfo

public TexUnitInfo()
Creates a new object.

Method Detail

configure

public void configure(Configuration config)
               throws ConfigurationException
Configure an object according to a given Configuration.

Specified by:
configure in interface Configurable
Parameters:
config - the configuration object to consider
Throws:
ConfigurationException - in case that something went wrong
See Also:
Configurable.configure( org.extex.framework.configuration.Configuration)

enableLogging

public void enableLogging(java.util.logging.Logger log)
Setter for the logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
log - the logger to use
See Also:
LogEnabled.enableLogging( java.util.logging.Logger)

load

public void load(Context context,
                 TokenSource source,
                 Typesetter typesetter)
          throws HelpingException
Perform a load operation.

Specified by:
load in interface Loader
Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
Throws:
HelpingException - in case of an error
See Also:
Loader.load( org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)

readResolve

protected java.lang.Object readResolve()
Return the singleton constant object after the serialized instance has been read back in.

Returns:
the instance of this object

receiveLoaded

public void receiveLoaded(Context context,
                          TokenSource source,
                          Typesetter typesetter)
                   throws HelpingException
Receive a notification on the loading of a context.

Specified by:
receiveLoaded in interface LoadedObserver
Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
Throws:
HelpingException - in case of an error
See Also:
LoadedObserver.receiveLoaded( org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, Typesetter)