From 8fabb4037efa01b5a1efacebeecc9d9b9fa6ea69 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Sun, 12 May 2019 22:15:38 +0200 Subject: [PATCH] add extern template to rte and strings --- alib2data/src/rte/formal/FormalRTE.cpp | 12 ++++++++++++ alib2data/src/rte/formal/FormalRTE.h | 2 ++ alib2data/src/rte/formal/FormalRTEAlternation.h | 2 ++ alib2data/src/rte/formal/FormalRTEElement.h | 2 ++ alib2data/src/rte/formal/FormalRTEEmpty.h | 2 ++ alib2data/src/rte/formal/FormalRTEIteration.h | 3 +++ alib2data/src/rte/formal/FormalRTEStructure.h | 2 ++ alib2data/src/rte/formal/FormalRTESubstitution.h | 2 ++ alib2data/src/rte/formal/FormalRTESymbol.h | 2 ++ alib2data/src/rte/formal/FormalRTESymbolAlphabet.h | 2 ++ alib2data/src/rte/formal/FormalRTESymbolSubst.h | 2 ++ alib2data/src/string/CyclicString.cpp | 2 ++ alib2data/src/string/CyclicString.h | 2 ++ alib2data/src/string/Epsilon.cpp | 2 ++ alib2data/src/string/Epsilon.h | 2 ++ alib2data/src/string/LinearString.cpp | 2 ++ alib2data/src/string/LinearString.h | 2 ++ alib2data/src/string/WildcardLinearString.cpp | 2 ++ alib2data/src/string/WildcardLinearString.h | 2 ++ 19 files changed, 49 insertions(+) diff --git a/alib2data/src/rte/formal/FormalRTE.cpp b/alib2data/src/rte/formal/FormalRTE.cpp index 211e124ade..35ec403824 100644 --- a/alib2data/src/rte/formal/FormalRTE.cpp +++ b/alib2data/src/rte/formal/FormalRTE.cpp @@ -6,9 +6,21 @@ */ #include "FormalRTE.h" +#include "FormalRTEElements.h" #include <registration/ValuePrinterRegistration.hpp> +template class rte::FormalRTE < >; +template class rte::FormalRTEStructure < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTEElement < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTEAlternation < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTESubstitution < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTEIteration < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTEEmpty < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTESymbol < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTESymbolAlphabet < DefaultSymbolType, DefaultRankType >; +template class rte::FormalRTESymbolSubst < DefaultSymbolType, DefaultRankType >; + namespace { static auto valuePrinter = registration::ValuePrinterRegister < rte::FormalRTE < > > ( ); diff --git a/alib2data/src/rte/formal/FormalRTE.h b/alib2data/src/rte/formal/FormalRTE.h index 8451c65cde..83b52dcfd7 100644 --- a/alib2data/src/rte/formal/FormalRTE.h +++ b/alib2data/src/rte/formal/FormalRTE.h @@ -438,4 +438,6 @@ struct normalize < rte::FormalRTE < SymbolType, RankType > > { } /* namespace core */ +extern template class rte::FormalRTE < >; + #endif /* FORMAL_RTE_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTEAlternation.h b/alib2data/src/rte/formal/FormalRTEAlternation.h index 28c448a858..9d6b01d64c 100644 --- a/alib2data/src/rte/formal/FormalRTEAlternation.h +++ b/alib2data/src/rte/formal/FormalRTEAlternation.h @@ -297,4 +297,6 @@ FormalRTEAlternation < SymbolType, RankType >::operator std::string ( ) const { } /* namespace rte */ +extern template class rte::FormalRTEAlternation < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_ALTERNATION_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTEElement.h b/alib2data/src/rte/formal/FormalRTEElement.h index db7bcfcbef..4d64bd3be2 100644 --- a/alib2data/src/rte/formal/FormalRTEElement.h +++ b/alib2data/src/rte/formal/FormalRTEElement.h @@ -340,4 +340,6 @@ std::pair < ext::set < common::ranked_symbol < SymbolType, RankType > >, ext::se } /* namespace rte */ +extern template class rte::FormalRTEElement < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_ELEMENT_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTEEmpty.h b/alib2data/src/rte/formal/FormalRTEEmpty.h index cdabe91892..4ba2911e1b 100644 --- a/alib2data/src/rte/formal/FormalRTEEmpty.h +++ b/alib2data/src/rte/formal/FormalRTEEmpty.h @@ -170,4 +170,6 @@ FormalRTEEmpty < SymbolType, RankType >::operator std::string ( ) const { } /* namespace rte */ +extern template class rte::FormalRTEEmpty < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_EMPTY_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTEIteration.h b/alib2data/src/rte/formal/FormalRTEIteration.h index 91ff467bc2..e0085d24d4 100644 --- a/alib2data/src/rte/formal/FormalRTEIteration.h +++ b/alib2data/src/rte/formal/FormalRTEIteration.h @@ -285,4 +285,7 @@ FormalRTEIteration < SymbolType, RankType >::operator std::string ( ) const { } } /* namespace rte */ + +extern template class rte::FormalRTEIteration < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_ITERATION_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTEStructure.h b/alib2data/src/rte/formal/FormalRTEStructure.h index cc57969b74..8424c51029 100644 --- a/alib2data/src/rte/formal/FormalRTEStructure.h +++ b/alib2data/src/rte/formal/FormalRTEStructure.h @@ -190,4 +190,6 @@ void FormalRTEStructure < SymbolType, RankType >::setStructure ( FormalRTEElemen } /* namespace rte */ +extern template class rte::FormalRTEStructure < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_STRUCTURE_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTESubstitution.h b/alib2data/src/rte/formal/FormalRTESubstitution.h index b9af983fa9..19b1f4d185 100644 --- a/alib2data/src/rte/formal/FormalRTESubstitution.h +++ b/alib2data/src/rte/formal/FormalRTESubstitution.h @@ -346,4 +346,6 @@ FormalRTESubstitution < SymbolType, RankType >::operator std::string ( ) const { } /* namespace rte */ +extern template class rte::FormalRTESubstitution < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_SUBSTITUTION_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTESymbol.h b/alib2data/src/rte/formal/FormalRTESymbol.h index a61a55b6a2..befb7b2967 100644 --- a/alib2data/src/rte/formal/FormalRTESymbol.h +++ b/alib2data/src/rte/formal/FormalRTESymbol.h @@ -92,4 +92,6 @@ common::ranked_symbol < SymbolType, RankType > && FormalRTESymbol < SymbolType, } /* namespace rte */ +extern template class rte::FormalRTESymbol < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_SYMBOL_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h index 91020ed2aa..919effca84 100644 --- a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h +++ b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h @@ -267,4 +267,6 @@ FormalRTESymbolAlphabet < SymbolType, RankType >::operator std::string ( ) const } /* namespace rte */ +extern template class rte::FormalRTESymbolAlphabet < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_SYMBOL_ALPHABET_H_ */ diff --git a/alib2data/src/rte/formal/FormalRTESymbolSubst.h b/alib2data/src/rte/formal/FormalRTESymbolSubst.h index be106f7298..2ced1884ee 100644 --- a/alib2data/src/rte/formal/FormalRTESymbolSubst.h +++ b/alib2data/src/rte/formal/FormalRTESymbolSubst.h @@ -178,4 +178,6 @@ FormalRTESymbolSubst < SymbolType, RankType >::operator std::string ( ) const { } /* namespace rte */ +extern template class rte::FormalRTESymbolSubst < DefaultSymbolType, DefaultRankType >; + #endif /* FORMAL_RTE_SUBST_SYMBOL_H_ */ diff --git a/alib2data/src/string/CyclicString.cpp b/alib2data/src/string/CyclicString.cpp index e6fb06edec..9dbb4daa82 100644 --- a/alib2data/src/string/CyclicString.cpp +++ b/alib2data/src/string/CyclicString.cpp @@ -10,6 +10,8 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/CastRegistration.hpp> +template class string::CyclicString < >; + namespace { static auto CyclicStringFromEpsilon = registration::CastRegister < string::CyclicString < >, string::Epsilon < > > ( ); diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h index fd33916dee..2dcd4f54ad 100644 --- a/alib2data/src/string/CyclicString.h +++ b/alib2data/src/string/CyclicString.h @@ -340,4 +340,6 @@ struct normalize < string::CyclicString < SymbolType > > { } /* namespace core */ +extern template class string::CyclicString < >; + #endif /* CYCLIC_STRING_H_ */ diff --git a/alib2data/src/string/Epsilon.cpp b/alib2data/src/string/Epsilon.cpp index 275ce6af7f..eaafbc38e8 100644 --- a/alib2data/src/string/Epsilon.cpp +++ b/alib2data/src/string/Epsilon.cpp @@ -10,6 +10,8 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/CastRegistration.hpp> +template class string::Epsilon < >; + namespace { static auto valuePrinter = registration::ValuePrinterRegister < string::Epsilon < > > ( ); diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h index 7849744e58..29e226c0d0 100644 --- a/alib2data/src/string/Epsilon.h +++ b/alib2data/src/string/Epsilon.h @@ -216,4 +216,6 @@ struct normalize < string::Epsilon < SymbolType > > { } /* namespace core */ +extern template class string::Epsilon < >; + #endif /* EPSILON_H_ */ diff --git a/alib2data/src/string/LinearString.cpp b/alib2data/src/string/LinearString.cpp index c164f62c62..0e5a859d8b 100644 --- a/alib2data/src/string/LinearString.cpp +++ b/alib2data/src/string/LinearString.cpp @@ -12,6 +12,8 @@ #include <registration/SetRegistration.hpp> #include <registration/ComponentRegistration.hpp> +template class string::LinearString < >; + namespace { static auto components = registration::ComponentRegister < string::LinearString < > > ( ); diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h index 535f15de2d..df50c3eb4f 100644 --- a/alib2data/src/string/LinearString.h +++ b/alib2data/src/string/LinearString.h @@ -370,4 +370,6 @@ struct normalize < string::LinearString < common::ranked_symbol < SymbolType, Ra } /* namespace core */ +extern template class string::LinearString < >; + #endif /* LINEAR_STRING_H_ */ diff --git a/alib2data/src/string/WildcardLinearString.cpp b/alib2data/src/string/WildcardLinearString.cpp index 72525adfe2..94641254d0 100644 --- a/alib2data/src/string/WildcardLinearString.cpp +++ b/alib2data/src/string/WildcardLinearString.cpp @@ -11,6 +11,8 @@ #include <registration/CastRegistration.hpp> #include <registration/ComponentRegistration.hpp> +template class string::WildcardLinearString < >; + namespace { static auto components = registration::ComponentRegister < string::WildcardLinearString < > > ( ); diff --git a/alib2data/src/string/WildcardLinearString.h b/alib2data/src/string/WildcardLinearString.h index c0638c5460..a81e37ff28 100644 --- a/alib2data/src/string/WildcardLinearString.h +++ b/alib2data/src/string/WildcardLinearString.h @@ -446,4 +446,6 @@ struct normalize < string::WildcardLinearString < SymbolType > > { } /* namespace core */ +extern template class string::WildcardLinearString < >; + #endif /* WILDCARD_LINEAR_STRING_H_ */ -- GitLab