TuringSim
C++ framework to simulate abstract computing models
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TuringSim::Transition::ConfigurationDoesNotMatchException< TransitionType > Class Template Reference

Exception thrown when we try to apply a transition to a configuration which does not match. More...

#include <transition.h>

Inheritance diagram for TuringSim::Transition::ConfigurationDoesNotMatchException< TransitionType >:
Inheritance graph
[legend]
Collaboration diagram for TuringSim::Transition::ConfigurationDoesNotMatchException< TransitionType >:
Collaboration graph
[legend]

Public Member Functions

 ConfigurationDoesNotMatchException ()=delete
 ConfigurationDoesNotMatchException must be build with interesting data.
 
 ConfigurationDoesNotMatchException (std::string message, typename TransitionType::StateType_ preState, typename TransitionType::StorageType_ storage, typename TransitionType::ApplyHelperType &applyHelper)
 Builds a ConfigurationDoesNotMatchException from its components. More...
 
- Public Member Functions inherited from TuringSim::Utils::MessageException
 MessageException ()=delete
 a message exception must have an explicative message.
 
 MessageException (std::string message) noexcept
 Builds a MessageException with a message. More...
 
 MessageException (const MessageException &e)=default
 Copy constructor. More...
 
 MessageException (MessageException &&e)=default
 Move constructor. More...
 
 ~MessageException () noexcept override=default
 Destructor.
 
std::string getMessage () const
 Get the full error message. More...
 
const char * what () const noexcept override
 Get the full error message. More...
 
 operator std::string () const
 Get the full error message. More...
 

Protected Member Functions

virtual std::string makeFullMessage () const override
 Build the full error message. It should be overridden by derived class that adds data to the exception. More...
 

Protected Attributes

TransitionType transition
 the transition we apply.
 
TransitionType::StateType_ preState
 the state before transition application.
 
TransitionType::StorageType_ storage
 the storage before transition application.
 
TransitionType::ApplyHelperType & applyHelper
 the apply helper provided to apply.

 
- Protected Attributes inherited from TuringSim::Utils::MessageException
std::string msg
 The error message.
 
std::optional< std::string > fullMsg
 The optional full message. Empty until first request.
 

Detailed Description

template<typename TransitionType>
class TuringSim::Transition::ConfigurationDoesNotMatchException< TransitionType >

Exception thrown when we try to apply a transition to a configuration which does not match.

This is a utility class, transition may use or not.

Definition at line 15 of file transition.h.

Constructor & Destructor Documentation

◆ ConfigurationDoesNotMatchException()

template<typename TransitionType >
TuringSim::Transition::ConfigurationDoesNotMatchException< TransitionType >::ConfigurationDoesNotMatchException ( std::string  message,
typename TransitionType::StateType_  preState,
typename TransitionType::StorageType_  storage,
typename TransitionType::ApplyHelperType &  applyHelper 
)
inline

Builds a ConfigurationDoesNotMatchException from its components.

Parameters
messagean explicative message.
preStatethe pre-state that does not match.
storagethe storage involved.
applyHelperthe helper.

Definition at line 27 of file transition.h.

Member Function Documentation

◆ makeFullMessage()

template<typename TransitionType >
virtual std::string TuringSim::Transition::ConfigurationDoesNotMatchException< TransitionType >::makeFullMessage ( ) const
inlineoverrideprotectedvirtual

Build the full error message. It should be overridden by derived class that adds data to the exception.

Returns
the full error message.

This is called the first time the full error is requested, the result is then memoized.

Reimplemented from TuringSim::Utils::MessageException.

Definition at line 40 of file transition.h.


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