|
TuringSim
C++ framework to simulate abstract computing models
|
Class to encode symbol pattern made of only one symbol. More...
#include <symbol/simpleSymbolPattern.h>


Public Member Functions | |
| SimpleSymbolPattern (const T &acceptedLetter) | |
| Constructor. More... | |
| virtual bool | match (const T &letter) const noexcept override |
| Test if a symbol matches the symbol. More... | |
| const T & | getLetter () const |
| Get the accepted letter, for optimized containers. More... | |
| bool | operator< (const SimpleSymbolPattern &other) const |
| Strict total order. More... | |
Public Member Functions inherited from TuringSim::Symbol::SymbolPattern< T, void > | |
| SymbolPattern ()=default | |
| The default constructor. | |
| SymbolPattern (const SymbolPattern &)=default | |
| The default copy constructor. | |
| SymbolPattern (SymbolPattern &&)=default | |
| The default move constructor. | |
| SymbolPattern & | operator= (const SymbolPattern &)=default |
| The default copy assignment operator. More... | |
| SymbolPattern & | operator= (SymbolPattern &&)=default |
| The default move assignment operator. More... | |
| virtual | ~SymbolPattern ()=default |
| The default virtual destructor. | |
| virtual bool | match (const SymbolType &symbol, const Context &context) const noexcept=0 |
| Test whether a symbol match the pattern, given a context. More... | |
Additional Inherited Members | |
Public Types inherited from TuringSim::Symbol::SymbolPattern< T, void > | |
| typedef T | SymbolType |
| The type of symbols. | |
| typedef void | Context |
| The type of context. | |
Class to encode symbol pattern made of only one symbol.
| T | the type of symbols. |
This is really the simplest pattern you can think of.
Definition at line 13 of file simpleSymbolPattern.h.
|
inline |
Constructor.
| [in] | acceptedLetter | The letter which have to be the pattern. |
The content of the reference is copied.
Complexity \(\mathcal{O}(\text{copy}_\texttt{T})\)
Definition at line 22 of file simpleSymbolPattern.h.
|
inline |
Get the accepted letter, for optimized containers.
Definition at line 41 of file simpleSymbolPattern.h.

|
inlineoverridevirtualnoexcept |
Test if a symbol matches the symbol.
| [in] | letter | Ths symbol to test. |
letter is exactly the accepted letter.The letter letter matches the pattern iff it is equal to the symbol of the pattern.
Complexity \(\mathcal{O}(\texttt{==}_\texttt{T})\)
Definition at line 34 of file simpleSymbolPattern.h.

|
inline |
Strict total order.
| [in] | other | The other value to compare. |
*this is ordered before other. Definition at line 49 of file simpleSymbolPattern.h.