de.dante.extex.interpreter
Interface Flags

All Known Implementing Classes:
FlagsImpl

public interface Flags

This interface describes a set of named flags.

The flags correspond largely to the prefix macros like \global The following flags are known:

Flag Macro Description
expanded The expanded flag is used internally to signal that expansion should be used for a definition. This is applied in \edef and \xdef.
global \global The global flag controls the scope of assignments like \defs.
immediate \immediate The immediate flag controls the delay of writing operations. This is used in \write and friends.
long \long The long flag controls the matching of macro parameters.
outer \outer The outer flag controls that the macro can not be used at places where tokens are absorbed at high speed.
protected \protected The protected flag controls the expansion of the macro when the argument for \edef and friends is expanded.

Version:
$Revision: 1.25 $
Author:
Gerd Neugebauer

Field Summary
static Flags NONE
          The constant NONE contains an instance where no flags are set.
 
Method Summary
 void clear()
          This method clears all flags.
 boolean clearExpanded()
          Setter for the expanded flag.
 boolean clearGlobal()
          Setter for the global flag.
 boolean clearImmediate()
          Setter for the immediate flag.
 boolean clearLong()
          Setter for the long flag.
 boolean clearOuter()
          Setter for the outer flag.
 boolean clearProtected()
          Setter for the protected flag.
 Flags copy()
          Clone an instance.
 java.lang.String[] get()
          Getter for the text representations of the flags currently set.
 boolean isDirty()
          Test if all flags are cleared.
 boolean isExpanded()
          Getter for the expanded flag.
 boolean isGlobal()
          Getter for the global flag.
 boolean isImmediate()
          Getter for the immediate flag.
 boolean isLong()
          Getter for the long flag.
 boolean isOuter()
          Getter for the outer flag.
 boolean isProtected()
          Getter for the protected flag.
 void set(Flags flags)
          Copy the flag settings from a given instance int this instance.
 void setExpanded()
          Setter for the expanded flag.
 void setGlobal()
          Setter for the global flag.
 void setGlobal(boolean value)
          Setter for the global flag.
 void setImmediate()
          Setter for the immediate flag.
 void setLong()
          Setter for the long flag.
 void setOuter()
          Setter for the outer flag.
 void setProtected()
          Setter for the protected flag.
 java.lang.String toText()
          Determine a printable representation of the flags set.
 

Field Detail

NONE

public static final Flags NONE
The constant NONE contains an instance where no flags are set. Beware of changing this instance!

Method Detail

clear

public void clear()
This method clears all flags.


clearExpanded

public boolean clearExpanded()
Setter for the expanded flag. The flag is reset to false.

Returns:
the old value of the expanded flag
See Also:
isExpanded(), setExpanded()

clearGlobal

public boolean clearGlobal()
Setter for the global flag. The flag is reset to false.

Returns:
the old value of the global flag
See Also:
isGlobal(), setGlobal(), setGlobal(boolean)

clearImmediate

public boolean clearImmediate()
Setter for the immediate flag. The flag is reset to false.

Returns:
the old value of the immediate flag
See Also:
isImmediate(), setImmediate()

clearLong

public boolean clearLong()
Setter for the long flag. The flag is reset to false.

Returns:
the old value of the long flag
See Also:
isLong(), setLong()

clearOuter

public boolean clearOuter()
Setter for the outer flag. The flag is reset to false.

Returns:
the old value of the outer flag
See Also:
isOuter(), setOuter()

clearProtected

public boolean clearProtected()
Setter for the protected flag. The flag is reset to false.

Returns:
the old value of the protected flag
See Also:
isProtected(), setProtected()

copy

public Flags copy()
Clone an instance.

Returns:
a copy of the instance

get

public java.lang.String[] get()
Getter for the text representations of the flags currently set.

Returns:
the array of flag names

isDirty

public boolean isDirty()
Test if all flags are cleared.

Returns:
true iff not all flags are cleared

isExpanded

public boolean isExpanded()
Getter for the expanded flag.

Returns:
the current value of the expanded flag
See Also:
clearExpanded(), setExpanded()

isGlobal

public boolean isGlobal()
Getter for the global flag.

Returns:
the current value of the global flag
See Also:
clearGlobal(), setGlobal(), setGlobal(boolean)

isImmediate

public boolean isImmediate()
Getter for the immediate flag.

Returns:
the current value of the immediate flag
See Also:
clearImmediate(), setImmediate()

isLong

public boolean isLong()
Getter for the long flag.

Returns:
the current value of the long flag
See Also:
clearLong(), setLong()

isOuter

public boolean isOuter()
Getter for the outer flag.

Returns:
the current value of the outer flag
See Also:
clearOuter(), setOuter()

isProtected

public boolean isProtected()
Getter for the protected flag.

Returns:
the current value of the protected flag
See Also:
clearProtected(), setProtected()

set

public void set(Flags flags)
Copy the flag settings from a given instance int this instance.

Parameters:
flags - the flags to copy

setExpanded

public void setExpanded()
Setter for the expanded flag. The flag is set to true.

See Also:
clearExpanded(), isExpanded()

setGlobal

public void setGlobal()
Setter for the global flag. The flag is set to true.

See Also:
clearGlobal(), isGlobal(), setGlobal(boolean)

setGlobal

public void setGlobal(boolean value)
Setter for the global flag. The flag is set to true.

Parameters:
value - the new value for the global flag
See Also:
clearGlobal(), isGlobal(), setGlobal()

setImmediate

public void setImmediate()
Setter for the immediate flag. The flag is set to true.

See Also:
clearImmediate(), isImmediate()

setLong

public void setLong()
Setter for the long flag. The flag is set to true.

See Also:
clearLong(), isLong()

setOuter

public void setOuter()
Setter for the outer flag. The flag is set to true.

See Also:
clearOuter(), isOuter()

setProtected

public void setProtected()
Setter for the protected flag. The flag is set to true.

See Also:
clearProtected(), isProtected()

toText

public java.lang.String toText()
Determine a printable representation of the flags set. The representation takes into account the current locale.

Returns:
the list