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

Checks that @match, text, @reply, and @question lines occur in the correct order. More...

+ Inheritance diagram for net.sf.gridarta.var.crossfire.model.validation.checks.ReplyValidator< 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.ReplyValidator< 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 match ()
 Processes a @match line. More...
 
void reply (@NotNull final ErrorGenerator< G, A, R > generator)
 Processes a qreply or @question line. More...
 
 ReplyValidator ()
 Creates a new instance. More...
 
void reset ()
 Resets the checker state. More...
 
void text (@NotNull final ErrorGenerator< G, A, R > generator)
 Processes a line of text. 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(ReplyValidator.class)
 The Logger for printing log messages. More...
 

Detailed Description

Checks that @match, text, @reply, and @question lines occur in the correct order.

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 37 of file ReplyValidator.java.

Constructor & Destructor Documentation

◆ ReplyValidator()

Creates a new instance.

Definition at line 54 of file ReplyValidator.java.

Member Function Documentation

◆ match()

◆ reply()

void net.sf.gridarta.var.crossfire.model.validation.checks.ReplyValidator< 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 129 of file ReplyValidator.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.ReplyValidator< 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 64 of file ReplyValidator.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.ReplyValidator< 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 158 of file ReplyValidator.java.

◆ text()

void net.sf.gridarta.var.crossfire.model.validation.checks.ReplyValidator< 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 line of text.

Parameters
generatorthe generator for error messages

Definition at line 75 of file ReplyValidator.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.ReplyValidator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.LOG = Logger.getLogger(ReplyValidator.class)
staticprivate

The Logger for printing log messages.

Definition at line 43 of file ReplyValidator.java.

◆ state

State net.sf.gridarta.var.crossfire.model.validation.checks.ReplyValidator< 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 49 of file ReplyValidator.java.


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