The IStateContext and IStateBehavior interfaces, and the various StateXXX classes used in the State pattern. More...
Go to the source code of this file.
Classes | |
| class | State_Constants |
| Represents constants used in the State machine. This is needed in a separate class because 1) C# requires constants to be defined inside a class or struct and 2) the constant is needed across multiple classes. More... | |
| interface | IStateContext |
| Represents the context as passed to each state class. More... | |
| interface | IStateBehavior |
| Represents a class that implements one state of the state machine. More... | |
| class | State_NormalText |
| Represents normal text behavior. More... | |
| class | State_DoubleQuotedText |
| Represents being inside a double-quote string where filtering is essentially turned off until the end of the string is reached. More... | |
| class | State_SingleQuotedText |
| Represents being inside a single-quoted string where filtering is effectively turned off until the end of the string is reached. More... | |
| class | State_EscapedDoubleQuoteText |
| Represents being in an escaped character sequence inside a double- quoted string. We don't do anything with the escaped character other than output it. Handling escaped characters allows us to more accurately detect the end of the string. More... | |
| class | State_EscapedSingleQuoteText |
| Represents being in an escaped character sequence inside a single- quoted string. We don't do anything with the escaped character other than output it. Handling escaped characters allows us to more accurately detect the end of the string. More... | |
| class | State_StartComment |
| Represents the possible start of a line or block comment. More... | |
| class | State_LineComment |
| Represents being in a line comment. More... | |
| class | State_BlockComment |
| Represents being in a block comment. More... | |
| class | State_EndBlockComment |
| Represents possibly being at the end of a block comment. More... | |
| class | State_Done |
| Represents being done with input. More... | |
| class | State_Factory |
| Class factory for generating the state class instances. More... | |
| class | StateContext_Class |
| Represents the state machine. This maintains the context in which the state machine runs. More... | |
Namespaces | |
| namespace | DesignPatternExamples_csharp |
| The namespace containing all Design Pattern Examples implemented in C#. | |
Enumerations | |
| enum | CurrentState { Initial , NormalText , DoubleQuotedText , SingleQuotedText , EscapedDoubleQuoteText , EscapedSingleQuoteText , StartComment , LineComment , BlockComment , EndBlockComment , Done } |
| Represents the current state of the state machine. More... | |
The IStateContext and IStateBehavior interfaces, and the various StateXXX classes used in the State pattern.
Definition in file State_Class.cs.