26#include <ext/iostream>
27#include <ext/algorithm>
45class ConstantAlphabet;
70template <
class SymbolType = DefaultSymbolType >
71class FormalRTE final :
public core::Components < FormalRTE < SymbolType >, ext::set < common::ranked_symbol < SymbolType > >, component::Set, std::tuple < GeneralAlphabet, ConstantAlphabet > > {
113 return this->
template accessComponent < GeneralAlphabet > ( ).get ( );
122 return std::move ( this->
template accessComponent < GeneralAlphabet > ( ).
get ( ) );
133 this->
template accessComponent < GeneralAlphabet > ( ).add ( std::move ( symbol ) );
142 this->
template accessComponent < GeneralAlphabet > ( ).add ( std::move ( symbols ) );
151 this->
template accessComponent < GeneralAlphabet > ( ).set ( std::move ( symbols ) );
162 this->
template accessComponent < GeneralAlphabet > ( ).remove ( symbol );
171 return this->
template accessComponent < ConstantAlphabet > ( ).get ( );
180 return std::move ( this->
template accessComponent < ConstantAlphabet > ( ).
get ( ) );
191 this->
template accessComponent < ConstantAlphabet > ( ).add ( std::move ( symbol ) );
200 this->
template accessComponent < ConstantAlphabet > ( ).add ( std::move ( symbols ) );
209 this->
template accessComponent < ConstantAlphabet > ( ).set ( std::move ( symbols ) );
220 this->
template accessComponent < ConstantAlphabet > ( ).remove ( symbol );
275 return out <<
"(FormalRTE " << instance.
getRTE ( ) <<
")";
279template <
class SymbolType >
281 if ( !this->m_rte.getStructure ( ).checkAlphabet ( getAlphabet ( ), getSubstitutionAlphabet ( ) ) )
285template <
class SymbolType >
289template <
class SymbolType >
293template <
class SymbolType >
297template <
class SymbolType >
302template <
class SymbolType >
304 return std::move ( m_rte );
307template <
class SymbolType >
309 if ( !param.getStructure ( ).checkAlphabet ( getAlphabet ( ), getSubstitutionAlphabet ( ) ) )
312 this->m_rte = std::move ( param );
324template <
class SymbolType >
336 return rte.getRTE ( ).getStructure ( ).testSymbol ( symbol );
358 if (
rte.template accessComponent < rte::ConstantAlphabet > ( ).get ( ).count ( symbol ) )
359 throw ::exception::CommonException (
"Symbol " +
ext::to_string ( symbol ) +
" cannot be in general alphabet since it is already in constant alphabet" );
368template <
class SymbolType >
380 return rte.getRTE ( ).getStructure ( ).testSymbol ( symbol );
402 if (
rte.template accessComponent < rte::GeneralAlphabet > ( ).get ( ).count ( symbol ) )
403 throw ::exception::CommonException (
"Symbol " +
ext::to_string ( symbol ) +
" cannot be in constant alphabet since it is already in general alphabet" );
412template <
class SymbolType >
static ext::set< common::ranked_symbol< DefaultSymbolType > > normalizeRankedAlphabet(ext::set< common::ranked_symbol< SymbolType > > &&symbols)
Definition: SymbolNormalize.h:59
Definition: ranked_symbol.hpp:20
Definition: components.hpp:181
Definition: setComponents.hpp:26
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
Definition: BarSymbol.cpp:12
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: normalize.hpp:10
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
std::string to_string(const T &value)
To string method designated for objects that can be casted to string.
Definition: string.hpp:131
Definition: ToFTAGlushkov.h:22
auto & get(ext::ptr_array< Type, N > &tpl)
Specialisation of get function for pointer arrays.
Definition: ptr_array.hpp:693
Definition: normalize.hpp:13