From 7a63c2a6b84ba612193834b261191e0409b97fea Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 10 Aug 2017 15:41:04 +0200 Subject: [PATCH] move type_index to ext namespace and cleanup --- acast2/src/acast.cpp | 4 +-- alib2cli/src/ast/statements/SingleStatement.h | 2 +- .../src/abstraction/AlgorithmRegistry.hpp | 20 ++++++------- .../src/abstraction/OperationAbstraction.hpp | 4 +-- alib2common/src/abstraction/Registry.cpp | 4 +-- alib2common/src/abstraction/Registry.h | 4 +-- .../abstraction/ValueOperationAbstraction.hpp | 8 ++--- .../abstraction/VoidOperationAbstraction.hpp | 8 ++--- alib2common/src/container/ObjectsDeque.h | 4 +-- alib2common/src/container/ObjectsList.h | 4 +-- alib2common/src/container/ObjectsMap.h | 4 +-- alib2common/src/container/ObjectsPair.h | 4 +-- alib2common/src/container/ObjectsSet.h | 4 +-- alib2common/src/container/ObjectsTree.h | 4 +-- alib2common/src/container/ObjectsTrie.h | 4 +-- alib2common/src/container/ObjectsVector.h | 4 +-- alib2common/src/core/castApi.hpp | 30 +++++++++---------- alib2common/src/core/multipleDispatch.hpp | 28 ++++++++--------- alib2common/src/core/namingApi.hpp | 10 +++---- alib2common/src/exception/CommonException.h | 4 +-- alib2common/src/object/AnyObject.h | 4 +-- alib2common/src/object/UniqueObject.h | 4 +-- alib2common/src/object/Void.h | 4 +-- alib2common/src/primitive/Bool.h | 4 +-- alib2common/src/primitive/Character.h | 4 +-- alib2common/src/primitive/Double.h | 4 +-- alib2common/src/primitive/Integer.h | 4 +-- alib2common/src/primitive/String.h | 4 +-- alib2common/src/primitive/Unsigned.h | 4 +-- alib2common/src/primitive/UnsignedLong.h | 4 +-- alib2data/src/alphabet/BarSymbol.h | 4 +-- alib2data/src/alphabet/BlankSymbol.h | 4 +-- .../src/alphabet/BottomOfTheStackSymbol.h | 4 +-- alib2data/src/alphabet/EndSymbol.h | 4 +-- alib2data/src/alphabet/InitialSymbol.h | 4 +-- alib2data/src/alphabet/LabeledSymbol.h | 4 +-- .../src/alphabet/NonlinearVariableSymbol.h | 4 +-- alib2data/src/alphabet/RankedSymbol.h | 4 +-- alib2data/src/alphabet/StartSymbol.h | 4 +-- .../src/alphabet/SubtreeWildcardSymbol.h | 4 +-- alib2data/src/alphabet/UniqueSymbol.h | 4 +-- alib2data/src/alphabet/VariablesBarSymbol.h | 4 +-- alib2data/src/automaton/FSM/CompactNFA.h | 4 +-- alib2data/src/automaton/FSM/DFA.h | 4 +-- alib2data/src/automaton/FSM/EpsilonNFA.h | 4 +-- alib2data/src/automaton/FSM/ExtendedNFA.h | 4 +-- .../src/automaton/FSM/MultiInitialStateNFA.h | 4 +-- alib2data/src/automaton/FSM/NFA.h | 4 +-- alib2data/src/automaton/PDA/DPDA.h | 4 +-- alib2data/src/automaton/PDA/InputDrivenDPDA.h | 4 +-- alib2data/src/automaton/PDA/InputDrivenNPDA.h | 4 +-- alib2data/src/automaton/PDA/NPDA.h | 4 +-- alib2data/src/automaton/PDA/NPDTA.h | 4 +-- .../PDA/RealTimeHeightDeterministicDPDA.h | 4 +-- .../PDA/RealTimeHeightDeterministicNPDA.h | 4 +-- alib2data/src/automaton/PDA/SinglePopDPDA.h | 4 +-- alib2data/src/automaton/PDA/SinglePopNPDA.h | 4 +-- .../src/automaton/PDA/VisiblyPushdownDPDA.h | 4 +-- .../src/automaton/PDA/VisiblyPushdownNPDA.h | 4 +-- alib2data/src/automaton/TA/DFTA.h | 4 +-- alib2data/src/automaton/TA/NFTA.h | 4 +-- alib2data/src/automaton/TM/OneTapeDTM.h | 4 +-- alib2data/src/grammar/ContextFree/CFG.h | 4 +-- alib2data/src/grammar/ContextFree/CNF.h | 4 +-- .../src/grammar/ContextFree/EpsilonFreeCFG.h | 4 +-- alib2data/src/grammar/ContextFree/GNF.h | 4 +-- alib2data/src/grammar/ContextFree/LG.h | 4 +-- alib2data/src/grammar/ContextSensitive/CSG.h | 4 +-- .../ContextSensitive/NonContractingGrammar.h | 4 +-- alib2data/src/grammar/Regular/LeftLG.h | 4 +-- alib2data/src/grammar/Regular/LeftRG.h | 4 +-- alib2data/src/grammar/Regular/RightLG.h | 4 +-- alib2data/src/grammar/Regular/RightRG.h | 4 +-- .../ContextPreservingUnrestrictedGrammar.h | 4 +-- .../Unrestricted/UnrestrictedGrammar.h | 4 +-- .../arbology/CompressedBitParallelTreeIndex.h | 4 +-- .../src/indexes/arbology/FullAndLinearIndex.h | 4 +-- .../arbology/NonlinearFullAndLinearIndex.h | 4 +-- .../src/indexes/stringology/BNDMMatcher.h | 4 +-- .../indexes/stringology/BitParallelIndex.h | 4 +-- .../stringology/CompressedBitParallelIndex.h | 4 +-- .../src/indexes/stringology/PositionHeap.h | 4 +-- .../src/indexes/stringology/SuffixArray.h | 4 +-- .../src/indexes/stringology/SuffixTrie.h | 4 +-- alib2data/src/label/FailStateLabel.h | 4 +-- alib2data/src/label/FinalStateLabel.h | 4 +-- alib2data/src/label/HexavigesimalLabel.h | 4 +-- alib2data/src/label/InitialStateLabel.h | 4 +-- alib2data/src/label/ObjectLabel.h | 4 +-- alib2data/src/label/PrimitiveLabel.h | 4 +-- alib2data/src/label/UniqueLabel.h | 4 +-- alib2data/src/regexp/formal/FormalRegExp.h | 4 +-- .../regexp/formal/FormalRegExpAlternation.h | 4 +-- .../regexp/formal/FormalRegExpConcatenation.h | 4 +-- .../src/regexp/formal/FormalRegExpEmpty.h | 4 +-- .../src/regexp/formal/FormalRegExpEpsilon.h | 4 +-- .../src/regexp/formal/FormalRegExpIteration.h | 4 +-- .../src/regexp/formal/FormalRegExpSymbol.h | 4 +-- .../src/regexp/unbounded/UnboundedRegExp.h | 4 +-- .../unbounded/UnboundedRegExpAlternation.h | 4 +-- .../unbounded/UnboundedRegExpConcatenation.h | 4 +-- .../regexp/unbounded/UnboundedRegExpEmpty.h | 4 +-- .../regexp/unbounded/UnboundedRegExpEpsilon.h | 4 +-- .../unbounded/UnboundedRegExpIteration.h | 4 +-- .../regexp/unbounded/UnboundedRegExpSymbol.h | 4 +-- alib2data/src/rte/formal/FormalRTE.h | 4 +-- .../src/rte/formal/FormalRTEAlternation.h | 4 +-- alib2data/src/rte/formal/FormalRTEEmpty.h | 4 +-- alib2data/src/rte/formal/FormalRTEIteration.h | 4 +-- .../src/rte/formal/FormalRTESubstitution.h | 4 +-- .../src/rte/formal/FormalRTESymbolAlphabet.h | 4 +-- .../src/rte/formal/FormalRTESymbolSubst.h | 4 +-- alib2data/src/string/CyclicString.h | 4 +-- alib2data/src/string/Epsilon.h | 4 +-- alib2data/src/string/LinearString.h | 4 +-- alib2data/src/tree/ranked/PostfixRankedTree.h | 4 +-- .../ranked/PrefixRankedBarNonlinearPattern.h | 4 +-- .../src/tree/ranked/PrefixRankedBarPattern.h | 4 +-- .../src/tree/ranked/PrefixRankedBarTree.h | 4 +-- .../ranked/PrefixRankedNonlinearPattern.h | 4 +-- .../src/tree/ranked/PrefixRankedPattern.h | 4 +-- alib2data/src/tree/ranked/PrefixRankedTree.h | 4 +-- .../src/tree/ranked/RankedNonlinearPattern.h | 4 +-- alib2data/src/tree/ranked/RankedPattern.h | 4 +-- alib2data/src/tree/ranked/RankedTree.h | 4 +-- alib2data/src/tree/unranked/PrefixBarTree.h | 4 +-- .../tree/unranked/UnrankedNonlinearPattern.h | 4 +-- alib2data/src/tree/unranked/UnrankedPattern.h | 4 +-- alib2data/src/tree/unranked/UnrankedTree.h | 4 +-- .../src/graph/directed/DirectedGraph.h | 4 +-- .../src/graph/undirected/UndirectedGraph.h | 4 +-- .../suffixTrie/SuffixTrieTerminatingSymbol.h | 4 +-- .../src/label/LR0ItemsLabel.h | 4 +-- .../string/LinearStringTerminatingSymbol.h | 4 +-- alib2std/src/extensions/typeindex.cpp | 10 ++----- alib2std/src/extensions/typeindex.h | 18 ++++++----- alib2std/src/extensions/typeinfo.cpp | 27 ----------------- alib2std/src/extensions/typeinfo.hpp | 11 ++----- 138 files changed, 322 insertions(+), 358 deletions(-) delete mode 100644 alib2std/src/extensions/typeinfo.cpp diff --git a/acast2/src/acast.cpp b/acast2/src/acast.cpp index f7389b8362..0e1a2fcd60 100644 --- a/acast2/src/acast.cpp +++ b/acast2/src/acast.cpp @@ -20,9 +20,9 @@ alib::Object doCast ( const alib::Object & in, const std::string & to ) { const alib::ObjectBase & inObject = in.getData ( ); - std::type_index inType = std::type_index ( typeid ( inObject ) ); + ext::type_index inType = ext::type_index ( typeid ( inObject ) ); - for ( const std::type_index & toType : alib::namingApi::getTypes ( to ) ) + for ( const ext::type_index & toType : alib::namingApi::getTypes ( to ) ) if ( alib::castApi::getCastPool ( toType ).castAvailable ( inType ) ) return alib::castApi::getCastPool ( toType ).cast ( inObject ); diff --git a/alib2cli/src/ast/statements/SingleStatement.h b/alib2cli/src/ast/statements/SingleStatement.h index 271b7cfb94..0adc69ed7d 100644 --- a/alib2cli/src/ast/statements/SingleStatement.h +++ b/alib2cli/src/ast/statements/SingleStatement.h @@ -21,7 +21,7 @@ public: params.push_back ( param->translateAndEval ( prev, environment ) ); } - ext::vector < std::type_index > paramTypes; + ext::vector < ext::type_index > paramTypes; for ( const std::shared_ptr < abstraction::OperationAbstraction > & param : params ) { paramTypes.push_back ( param->type ( ) ); } diff --git a/alib2common/src/abstraction/AlgorithmRegistry.hpp b/alib2common/src/abstraction/AlgorithmRegistry.hpp index 336fa8f245..26a0f8ba0a 100644 --- a/alib2common/src/abstraction/AlgorithmRegistry.hpp +++ b/alib2common/src/abstraction/AlgorithmRegistry.hpp @@ -61,8 +61,8 @@ class AlgorithmRegistry { virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( ) const override; }; - static ext::map < std::string, ext::map < ext::vector < std::type_index >, std::unique_ptr < Entry > > > & getEntries ( ) { - static ext::map < std::string, ext::map < ext::vector < std::type_index >, std::unique_ptr < Entry > > > algorithmGroups; + static ext::map < std::string, ext::map < ext::vector < ext::type_index >, std::unique_ptr < Entry > > > & getEntries ( ) { + static ext::map < std::string, ext::map < ext::vector < ext::type_index >, std::unique_ptr < Entry > > > algorithmGroups; return algorithmGroups; }; @@ -71,14 +71,14 @@ public: static void registerAlgorithm ( ReturnType ( * callback ) ( ParamTypes ... ), bool downcast, bool normalize ) { std::string algorithm = ext::to_string < Algo > ( ); - ext::vector < std::type_index > params; - ( void ) std::initializer_list < int > { ( params.push_back ( std::type_index ( typeid ( typename std::decay < ParamTypes >::type ) ) ), 0 ) ... }; + ext::vector < ext::type_index > params; + ( void ) std::initializer_list < int > { ( params.push_back ( ext::type_index ( typeid ( typename std::decay < ParamTypes >::type ) ) ), 0 ) ... }; if ( ! getEntries ( ) [ algorithm ].insert ( std::make_pair ( params, std::unique_ptr < Entry > ( new EntryImpl < ReturnType, ParamTypes ... > ( callback, downcast, normalize ) ) ) ).second ) throw ::exception::CommonException ( "Callback for " + algorithm + " already registered." ); } - static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( std::string name, const ext::vector < std::type_index > & paramTypes, bool & downcast, bool & normalize ) { + static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( std::string name, const ext::vector < ext::type_index > & paramTypes, bool & downcast, bool & normalize ) { auto group = getEntries ( ).find ( name ); if ( group == getEntries ( ).end ( ) ) throw exception::CommonException ( "Entry " + name + " not available" ); @@ -97,14 +97,14 @@ public: return overload->second->getAbstraction ( ); } - static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( std::string name, const ext::vector < std::type_index > & paramTypes ) { + static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( std::string name, const ext::vector < ext::type_index > & paramTypes ) { bool downcast; bool normalize; return getAbstraction ( std::move ( name ), paramTypes, downcast, normalize ); } static void listGroup ( const std::string & group ) { - for ( const std::pair < const std::string, ext::map < ext::vector < std::type_index >, std::unique_ptr < Entry > > > & entry : getEntries ( ) ) { + for ( const std::pair < const std::string, ext::map < ext::vector < ext::type_index >, std::unique_ptr < Entry > > > & entry : getEntries ( ) ) { if ( entry.first.find ( group ) == 0 ) //found at the begining std::cout << entry.first << std::endl; } @@ -115,15 +115,15 @@ public: if ( group == getEntries ( ).end ( ) ) throw exception::CommonException ( "Entry " + algorithm + " not available" ); - for ( const std::pair < const ext::vector < std::type_index >, std::unique_ptr < Entry > > & overloads : group->second ) { - for ( const std::type_index & param : overloads.first ) { + for ( const std::pair < const ext::vector < ext::type_index >, std::unique_ptr < Entry > > & overloads : group->second ) { + for ( const ext::type_index & param : overloads.first ) { std::cout << param << " " << std::endl; } } } static void list ( ) { - for ( const std::pair < const std::string, ext::map < ext::vector < std::type_index >, std::unique_ptr < Entry > > > & entry : getEntries ( ) ) { + for ( const std::pair < const std::string, ext::map < ext::vector < ext::type_index >, std::unique_ptr < Entry > > > & entry : getEntries ( ) ) { std::cout << entry.first << std::endl; } } diff --git a/alib2common/src/abstraction/OperationAbstraction.hpp b/alib2common/src/abstraction/OperationAbstraction.hpp index 11f3e9edf3..81f702f64d 100644 --- a/alib2common/src/abstraction/OperationAbstraction.hpp +++ b/alib2common/src/abstraction/OperationAbstraction.hpp @@ -30,8 +30,8 @@ public: virtual bool inputsAttached ( ) const = 0; virtual bool run ( ) = 0; virtual bool eval ( ) = 0; - virtual std::type_index type ( ) const = 0; - virtual std::type_index runtime_type ( ) const = 0; + virtual ext::type_index type ( ) const = 0; + virtual ext::type_index runtime_type ( ) const = 0; virtual unsigned numberOfParams ( ) const = 0; virtual bool cached ( ) const = 0; diff --git a/alib2common/src/abstraction/Registry.cpp b/alib2common/src/abstraction/Registry.cpp index 4764822dea..6ae0f879db 100644 --- a/alib2common/src/abstraction/Registry.cpp +++ b/alib2common/src/abstraction/Registry.cpp @@ -30,11 +30,11 @@ void Registry::listAlgorithms ( ) { AlgorithmRegistry::list ( ); } -std::shared_ptr < abstraction::OperationAbstraction > Registry::getAlgorithmAbstraction ( std::string name, const ext::vector < std::type_index > & paramTypes ) { +std::shared_ptr < abstraction::OperationAbstraction > Registry::getAlgorithmAbstraction ( std::string name, const ext::vector < ext::type_index > & paramTypes ) { return AlgorithmRegistry::getAbstraction ( std::move ( name ), paramTypes ); } -std::shared_ptr < abstraction::OperationAbstraction > Registry::getAlgorithmAbstraction ( std::string name, const ext::vector < std::type_index > & paramTypes, bool & unwrap, bool & normalize ) { +std::shared_ptr < abstraction::OperationAbstraction > Registry::getAlgorithmAbstraction ( std::string name, const ext::vector < ext::type_index > & paramTypes, bool & unwrap, bool & normalize ) { return AlgorithmRegistry::getAbstraction ( std::move ( name ), paramTypes, unwrap, normalize ); } diff --git a/alib2common/src/abstraction/Registry.h b/alib2common/src/abstraction/Registry.h index 79b57d5881..5daefbb8cf 100644 --- a/alib2common/src/abstraction/Registry.h +++ b/alib2common/src/abstraction/Registry.h @@ -18,8 +18,8 @@ public: static void listAlgorithmOverloads ( const std::string & algorithm ); static void listAlgorithms ( ); - static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( std::string name, const ext::vector < std::type_index > & paramTypes ); - static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( std::string name, const ext::vector < std::type_index > & paramTypes, bool & unwrap, bool & normalize ); + static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( std::string name, const ext::vector < ext::type_index > & paramTypes ); + static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( std::string name, const ext::vector < ext::type_index > & paramTypes, bool & unwrap, bool & normalize ); static std::shared_ptr < abstraction::OperationAbstraction > getCastAbstraction ( std::string target, std::string param ); static std::shared_ptr < abstraction::OperationAbstraction > getImmediateAbstraction ( std::string result, std::string value ); static std::shared_ptr < abstraction::OperationAbstraction > getNormalizeAbstraction ( std::string param ); diff --git a/alib2common/src/abstraction/ValueOperationAbstraction.hpp b/alib2common/src/abstraction/ValueOperationAbstraction.hpp index 2d2e9c9e5a..ec43b9ad3f 100644 --- a/alib2common/src/abstraction/ValueOperationAbstraction.hpp +++ b/alib2common/src/abstraction/ValueOperationAbstraction.hpp @@ -70,13 +70,13 @@ public: return Registry::getDowncastAbstraction ( concrete, base ); } - virtual std::type_index type ( ) const override { - return std::type_index ( typeid ( ReturnType ) ); + virtual ext::type_index type ( ) const override { + return ext::type_index ( typeid ( ReturnType ) ); } - virtual std::type_index runtime_type ( ) const override { + virtual ext::type_index runtime_type ( ) const override { if ( isReady ( ) ) - return std::type_index ( typeid ( getData ( ) ) ); + return ext::type_index ( typeid ( getData ( ) ) ); else throw exception::CommonException ( "Runtime type unknown before evaluation." ); } diff --git a/alib2common/src/abstraction/VoidOperationAbstraction.hpp b/alib2common/src/abstraction/VoidOperationAbstraction.hpp index db172bb0c4..b686c7ee47 100644 --- a/alib2common/src/abstraction/VoidOperationAbstraction.hpp +++ b/alib2common/src/abstraction/VoidOperationAbstraction.hpp @@ -45,12 +45,12 @@ public: throw exception::CommonException ( "Void algorithm does not have a result." ); } - virtual std::type_index type ( ) const override { - return std::type_index ( typeid ( void ) ); + virtual ext::type_index type ( ) const override { + return ext::type_index ( typeid ( void ) ); } - virtual std::type_index runtime_type ( ) const override { - return std::type_index ( typeid ( void ) ); + virtual ext::type_index runtime_type ( ) const override { + return ext::type_index ( typeid ( void ) ); } virtual bool cached ( ) const override { diff --git a/alib2common/src/container/ObjectsDeque.h b/alib2common/src/container/ObjectsDeque.h index 8f9205fc17..e25e0ba8fa 100644 --- a/alib2common/src/container/ObjectsDeque.h +++ b/alib2common/src/container/ObjectsDeque.h @@ -36,9 +36,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsDeque & other ) const; diff --git a/alib2common/src/container/ObjectsList.h b/alib2common/src/container/ObjectsList.h index 12b53d7001..9cbf7e4d0c 100644 --- a/alib2common/src/container/ObjectsList.h +++ b/alib2common/src/container/ObjectsList.h @@ -36,9 +36,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsList & other ) const; diff --git a/alib2common/src/container/ObjectsMap.h b/alib2common/src/container/ObjectsMap.h index a1d09007ff..8e0f38bcdf 100644 --- a/alib2common/src/container/ObjectsMap.h +++ b/alib2common/src/container/ObjectsMap.h @@ -38,9 +38,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsMap & other ) const; diff --git a/alib2common/src/container/ObjectsPair.h b/alib2common/src/container/ObjectsPair.h index b6282cc376..6b237194f5 100644 --- a/alib2common/src/container/ObjectsPair.h +++ b/alib2common/src/container/ObjectsPair.h @@ -36,9 +36,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsPair & other ) const; diff --git a/alib2common/src/container/ObjectsSet.h b/alib2common/src/container/ObjectsSet.h index f7492634b7..e20bb49d4b 100644 --- a/alib2common/src/container/ObjectsSet.h +++ b/alib2common/src/container/ObjectsSet.h @@ -36,9 +36,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsSet & other ) const; diff --git a/alib2common/src/container/ObjectsTree.h b/alib2common/src/container/ObjectsTree.h index e230dc8508..4a742defa9 100644 --- a/alib2common/src/container/ObjectsTree.h +++ b/alib2common/src/container/ObjectsTree.h @@ -35,9 +35,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsTree & other ) const; diff --git a/alib2common/src/container/ObjectsTrie.h b/alib2common/src/container/ObjectsTrie.h index fab4a853e9..89bb303338 100644 --- a/alib2common/src/container/ObjectsTrie.h +++ b/alib2common/src/container/ObjectsTrie.h @@ -35,9 +35,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsTrie & other ) const; diff --git a/alib2common/src/container/ObjectsVector.h b/alib2common/src/container/ObjectsVector.h index 6ca4118c95..c7b3a214b7 100644 --- a/alib2common/src/container/ObjectsVector.h +++ b/alib2common/src/container/ObjectsVector.h @@ -36,9 +36,9 @@ public: virtual ContainerBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectsVector & other ) const; diff --git a/alib2common/src/core/castApi.hpp b/alib2common/src/core/castApi.hpp index 7b2b0c17c5..9e5787d85c 100644 --- a/alib2common/src/core/castApi.hpp +++ b/alib2common/src/core/castApi.hpp @@ -23,7 +23,7 @@ struct castApi { private: class CastPoolBase { protected: - ext::map < std::type_index, std::function < alib::Object ( const alib::ObjectBase & ) > > castFunctions; + ext::map < ext::type_index, std::function < alib::Object ( const alib::ObjectBase & ) > > castFunctions; virtual std::string toType ( ) = 0; @@ -32,7 +32,7 @@ private: } alib::Object cast ( const alib::ObjectBase & from ) { - ext::map < std::type_index, std::function < alib::Object ( const alib::ObjectBase & ) > >::iterator res = castFunctions.find ( std::type_index ( typeid ( from ) ) ); + ext::map < ext::type_index, std::function < alib::Object ( const alib::ObjectBase & ) > >::iterator res = castFunctions.find ( ext::type_index ( typeid ( from ) ) ); if ( res == castFunctions.end ( ) ) { std::string fromType = ext::to_string ( typeid ( from ) ); @@ -43,7 +43,7 @@ private: return res->second ( from ); } - bool castAvailable ( std::type_index from ) { + bool castAvailable ( ext::type_index from ) { return castFunctions.count ( from ); } @@ -54,7 +54,7 @@ private: public: template < class From > void add ( std::function < To ( const From & ) > castFunction ) { - bool res = castFunctions.insert ( std::make_pair ( std::type_index ( typeid ( From ) ), [=] ( const alib::ObjectBase & from ) { + bool res = castFunctions.insert ( std::make_pair ( ext::type_index ( typeid ( From ) ), [=] ( const alib::ObjectBase & from ) { return alib::Object ( castFunction ( static_cast < const From & > ( from ) ) ); } ) ).second; if ( ! res ) { @@ -82,7 +82,7 @@ private: template < class From > bool test ( ) { - return castFunctions.count ( std::type_index ( typeid ( From ) ) ); + return castFunctions.count ( ext::type_index ( typeid ( From ) ) ); } std::string toType ( ) { @@ -92,25 +92,25 @@ private: }; private: - class CastPoolBaseMap : public ext::map < std::type_index, CastPoolBase * > { + class CastPoolBaseMap : public ext::map < ext::type_index, CastPoolBase * > { public: ~CastPoolBaseMap ( ) { - for ( const std::pair < const std::type_index, CastPoolBase * > & item : * this ) + for ( const std::pair < const ext::type_index, CastPoolBase * > & item : * this ) delete item.second; } }; // INFO: Function exist to handle static order of initialisation - static ext::map < std::type_index, CastPoolBase * > & castFunctionsById ( ) { + static ext::map < ext::type_index, CastPoolBase * > & castFunctionsById ( ) { static CastPoolBaseMap res; return res; } public: - static CastPoolBase & getCastPool ( std::type_index typeId ) { - ext::map < std::type_index, CastPoolBase * >::iterator res = castFunctionsById ( ).find ( typeId ); + static CastPoolBase & getCastPool ( ext::type_index typeId ) { + ext::map < ext::type_index, CastPoolBase * >::iterator res = castFunctionsById ( ).find ( typeId ); if ( res == castFunctionsById ( ).end ( ) ) { std::string toType = ext::to_string ( typeId ); @@ -123,19 +123,19 @@ public: template < class To > static CastPool < To > & getCastPool ( ) { - ext::map < std::type_index, CastPoolBase * >::iterator res = castFunctionsById ( ).find ( std::type_index ( typeid ( To ) ) ); + ext::map < ext::type_index, CastPoolBase * >::iterator res = castFunctionsById ( ).find ( ext::type_index ( typeid ( To ) ) ); if ( res == castFunctionsById ( ).end ( ) ) { CastPool < To > * castPool = new CastPool < To > ( ); castPool->template add < To > ( ); - return * ( CastPool < To > * )( castFunctionsById ( ).insert ( std::make_pair ( std::type_index ( typeid ( To ) ), castPool ) ).first->second ); + return * ( CastPool < To > * )( castFunctionsById ( ).insert ( std::make_pair ( ext::type_index ( typeid ( To ) ), castPool ) ).first->second ); } else { return * ( CastPool < To > * )res->second; } } - static bool castAvailable ( std::type_index to, std::type_index from ) { - ext::map < std::type_index, CastPoolBase * >::iterator res = castFunctionsById ( ).find ( to ); + static bool castAvailable ( ext::type_index to, ext::type_index from ) { + ext::map < ext::type_index, CastPoolBase * >::iterator res = castFunctionsById ( ).find ( to ); if ( res == castFunctionsById ( ).end ( ) ) return false; @@ -145,7 +145,7 @@ public: template < class To, class From > static bool castAvailable ( ) { - return castAvailable ( std::type_index ( typeid ( To ) ), std::type_index ( typeid ( From ) ) ); + return castAvailable ( ext::type_index ( typeid ( To ) ), ext::type_index ( typeid ( From ) ) ); } }; diff --git a/alib2common/src/core/multipleDispatch.hpp b/alib2common/src/core/multipleDispatch.hpp index c253b6a0fe..c518d10926 100644 --- a/alib2common/src/core/multipleDispatch.hpp +++ b/alib2common/src/core/multipleDispatch.hpp @@ -59,7 +59,7 @@ private: }; - ext::map < typename ext::TupleBuilder < std::type_index, sizeof ... ( DispatchedParameterTypes ) >::type, std::unique_ptr < RegistratorWrapperBase > > registeredFunctions; + ext::map < typename ext::TupleBuilder < ext::type_index, sizeof ... ( DispatchedParameterTypes ) >::type, std::unique_ptr < RegistratorWrapperBase > > registeredFunctions; static MultipleDispatch < Algorithm, ReturnType, ext::tuple < FrontStaticParamTypes ... >, ext::tuple < DispatchedParameterTypes ... >, ext::tuple < BackStaticParamTypes ... > > & getInstance ( ) { static MultipleDispatch < Algorithm, ReturnType, ext::tuple < FrontStaticParamTypes ... >, ext::tuple < DispatchedParameterTypes ... >, ext::tuple < BackStaticParamTypes ... > > res; @@ -72,7 +72,7 @@ public: // static void registerOverload ( overload < RealReturnType, RealParameterTypeBases ... > callback ) { causes clang 4.0.0 to crash... // static void registerOverload ( rawOverload < RealReturnType, RealParameterTypeBases ... > callback ) { causes clang 4.0.0 to crash... static void registerOverload ( RealReturnType ( * callback ) ( FrontStaticParamTypes ..., typename ext::match_cv_ref < DispatchedParameterTypes, RealParameterTypeBases >::type && ..., BackStaticParamTypes ... ) ) { - auto key = ext::make_tuple ( std::type_index ( typeid ( typename ext::match_cv_ref < DispatchedParameterTypes, RealParameterTypeBases >::type ) ) ... ); + auto key = ext::make_tuple ( ext::type_index ( typeid ( typename ext::match_cv_ref < DispatchedParameterTypes, RealParameterTypeBases >::type ) ) ... ); std::unique_ptr < RegistratorWrapperBase > value ( new RegistratorWrapper < RealReturnType, RealParameterTypeBases ... > ( callback ) ); bool res = getInstance ( ).registeredFunctions.insert ( std::make_pair ( std::move ( key ), std::move ( value ) ) ).second; @@ -88,7 +88,7 @@ public: } static ReturnType dispatch ( FrontStaticParamTypes ... front, DispatchedParameterTypes && ... dispatched, BackStaticParamTypes ... back ) { - auto callback = getInstance ( ).registeredFunctions.find ( ext::make_tuple ( std::type_index ( typeid ( dispatched ) ) ... ) ); + auto callback = getInstance ( ).registeredFunctions.find ( ext::make_tuple ( ext::type_index ( typeid ( dispatched ) ) ... ) ); if ( callback == getInstance ( ).registeredFunctions.end ( ) ) { std::stringstream ss; @@ -138,7 +138,7 @@ private: class RegistratorWrapperBase { public: virtual ReturnType eval ( bool firstAttempt, ParametersType &&, ParametersType && ) = 0; - virtual bool available ( bool firstAttempt, std::type_index first, std::type_index second ) = 0; + virtual bool available ( bool firstAttempt, ext::type_index first, ext::type_index second ) = 0; }; template < class RealReturnType, class RealParametersTypeBase > @@ -149,19 +149,19 @@ private: public: ReturnType eval ( bool firstAttempt, ParametersType && first, ParametersType && second ) { - if ( std::type_index ( typeid ( first ) ) == std::type_index ( typeid ( second ) ) ) + if ( ext::type_index ( typeid ( first ) ) == ext::type_index ( typeid ( second ) ) ) return ReturnType ( m_callback ( std::forward < RealParametersType > ( static_cast < RealParametersType && > ( first ) ), std::forward < RealParametersType > ( static_cast < RealParametersType && > ( second ) ) ) ); if ( firstAttempt ) { - alib::Object casted = alib::castApi::getCastPool ( std::type_index ( typeid ( first ) ) ).cast ( std::forward < ParametersType > ( second ) ); + alib::Object casted = alib::castApi::getCastPool ( ext::type_index ( typeid ( first ) ) ).cast ( std::forward < ParametersType > ( second ) ); return ReturnType ( m_callback ( std::forward < RealParametersType > ( static_cast < RealParametersType && > ( first ) ), std::forward < RealParametersType > ( static_cast < RealParametersType && > ( casted.getData ( ) ) ) ) ); } else { - alib::Object casted = alib::castApi::getCastPool ( std::type_index ( typeid ( second ) ) ).cast ( std::forward < ParametersType > ( first ) ); + alib::Object casted = alib::castApi::getCastPool ( ext::type_index ( typeid ( second ) ) ).cast ( std::forward < ParametersType > ( first ) ); return ReturnType ( m_callback ( std::forward < RealParametersType > ( static_cast < RealParametersType && > ( casted.getData ( ) ) ), std::forward < RealParametersType > ( static_cast < RealParametersType && > ( second ) ) ) ); } } - bool available ( bool firstAttempt, std::type_index first, std::type_index second ) { + bool available ( bool firstAttempt, ext::type_index first, ext::type_index second ) { if ( first == second ) return true; if ( firstAttempt ) @@ -175,7 +175,7 @@ private: }; - ext::map < std::type_index, std::unique_ptr < RegistratorWrapperBase > > registeredFunctions; + ext::map < ext::type_index, std::unique_ptr < RegistratorWrapperBase > > registeredFunctions; static PromotingDoubleDispatch < Algorithm, ReturnType, ParametersType > & getInstance ( ) { static PromotingDoubleDispatch < Algorithm, ReturnType, ParametersType > res; @@ -188,7 +188,7 @@ public: static void registerOverload ( RealReturnType ( * callback ) ( typename ext::match_cv_ref < ParametersType, RealParametersTypeBase >::type &&, typename ext::match_cv_ref < ParametersType, RealParametersTypeBase >::type && ) ) { std::unique_ptr < RegistratorWrapperBase > value ( new RegistratorWrapper < RealReturnType, RealParametersTypeBase > ( callback ) ); - bool res = getInstance ( ).registeredFunctions.insert ( std::make_pair ( std::type_index ( typeid ( typename ext::match_cv_ref < ParametersType, RealParametersTypeBase >::type ) ), std::move ( value ) ) ).second; + bool res = getInstance ( ).registeredFunctions.insert ( std::make_pair ( ext::type_index ( typeid ( typename ext::match_cv_ref < ParametersType, RealParametersTypeBase >::type ) ), std::move ( value ) ) ).second; if ( ! res ) { std::string paramsType = ext::to_string < typename ext::match_cv_ref < ParametersType, RealParametersTypeBase >::type > ( ); @@ -199,14 +199,14 @@ public: } static ReturnType dispatch ( ParametersType && first, ParametersType && second ) { - typename ext::map < std::type_index, std::unique_ptr < RegistratorWrapperBase > >::iterator callback = getInstance ( ).registeredFunctions.find ( std::type_index ( typeid ( first ) ) ); + typename ext::map < ext::type_index, std::unique_ptr < RegistratorWrapperBase > >::iterator callback = getInstance ( ).registeredFunctions.find ( ext::type_index ( typeid ( first ) ) ); - if ( ( callback != getInstance ( ).registeredFunctions.end ( ) ) && callback->second->available ( true, std::type_index ( typeid ( first ) ), std::type_index ( typeid ( second ) ) ) ) + if ( ( callback != getInstance ( ).registeredFunctions.end ( ) ) && callback->second->available ( true, ext::type_index ( typeid ( first ) ), ext::type_index ( typeid ( second ) ) ) ) return callback->second->eval ( true, std::forward < ParametersType > ( first ), std::forward < ParametersType > ( second ) ); - callback = getInstance ( ).registeredFunctions.find ( std::type_index ( typeid ( second ) ) ); + callback = getInstance ( ).registeredFunctions.find ( ext::type_index ( typeid ( second ) ) ); - if ( ( callback != getInstance ( ).registeredFunctions.end ( ) ) && callback->second->available ( false, std::type_index ( typeid ( first ) ), std::type_index ( typeid ( second ) ) ) ) + if ( ( callback != getInstance ( ).registeredFunctions.end ( ) ) && callback->second->available ( false, ext::type_index ( typeid ( first ) ), ext::type_index ( typeid ( second ) ) ) ) return callback->second->eval ( false, std::forward < ParametersType > ( first ), std::forward < ParametersType > ( second ) ); std::string firstType = ext::to_string ( typeid ( first ) ); diff --git a/alib2common/src/core/namingApi.hpp b/alib2common/src/core/namingApi.hpp index abf732674a..b4681f14b0 100644 --- a/alib2common/src/core/namingApi.hpp +++ b/alib2common/src/core/namingApi.hpp @@ -18,21 +18,21 @@ namespace alib { class namingApi { - static ext::map < std::string, ext::set < std::type_index > > & getNames ( ) { - static ext::map < std::string, ext::set < std::type_index > > names; + 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 ) { - std::type_index type = std::type_index ( typeid ( Type ) ); - std::pair < ext::set < std::type_index >::iterator, bool > res = getNames ( ) [ name ].insert ( type ); + 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 < std::type_index > & getTypes ( std::string stringname ) { + 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."); diff --git a/alib2common/src/exception/CommonException.h b/alib2common/src/exception/CommonException.h index a41a54139d..7434c628c6 100644 --- a/alib2common/src/exception/CommonException.h +++ b/alib2common/src/exception/CommonException.h @@ -39,9 +39,9 @@ public: virtual alib::ObjectBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CommonException & other ) const; diff --git a/alib2common/src/object/AnyObject.h b/alib2common/src/object/AnyObject.h index 77471cb53a..9b2bbb4d12 100644 --- a/alib2common/src/object/AnyObject.h +++ b/alib2common/src/object/AnyObject.h @@ -39,9 +39,9 @@ public: const T & getData ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const AnyObject & other ) const; diff --git a/alib2common/src/object/UniqueObject.h b/alib2common/src/object/UniqueObject.h index b323091170..2628313823 100644 --- a/alib2common/src/object/UniqueObject.h +++ b/alib2common/src/object/UniqueObject.h @@ -42,9 +42,9 @@ public: primitive::Integer & getId ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UniqueObject & other ) const; diff --git a/alib2common/src/object/Void.h b/alib2common/src/object/Void.h index 46ab9c0dc6..317aba435d 100644 --- a/alib2common/src/object/Void.h +++ b/alib2common/src/object/Void.h @@ -30,9 +30,9 @@ public: virtual ObjectBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Void & other ) const; diff --git a/alib2common/src/primitive/Bool.h b/alib2common/src/primitive/Bool.h index d8f1c8326b..7e91b70344 100644 --- a/alib2common/src/primitive/Bool.h +++ b/alib2common/src/primitive/Bool.h @@ -44,9 +44,9 @@ public: void setData ( bool data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Bool & other ) const; diff --git a/alib2common/src/primitive/Character.h b/alib2common/src/primitive/Character.h index 78e5ef1b5a..62814d844e 100644 --- a/alib2common/src/primitive/Character.h +++ b/alib2common/src/primitive/Character.h @@ -44,9 +44,9 @@ public: void setData ( char data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Character & other ) const; diff --git a/alib2common/src/primitive/Double.h b/alib2common/src/primitive/Double.h index 2ca6999aad..f3c3a2280b 100644 --- a/alib2common/src/primitive/Double.h +++ b/alib2common/src/primitive/Double.h @@ -44,9 +44,9 @@ public: void setData ( double data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Double & other ) const; diff --git a/alib2common/src/primitive/Integer.h b/alib2common/src/primitive/Integer.h index 59ce6a740d..da6cd69b07 100644 --- a/alib2common/src/primitive/Integer.h +++ b/alib2common/src/primitive/Integer.h @@ -44,9 +44,9 @@ public: void setData ( int data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Integer & other ) const; diff --git a/alib2common/src/primitive/String.h b/alib2common/src/primitive/String.h index 88d34f8d12..06a188734e 100644 --- a/alib2common/src/primitive/String.h +++ b/alib2common/src/primitive/String.h @@ -45,9 +45,9 @@ public: std::string & getData ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const String & other ) const; diff --git a/alib2common/src/primitive/Unsigned.h b/alib2common/src/primitive/Unsigned.h index a27e78f61c..97ed5d602e 100644 --- a/alib2common/src/primitive/Unsigned.h +++ b/alib2common/src/primitive/Unsigned.h @@ -46,9 +46,9 @@ public: void setData ( unsigned data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Unsigned & other ) const; diff --git a/alib2common/src/primitive/UnsignedLong.h b/alib2common/src/primitive/UnsignedLong.h index f1abcdca56..bd4cfbf082 100644 --- a/alib2common/src/primitive/UnsignedLong.h +++ b/alib2common/src/primitive/UnsignedLong.h @@ -44,9 +44,9 @@ public: void setData ( unsigned long data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UnsignedLong & other ) const; diff --git a/alib2data/src/alphabet/BarSymbol.h b/alib2data/src/alphabet/BarSymbol.h index ca97ca7358..1ed96e6f4f 100644 --- a/alib2data/src/alphabet/BarSymbol.h +++ b/alib2data/src/alphabet/BarSymbol.h @@ -29,9 +29,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const BarSymbol & other ) const; diff --git a/alib2data/src/alphabet/BlankSymbol.h b/alib2data/src/alphabet/BlankSymbol.h index a7ff17b9b1..c6de00c362 100644 --- a/alib2data/src/alphabet/BlankSymbol.h +++ b/alib2data/src/alphabet/BlankSymbol.h @@ -29,9 +29,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const BlankSymbol & other ) const; diff --git a/alib2data/src/alphabet/BottomOfTheStackSymbol.h b/alib2data/src/alphabet/BottomOfTheStackSymbol.h index 7c9f025273..c6180b293e 100644 --- a/alib2data/src/alphabet/BottomOfTheStackSymbol.h +++ b/alib2data/src/alphabet/BottomOfTheStackSymbol.h @@ -29,9 +29,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const BottomOfTheStackSymbol & other ) const; diff --git a/alib2data/src/alphabet/EndSymbol.h b/alib2data/src/alphabet/EndSymbol.h index 4e8c6c97d7..d3c4fca72c 100644 --- a/alib2data/src/alphabet/EndSymbol.h +++ b/alib2data/src/alphabet/EndSymbol.h @@ -29,9 +29,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const EndSymbol & other ) const; diff --git a/alib2data/src/alphabet/InitialSymbol.h b/alib2data/src/alphabet/InitialSymbol.h index ffa2ad08ed..523db64b1d 100644 --- a/alib2data/src/alphabet/InitialSymbol.h +++ b/alib2data/src/alphabet/InitialSymbol.h @@ -30,9 +30,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const InitialSymbol & other ) const; diff --git a/alib2data/src/alphabet/LabeledSymbol.h b/alib2data/src/alphabet/LabeledSymbol.h index e73d419db6..5577891bfc 100644 --- a/alib2data/src/alphabet/LabeledSymbol.h +++ b/alib2data/src/alphabet/LabeledSymbol.h @@ -42,9 +42,9 @@ public: label::Label & getLabel ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const LabeledSymbol & other ) const; diff --git a/alib2data/src/alphabet/NonlinearVariableSymbol.h b/alib2data/src/alphabet/NonlinearVariableSymbol.h index edbd068a96..5954ea0ffb 100644 --- a/alib2data/src/alphabet/NonlinearVariableSymbol.h +++ b/alib2data/src/alphabet/NonlinearVariableSymbol.h @@ -51,9 +51,9 @@ public: SymbolType & getSymbol ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NonlinearVariableSymbol & other ) const; diff --git a/alib2data/src/alphabet/RankedSymbol.h b/alib2data/src/alphabet/RankedSymbol.h index e140130602..84e0b2f45c 100644 --- a/alib2data/src/alphabet/RankedSymbol.h +++ b/alib2data/src/alphabet/RankedSymbol.h @@ -34,9 +34,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const RankedSymbol & other ) const; diff --git a/alib2data/src/alphabet/StartSymbol.h b/alib2data/src/alphabet/StartSymbol.h index 8d26e1f5b7..eaaa9a9c94 100644 --- a/alib2data/src/alphabet/StartSymbol.h +++ b/alib2data/src/alphabet/StartSymbol.h @@ -29,9 +29,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const StartSymbol & other ) const; diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.h b/alib2data/src/alphabet/SubtreeWildcardSymbol.h index 2998b05f90..f76fa44fab 100644 --- a/alib2data/src/alphabet/SubtreeWildcardSymbol.h +++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.h @@ -30,9 +30,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const SubtreeWildcardSymbol & other ) const; diff --git a/alib2data/src/alphabet/UniqueSymbol.h b/alib2data/src/alphabet/UniqueSymbol.h index cdca43cd10..91b205e3f5 100644 --- a/alib2data/src/alphabet/UniqueSymbol.h +++ b/alib2data/src/alphabet/UniqueSymbol.h @@ -42,9 +42,9 @@ public: primitive::Integer & getId ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UniqueSymbol & other ) const; diff --git a/alib2data/src/alphabet/VariablesBarSymbol.h b/alib2data/src/alphabet/VariablesBarSymbol.h index a8b0c8bb70..0608d7181e 100644 --- a/alib2data/src/alphabet/VariablesBarSymbol.h +++ b/alib2data/src/alphabet/VariablesBarSymbol.h @@ -30,9 +30,9 @@ public: virtual SymbolBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const VariablesBarSymbol & other ) const; diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h index 19c866b4f4..86126da059 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.h +++ b/alib2data/src/automaton/FSM/CompactNFA.h @@ -158,9 +158,9 @@ public: ext::map < ext::pair < StateType, ext::vector < SymbolType > >, ext::set < StateType > > getTransitionsToState ( const StateType & from ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CompactNFA & other ) const; diff --git a/alib2data/src/automaton/FSM/DFA.h b/alib2data/src/automaton/FSM/DFA.h index 9665552717..ffb889aa43 100644 --- a/alib2data/src/automaton/FSM/DFA.h +++ b/alib2data/src/automaton/FSM/DFA.h @@ -150,9 +150,9 @@ public: bool isTotal ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const DFA & other ) const; diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h index e6c7631c70..9eb1cac09b 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.h +++ b/alib2data/src/automaton/FSM/EpsilonNFA.h @@ -251,9 +251,9 @@ public: bool isTotal ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const EpsilonNFA & other ) const; diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.h b/alib2data/src/automaton/FSM/ExtendedNFA.h index 24fb17a703..4de6209c92 100644 --- a/alib2data/src/automaton/FSM/ExtendedNFA.h +++ b/alib2data/src/automaton/FSM/ExtendedNFA.h @@ -162,9 +162,9 @@ public: ext::map < ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, ext::set < StateType > > getTransitionsToState ( const StateType & from ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ExtendedNFA & other ) const; diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h index 93ee6d7890..e94dcae431 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h +++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h @@ -176,9 +176,9 @@ public: unsigned transitionsSize ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const MultiInitialStateNFA & other ) const; diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h index 7acac68985..2c6210f1eb 100644 --- a/alib2data/src/automaton/FSM/NFA.h +++ b/alib2data/src/automaton/FSM/NFA.h @@ -168,9 +168,9 @@ public: unsigned transitionsSize ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NFA & other ) const; diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h index a487f4ca4e..b83d4df3a1 100644 --- a/alib2data/src/automaton/PDA/DPDA.h +++ b/alib2data/src/automaton/PDA/DPDA.h @@ -183,9 +183,9 @@ public: ext::map < ext::tuple < StateType, ext::variant < EpsilonType, InputSymbolType >, ext::vector < PushdownStoreSymbolType > >, ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > getTransitionsToState ( const StateType & from ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const DPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/PDA/InputDrivenDPDA.h index 67973530ae..c76cf6f04b 100644 --- a/alib2data/src/automaton/PDA/InputDrivenDPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.h @@ -187,9 +187,9 @@ public: bool isDeterministic ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const InputDrivenDPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h index 6eaa97730b..f3f3773559 100644 --- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h @@ -196,9 +196,9 @@ public: bool isDeterministic ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const InputDrivenNPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h index 8e2a7feefd..1f04d9d88f 100644 --- a/alib2data/src/automaton/PDA/NPDA.h +++ b/alib2data/src/automaton/PDA/NPDA.h @@ -181,9 +181,9 @@ public: const ext::map < ext::tuple < StateType, ext::variant < EpsilonType, InputSymbolType >, ext::vector < PushdownStoreSymbolType > >, ext::set < ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > > & getTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/NPDTA.h b/alib2data/src/automaton/PDA/NPDTA.h index f13f665655..f57147b461 100644 --- a/alib2data/src/automaton/PDA/NPDTA.h +++ b/alib2data/src/automaton/PDA/NPDTA.h @@ -205,9 +205,9 @@ public: ext::map < ext::tuple < StateType, ext::variant < EpsilonType, InputSymbolType >, ext::vector < PushdownStoreSymbolType > >, ext::tuple < StateType, ext::vector < PushdownStoreSymbolType >, ext::vector < OutputSymbolType > > > getTransitionsFromState ( const StateType & from ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NPDTA & other ) const; diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h index 10f7bcda8c..084a4f34b3 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h @@ -209,9 +209,9 @@ public: const ext::map < ext::pair < StateType, ext::variant < EpsilonType, InputSymbolType > >, StateType > & getLocalTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const RealTimeHeightDeterministicDPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h index 585c63a2b9..10ef820363 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h @@ -250,9 +250,9 @@ public: const ext::map < ext::pair < StateType, ext::variant < EpsilonType, InputSymbolType > >, ext::set < StateType > > & getLocalTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const RealTimeHeightDeterministicNPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h index dd1d1fc33b..efb592ac13 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h @@ -174,9 +174,9 @@ public: const ext::map < ext::tuple < StateType, ext::variant < EpsilonType, InputSymbolType >, PushdownStoreSymbolType >, ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > & getTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const SinglePopDPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h index fcd24d0b03..c30e283c39 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h @@ -181,9 +181,9 @@ public: const ext::map < ext::tuple < StateType, ext::variant < EpsilonType, InputSymbolType >, PushdownStoreSymbolType >, ext::set < ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > > & getTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const SinglePopNPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h index 70a62bb28e..8471db4ffe 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h @@ -242,9 +242,9 @@ public: const ext::map < ext::pair < StateType, InputSymbolType >, StateType > & getLocalTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const VisiblyPushdownDPDA & other ) const; diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h index 3466ed07bf..f82b0d6153 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h @@ -277,9 +277,9 @@ public: const ext::map < ext::pair < StateType, InputSymbolType >, ext::set < StateType > > & getLocalTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const VisiblyPushdownNPDA & other ) const; diff --git a/alib2data/src/automaton/TA/DFTA.h b/alib2data/src/automaton/TA/DFTA.h index a3e4e942dd..1ad2e3eb8b 100644 --- a/alib2data/src/automaton/TA/DFTA.h +++ b/alib2data/src/automaton/TA/DFTA.h @@ -125,9 +125,9 @@ public: unsigned transitionsSize ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const DFTA & other ) const; diff --git a/alib2data/src/automaton/TA/NFTA.h b/alib2data/src/automaton/TA/NFTA.h index 2871a7b85b..c382f103f6 100644 --- a/alib2data/src/automaton/TA/NFTA.h +++ b/alib2data/src/automaton/TA/NFTA.h @@ -143,9 +143,9 @@ public: unsigned transitionsSize ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NFTA & other ) const; diff --git a/alib2data/src/automaton/TM/OneTapeDTM.h b/alib2data/src/automaton/TM/OneTapeDTM.h index 2c6e269ae3..dfbffb0872 100644 --- a/alib2data/src/automaton/TM/OneTapeDTM.h +++ b/alib2data/src/automaton/TM/OneTapeDTM.h @@ -162,9 +162,9 @@ public: const ext::map < ext::pair < StateType, SymbolType >, ext::tuple < StateType, SymbolType, Shift > > & getTransitions ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const OneTapeDTM & other ) const; diff --git a/alib2data/src/grammar/ContextFree/CFG.h b/alib2data/src/grammar/ContextFree/CFG.h index e371d3c52d..6d43d7e272 100644 --- a/alib2data/src/grammar/ContextFree/CFG.h +++ b/alib2data/src/grammar/ContextFree/CFG.h @@ -96,9 +96,9 @@ public: } virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CFG & other ) const; diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h index c6ecb8320d..3bf4c0248d 100644 --- a/alib2data/src/grammar/ContextFree/CNF.h +++ b/alib2data/src/grammar/ContextFree/CNF.h @@ -103,9 +103,9 @@ public: bool getGeneratesEpsilon ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CNF & other ) const; diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h index acab16d262..536c84d3e0 100644 --- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h +++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h @@ -98,9 +98,9 @@ public: bool getGeneratesEpsilon ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const EpsilonFreeCFG & other ) const; diff --git a/alib2data/src/grammar/ContextFree/GNF.h b/alib2data/src/grammar/ContextFree/GNF.h index acde0fed8d..ad224bc6f9 100644 --- a/alib2data/src/grammar/ContextFree/GNF.h +++ b/alib2data/src/grammar/ContextFree/GNF.h @@ -99,9 +99,9 @@ public: bool getGeneratesEpsilon ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const GNF & other ) const; diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h index fa2722c1cd..4dd3c0436d 100644 --- a/alib2data/src/grammar/ContextFree/LG.h +++ b/alib2data/src/grammar/ContextFree/LG.h @@ -100,9 +100,9 @@ public: } virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const LG & other ) const; diff --git a/alib2data/src/grammar/ContextSensitive/CSG.h b/alib2data/src/grammar/ContextSensitive/CSG.h index da7666cad0..e299253c04 100644 --- a/alib2data/src/grammar/ContextSensitive/CSG.h +++ b/alib2data/src/grammar/ContextSensitive/CSG.h @@ -92,9 +92,9 @@ public: bool getGeneratesEpsilon ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CSG & other ) const; diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h index 5095e0994e..15515d11c1 100644 --- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h +++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h @@ -92,9 +92,9 @@ public: bool getGeneratesEpsilon ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NonContractingGrammar & other ) const; diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h index 9d157afcc4..132fc6a314 100644 --- a/alib2data/src/grammar/Regular/LeftLG.h +++ b/alib2data/src/grammar/Regular/LeftLG.h @@ -285,9 +285,9 @@ public: * @copydoc alib::CommonBase<ObjectBase>::compare ( const ObjectBase & ) */ virtual int compare ( const ObjectBase & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } /** diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h index f4a165a914..f565b014aa 100644 --- a/alib2data/src/grammar/Regular/LeftRG.h +++ b/alib2data/src/grammar/Regular/LeftRG.h @@ -308,9 +308,9 @@ public: * @copydoc alib::CommonBase<ObjectBase>::compare ( const ObjectBase & ) */ virtual int compare ( const ObjectBase & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } /** diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h index 620794d44c..9496badbf8 100644 --- a/alib2data/src/grammar/Regular/RightLG.h +++ b/alib2data/src/grammar/Regular/RightLG.h @@ -285,9 +285,9 @@ public: * @copydoc alib::CommonBase<ObjectBase>::compare ( const ObjectBase & ) */ virtual int compare ( const ObjectBase & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } /** diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h index fd95f85aff..a56ef3353c 100644 --- a/alib2data/src/grammar/Regular/RightRG.h +++ b/alib2data/src/grammar/Regular/RightRG.h @@ -308,9 +308,9 @@ public: * @copydoc alib::CommonBase<ObjectBase>::compare ( const ObjectBase & ) */ virtual int compare ( const ObjectBase & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } /** diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h index 5d4b029c95..334b54815f 100644 --- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h +++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h @@ -88,9 +88,9 @@ public: } virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ContextPreservingUnrestrictedGrammar & other ) const; diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h index 79997c49aa..75c5d93628 100644 --- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h +++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h @@ -88,9 +88,9 @@ public: } virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UnrestrictedGrammar & other ) const; diff --git a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h index 22e62d4aea..9aa18a6d6a 100644 --- a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h +++ b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h @@ -98,9 +98,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CompressedBitParallelTreeIndex & other ) const; diff --git a/alib2data/src/indexes/arbology/FullAndLinearIndex.h b/alib2data/src/indexes/arbology/FullAndLinearIndex.h index 36ab7155d8..55b809eb32 100644 --- a/alib2data/src/indexes/arbology/FullAndLinearIndex.h +++ b/alib2data/src/indexes/arbology/FullAndLinearIndex.h @@ -93,9 +93,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const FullAndLinearIndex & other ) const; diff --git a/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h b/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h index bad424bbc3..c94f163625 100644 --- a/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h +++ b/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h @@ -99,9 +99,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const NonlinearFullAndLinearIndex & other ) const; diff --git a/alib2data/src/indexes/stringology/BNDMMatcher.h b/alib2data/src/indexes/stringology/BNDMMatcher.h index d9393638fa..46bbb544a6 100644 --- a/alib2data/src/indexes/stringology/BNDMMatcher.h +++ b/alib2data/src/indexes/stringology/BNDMMatcher.h @@ -94,9 +94,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const BNDMMatcher & other ) const; diff --git a/alib2data/src/indexes/stringology/BitParallelIndex.h b/alib2data/src/indexes/stringology/BitParallelIndex.h index f76708a7f3..5aa8975e13 100644 --- a/alib2data/src/indexes/stringology/BitParallelIndex.h +++ b/alib2data/src/indexes/stringology/BitParallelIndex.h @@ -91,9 +91,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const BitParallelIndex & other ) const; diff --git a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h index 18866e0092..3e0161a250 100644 --- a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h +++ b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h @@ -91,9 +91,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CompressedBitParallelIndex & other ) const; diff --git a/alib2data/src/indexes/stringology/PositionHeap.h b/alib2data/src/indexes/stringology/PositionHeap.h index 1327b1bf8c..7cea95e7b4 100644 --- a/alib2data/src/indexes/stringology/PositionHeap.h +++ b/alib2data/src/indexes/stringology/PositionHeap.h @@ -101,9 +101,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PositionHeap & other ) const; diff --git a/alib2data/src/indexes/stringology/SuffixArray.h b/alib2data/src/indexes/stringology/SuffixArray.h index ec71d522e3..4194bacb81 100644 --- a/alib2data/src/indexes/stringology/SuffixArray.h +++ b/alib2data/src/indexes/stringology/SuffixArray.h @@ -95,9 +95,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const SuffixArray & other ) const; diff --git a/alib2data/src/indexes/stringology/SuffixTrie.h b/alib2data/src/indexes/stringology/SuffixTrie.h index b6cad15ef1..cbc94d67ab 100644 --- a/alib2data/src/indexes/stringology/SuffixTrie.h +++ b/alib2data/src/indexes/stringology/SuffixTrie.h @@ -101,9 +101,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const SuffixTrie & other ) const; diff --git a/alib2data/src/label/FailStateLabel.h b/alib2data/src/label/FailStateLabel.h index 78ac0d4808..ce7ea68ba8 100644 --- a/alib2data/src/label/FailStateLabel.h +++ b/alib2data/src/label/FailStateLabel.h @@ -30,9 +30,9 @@ public: virtual LabelBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const FailStateLabel & other ) const; diff --git a/alib2data/src/label/FinalStateLabel.h b/alib2data/src/label/FinalStateLabel.h index 68801f99d9..2094cf63bc 100644 --- a/alib2data/src/label/FinalStateLabel.h +++ b/alib2data/src/label/FinalStateLabel.h @@ -30,9 +30,9 @@ public: virtual LabelBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const FinalStateLabel & other ) const; diff --git a/alib2data/src/label/HexavigesimalLabel.h b/alib2data/src/label/HexavigesimalLabel.h index 1c3700d67b..a179c69aed 100644 --- a/alib2data/src/label/HexavigesimalLabel.h +++ b/alib2data/src/label/HexavigesimalLabel.h @@ -40,9 +40,9 @@ public: void setData ( int data ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const HexavigesimalLabel & other ) const; diff --git a/alib2data/src/label/InitialStateLabel.h b/alib2data/src/label/InitialStateLabel.h index f3e3238a04..969850e8f7 100644 --- a/alib2data/src/label/InitialStateLabel.h +++ b/alib2data/src/label/InitialStateLabel.h @@ -30,9 +30,9 @@ public: virtual LabelBase * plunder ( ) &&; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const InitialStateLabel & other ) const; diff --git a/alib2data/src/label/ObjectLabel.h b/alib2data/src/label/ObjectLabel.h index ff1f3fe5a5..4b1f820731 100644 --- a/alib2data/src/label/ObjectLabel.h +++ b/alib2data/src/label/ObjectLabel.h @@ -38,9 +38,9 @@ public: const alib::Object & getData ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const ObjectLabel & other ) const; diff --git a/alib2data/src/label/PrimitiveLabel.h b/alib2data/src/label/PrimitiveLabel.h index 2cc83afa8c..ba1bf5fe76 100644 --- a/alib2data/src/label/PrimitiveLabel.h +++ b/alib2data/src/label/PrimitiveLabel.h @@ -40,9 +40,9 @@ public: primitive::Primitive & getData ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrimitiveLabel & other ) const; diff --git a/alib2data/src/label/UniqueLabel.h b/alib2data/src/label/UniqueLabel.h index 0aec9db45f..1c9e476988 100644 --- a/alib2data/src/label/UniqueLabel.h +++ b/alib2data/src/label/UniqueLabel.h @@ -42,9 +42,9 @@ public: primitive::Integer & getId ( ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UniqueLabel & other ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h index 6b3e742cb3..81104e9de7 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.h +++ b/alib2data/src/regexp/formal/FormalRegExp.h @@ -84,9 +84,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const FormalRegExp & other ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.h b/alib2data/src/regexp/formal/FormalRegExpAlternation.h index 4857a62544..fbb9de5e64 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.h +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.h @@ -87,9 +87,9 @@ public: void setRightElement ( const FormalRegExpElement < SymbolType > & element ); int compare ( const FormalRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRegExpAlternation & ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h index 0783e23acb..c948fcb330 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h @@ -83,9 +83,9 @@ public: void setRightElement ( const FormalRegExpElement < SymbolType > & element ); int compare ( const FormalRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRegExpConcatenation & ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExpEmpty.h b/alib2data/src/regexp/formal/FormalRegExpEmpty.h index f37cfc1623..da7aa2e326 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEmpty.h +++ b/alib2data/src/regexp/formal/FormalRegExpEmpty.h @@ -57,9 +57,9 @@ public: bool checkAlphabet ( const ext::set < SymbolType > & alphabet ) const override; int compare ( const FormalRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRegExpEmpty & ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h index 22079d5a77..34ba05fb1c 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h +++ b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h @@ -57,9 +57,9 @@ public: bool checkAlphabet ( const ext::set < SymbolType > & alphabet ) const override; int compare ( const FormalRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRegExpEpsilon & ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.h b/alib2data/src/regexp/formal/FormalRegExpIteration.h index bf54ecaef5..c464072277 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.h +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.h @@ -78,9 +78,9 @@ public: void setElement ( const FormalRegExpElement < SymbolType > & element ); int compare ( const FormalRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRegExpIteration & ) const; diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.h b/alib2data/src/regexp/formal/FormalRegExpSymbol.h index 6b36eb4c90..8927aa03a3 100644 --- a/alib2data/src/regexp/formal/FormalRegExpSymbol.h +++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.h @@ -60,9 +60,9 @@ public: bool checkAlphabet ( const ext::set < SymbolType > & alphabet ) const override; int compare ( const FormalRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRegExpSymbol & ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.h b/alib2data/src/regexp/unbounded/UnboundedRegExp.h index 1e1aaa73fc..147a8d662f 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExp.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.h @@ -84,9 +84,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UnboundedRegExp & other ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h index ab7f78e91a..2958fa9f41 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h @@ -77,9 +77,9 @@ public: void appendElement ( const UnboundedRegExpElement < SymbolType > & element ); int compare ( const UnboundedRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const UnboundedRegExpAlternation < SymbolType > & ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h index 9e0a02c3f0..584030cc44 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h @@ -77,9 +77,9 @@ public: void appendElement ( const UnboundedRegExpElement < SymbolType > & element ); int compare ( const UnboundedRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const UnboundedRegExpConcatenation & ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h index b565c98296..dbadb7e98a 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h @@ -57,9 +57,9 @@ public: bool checkAlphabet ( const ext::set < SymbolType > & alphabet ) const override; int compare ( const UnboundedRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const UnboundedRegExpEmpty & ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h index 3a2123a9d6..4e3c195776 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h @@ -57,9 +57,9 @@ public: bool checkAlphabet ( const ext::set < SymbolType > & alphabet ) const override; int compare ( const UnboundedRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const UnboundedRegExpEpsilon & ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h index 77d69eac77..d205c5db75 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h @@ -77,9 +77,9 @@ public: void setElement ( const UnboundedRegExpElement < SymbolType > & element ); int compare ( const UnboundedRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const UnboundedRegExpIteration & ) const; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h index c713cd1446..1451ea71e9 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h @@ -60,9 +60,9 @@ public: bool checkAlphabet ( const ext::set < SymbolType > & alphabet ) const override; int compare ( const UnboundedRegExpElement < SymbolType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const UnboundedRegExpSymbol & ) const; diff --git a/alib2data/src/rte/formal/FormalRTE.h b/alib2data/src/rte/formal/FormalRTE.h index 1314fc958c..23544353a6 100644 --- a/alib2data/src/rte/formal/FormalRTE.h +++ b/alib2data/src/rte/formal/FormalRTE.h @@ -121,9 +121,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const FormalRTE & other ) const; diff --git a/alib2data/src/rte/formal/FormalRTEAlternation.h b/alib2data/src/rte/formal/FormalRTEAlternation.h index d8b4d2f877..a2182f4916 100644 --- a/alib2data/src/rte/formal/FormalRTEAlternation.h +++ b/alib2data/src/rte/formal/FormalRTEAlternation.h @@ -81,9 +81,9 @@ public: void setRightElement ( FormalRTEElement < SymbolType, RankType > && element ); virtual int compare ( const FormalRTEElement < SymbolType, RankType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRTEAlternation & ) const; diff --git a/alib2data/src/rte/formal/FormalRTEEmpty.h b/alib2data/src/rte/formal/FormalRTEEmpty.h index 49d586950a..3c53a3065f 100644 --- a/alib2data/src/rte/formal/FormalRTEEmpty.h +++ b/alib2data/src/rte/formal/FormalRTEEmpty.h @@ -51,9 +51,9 @@ public: virtual bool checkAlphabet ( const ext::set < common::ranked_symbol < SymbolType, RankType > > & alphabetF, const ext::set < common::ranked_symbol < SymbolType, RankType > > & alphabetK ) const override; virtual int compare ( const FormalRTEElement < SymbolType, RankType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRTEEmpty & ) const; diff --git a/alib2data/src/rte/formal/FormalRTEIteration.h b/alib2data/src/rte/formal/FormalRTEIteration.h index 5c57ca4ae5..dd3e03c0f3 100644 --- a/alib2data/src/rte/formal/FormalRTEIteration.h +++ b/alib2data/src/rte/formal/FormalRTEIteration.h @@ -81,9 +81,9 @@ public: void setSubstitutionSymbol ( FormalRTESymbolSubst < SymbolType, RankType > element ); virtual int compare ( const FormalRTEElement < SymbolType, RankType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRTEIteration & ) const; diff --git a/alib2data/src/rte/formal/FormalRTESubstitution.h b/alib2data/src/rte/formal/FormalRTESubstitution.h index 79c3d93181..49f5d090da 100644 --- a/alib2data/src/rte/formal/FormalRTESubstitution.h +++ b/alib2data/src/rte/formal/FormalRTESubstitution.h @@ -85,9 +85,9 @@ public: void setSubstitutionSymbol ( FormalRTESymbolSubst < SymbolType, RankType > element ); virtual int compare ( const FormalRTEElement < SymbolType, RankType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } int compare ( const FormalRTESubstitution & ) const; diff --git a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h index 60808d3423..949322e8cd 100644 --- a/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h +++ b/alib2data/src/rte/formal/FormalRTESymbolAlphabet.h @@ -63,9 +63,9 @@ public: int compare ( const FormalRTESymbolAlphabet & ) const; virtual int compare ( const FormalRTEElement < SymbolType, RankType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } /** diff --git a/alib2data/src/rte/formal/FormalRTESymbolSubst.h b/alib2data/src/rte/formal/FormalRTESymbolSubst.h index 818120c59c..dffba15bc0 100644 --- a/alib2data/src/rte/formal/FormalRTESymbolSubst.h +++ b/alib2data/src/rte/formal/FormalRTESymbolSubst.h @@ -56,9 +56,9 @@ public: int compare ( const FormalRTESymbolSubst & ) const; virtual int compare ( const FormalRTEElement < SymbolType, RankType > & other ) const override { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } /** diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h index 86f9908bb4..9b3e614ba1 100644 --- a/alib2data/src/string/CyclicString.h +++ b/alib2data/src/string/CyclicString.h @@ -68,9 +68,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const CyclicString & other ) const; diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h index 7be2645795..2eceda3b3b 100644 --- a/alib2data/src/string/Epsilon.h +++ b/alib2data/src/string/Epsilon.h @@ -60,9 +60,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const Epsilon & other ) const; diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h index 94cc77f530..8580f76e01 100644 --- a/alib2data/src/string/LinearString.h +++ b/alib2data/src/string/LinearString.h @@ -88,9 +88,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const LinearString & other ) const; diff --git a/alib2data/src/tree/ranked/PostfixRankedTree.h b/alib2data/src/tree/ranked/PostfixRankedTree.h index 9a772009fc..a371d31012 100644 --- a/alib2data/src/tree/ranked/PostfixRankedTree.h +++ b/alib2data/src/tree/ranked/PostfixRankedTree.h @@ -72,9 +72,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PostfixRankedTree & other ) const; diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h index 72819f2bcc..e1da66041f 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h @@ -105,9 +105,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixRankedBarNonlinearPattern & other ) const; diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h index bc2bc9eddd..7fefba438a 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h @@ -94,9 +94,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixRankedBarPattern & other ) const; diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/ranked/PrefixRankedBarTree.h index ebbc6c3d63..d0d2309494 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.h @@ -81,9 +81,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixRankedBarTree & other ) const; diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h index b8a89a9046..f5b8a3df9f 100644 --- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h @@ -89,9 +89,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixRankedNonlinearPattern & other ) const; diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.h b/alib2data/src/tree/ranked/PrefixRankedPattern.h index a4e82a5fa3..a7f4757e4b 100644 --- a/alib2data/src/tree/ranked/PrefixRankedPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedPattern.h @@ -80,9 +80,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixRankedPattern & other ) const; diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.h b/alib2data/src/tree/ranked/PrefixRankedTree.h index 78382d3fd3..edefb3d6bb 100644 --- a/alib2data/src/tree/ranked/PrefixRankedTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedTree.h @@ -72,9 +72,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixRankedTree & other ) const; diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.h b/alib2data/src/tree/ranked/RankedNonlinearPattern.h index c708348e7e..87f845a746 100644 --- a/alib2data/src/tree/ranked/RankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.h @@ -97,9 +97,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const RankedNonlinearPattern & other ) const; diff --git a/alib2data/src/tree/ranked/RankedPattern.h b/alib2data/src/tree/ranked/RankedPattern.h index e050e1cdfd..cca9ae27c7 100644 --- a/alib2data/src/tree/ranked/RankedPattern.h +++ b/alib2data/src/tree/ranked/RankedPattern.h @@ -91,9 +91,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const RankedPattern & other ) const; diff --git a/alib2data/src/tree/ranked/RankedTree.h b/alib2data/src/tree/ranked/RankedTree.h index cb32bf0e73..d22abb5812 100644 --- a/alib2data/src/tree/ranked/RankedTree.h +++ b/alib2data/src/tree/ranked/RankedTree.h @@ -88,9 +88,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const RankedTree & other ) const; diff --git a/alib2data/src/tree/unranked/PrefixBarTree.h b/alib2data/src/tree/unranked/PrefixBarTree.h index 34722ce00d..0f8efc4c5b 100644 --- a/alib2data/src/tree/unranked/PrefixBarTree.h +++ b/alib2data/src/tree/unranked/PrefixBarTree.h @@ -78,9 +78,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const PrefixBarTree & other ) const; diff --git a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h index a955365a6a..c871dba0f8 100644 --- a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h +++ b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h @@ -101,9 +101,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UnrankedNonlinearPattern & other ) const; diff --git a/alib2data/src/tree/unranked/UnrankedPattern.h b/alib2data/src/tree/unranked/UnrankedPattern.h index db8f2367d9..f02b928674 100644 --- a/alib2data/src/tree/unranked/UnrankedPattern.h +++ b/alib2data/src/tree/unranked/UnrankedPattern.h @@ -89,9 +89,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UnrankedPattern & other ) const; diff --git a/alib2data/src/tree/unranked/UnrankedTree.h b/alib2data/src/tree/unranked/UnrankedTree.h index 88b9a31089..ec81bee250 100644 --- a/alib2data/src/tree/unranked/UnrankedTree.h +++ b/alib2data/src/tree/unranked/UnrankedTree.h @@ -84,9 +84,9 @@ public: virtual void operator >>( std::ostream & out ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const UnrankedTree & other ) const; diff --git a/alib2data_experimental/src/graph/directed/DirectedGraph.h b/alib2data_experimental/src/graph/directed/DirectedGraph.h index 9fa1124a98..022186f38f 100644 --- a/alib2data_experimental/src/graph/directed/DirectedGraph.h +++ b/alib2data_experimental/src/graph/directed/DirectedGraph.h @@ -95,9 +95,9 @@ public: // commmon methods int compare( const ObjectBase & other ) const override { - if (std::type_index( typeid( *this ) ) == std::type_index( typeid( other ) )) + if (ext::type_index( typeid( *this ) ) == ext::type_index( typeid( other ) )) return this->compare( (decltype( *this ))other ); - return std::type_index( typeid( *this ) ) - std::type_index( typeid( other ) ); + return ext::type_index( typeid( *this ) ) - ext::type_index( typeid( other ) ); } int compare( const DirectedGraph & other ) const; diff --git a/alib2data_experimental/src/graph/undirected/UndirectedGraph.h b/alib2data_experimental/src/graph/undirected/UndirectedGraph.h index a5633fc1cf..7f7f10f5d9 100644 --- a/alib2data_experimental/src/graph/undirected/UndirectedGraph.h +++ b/alib2data_experimental/src/graph/undirected/UndirectedGraph.h @@ -87,9 +87,9 @@ public: // common methods int compare( const ObjectBase & other ) const override { - if (std::type_index( typeid( *this ) ) == std::type_index( typeid( other ) )) + if (ext::type_index( typeid( *this ) ) == ext::type_index( typeid( other ) )) return this->compare( (decltype( *this ))other ); - return std::type_index( typeid( *this ) ) - std::type_index( typeid( other ) ); + return ext::type_index( typeid( *this ) ) - ext::type_index( typeid( other ) ); } int compare( const UndirectedGraph & other ) const; diff --git a/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.h b/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.h index dfa7aba9b2..b8c930af0a 100644 --- a/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.h +++ b/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.h @@ -88,9 +88,9 @@ public: friend std::ostream & operator <<( std::ostream & out, const SuffixTrieTerminatingSymbol & instance ); virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const SuffixTrieTerminatingSymbol & other ) const; diff --git a/alib2data_experimental/src/label/LR0ItemsLabel.h b/alib2data_experimental/src/label/LR0ItemsLabel.h index d086b4474a..e0d762e521 100644 --- a/alib2data_experimental/src/label/LR0ItemsLabel.h +++ b/alib2data_experimental/src/label/LR0ItemsLabel.h @@ -53,9 +53,9 @@ public: } virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const LR0ItemsLabel & other ) const; diff --git a/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h b/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h index aae612a9cb..172beb7e08 100644 --- a/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h +++ b/alib2data_experimental/src/string/LinearStringTerminatingSymbol.h @@ -69,9 +69,9 @@ public: bool isEmpty ( ) const; virtual int compare ( const ObjectBase & other ) const { - if ( std::type_index ( typeid ( * this ) ) == std::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); + if ( ext::type_index ( typeid ( * this ) ) == ext::type_index ( typeid ( other ) ) ) return this->compare ( ( decltype ( * this ) )other ); - return std::type_index ( typeid ( * this ) ) - std::type_index ( typeid ( other ) ); + return ext::type_index ( typeid ( * this ) ) - ext::type_index ( typeid ( other ) ); } virtual int compare ( const LinearStringTerminatingSymbol & other ) const; diff --git a/alib2std/src/extensions/typeindex.cpp b/alib2std/src/extensions/typeindex.cpp index cf59e91357..7cc63488e7 100644 --- a/alib2std/src/extensions/typeindex.cpp +++ b/alib2std/src/extensions/typeindex.cpp @@ -10,18 +10,14 @@ #include <cstdlib> #include <cxxabi.h> -namespace std { +namespace ext { -std::ostream & operator << ( std::ostream & os, const std::type_index & type ) { +std::ostream & operator << ( std::ostream & os, const ext::type_index & type ) { os << ext::to_string ( type ); return os; } -} /* namespace std */ - -namespace ext { - -std::string to_string ( const std::type_index & type ) { +std::string to_string ( const ext::type_index & type ) { int status; char* demangled = abi::__cxa_demangle(type.name(), 0, 0, &status); diff --git a/alib2std/src/extensions/typeindex.h b/alib2std/src/extensions/typeindex.h index c698f0c968..061834b7fe 100644 --- a/alib2std/src/extensions/typeindex.h +++ b/alib2std/src/extensions/typeindex.h @@ -13,19 +13,21 @@ #include "string.hpp" -namespace std { +namespace ext { + +class type_index : public std::type_index { +public: + using std::type_index::type_index; + using std::type_index::operator =; +}; -inline int operator -( const std::type_index & first, const std::type_index & second ) { +inline int operator -( const ext::type_index & first, const ext::type_index & second ) { return ( first < second ) ? -1 : ( first > second ) ? 1 : 0; } -std::ostream & operator << ( std::ostream & os, const std::type_index & type ); - -} /* namespace std */ - -namespace ext { +std::ostream & operator << ( std::ostream & os, const ext::type_index & type ); -std::string to_string ( const std::type_index & type ); +std::string to_string ( const ext::type_index & type ); } /* namespace ext */ diff --git a/alib2std/src/extensions/typeinfo.cpp b/alib2std/src/extensions/typeinfo.cpp deleted file mode 100644 index 3ce04b1524..0000000000 --- a/alib2std/src/extensions/typeinfo.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * typeinfo.cpp - * - * Created on: Apr 14, 2016 - * Author: Jan Travnicek - */ - -#include <typeinfo> -#include <typeindex> -#include <iostream> - -namespace ext { - -std::string to_string ( const std::type_info & type ) { - return to_string ( std::type_index ( type ) ); -} - -} /* namespace ext */ - -namespace std { - -std::ostream & operator << ( std::ostream & os, const std::type_info & type ) { - os << ext::to_string ( type ); - return os; -} - -} /* namespace std */ diff --git a/alib2std/src/extensions/typeinfo.hpp b/alib2std/src/extensions/typeinfo.hpp index 351ced252b..de1497ccaf 100644 --- a/alib2std/src/extensions/typeinfo.hpp +++ b/alib2std/src/extensions/typeinfo.hpp @@ -15,14 +15,13 @@ #include <cstring> #include "string.hpp" +#include "typeindex.h" namespace ext { -std::string to_string ( const std::type_info & type ); - template < class T > std::string to_string ( ) { - return to_string (typeid(T)); + return ext::to_string ( ext::type_index ( typeid ( T ) ) ); } template<typename T> @@ -41,10 +40,4 @@ bool is_same_type(const char* name) { } /* namespace ext */ -namespace std { - -std::ostream & operator << ( std::ostream & os, const std::type_info & type ); - -} /* namespace std */ - #endif /* __TYPEINFO_HPP_ */ -- GitLab