Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
alib2data
src
rte
formal
FormalRTESymbol.h
Go to the documentation of this file.
1
6
/*
7
* This file is part of Algorithms library toolkit.
8
* Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
9
10
* Algorithms library toolkit is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
15
* Algorithms library toolkit is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
20
* You should have received a copy of the GNU General Public License
21
* along with Algorithms library toolkit. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
24
#pragma once
25
26
#include <
common/ranked_symbol.hpp
>
27
#include "
FormalRTEElement.h
"
28
29
namespace
rte
{
30
36
template
<
class
SymbolType >
37
class
FormalRTESymbol
{
41
common::ranked_symbol < SymbolType >
m_symbol;
42
43
public
:
49
FormalRTESymbol
(
common::ranked_symbol < SymbolType >
symbol );
50
56
const
common::ranked_symbol < SymbolType >
&
getSymbol
( )
const
&;
57
63
common::ranked_symbol < SymbolType >
&&
getSymbol
( ) &&;
64
};
65
66
template
<
class
SymbolType >
67
FormalRTESymbol < SymbolType >::FormalRTESymbol
(
common::ranked_symbol < SymbolType >
symbol ) : m_symbol ( std::move ( symbol ) ) {
68
}
69
70
template
<
class
SymbolType >
71
const
common::ranked_symbol < SymbolType >
&
FormalRTESymbol < SymbolType >::getSymbol
( )
const
& {
72
return
m_symbol;
73
}
74
75
template
<
class
SymbolType >
76
common::ranked_symbol < SymbolType >
&&
FormalRTESymbol < SymbolType >::getSymbol
( ) && {
77
return
std::move ( m_symbol );
78
}
79
80
}
/* namespace rte */
81
82
extern
template
class
rte::FormalRTESymbol < DefaultSymbolType >
;
83
FormalRTEElement.h
common::ranked_symbol
Definition:
ranked_symbol.hpp:20
rte::FormalRTESymbol
Represents the common part of SubstitutionSymbol and TerminalSymbol.
Definition:
FormalRTESymbol.h:37
rte::FormalRTESymbol::getSymbol
const common::ranked_symbol< SymbolType > & getSymbol() const &
Definition:
FormalRTESymbol.h:71
rte::FormalRTESymbol::FormalRTESymbol
FormalRTESymbol(common::ranked_symbol< SymbolType > symbol)
Creates a new instance of the symbol node using the actual symbol to represent.
Definition:
FormalRTESymbol.h:67
rte
Definition:
ToFTAGlushkov.h:22
ranked_symbol.hpp
Generated on Mon Dec 27 2021 10:21:53 for Algorithms Library Toolkit by
1.9.2