diff --git a/aintrospection2/src/aintrospection.cpp b/aintrospection2/src/aintrospection.cpp index d45ffd8c7a67d91771745148c191973d7b22a633..5aa9c1e45ffbec662201d27b17b1e9337a1427b3 100644 --- a/aintrospection2/src/aintrospection.cpp +++ b/aintrospection2/src/aintrospection.cpp @@ -37,9 +37,6 @@ int main ( int argc, char * argv[] ) { TCLAP::SwitchArg castTo ( "t", "cast_to", "Casting to type", false ); cmd.add ( castTo ); - TCLAP::SwitchArg names ( "n", "names", "Names", false ); - cmd.add ( names ); - TCLAP::SwitchArg summary ( "s", "sumary", "Sumary", false ); cmd.add ( summary ); @@ -81,9 +78,6 @@ int main ( int argc, char * argv[] ) { } else if ( castTo.isSet ( ) ) { cli::Parser parser ( cli::Lexer ( "introspect casts :to #argument" ) ); parser.parse ( )->run ( environment ); - } else if ( names.isSet ( ) ) { - cli::Parser parser ( cli::Lexer ( "introspect names" ) ); - parser.parse ( )->run ( environment ); } else if ( summary.isSet ( ) ) { ext::deque < sax::Token > tokens; diff --git a/alib2cli/src/command/NamesIntrospectionCommand.h b/alib2cli/src/command/NamesIntrospectionCommand.h deleted file mode 100644 index 994039a54a2155d7f8e2c5d07e51f92479d2e1b4..0000000000000000000000000000000000000000 --- a/alib2cli/src/command/NamesIntrospectionCommand.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _CLI_NAME_INTROSPECTION_COMMAND_H_ -#define _CLI_NAME_INTROSPECTION_COMMAND_H_ - -#include <command/Command.h> -#include <environment/Environment.h> - -namespace cli { - -class NamesIntrospectionCommand : public Command { -public: - void printNames ( const ext::set < ext::pair < std::string, ext::set < std::string > > > & names ) const { - for ( const std::pair < std::string, std::set < std::string > > & entry : names ) { - std::cout << entry.first << " : "; - bool first = true; - for ( const std::string & name : entry.second ) { - if ( first ) - first = false; - else - std::cout << ", "; - - std::cout << name; - } - std::cout << std::endl; - } - } - - virtual Command::Result run ( Environment & ) const override { - printNames ( abstraction::Registry::listNames ( ) ); - return Command::Result::OK; - } -}; - -} /* namespace cli */ - -#endif /* _CLI_NAME_INTROSPECTION_COMMAND_H_ */ diff --git a/alib2cli/src/parser/Parser.cpp b/alib2cli/src/parser/Parser.cpp index 237703f813bf5758f372991b2444ae55ddd77905..0b3c98127111b8ae4fd899ac942acd0ff60dc47f 100644 --- a/alib2cli/src/parser/Parser.cpp +++ b/alib2cli/src/parser/Parser.cpp @@ -28,7 +28,6 @@ #include <command/AlgorithmsIntrospectionCommand.h> #include <command/OverloadsIntrospectionCommand.h> #include <command/DataTypesIntrospectionCommand.h> -#include <command/NamesIntrospectionCommand.h> #include <command/CastsIntrospectionCommand.h> #include <command/SetCommand.h> @@ -305,10 +304,6 @@ std::unique_ptr < Command > Parser::introspect_command ( ) { std::unique_ptr < cli::Arg > param = optional_arg ( ); match ( cli::Lexer::TokenType::END ); return std::make_unique < DataTypesIntrospectionCommand > ( std::move ( param ) ); - } else if ( check_nonreserved_kw ( "names" ) ) { - match_nonreserved_kw ( "names" ); - match ( cli::Lexer::TokenType::END ); - return std::make_unique < NamesIntrospectionCommand > ( ); } else if ( check_nonreserved_kw ( "casts" ) ) { match_nonreserved_kw ( "casts" ); std::pair < bool, bool > from_to = introspect_cast_from_to ( ); diff --git a/alib2common/src/abstraction/CastRegistry.cpp b/alib2common/src/abstraction/CastRegistry.cpp index d6f101aa33dea0810c5b0913a7c4246c95b5b1f2..9fabc80935987295d2f9d994ddde2937fd70a256 100644 --- a/alib2common/src/abstraction/CastRegistry.cpp +++ b/alib2common/src/abstraction/CastRegistry.cpp @@ -6,89 +6,53 @@ */ #include <abstraction/CastRegistry.hpp> - -#include <core/namingApi.hpp> - #include <algorithm> namespace abstraction { std::shared_ptr < abstraction::OperationAbstraction > CastRegistry::getAbstraction ( const std::string & target, const std::string & param ) { - std::set < std::string > targetTypes; - if ( alib::namingApi::hasTypes ( target ) ) - targetTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( target ), [ ] ( const ext::type_index & type ) { return ext::to_string ( type ); } ); - else - targetTypes.insert ( target ); - - for ( const std::string & toType : targetTypes ) { - auto cast = getEntries ( ).find ( std::make_pair ( toType, param ) ); - if ( cast != getEntries ( ).end ( ) ) { - return cast->second->getAbstraction ( ); + auto entry = getEntries ( ).end ( ); + for ( auto iter = getEntries ( ).begin ( ); iter != getEntries ( ).end ( ); ++ iter ) + if ( iter->first.second == param && ext::is_same_type ( target, ext::erase_template_info ( iter->first.first ) ) ) { + if ( entry == getEntries ( ).end ( ) ) + entry = iter; + else + throw exception::CommonException ( "Entry from " + param + " to " + target + " is ambigous." ); } - } - throw exception::CommonException ( "Entry from " + param + " to " + target + " not available." ); + if ( entry == getEntries ( ).end ( ) ) + throw exception::CommonException ( "Entry from " + param + " to " + target + " not available." ); + + return entry->second->getAbstraction ( ); } bool CastRegistry::isNoOp ( const std::string & target, const std::string & param ) { - std::set < std::string > targetTypes; - if ( alib::namingApi::hasTypes ( target ) ) - targetTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( target ), [ ] ( const ext::type_index & type ) { return ext::to_string ( type ); } ); - else - targetTypes.insert ( target ); - - for ( const std::string & toType : targetTypes ) - if ( param == toType ) - return true; - - return false; + return ext::erase_template_info ( param ) == ext::erase_template_info ( target ); } bool CastRegistry::castAvailable ( const std::string & target, const std::string & param ) { - std::set < std::string > targetTypes; - if ( alib::namingApi::hasTypes ( target ) ) - targetTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( target ), [ ] ( const ext::type_index & type ) { return ext::to_string ( type ); } ); - else - targetTypes.insert ( target ); - - for ( const std::string & toType : targetTypes ) { - auto cast = getEntries ( ).find ( std::make_pair ( toType, param ) ); - if ( cast != getEntries ( ).end ( ) ) + for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) ) + if ( entry.first.second == param && ext::is_same_type ( target, ext::erase_template_info ( entry.first.first ) ) ) return true; - } return false; } ext::set < std::string > CastRegistry::listFrom ( const std::string & type ) { - std::set < std::string > sourceTypes; - - if ( alib::namingApi::hasTypes ( type ) ) - sourceTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( type ), [ ] ( const ext::type_index & raw_type ) { return ext::to_string ( raw_type ); } ); - else - sourceTypes.insert ( type ); - ext::set < std::string > res; for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) ) - if ( sourceTypes.count ( entry.first.second ) ) + if ( ext::is_same_type ( type, ext::erase_template_info ( entry.first.second ) ) ) res.insert ( entry.first.first ); return res; } ext::set < std::string > CastRegistry::listTo ( const std::string & type ) { - std::set < std::string > targetTypes; - - if ( alib::namingApi::hasTypes ( type ) ) - targetTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( type ), [ ] ( const ext::type_index & raw_type ) { return ext::to_string ( raw_type ); } ); - else - targetTypes.insert ( type ); - ext::set < std::string > res; for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) ) - if ( targetTypes.count ( entry.first.first ) ) + if ( ext::is_same_type ( type, ext::erase_template_info ( entry.first.first ) ) ) res.insert ( entry.first.second ); return res; diff --git a/alib2common/src/abstraction/ContainerRegistry.cpp b/alib2common/src/abstraction/ContainerRegistry.cpp index d017710736c6734500bd0e6db574635f6e127aa5..994355077aaa5fe3205c0963e8f6c5da2d95007f 100644 --- a/alib2common/src/abstraction/ContainerRegistry.cpp +++ b/alib2common/src/abstraction/ContainerRegistry.cpp @@ -14,22 +14,16 @@ bool ContainerRegistry::hasAbstraction ( const std::string & container ) { return getEntries ( ).count ( container ); } -std::shared_ptr < abstraction::OperationAbstraction > ContainerRegistry::getAbstraction ( const std::string & container, const std::string & paramType ) { - std::set < std::string > paramTypes; - if ( alib::namingApi::hasTypes ( paramType ) ) - paramTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( paramType ), [ ] ( const ext::type_index & type ) { return ext::to_string ( type ); } ); - else - paramTypes.insert ( paramType ); - +std::shared_ptr < abstraction::OperationAbstraction > ContainerRegistry::getAbstraction ( const std::string & container, const std::string & param ) { auto group = getEntries ( ).find ( container ); if ( group == getEntries ( ).end ( ) ) throw exception::CommonException ( "Entry " + container + " not available" ); for ( const ext::pair < std::string, std::shared_ptr < Entry > > & entry : group->second ) - if ( paramTypes.count ( entry.first ) ) + if ( ext::is_same_type ( param, ext::erase_template_info ( entry.first ) ) ) return entry.second->getAbstraction ( ); - throw exception::CommonException ( "Entry for " + container + " parametrized with " + paramType + " not available." ); + throw exception::CommonException ( "Entry for " + container + " parametrized with " + param + " not available." ); } ext::set < std::string > ContainerRegistry::listOverloads ( const std::string & container ) { diff --git a/alib2common/src/abstraction/ContainerRegistry.hpp b/alib2common/src/abstraction/ContainerRegistry.hpp index 3822153c28f480cea0d69ba8509c0dc90c3410e5..62cb350ddec4088747d6263288816454cc9313f2 100644 --- a/alib2common/src/abstraction/ContainerRegistry.hpp +++ b/alib2common/src/abstraction/ContainerRegistry.hpp @@ -18,8 +18,6 @@ #include <exception/CommonException.h> #include <abstraction/OperationAbstraction.hpp> -#include <core/namingApi.hpp> - namespace abstraction { class ContainerRegistry { @@ -61,7 +59,7 @@ public: static bool hasAbstraction ( const std::string & container ); - static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & container, const std::string & paramType ); + static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & container, const std::string & param ); static ext::set < std::string > listOverloads ( const std::string & algorithm ); diff --git a/alib2common/src/abstraction/Registry.cpp b/alib2common/src/abstraction/Registry.cpp index dd5850d261e7a7aacbbd4266b9746d8178f9e853..02a5d01cf9c24150e8624dadb8c1c27d780d9e5b 100644 --- a/alib2common/src/abstraction/Registry.cpp +++ b/alib2common/src/abstraction/Registry.cpp @@ -14,8 +14,6 @@ #include <abstraction/NormalizeRegistry.hpp> #include <abstraction/ContainerRegistry.hpp> -#include <core/namingApi.hpp> - namespace abstraction { ext::set < std::string > Registry::listAlgorithmGroup ( const std::string & group ) { @@ -38,10 +36,6 @@ ext::set < ext::pair < std::string, std::string > > Registry::listCasts ( ) { return CastRegistry::list ( ); } -ext::set < ext::pair < std::string, ext::set < std::string > > > Registry::listNames ( ) { - return alib::namingApi::list ( ); -} - ext::set < ext::tuple < AlgorithmCategories::AlgorithmCategory, ext::pair < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier > >, ext::vector < ext::tuple < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier >, std::string > > > > Registry::listOverloads ( const std::string & algorithm ) { return AlgorithmRegistry::listOverloads ( algorithm ); } diff --git a/alib2common/src/abstraction/Registry.h b/alib2common/src/abstraction/Registry.h index 1793c03a31f4bb43e9e90070ee9f117e8b80bf1c..bef140b80306ccf6dba8f631a8869619508136c9 100644 --- a/alib2common/src/abstraction/Registry.h +++ b/alib2common/src/abstraction/Registry.h @@ -28,8 +28,6 @@ public: static ext::set < ext::tuple < AlgorithmCategories::AlgorithmCategory, ext::pair < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier > >, ext::vector < ext::tuple < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier >, std::string > > > > listOverloads ( const std::string & algorithm ); - static ext::set < ext::pair < std::string, ext::set < std::string > > > listNames ( ); - static std::shared_ptr < abstraction::OperationAbstraction > getContainerAbstraction ( const std::string & container, const std::string & type ); static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( const std::string & name, const ext::vector < std::string > & paramTypes, AlgorithmCategories::AlgorithmCategory ); static std::shared_ptr < abstraction::OperationAbstraction > getCastAbstraction ( const std::string & target, const std::string & param ); diff --git a/alib2common/src/core/namingApi.hpp b/alib2common/src/core/namingApi.hpp deleted file mode 100644 index 5aa707a74cf9131b9e46c1a6b6f586f5c542050f..0000000000000000000000000000000000000000 --- a/alib2common/src/core/namingApi.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * namingApi.hpp - * - * Created on: Jul 7, 2017 - * Author: Jan Travnicek - */ - -#ifndef NAMING_API_HPP_ -#define NAMING_API_HPP_ - -#include <map> -#include <set> -#include <string> -#include <typeindex> - -#include <exception/CommonException.h> - -namespace alib { - -class namingApi { - static ext::map < std::string, ext::set < ext::type_index > > & getNames ( ) { - static ext::map < std::string, ext::set < ext::type_index > > names; - return names; - } - -public: - template < typename Type > - static void registerName ( std::string name ) { - ext::type_index type = ext::type_index ( typeid ( Type ) ); - std::pair < ext::set < ext::type_index >::iterator, bool > res = getNames ( ) [ name ].insert ( type ); - if ( ! res.second && * res.first != type ) - throw exception::CommonException ( "Type for name " + name + " already registered."); - } - - static ext::set < ext::type_index > & getTypes ( std::string stringname ) { - auto name = getNames ( ).find ( stringname ); - if ( name == getNames ( ).end ( ) ) - throw exception::CommonException ( "Types for name " + stringname + " not registered."); - - return name->second; - } - - static bool hasTypes ( std::string stringname ) { - auto name = getNames ( ).find ( stringname ); - return name != getNames ( ).end ( ); - } - - static ext::set < ext::pair < std::string, ext::set < std::string > > > list ( ) { - ext::set < ext::pair < std::string, ext::set < std::string > > > res; - - for ( const std::pair < const std::string, ext::set < ext::type_index > > & entry : getNames ( ) ) { - ext::set < std::string > names; - for ( const ext::type_index & name : entry.second ) - names.insert ( ext::to_string ( name ) ); - - res.insert ( ext::make_pair ( entry.first, names ) ); - } - - return res; - } - -}; - -} /* namespace alib */ - -#endif /* CAST_API_HPP_ */ diff --git a/alib2common/src/registration/NameRegistration.hpp b/alib2common/src/registration/NameRegistration.hpp deleted file mode 100644 index 13e8ac7475a099ac50233066e5627a3e6ce0be07..0000000000000000000000000000000000000000 --- a/alib2common/src/registration/NameRegistration.hpp +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _NAME_REGISTRATION_HPP_ -#define _NAME_REGISTRATION_HPP_ - -#include <core/namingApi.hpp> -#include <string> - -namespace registration { - -template < class Type > -class NameRegister { -public: - NameRegister ( std::string name ) { - alib::namingApi::registerName < Type > ( std::move ( name ) ); - } -}; - -} /* namespace registration */ - -#endif // _NAME_REGISTRATION_HPP_ diff --git a/alib2data/src/automaton/FSM/CompactNFA.cpp b/alib2data/src/automaton/FSM/CompactNFA.cpp index e9ca521672abe492957d7f28a339a5b7012a17a8..714e6cee9fe16cee4233d4919975c63b36db0fa8 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.cpp +++ b/alib2data/src/automaton/FSM/CompactNFA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto compactNFAFromNFA = registration::CastRegister < automaton::CompactN static auto compactNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::MultiInitialStateNFA < > > ( ); static auto compactNFAEpsilonNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::EpsilonNFA < > > ( ); -static auto name = registration::NameRegister < automaton::CompactNFA < > > ( automaton::CompactNFA < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.cpp b/alib2data/src/automaton/FSM/EpsilonNFA.cpp index 37c2823922264c29988d478b996ebc09ba478f49..0edf050a78478d44806444c757e23062f1946847 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.cpp +++ b/alib2data/src/automaton/FSM/EpsilonNFA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -28,6 +27,4 @@ static auto epsilonNFAFromDFA = registration::CastRegister < automaton::EpsilonN static auto epsilonNFAFromNFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::NFA < > > ( ); static auto epsilonNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::MultiInitialStateNFA < > > ( ); -static auto name = registration::NameRegister < automaton::EpsilonNFA < > > ( automaton::EpsilonNFA < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.cpp b/alib2data/src/automaton/FSM/ExtendedNFA.cpp index 804ad8905d2e278271c192af9f71872e7f439556..4e15266a5182c1e66a52ecfa4c29ec0a3d076d9e 100644 --- a/alib2data/src/automaton/FSM/ExtendedNFA.cpp +++ b/alib2data/src/automaton/FSM/ExtendedNFA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -30,6 +29,4 @@ static auto extendedNFAFromMultiInitialStateNFA = registration::CastRegister < a static auto extendedNFAEpsilonNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::EpsilonNFA < > > ( ); static auto extendedNFACompactNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::CompactNFA < > > ( ); -static auto name = registration::NameRegister < automaton::ExtendedNFA < > > ( automaton::ExtendedNFA < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp b/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp index 7399583d9b187b89a35025390a7e64ac21d2656a..26e4b030bf482bccf22f2a73a1a317c4ea48b9e4 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp +++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -27,6 +26,4 @@ static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automat static auto multiInitialStateNFAFromDFA = registration::CastRegister < automaton::MultiInitialStateNFA < >, automaton::DFA < > > ( ); static auto multiInitialStateNFAFromNFA = registration::CastRegister < automaton::MultiInitialStateNFA < >, automaton::NFA < > > ( ); -static auto name = registration::NameRegister < automaton::MultiInitialStateNFA < > > ( automaton::MultiInitialStateNFA < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/automaton/FSM/NFA.cpp b/alib2data/src/automaton/FSM/NFA.cpp index a23a5ea80e4cf286a01db9dd39f7f876e9ac4cc3..904b1007819139170124ee538b8a5cd784125dfc 100644 --- a/alib2data/src/automaton/FSM/NFA.cpp +++ b/alib2data/src/automaton/FSM/NFA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -26,6 +25,4 @@ static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automat static auto NFAFromDFA = registration::CastRegister < automaton::NFA < >, automaton::DFA < > > ( ); -static auto name = registration::NameRegister < automaton::NFA < > > ( automaton::NFA < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/automaton/PDA/DPDA.cpp b/alib2data/src/automaton/PDA/DPDA.cpp index 8c1579591b6731e49d4b92a3c043e44e50dcc281..70fb76de736d8f970a254cab08682582fe4d673e 100644 --- a/alib2data/src/automaton/PDA/DPDA.cpp +++ b/alib2data/src/automaton/PDA/DPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp b/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp index ffabec3d8e0df09f021eb616b0c920c2607ee9b3..01bb24cb166fbeb6656b65a8b98f35818ce59f08 100644 --- a/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp +++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp b/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp index 9fe18cb1e414eb83c8d9a46e8aa7e182a82978e6..ec48c6d473c409cc194e59e10f9967d862fdfb00 100644 --- a/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp +++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/NPDA.cpp b/alib2data/src/automaton/PDA/NPDA.cpp index 2a21c815b01c0c1f251723796f457bd20625f528..ca0624b741ff91e518bfc36fb5b4c44c3dd6c49f 100644 --- a/alib2data/src/automaton/PDA/NPDA.cpp +++ b/alib2data/src/automaton/PDA/NPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/NPDTA.cpp b/alib2data/src/automaton/PDA/NPDTA.cpp index a69b9027014f838c63fc4f38b07eaeb6b31538da..d1bc3fc8951846944372fa88e62a648835dad623 100644 --- a/alib2data/src/automaton/PDA/NPDTA.cpp +++ b/alib2data/src/automaton/PDA/NPDTA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp index 2810a2adac9d89ba2802af32ecd94126dd06ff19..31158c7e9cfdf9a4a5ba9bf6a3a7fd323342bc45 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp index b4885eec50d42c91c0ff6586ed88ebf61b72c814..90c13731cb60a58afeb2c859b7b70e5723fd6d1e 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.cpp b/alib2data/src/automaton/PDA/SinglePopDPDA.cpp index 0b28e30d68ac0d4b10418d6c1fb187b1d6c4b0f2..e7641bc50c66a030a314d0048f959bbc3d870b84 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.cpp +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.cpp b/alib2data/src/automaton/PDA/SinglePopNPDA.cpp index 2b5332c234cefa81e36b0ec3b48c5cec805c8561..fae7c4660bf618b075744b357ba46d599777cfd3 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.cpp +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp index 970b430b1cb5b3fd518d9aad8d9acf89e7e78ad7..c0862fb0b914293edfe2510fce13452c1a31bf29 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp index 246861a0a0c7054a14da58c7a15d9b5b7ab4889f..de65bfeea059b2671bc53ef869e132957e59c259 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/TA/DFTA.cpp b/alib2data/src/automaton/TA/DFTA.cpp index 46acb95227175d9af412e8e82a655a444aa34def..e03fa9fdf7fc72d62e73a9aa2989ba9e4ac7b601 100644 --- a/alib2data/src/automaton/TA/DFTA.cpp +++ b/alib2data/src/automaton/TA/DFTA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/TA/NFTA.cpp b/alib2data/src/automaton/TA/NFTA.cpp index 9772259d1963cfdf7df81ef8320cea9c9ae4e393..d634de13cf2495e9db2379ecd6bf737196456df4 100644 --- a/alib2data/src/automaton/TA/NFTA.cpp +++ b/alib2data/src/automaton/TA/NFTA.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/automaton/TM/OneTapeDTM.cpp b/alib2data/src/automaton/TM/OneTapeDTM.cpp index 5236191bfa1a2f43bb98ed120db138ff9db1820b..403f0414f19d580dc383e65b5580e7b4fe10682b 100644 --- a/alib2data/src/automaton/TM/OneTapeDTM.cpp +++ b/alib2data/src/automaton/TM/OneTapeDTM.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextFree/CFG.cpp b/alib2data/src/grammar/ContextFree/CFG.cpp index 257fb04dfc7e58f509afe517af77777c8eb2303f..1b7deb9f03b2ffca2cc350c7541c93610473c385 100644 --- a/alib2data/src/grammar/ContextFree/CFG.cpp +++ b/alib2data/src/grammar/ContextFree/CFG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextFree/CNF.cpp b/alib2data/src/grammar/ContextFree/CNF.cpp index 37a8db100c6242762f5188f1605d4222b6503019..58a9428c21dffae50fdb0a3030a372c55e7b465a 100644 --- a/alib2data/src/grammar/ContextFree/CNF.cpp +++ b/alib2data/src/grammar/ContextFree/CNF.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp index 4c3ed02a8a9ad858ebe9f9178e029bfb4b258555..acd3beb4095debaad8a2c8d969f8aafeb3a39d61 100644 --- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp +++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextFree/GNF.cpp b/alib2data/src/grammar/ContextFree/GNF.cpp index f6e789a6dbac2976a5c005022f8c4da3645aa458..c328a226a2f53782ca9f4190b1447d75d4686e3f 100644 --- a/alib2data/src/grammar/ContextFree/GNF.cpp +++ b/alib2data/src/grammar/ContextFree/GNF.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextFree/LG.cpp b/alib2data/src/grammar/ContextFree/LG.cpp index e6bb144761541b1d8494234f1abd6e634a7a75a4..eaf5a5e9f105bc73f4b0d828af09b0ff89486920 100644 --- a/alib2data/src/grammar/ContextFree/LG.cpp +++ b/alib2data/src/grammar/ContextFree/LG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextSensitive/CSG.cpp b/alib2data/src/grammar/ContextSensitive/CSG.cpp index 164ca5cf35675d675abc38915ae055f5e9d4e9cb..6e8ea12366b7b286f2edab3f2d61ee9fcdd04bd7 100644 --- a/alib2data/src/grammar/ContextSensitive/CSG.cpp +++ b/alib2data/src/grammar/ContextSensitive/CSG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp index 2020860f3293f1b5a65bca039725e321e60bbdaa..cf6353cfdd4a2aa5e2092ba698db6e0b7337c75d 100644 --- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp +++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/Regular/LeftLG.cpp b/alib2data/src/grammar/Regular/LeftLG.cpp index bb2f2ff7813009f6a9e84e0cc7dfb41dd3af6e30..78cc2b4f62ec4501278abec88c2cc0f494ec1d32 100644 --- a/alib2data/src/grammar/Regular/LeftLG.cpp +++ b/alib2data/src/grammar/Regular/LeftLG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/Regular/LeftRG.cpp b/alib2data/src/grammar/Regular/LeftRG.cpp index b20181e804187b0aaab278d6f35e65effb784555..66e53dad073bfe6f1968646abf864f733d385ba1 100644 --- a/alib2data/src/grammar/Regular/LeftRG.cpp +++ b/alib2data/src/grammar/Regular/LeftRG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/Regular/RightLG.cpp b/alib2data/src/grammar/Regular/RightLG.cpp index 984a00351f7486edfd7fbc31ef6ec3b92eec7264..4fb191751f3b14747382a1ec26f049c4161ecf0b 100644 --- a/alib2data/src/grammar/Regular/RightLG.cpp +++ b/alib2data/src/grammar/Regular/RightLG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/Regular/RightRG.cpp b/alib2data/src/grammar/Regular/RightRG.cpp index afca72418b134096a48cb96dd3ae1e19e6bc3596..2bd6477acccdab41a40359426fe008a7425f8120 100644 --- a/alib2data/src/grammar/Regular/RightRG.cpp +++ b/alib2data/src/grammar/Regular/RightRG.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp index 208ced142d9ec8106f72f3d0e58180c615132984..42036faa95d9c5ba06cf42085e33c814392c48d0 100644 --- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp +++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp index 368fa468bdf62d8a642ef824d3cf4ec2a10292cb..e07dccf1cac452902d2f190dad6b0bbe90e50c76 100644 --- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp +++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/regexp/formal/FormalRegExp.cpp b/alib2data/src/regexp/formal/FormalRegExp.cpp index 0327db3f7a89c1ab7505aedc0e932f8e112db043..0fa1f9fe0aba882b2d3b4e6a481a414c109fae52 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.cpp +++ b/alib2data/src/regexp/formal/FormalRegExp.cpp @@ -10,7 +10,6 @@ #include <object/Object.h> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> @@ -18,8 +17,6 @@ namespace { static auto formalRegExpFromUnboundedRegExp = registration::CastRegister < regexp::FormalRegExp < >, regexp::UnboundedRegExp < > > ( ); -static auto name = registration::NameRegister < regexp::FormalRegExp < > > ( regexp::FormalRegExp < >::getXmlTagName ( ) ); - static auto valuePrinter = registration::ValuePrinterRegister < regexp::FormalRegExp < > > ( ); static auto xmlWrite = registration::XmlWriterRegister < regexp::RegExp, regexp::FormalRegExp < > > ( ); diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp index 41e6ef0fbd311f877db14c8acc557f9701542a93..27190442ef2378b698d24dbb43fffacd6aa1f44b 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp @@ -10,7 +10,6 @@ #include <object/Object.h> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> @@ -18,8 +17,6 @@ namespace { static auto unboundedRegExpFromFormalRegExp = registration::CastRegister < regexp::UnboundedRegExp < >, regexp::FormalRegExp < > > ( ); -static auto name = registration::NameRegister < regexp::UnboundedRegExp < > > ( regexp::UnboundedRegExp < >::getXmlTagName ( ) ); - static auto valuePrinter = registration::ValuePrinterRegister < regexp::UnboundedRegExp < > > ( ); static auto xmlWrite = registration::XmlWriterRegister < regexp::RegExp, regexp::UnboundedRegExp < > > ( ); diff --git a/alib2data/src/string/CyclicString.cpp b/alib2data/src/string/CyclicString.cpp index 3da718ba64c9c8b982417c710654c45633b16df7..904bcaf1db8b1127cde4c9e9fd0242d3034981b3 100644 --- a/alib2data/src/string/CyclicString.cpp +++ b/alib2data/src/string/CyclicString.cpp @@ -12,7 +12,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/string/Epsilon.cpp b/alib2data/src/string/Epsilon.cpp index b11b673c64cf18e09730e26c817c1f450df6ae4b..bf9d6e745eaffac53d0a9a64394fac5eb85588ba 100644 --- a/alib2data/src/string/Epsilon.cpp +++ b/alib2data/src/string/Epsilon.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { diff --git a/alib2data/src/string/LinearString.cpp b/alib2data/src/string/LinearString.cpp index cfb0e83bf1a0919c3d1ca7647e111661eee062f2..341e738ef48e6a337a713a449a095cd77a0ff778 100644 --- a/alib2data/src/string/LinearString.cpp +++ b/alib2data/src/string/LinearString.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> #include <registration/SetRegistration.hpp> #include <container/ObjectsSet.h> @@ -33,9 +32,6 @@ static auto LinearStringFromPrefixRankedBarTree = registration::CastRegister < s static auto LinearStringFromPrefixRankedBarPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarPattern < > > ( ); static auto LinearStringFromPrefixRankedBarNonlinearPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarNonlinearPattern < > > ( ); -static auto LinearStringName = registration::NameRegister < string::LinearString < > > ( string::LinearString < >::getXmlTagName ( ) ); -static auto LinearStringName2 = registration::NameRegister < string::LinearString < common::ranked_symbol < > > > ( string::LinearString < >::getXmlTagName ( ) ); - static auto LinearStringSet = registration::SetRegister < string::LinearString < > > ( ); static auto valuePrinter = registration::ValuePrinterRegister < string::LinearString < > > ( ); diff --git a/alib2data/src/tree/ranked/PostfixRankedTree.cpp b/alib2data/src/tree/ranked/PostfixRankedTree.cpp index 9728d6217710507ca496e1543b2b575e06b53cb1..32f6d6c42f38b9e5df74f5291972d4a87e567751 100644 --- a/alib2data/src/tree/ranked/PostfixRankedTree.cpp +++ b/alib2data/src/tree/ranked/PostfixRankedTree.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::P static auto PostfixRankedTreeFromRankedTree = registration::CastRegister < tree::PostfixRankedTree < >, tree::RankedTree < > > ( ); -static auto name = registration::NameRegister < tree::PostfixRankedTree < > > ( tree::PostfixRankedTree < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp index d9a2c30d2380ca55c6c1f181c27d764bd26e0954..ee7bbf70fa6dd466a26c6e339cd65a86b4a91f4b 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -33,6 +32,4 @@ static auto PrefixRankedBarNonlinearPatternFromRankedNonlinearPattern = registra static auto PrefixRankedBarNonlinearPatternFromPrefixRankedBarTree = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::PrefixRankedBarTree < > > ( ); static auto PrefixRankedBarNonlinearPatternFromPrefixRankedBarPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::PrefixRankedBarPattern < > > ( ); -static auto name = registration::NameRegister < tree::PrefixRankedBarNonlinearPattern < > > ( tree::PrefixRankedBarNonlinearPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp index 3862afa7762d5e8d2dd3586b5ac1f68deff3c519..2d06376813f24ed854c826efcd2c4784a3c3601b 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -30,6 +29,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::P static auto PrefixRankedBarPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedBarPattern < >, tree::RankedPattern < > > ( ); static auto PrefixRankedBarPatternFromPrefixRankedBarTree = registration::CastRegister < tree::PrefixRankedBarPattern < >, tree::PrefixRankedBarTree < > > ( ); -static auto name = registration::NameRegister < tree::PrefixRankedBarPattern < > > ( tree::PrefixRankedBarPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp b/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp index f9066c2d7075ff068e6847db6c85a7aceabeb1cf..d5ae307ffd7c949da020a91d3cc0e57fb6f252a7 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::P static auto PrefixRankedBarTreeFromRankedTree = registration::CastRegister < tree::PrefixRankedBarTree < >, tree::RankedTree < > > ( ); -static auto name = registration::NameRegister < tree::PrefixRankedBarTree < > > ( tree::PrefixRankedBarTree < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp index 863c83e3b0c8b178493961384b023525adb904c7..9efbe12b773b4e50d17b0776e680764eb1abaa74 100644 --- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -33,6 +32,4 @@ static auto PrefixRankedNonlinearPatternFromRankedNonlinearPattern = registratio static auto PrefixRankedNonlinearPatternFromPrefixRankedTree = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::PrefixRankedTree < > > ( ); static auto PrefixRankedNonlinearPatternFromPrefixRankedPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::PrefixRankedPattern < > > ( ); -static auto name = registration::NameRegister < tree::PrefixRankedNonlinearPattern < > > ( tree::PrefixRankedNonlinearPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedPattern.cpp index 9a78d43ce7e31fd6495ae2fa8a2894323e4aac8b..b7a54ea3d57ade9c4b3d190f7e3ea4c8c984814a 100644 --- a/alib2data/src/tree/ranked/PrefixRankedPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -30,6 +29,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::P static auto PrefixRankedPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedPattern < >, tree::RankedPattern < > > ( ); static auto PrefixRankedPatternFromPrefixRankedTree = registration::CastRegister < tree::PrefixRankedPattern < >, tree::PrefixRankedTree < > > ( ); -static auto name = registration::NameRegister < tree::PrefixRankedPattern < > > ( tree::PrefixRankedPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.cpp b/alib2data/src/tree/ranked/PrefixRankedTree.cpp index 8c2fa12c81746f8a2d3796d07e7373a0857089b7..12b58ea5ff3e5b8dd59747b8d95af1d3998c3e63 100644 --- a/alib2data/src/tree/ranked/PrefixRankedTree.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedTree.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::P static auto PrefixRankedTreeFromRankedTree = registration::CastRegister < tree::PrefixRankedTree < >, tree::RankedTree < > > ( ); -static auto name = registration::NameRegister < tree::PrefixRankedTree < > > ( tree::PrefixRankedTree < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp b/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp index b5de7d4fdacd9b4cbdeee6f6d3cf894b61022d9c..197127ae4153906c429229cdff5a07ade0ae0a86 100644 --- a/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp +++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -27,6 +26,4 @@ static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::Rank static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::RankedNonlinearPattern < > > ( ); static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::RankedNonlinearPattern < > > ( ); -static auto name = registration::NameRegister < tree::RankedNonlinearPattern < > > ( tree::RankedNonlinearPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/RankedPattern.cpp b/alib2data/src/tree/ranked/RankedPattern.cpp index ce2f28c5b74c34054dd72cb49eca27c49a75524e..ebf8c282c601a47454209fbf867738deb6d1f3e1 100644 --- a/alib2data/src/tree/ranked/RankedPattern.cpp +++ b/alib2data/src/tree/ranked/RankedPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::R static auto RankedPatternFromUnrankedPattern = registration::CastRegister < tree::RankedPattern < >, tree::UnrankedPattern < > > ( ); -static auto name = registration::NameRegister < tree::RankedPattern < > > ( tree::RankedPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/ranked/RankedTree.cpp b/alib2data/src/tree/ranked/RankedTree.cpp index 7928779e03fbde5f007e8f2e4e955d90d2952737..692341566b8ac4de6a7cad88134d1b76e8034083 100644 --- a/alib2data/src/tree/ranked/RankedTree.cpp +++ b/alib2data/src/tree/ranked/RankedTree.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -30,6 +29,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::R static auto RankedTreeFromUnrankedTree = registration::CastRegister < tree::RankedTree < >, tree::UnrankedTree < > > ( ); static auto RankedTreeFromPostfixRankedTree = registration::CastRegister < tree::RankedTree < >, tree::PostfixRankedTree < > > ( ); -static auto name = registration::NameRegister < tree::RankedTree < > > ( tree::RankedTree < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/unranked/PrefixBarTree.cpp b/alib2data/src/tree/unranked/PrefixBarTree.cpp index 43208bc99b258535e7767a77e8c282a7a30c17f5..52e45756ab896290f80d937cfa2dd2cb38ec6144 100644 --- a/alib2data/src/tree/unranked/PrefixBarTree.cpp +++ b/alib2data/src/tree/unranked/PrefixBarTree.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::P static auto PrefixBarTreeFromUnrankedTree = registration::CastRegister < tree::PrefixBarTree < >, tree::UnrankedTree < > > ( ); -static auto name = registration::NameRegister < tree::PrefixBarTree < > > ( tree::PrefixBarTree < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp index 34d57f5361d20b80c17f5ca0e104d85810d61dac..c46db0367cdf7a1fc08f66a855087c9dc25b0321 100644 --- a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp +++ b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -27,6 +26,4 @@ static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::Unra static auto xmlReaded2 = registration::XmlReaderRegister < tree::UnrankedTreeWrapper, tree::UnrankedNonlinearPattern < > > ( ); static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::UnrankedNonlinearPattern < > > ( ); -static auto name = registration::NameRegister < tree::UnrankedNonlinearPattern < > > ( tree::UnrankedNonlinearPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/unranked/UnrankedPattern.cpp b/alib2data/src/tree/unranked/UnrankedPattern.cpp index b31b26112fc9247b80e83e5a126690bf1ff78de7..57de3ffbe0a6b5ee20490697833c9dfeb0972fc3 100644 --- a/alib2data/src/tree/unranked/UnrankedPattern.cpp +++ b/alib2data/src/tree/unranked/UnrankedPattern.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::U static auto UnrankedPatternFromRankedPattern = registration::CastRegister < tree::UnrankedPattern < >, tree::RankedPattern < > > ( ); -static auto name = registration::NameRegister < tree::UnrankedPattern < > > ( tree::UnrankedPattern < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2data/src/tree/unranked/UnrankedTree.cpp b/alib2data/src/tree/unranked/UnrankedTree.cpp index f60a54e7bb8dab2f925a18e7803830830f607248..5e7f635d54390986f5419bbf4747e63835df53d6 100644 --- a/alib2data/src/tree/unranked/UnrankedTree.cpp +++ b/alib2data/src/tree/unranked/UnrankedTree.cpp @@ -13,7 +13,6 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> -#include <registration/NameRegistration.hpp> namespace { @@ -29,6 +28,4 @@ static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::U static auto UnrankedTreeFromRankedTree = registration::CastRegister < tree::UnrankedTree < >, tree::RankedTree < > > ( ); -static auto name = registration::NameRegister < tree::UnrankedTree < > > ( tree::UnrankedTree < >::getXmlTagName ( ) ); - } /* namespace */ diff --git a/alib2xml/src/abstraction/XmlContainerParserRegistry.cpp b/alib2xml/src/abstraction/XmlContainerParserRegistry.cpp index 13bb83ee3665954f224215008784c91c08e41b54..04a0749e8c6d21b9a9983611943707ee36b0cab4 100644 --- a/alib2xml/src/abstraction/XmlContainerParserRegistry.cpp +++ b/alib2xml/src/abstraction/XmlContainerParserRegistry.cpp @@ -15,18 +15,12 @@ bool XmlContainerParserRegistry::hasAbstraction ( const std::string & container } std::shared_ptr < abstraction::OperationAbstraction > XmlContainerParserRegistry::getAbstraction ( const std::string & container, const std::string & type ) { - std::set < std::string > paramTypes; - if ( alib::namingApi::hasTypes ( type ) ) - paramTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( type ), [ ] ( const ext::type_index & theType ) { return ext::to_string ( theType ); } ); - else - paramTypes.insert ( type ); - auto group = getEntries ( ).find ( container ); if ( group == getEntries ( ).end ( ) ) throw exception::CommonException ( "Entry " + container + " not available" ); for ( const ext::pair < std::string, std::shared_ptr < Entry > > & entry : group->second ) - if ( paramTypes.count ( entry.first ) ) + if ( ext::is_same_type ( type, ext::erase_template_info ( entry.first ) ) ) return entry.second->getAbstraction ( ); throw exception::CommonException ( "Entry for " + container + " parametrized with " + type + " not available." ); diff --git a/alib2xml/src/abstraction/XmlContainerParserRegistry.hpp b/alib2xml/src/abstraction/XmlContainerParserRegistry.hpp index a3dcd1e7225179d5d9e3297b0f504a63c63f7b4f..31b385bb701cd6d241773400edfc9a98847674f6 100644 --- a/alib2xml/src/abstraction/XmlContainerParserRegistry.hpp +++ b/alib2xml/src/abstraction/XmlContainerParserRegistry.hpp @@ -13,12 +13,11 @@ #include <vector> #include <string> #include <set> +#include <map> #include <exception/CommonException.h> #include <abstraction/OperationAbstraction.hpp> -#include <core/namingApi.hpp> - namespace abstraction { class XmlContainerParserRegistry { diff --git a/alib2xml/src/abstraction/XmlRegistry.cpp b/alib2xml/src/abstraction/XmlRegistry.cpp index 9ed877748f2a8a6277f4a52437bd4ccc2bd8e389..b4076f57e17d1939f94713c95ad40fc0270df726 100644 --- a/alib2xml/src/abstraction/XmlRegistry.cpp +++ b/alib2xml/src/abstraction/XmlRegistry.cpp @@ -16,8 +16,6 @@ #include <abstraction/XmlTokensComposerAbstraction.hpp> #include <abstraction/XmlTokensParserAbstraction.hpp> -#include <core/namingApi.hpp> - namespace abstraction { ext::set < std::string > XmlRegistry::listDataTypes ( ) {