Design Pattern Examples
Overview of object-oriented design patterns
StateContext Struct Reference

Represents the context in which the state machine runs. More...

Collaboration diagram for StateContext:
Collaboration graph

Public Attributes

const char * inputText
 The text being filtered.
 
size_t textIndex
 Index into the text being filtered.
 
char * outputText
 Buffer into which output text is written, character by character.
 
size_t outputTextIndex
 Index of the next point to put the output character.
 
CurrentState currentState
 Value from the CurrentState enumeration indicating the current state of the machine.
 
StateFunctionPtr currentStateBehavior
 Pointer to a function that acts on the current state.
 

Detailed Description

Represents the context in which the state machine runs.

Definition at line 50 of file State_RemoveComments.c.

Member Data Documentation

◆ currentState

CurrentState currentState

Value from the CurrentState enumeration indicating the current state of the machine.

Definition at line 56 of file State_RemoveComments.c.

Referenced by _SetNextState(), and State_RemoveComments().

◆ currentStateBehavior

StateFunctionPtr currentStateBehavior

Pointer to a function that acts on the current state.

Definition at line 57 of file State_RemoveComments.c.

Referenced by _SetNextState(), and State_RemoveComments().

◆ inputText

const char* inputText

The text being filtered.

Definition at line 52 of file State_RemoveComments.c.

Referenced by _GetNextCharacter(), and State_RemoveComments().

◆ outputText

char* outputText

Buffer into which output text is written, character by character.

Definition at line 54 of file State_RemoveComments.c.

Referenced by _OutputCharacter(), and State_RemoveComments().

◆ outputTextIndex

size_t outputTextIndex

Index of the next point to put the output character.

Definition at line 55 of file State_RemoveComments.c.

Referenced by _OutputCharacter(), and State_RemoveComments().

◆ textIndex

size_t textIndex

Index into the text being filtered.

Definition at line 53 of file State_RemoveComments.c.

Referenced by _GetNextCharacter(), and State_RemoveComments().


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