Gridarta Editor
net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Reference

Checks for suspicious text lines. More...

+ Inheritance diagram for net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:

Classes

enum  State
 The FSM states. More...
 

Public Member Functions

void empty (@NotNull final ErrorGenerator< G, A, R > generator)
 Processes an empty line of text. More...
 
void eof (@NotNull final ErrorGenerator< G, A, R > generator)
 Will be called at the end of processing. More...
 
void match (@NotNull final ErrorGenerator< G, A, R > generator)
 Processes a @match line. More...
 
void reply (@NotNull final ErrorGenerator< G, A, R > generator)
 Processes a qreply or @question line. More...
 
void reset ()
 Resets the checker state. More...
 
void text (@NotNull final ErrorGenerator< G, A, R > generator)
 Processes a non-empty line of text. More...
 
 TextValidator ()
 Creates a new instance. More...
 

Private Member Functions

void setState (@NotNull final State state)
 Updates state and prints a debug message if it changes. More...
 

Private Attributes

State state = State.N
 The current FSM state. More...
 

Static Private Attributes

static final Category LOG = Logger.getLogger(TextValidator.class)
 The Logger for printing log messages. More...
 

Detailed Description

Checks for suspicious text lines.

Parameters
<G>the game object type of the object
<A>the map arch object type of the object
<R>the archetype type of the object

Definition at line 36 of file TextValidator.java.

Constructor & Destructor Documentation

◆ TextValidator()

Creates a new instance.

Definition at line 53 of file TextValidator.java.

Member Function Documentation

◆ empty()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.empty ( @NotNull final ErrorGenerator< G, A, R >  generator)

Processes an empty line of text.

Parameters
generatorthe generator for error messages

Definition at line 108 of file TextValidator.java.

Referenced by net.sf.gridarta.var.crossfire.model.validation.checks.SuspiciousMsgChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkMessage().

+ Here is the caller graph for this function:

◆ eof()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.eof ( @NotNull final ErrorGenerator< G, A, R >  generator)

Will be called at the end of processing.

Parameters
generatorthe generator for error messages

Definition at line 208 of file TextValidator.java.

Referenced by net.sf.gridarta.var.crossfire.model.validation.checks.SuspiciousMsgChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkMessage().

+ Here is the caller graph for this function:

◆ match()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.match ( @NotNull final ErrorGenerator< G, A, R >  generator)

Processes a @match line.

Parameters
generatorthe generator for error messages

Definition at line 147 of file TextValidator.java.

Referenced by net.sf.gridarta.var.crossfire.model.validation.checks.SuspiciousMsgChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkMessage().

+ Here is the caller graph for this function:

◆ reply()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reply ( @NotNull final ErrorGenerator< G, A, R >  generator)

Processes a qreply or @question line.

Parameters
generatorthe generator for error messages

Definition at line 183 of file TextValidator.java.

Referenced by net.sf.gridarta.var.crossfire.model.validation.checks.SuspiciousMsgChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkMessage().

+ Here is the caller graph for this function:

◆ reset()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reset ( )

Resets the checker state.

Afterwards the state is the same as if a new instance was created.

Definition at line 63 of file TextValidator.java.

Referenced by net.sf.gridarta.var.crossfire.model.validation.checks.SuspiciousMsgChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkMessage().

+ Here is the caller graph for this function:

◆ setState()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setState ( @NotNull final State  state)
private

Updates state and prints a debug message if it changes.

Parameters
statethe new state

Definition at line 240 of file TextValidator.java.

◆ text()

void net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.text ( @NotNull final ErrorGenerator< G, A, R >  generator)

Processes a non-empty line of text.

Parameters
generatorthe generator for error messages

Definition at line 74 of file TextValidator.java.

Referenced by net.sf.gridarta.var.crossfire.model.validation.checks.SuspiciousMsgChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkMessage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ LOG

final Category net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.LOG = Logger.getLogger(TextValidator.class)
staticprivate

The Logger for printing log messages.

Definition at line 42 of file TextValidator.java.

◆ state

State net.sf.gridarta.var.crossfire.model.validation.checks.TextValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.state = State.N
private

The current FSM state.

Definition at line 48 of file TextValidator.java.


The documentation for this class was generated from the following file: