TuringSim
C++ framework to simulate abstract computing models
Public Types | Public Member Functions | List of all members
TuringSim::Symbol::SymbolPattern< SymbolType_, Context_ > Class Template Referenceabstract

Base class to store any symbol pattern on one letter. More...

#include <symbol/symbolPattern.h>

Public Types

typedef SymbolType_ SymbolType
 The type of symbols.
 
typedef Context_ Context
 The type of context.
 

Public Member Functions

 SymbolPattern ()=default
 The default constructor.
 
 SymbolPattern (const SymbolPattern &)=default
 The default copy constructor.
 
 SymbolPattern (SymbolPattern &&)=default
 The default move constructor.
 
SymbolPatternoperator= (const SymbolPattern &)=default
 The default copy assignment operator. More...
 
SymbolPatternoperator= (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...
 

Detailed Description

template<typename SymbolType_, typename Context_>
class TuringSim::Symbol::SymbolPattern< SymbolType_, Context_ >

Base class to store any symbol pattern on one letter.

Template Parameters
SymbolType_The alphabet of the pattern.
Context_The type of the context in which a dynamic symbol should be evaluated.

Definition at line 13 of file symbolPattern.h.

Member Function Documentation

◆ match()

template<typename SymbolType_ , typename Context_ >
virtual bool TuringSim::Symbol::SymbolPattern< SymbolType_, Context_ >::match ( const SymbolType symbol,
const Context context 
) const
pure virtualnoexcept

Test whether a symbol match the pattern, given a context.

Parameters
[in]symbolthe symbol to test.
[in]contextthe context to evaluate the pattern.
Returns
true if and only if the pattern matches.

◆ operator=() [1/2]

template<typename SymbolType_ , typename Context_ >
SymbolPattern& TuringSim::Symbol::SymbolPattern< SymbolType_, Context_ >::operator= ( const SymbolPattern< SymbolType_, Context_ > &  )
default

The default copy assignment operator.

Returns
a reference to *this.

◆ operator=() [2/2]

template<typename SymbolType_ , typename Context_ >
SymbolPattern& TuringSim::Symbol::SymbolPattern< SymbolType_, Context_ >::operator= ( SymbolPattern< SymbolType_, Context_ > &&  )
default

The default move assignment operator.

Returns
a reference to *this.

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