org.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
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:5563 $
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 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 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 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

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

Method Detail

clear

void clear()
This method clears all flags.


clearGlobal

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

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

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

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

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

Flags copy()
Clone an instance.

Returns:
a copy of the instance

get

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

Returns:
the array of flag names

isDirty

boolean isDirty()
Test if all flags are cleared.

Returns:
true iff not all flags are cleared

isGlobal

boolean isGlobal()
Getter for the global flag.

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

isImmediate

boolean isImmediate()
Getter for the immediate flag.

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

isLong

boolean isLong()
Getter for the long flag.

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

isOuter

boolean isOuter()
Getter for the outer flag.

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

isProtected

boolean isProtected()
Getter for the protected flag.

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

set

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

Parameters:
flags - the flags to copy

setGlobal

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

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

setGlobal

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

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

See Also:
clearImmediate(), isImmediate()

setLong

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

See Also:
clearLong(), isLong()

setOuter

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

See Also:
clearOuter(), isOuter()

setProtected

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

See Also:
clearProtected(), isProtected()

toText

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

Returns:
the list