de.dante.extex.interpreter.unit.tex
Class TexUnitInfo

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

public class TexUnitInfo
extends UnitInfo
implements 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: 1.1 $
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 enableLogging(java.util.logging.Logger log)
          Setter for the logger.
 void load(Context context, TokenSource source, Typesetter typesetter)
          Perform a load operation.
 void receiveLoaded(Context context, TokenSource source)
          Receive a notification on the loading of a context.
 
Methods inherited from class de.dante.extex.interpreter.unit.UnitInfo
getName, setName, 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

enableLogging

public void enableLogging(java.util.logging.Logger log)
Description copied from interface: LogEnabled
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 InterpreterException
Description copied from interface: Loader
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:
InterpreterException - in case of an error
See Also:
de.dante.extex.interpreter.primitives.dynamic.Loader#load( de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

receiveLoaded

public void receiveLoaded(Context context,
                          TokenSource source)
                   throws InterpreterException
Description copied from interface: LoadedObserver
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
Throws:
InterpreterException - in case of a problem
See Also:
LoadedObserver.receiveLoaded( de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource)