From aa101f95fe510a11c0086f90f289630d9c7982f2 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Sun, 26 Apr 2015 21:40:25 +0200 Subject: [PATCH] move std dir to separate module --- acompaction2/makefile | 6 +- acompare2/makefile | 6 +- acompare2/src/GrammarCompare.cpp | 2 - aconversions2/makefile | 6 +- aconvert2/makefile | 6 +- aderivation2/makefile | 6 +- adeterminize2/makefile | 6 +- aecho2/makefile | 6 +- aepsilon2/makefile | 6 +- agenerate2/makefile | 6 +- aintegral2/makefile | 6 +- alangop2/makefile | 6 +- alib2algo/makefile | 16 +- .../determinize/DeterminizeRHDPDAPart.cxx | 3 +- .../determinize/DeterminizeVPAPart.cxx | 3 +- .../determinize/common/RHDPDACommon.h | 2 +- .../properties/AllEpsilonClosure.cpp | 1 - .../src/automaton/transform/RHPDAToPDA.cpp | 2 - .../properties/NonterminalUnitRuleCycle.cpp | 2 +- .../grammar/simplify/LeftRecursionRemover.cpp | 2 +- .../simplify/UnproductiveSymbolsRemover.cpp | 2 +- .../simplify/UnreachableSymbolsRemover.cpp | 2 +- .../regexp/convert/ToAutomatonDerivation.cpp | 2 +- .../convert/ToGrammarRightRGDerivation.cpp | 2 +- .../src/string/simplify/NormalizeAlphabet.cpp | 2 +- .../GrammarSimpleRulesRemoverTest.cpp | 2 +- .../grammar/simplify/GrammarToCNFTest.cpp | 2 +- alib2data/makefile | 16 +- alib2data/src/alphabet/Symbol.h | 2 - alib2data/src/alphabet/SymbolBase.h | 1 - alib2data/src/alphabet/SymbolPairSymbol.cpp | 1 - alib2data/src/alphabet/SymbolPairSymbol.h | 2 +- alib2data/src/alphabet/SymbolSetSymbol.cpp | 1 - alib2data/src/alphabet/UniqueSymbol.cpp | 1 - alib2data/src/automaton/Automaton.h | 2 - alib2data/src/automaton/AutomatonBase.h | 1 - .../automaton/AutomatonFromStringLexer.cpp | 2 +- .../src/automaton/AutomatonFromStringParser.h | 2 +- .../src/automaton/AutomatonFromXMLParser.cpp | 1 - .../src/automaton/AutomatonFromXMLParser.h | 2 +- .../src/automaton/AutomatonToStringComposer.h | 2 +- alib2data/src/automaton/FSM/CompactNFA.cpp | 1 - alib2data/src/automaton/FSM/DFA.cpp | 2 - alib2data/src/automaton/FSM/EpsilonNFA.cpp | 1 - alib2data/src/automaton/FSM/EpsilonNFA.h | 2 +- alib2data/src/automaton/FSM/ExtendedNFA.cpp | 1 - .../src/automaton/FSM/MultiInitialStateNFA.h | 1 - alib2data/src/automaton/FSM/NFA.h | 1 - alib2data/src/automaton/PDA/DPDA.cpp | 1 - alib2data/src/automaton/PDA/DPDA.h | 2 +- alib2data/src/automaton/PDA/InputDrivenDPDA.h | 3 +- alib2data/src/automaton/PDA/InputDrivenNPDA.h | 3 +- alib2data/src/automaton/PDA/NPDA.cpp | 1 - alib2data/src/automaton/PDA/NPDA.h | 2 +- .../PDA/RealTimeHeightDeterministicDPDA.cpp | 1 - .../PDA/RealTimeHeightDeterministicDPDA.h | 3 +- .../PDA/RealTimeHeightDeterministicNPDA.cpp | 1 - .../PDA/RealTimeHeightDeterministicNPDA.h | 3 +- alib2data/src/automaton/PDA/SinglePopDPDA.cpp | 1 - alib2data/src/automaton/PDA/SinglePopDPDA.h | 2 +- alib2data/src/automaton/PDA/SinglePopNPDA.cpp | 1 - alib2data/src/automaton/PDA/SinglePopNPDA.h | 2 +- .../src/automaton/PDA/VisiblyPushdownDPDA.cpp | 1 - .../src/automaton/PDA/VisiblyPushdownDPDA.h | 1 - .../src/automaton/PDA/VisiblyPushdownNPDA.cpp | 1 - .../src/automaton/PDA/VisiblyPushdownNPDA.h | 1 - alib2data/src/automaton/TM/OneTapeDTM.cpp | 1 - .../src/automaton/common/InputAlphabet.cpp | 1 - alib2data/src/automaton/common/Shift.h | 2 +- alib2data/src/{std => common}/visitor.hpp | 0 alib2data/src/container/Container.h | 2 - alib2data/src/container/ContainerBase.h | 1 - .../src/container/ContainerFromXMLParser.hpp | 2 +- .../src/container/ContainerToXMLComposer.hpp | 2 +- alib2data/src/container/ObjectsMap.cpp | 1 - alib2data/src/container/ObjectsPair.cpp | 1 - alib2data/src/container/ObjectsPair.h | 2 +- alib2data/src/container/ObjectsSet.cpp | 1 - alib2data/src/container/ObjectsVector.cpp | 1 - alib2data/src/debug/bfdStacktrace.cpp | 2 +- alib2data/src/debug/sigHandler.h | 1 - alib2data/src/grammar/ContextFree/CFG.cpp | 1 - alib2data/src/grammar/ContextFree/CNF.cpp | 1 - alib2data/src/grammar/ContextFree/CNF.h | 2 +- .../grammar/ContextFree/EpsilonFreeCFG.cpp | 1 - alib2data/src/grammar/ContextFree/GNF.cpp | 1 - alib2data/src/grammar/ContextFree/LG.cpp | 1 - alib2data/src/grammar/ContextFree/LG.h | 2 +- .../src/grammar/ContextSensitive/CSG.cpp | 1 - .../NonContractingGrammar.cpp | 1 - alib2data/src/grammar/Grammar.h | 2 - alib2data/src/grammar/GrammarBase.h | 1 - .../src/grammar/GrammarFromStringLexer.cpp | 2 +- .../src/grammar/GrammarFromStringParser.h | 1 + alib2data/src/grammar/GrammarFromXMLParser.h | 2 +- alib2data/src/grammar/Regular/LeftLG.cpp | 1 - alib2data/src/grammar/Regular/LeftLG.h | 2 +- alib2data/src/grammar/Regular/LeftRG.cpp | 1 - alib2data/src/grammar/Regular/LeftRG.h | 2 +- alib2data/src/grammar/Regular/RightLG.cpp | 1 - alib2data/src/grammar/Regular/RightLG.h | 2 +- alib2data/src/grammar/Regular/RightRG.cpp | 1 - alib2data/src/grammar/Regular/RightRG.h | 2 +- .../ContextPreservingUnrestrictedGrammar.cpp | 1 - .../Unrestricted/UnrestrictedGrammar.cpp | 1 - alib2data/src/graph/Graph.h | 2 - alib2data/src/graph/GraphBase.h | 1 - alib2data/src/graph/GraphToStringComposer.h | 1 - alib2data/src/graph/GraphToXMLComposer.cpp | 2 +- alib2data/src/graph/GraphToXMLComposer.h | 1 - alib2data/src/graph/common/GraphElement.h | 2 +- .../directed/AdjacencyListDirectedGraph.cpp | 2 +- .../directed/AdjacencyMatrixDirectedGraph.cpp | 2 +- .../src/graph/directed/DirectedGraph.cpp | 1 - alib2data/src/graph/directed/DirectedGraph.h | 1 + .../AdjacencyListUndirectedGraph.cpp | 2 +- .../AdjacencyMatrixUndirectedGraph.cpp | 2 +- .../src/graph/undirected/UndirectedGraph.cpp | 1 - .../src/graph/undirected/UndirectedGraph.h | 1 + alib2data/src/graph/undirected/utils.h | 1 + alib2data/src/label/HexavigesimalLabel.cpp | 1 - alib2data/src/label/HexavigesimalLabel.h | 2 +- alib2data/src/label/Label.h | 2 - alib2data/src/label/LabelBase.h | 1 - alib2data/src/label/LabelPairLabel.cpp | 2 +- alib2data/src/label/LabelSetLabel.cpp | 2 +- alib2data/src/label/LabelToStringComposer.h | 2 +- alib2data/src/label/LabelToXMLComposer.cpp | 2 +- alib2data/src/label/NextLabel.cpp | 2 +- alib2data/src/label/UniqueLabel.cpp | 1 - alib2data/src/object/Object.h | 3 +- alib2data/src/object/ObjectBase.h | 4 +- alib2data/src/object/Void.h | 2 - alib2data/src/primitive/NextPrimitive.cpp | 2 +- alib2data/src/primitive/Primitive.h | 2 - alib2data/src/primitive/PrimitiveBase.h | 1 - .../src/primitive/PrimitiveFromXMLParser.cpp | 2 +- .../src/primitive/PrimitiveToXMLComposer.cpp | 3 +- alib2data/src/regexp/RegExp.h | 2 - alib2data/src/regexp/RegExpBase.h | 1 - alib2data/src/regexp/RegExpToXMLComposer.h | 7 +- alib2data/src/regexp/formal/FormalRegExp.cpp | 1 - alib2data/src/regexp/formal/FormalRegExp.h | 1 - .../src/regexp/formal/FormalRegExpElement.h | 2 +- .../src/regexp/unbounded/UnboundedRegExp.cpp | 1 - .../src/regexp/unbounded/UnboundedRegExp.h | 1 - .../regexp/unbounded/UnboundedRegExpElement.h | 2 +- alib2data/src/std/compare.hpp | 204 ---------------- alib2data/src/std/itos.cpp | 11 - alib2data/src/std/itos.h | 13 - alib2data/src/std/list.hpp | 41 ---- alib2data/src/std/pair.hpp | 32 --- alib2data/src/std/stou.cpp | 12 - alib2data/src/std/stou.h | 13 - alib2data/src/std/tuple.hpp | 52 ---- alib2data/src/std/utos.cpp | 11 - alib2data/src/std/utos.h | 13 - alib2data/src/std/vector.hpp | 41 ---- alib2data/src/string/CyclicString.h | 1 - alib2data/src/string/Epsilon.h | 1 - alib2data/src/string/LinearString.h | 1 - alib2data/src/string/String.h | 4 +- alib2data/src/string/StringBase.h | 1 - alib2data/src/string/StringFromStringParser.h | 2 + .../VisitorTest.cpp} | 19 +- .../StdVisitorTest.h => common/VisitorTest.h} | 4 +- alib2data/test-src/std/StdTest.cpp | 106 --------- alib2elgo/makefile | 16 +- .../efficient/AllEpsilonClosure.cpp | 1 - alib2std/makefile | 225 ++++++++++++++++++ alib2std/src/compare | 6 + alib2std/src/deque | 10 + alib2std/src/extensions/compare.hpp | 41 ++++ .../std => alib2std/src/extensions}/deque.hpp | 24 +- .../src/extensions}/hexavigesimal.cpp | 8 +- .../src/extensions}/hexavigesimal.h | 6 +- .../src/extensions}/istream.cpp | 9 +- .../std => alib2std/src/extensions}/istream.h | 10 +- alib2std/src/extensions/list.hpp | 46 ++++ .../std => alib2std/src/extensions}/map.hpp | 37 +-- alib2std/src/extensions/pair.hpp | 34 +++ .../src/extensions}/pointer.hpp | 7 + .../std => alib2std/src/extensions}/set.hpp | 39 +-- alib2std/src/extensions/string.cpp | 33 +++ alib2std/src/extensions/string.hpp | 28 +++ alib2std/src/extensions/tuple.hpp | 104 ++++++++ .../src/extensions}/type_traits.hpp | 8 +- alib2std/src/extensions/unordered_map.hpp | 48 ++++ .../src/extensions}/variant.hpp | 9 +- alib2std/src/extensions/vector.hpp | 46 ++++ alib2std/src/hexavigesimal | 7 + alib2std/src/istream | 8 + alib2std/src/list | 10 + alib2std/src/map | 10 + alib2std/src/pair | 8 + alib2std/src/pointer | 8 + alib2std/src/set | 10 + alib2std/src/string | 9 + alib2std/src/tuple | 10 + alib2std/src/type_traits | 7 + alib2std/src/unordered_map | 10 + alib2std/src/variant | 13 + alib2std/src/vector | 10 + alib2std/test-src/extensions/CompareTest.cpp | 35 +++ alib2std/test-src/extensions/CompareTest.h | 19 ++ .../test-src/extensions/HexavigesimalTest.cpp | 14 +- .../test-src/extensions/HexavigesimalTest.h | 4 +- alib2std/test-src/extensions/OstreamTest.cpp | 42 ++++ alib2std/test-src/extensions/OstreamTest.h | 19 ++ .../test-src/extensions/SetTest.cpp | 24 +- .../test-src/extensions/SetTest.h | 4 +- .../test-src/extensions}/TypeInfoTest.cpp | 2 +- .../test-src/extensions}/TypeInfoTest.h | 0 .../test-src/extensions/TypeTraitsTest.cpp | 19 ++ alib2std/test-src/extensions/TypeTraitsTest.h | 68 ++++++ alib2std/test-src/extensions/VariantTest.cpp | 99 ++++++++ .../test-src/extensions/VariantTest.h | 11 +- alib2std/test-src/main.cpp | 162 +++++++++++++ aminimize2/makefile | 6 +- anormalize2/makefile | 6 +- arand2/makefile | 6 +- arename2/makefile | 6 +- areverse2/makefile | 6 +- arun2/makefile | 6 +- astat2/makefile | 6 +- astringology2/makefile | 6 +- atrim2/makefile | 6 +- makefile | 62 +++-- 228 files changed, 1532 insertions(+), 920 deletions(-) rename alib2data/src/{std => common}/visitor.hpp (100%) delete mode 100644 alib2data/src/std/compare.hpp delete mode 100644 alib2data/src/std/itos.cpp delete mode 100644 alib2data/src/std/itos.h delete mode 100644 alib2data/src/std/list.hpp delete mode 100644 alib2data/src/std/pair.hpp delete mode 100644 alib2data/src/std/stou.cpp delete mode 100644 alib2data/src/std/stou.h delete mode 100644 alib2data/src/std/tuple.hpp delete mode 100644 alib2data/src/std/utos.cpp delete mode 100644 alib2data/src/std/utos.h delete mode 100644 alib2data/src/std/vector.hpp rename alib2data/test-src/{std/StdVisitorTest.cpp => common/VisitorTest.cpp} (93%) rename alib2data/test-src/{std/StdVisitorTest.h => common/VisitorTest.h} (80%) delete mode 100644 alib2data/test-src/std/StdTest.cpp create mode 100644 alib2std/makefile create mode 100644 alib2std/src/compare create mode 100644 alib2std/src/deque create mode 100644 alib2std/src/extensions/compare.hpp rename {alib2data/src/std => alib2std/src/extensions}/deque.hpp (56%) rename {alib2data/src/std => alib2std/src/extensions}/hexavigesimal.cpp (89%) rename {alib2data/src/std => alib2std/src/extensions}/hexavigesimal.h (92%) rename {alib2data/src/std => alib2std/src/extensions}/istream.cpp (86%) rename {alib2data/src/std => alib2std/src/extensions}/istream.h (59%) create mode 100644 alib2std/src/extensions/list.hpp rename {alib2data/src/std => alib2std/src/extensions}/map.hpp (69%) create mode 100644 alib2std/src/extensions/pair.hpp rename {alib2data/src/std => alib2std/src/extensions}/pointer.hpp (90%) rename {alib2data/src/std => alib2std/src/extensions}/set.hpp (82%) create mode 100644 alib2std/src/extensions/string.cpp create mode 100644 alib2std/src/extensions/string.hpp create mode 100644 alib2std/src/extensions/tuple.hpp rename {alib2data/src/std => alib2std/src/extensions}/type_traits.hpp (89%) create mode 100644 alib2std/src/extensions/unordered_map.hpp rename {alib2data/src/std => alib2std/src/extensions}/variant.hpp (97%) create mode 100644 alib2std/src/extensions/vector.hpp create mode 100644 alib2std/src/hexavigesimal create mode 100644 alib2std/src/istream create mode 100644 alib2std/src/list create mode 100644 alib2std/src/map create mode 100644 alib2std/src/pair create mode 100644 alib2std/src/pointer create mode 100644 alib2std/src/set create mode 100644 alib2std/src/string create mode 100644 alib2std/src/tuple create mode 100644 alib2std/src/type_traits create mode 100644 alib2std/src/unordered_map create mode 100644 alib2std/src/variant create mode 100644 alib2std/src/vector create mode 100644 alib2std/test-src/extensions/CompareTest.cpp create mode 100644 alib2std/test-src/extensions/CompareTest.h rename alib2data/test-src/std/StdTestHexavigesimal.cpp => alib2std/test-src/extensions/HexavigesimalTest.cpp (84%) rename alib2data/test-src/std/StdTestHexavigesimal.h => alib2std/test-src/extensions/HexavigesimalTest.h (71%) create mode 100644 alib2std/test-src/extensions/OstreamTest.cpp create mode 100644 alib2std/test-src/extensions/OstreamTest.h rename alib2data/test-src/std/StdSet.cpp => alib2std/test-src/extensions/SetTest.cpp (63%) rename alib2data/test-src/std/StdSet.h => alib2std/test-src/extensions/SetTest.h (77%) rename {alib2data/test-src/std => alib2std/test-src/extensions}/TypeInfoTest.cpp (96%) rename {alib2data/test-src/std => alib2std/test-src/extensions}/TypeInfoTest.h (100%) create mode 100644 alib2std/test-src/extensions/TypeTraitsTest.cpp create mode 100644 alib2std/test-src/extensions/TypeTraitsTest.h create mode 100644 alib2std/test-src/extensions/VariantTest.cpp rename alib2data/test-src/std/StdTest.h => alib2std/test-src/extensions/VariantTest.h (84%) create mode 100644 alib2std/test-src/main.cpp diff --git a/acompaction2/makefile b/acompaction2/makefile index 224fdc163b..54cb12421d 100644 --- a/acompaction2/makefile +++ b/acompaction2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/acompare2/makefile b/acompare2/makefile index eb4bd68c72..f558b3a5ab 100644 --- a/acompare2/makefile +++ b/acompare2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/acompare2/src/GrammarCompare.cpp b/acompare2/src/GrammarCompare.cpp index 1cb58fc7dc..d290b68b07 100644 --- a/acompare2/src/GrammarCompare.cpp +++ b/acompare2/src/GrammarCompare.cpp @@ -16,8 +16,6 @@ #include <iostream> #include <algorithm> -#include "std/set.hpp" - #include "grammar/Regular/LeftLG.h" #include "grammar/Regular/LeftRG.h" #include "grammar/Regular/RightLG.h" diff --git a/aconversions2/makefile b/aconversions2/makefile index 9294673249..eb999bde3e 100644 --- a/aconversions2/makefile +++ b/aconversions2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/aconvert2/makefile b/aconvert2/makefile index d2b3672e2f..796754115f 100644 --- a/aconvert2/makefile +++ b/aconvert2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/aderivation2/makefile b/aderivation2/makefile index 9cd8171418..e8a7e0f4c8 100644 --- a/aderivation2/makefile +++ b/aderivation2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/adeterminize2/makefile b/adeterminize2/makefile index 82434fd94a..7662ce0846 100644 --- a/adeterminize2/makefile +++ b/adeterminize2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/aecho2/makefile b/aecho2/makefile index e004885960..8ea57b8356 100644 --- a/aecho2/makefile +++ b/aecho2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/aepsilon2/makefile b/aepsilon2/makefile index f581cd56fe..99581daffa 100644 --- a/aepsilon2/makefile +++ b/aepsilon2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/agenerate2/makefile b/agenerate2/makefile index e6bb92dec3..564620d742 100644 --- a/agenerate2/makefile +++ b/agenerate2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/aintegral2/makefile b/aintegral2/makefile index 931850aeca..b308559353 100644 --- a/aintegral2/makefile +++ b/aintegral2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/alangop2/makefile b/alangop2/makefile index 727b693d3b..9c3acc1074 100644 --- a/alangop2/makefile +++ b/alangop2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/alib2algo/makefile b/alib2algo/makefile index 897b60a322..ffd0a575b5 100644 --- a/alib2algo/makefile +++ b/alib2algo/makefile @@ -9,11 +9,11 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -rdynamic -shared -lxml2 -TEST_LDFLAGS_DEBUG:= -Llib-debug -L../alib2data/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lcppunit -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -rdynamic -shared -lxml2 +TEST_LDFLAGS_DEBUG:= -Llib-debug -L../alib2std/lib-debug -L../alib2data/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lcppunit -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -rdynamic -shared -lxml2 -TEST_LDFLAGS_RELEASE:= -Llib-release -L../alib2data/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lcppunit -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -rdynamic -shared -lxml2 +TEST_LDFLAGS_RELEASE:= -Llib-release -L../alib2std/lib-release -L../alib2data/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lcppunit -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) TEST_OBJECTS_DEBUG:=$(patsubst test-src/%.cpp, test-obj-debug/%.o, $(shell find test-src/ -name *cpp)) @@ -43,7 +43,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src/ -I../../\$$(DEPTH)alib2data/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ @@ -95,7 +95,7 @@ test-obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../\$$(DEPTH)src/ -I../../\$$(DEPTH)alib2data/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../\$$(DEPTH)src/ -I../../\$$(DEPTH)alib2std/src/ -I../../\$$(DEPTH)alib2data/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ @@ -203,10 +203,10 @@ build-tests-release: test-bin-release/$(TESTBIN) unit-test-debug: build-tests-debug - LD_LIBRARY_PATH="../alib2data/lib-debug;lib-debug" test-bin-debug/$(TESTBIN) + LD_LIBRARY_PATH="../alib2std/lib-debug;../alib2data/lib-debug;lib-debug" test-bin-debug/$(TESTBIN) unit-test-release: build-tests-release - LD_LIBRARY_PATH="../alib2data/lib-release;lib-release" test-bin-release/$(TESTBIN) + LD_LIBRARY_PATH="../alib2std/lib-release;../alib2data/lib-release;lib-release" test-bin-release/$(TESTBIN) diff --git a/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.cxx b/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.cxx index 54ba103d19..ce8be6bf66 100644 --- a/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.cxx +++ b/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.cxx @@ -13,8 +13,7 @@ #include "alphabet/LabeledSymbol.h" #include "label/Label.h" #include "exception/AlibException.h" -#include <std/set.hpp> -#include <iostream> +#include <set> namespace automaton { diff --git a/alib2algo/src/automaton/determinize/DeterminizeVPAPart.cxx b/alib2algo/src/automaton/determinize/DeterminizeVPAPart.cxx index 0398cc35ff..fb77c6f144 100644 --- a/alib2algo/src/automaton/determinize/DeterminizeVPAPart.cxx +++ b/alib2algo/src/automaton/determinize/DeterminizeVPAPart.cxx @@ -12,8 +12,7 @@ #include "alphabet/Symbol.h" #include "alphabet/LabeledSymbol.h" #include "label/Label.h" -#include <std/set.hpp> -#include <iostream> +#include <set> namespace automaton { diff --git a/alib2algo/src/automaton/determinize/common/RHDPDACommon.h b/alib2algo/src/automaton/determinize/common/RHDPDACommon.h index cf3e66e356..cfeb72c6ba 100644 --- a/alib2algo/src/automaton/determinize/common/RHDPDACommon.h +++ b/alib2algo/src/automaton/determinize/common/RHDPDACommon.h @@ -5,7 +5,7 @@ #include "automaton/common/State.h" #include "alphabet/Symbol.h" #include "string/Epsilon.h" -#include "std/variant.hpp" +#include <variant> #include <set> #include <map> diff --git a/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp b/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp index 1c0eca206b..1f3af73a94 100644 --- a/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp +++ b/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp @@ -18,7 +18,6 @@ #include <set> #include <map> #include <deque> -#include <std/map.hpp> #include <iostream> #include "../../regexp/properties/RegExpEpsilon.h" diff --git a/alib2algo/src/automaton/transform/RHPDAToPDA.cpp b/alib2algo/src/automaton/transform/RHPDAToPDA.cpp index f5f03a3405..0e6e037420 100644 --- a/alib2algo/src/automaton/transform/RHPDAToPDA.cpp +++ b/alib2algo/src/automaton/transform/RHPDAToPDA.cpp @@ -20,8 +20,6 @@ #include <queue> #include <iostream> -#include <std/map.hpp> - namespace automaton { automaton::DPDA RHPDAToPDA::convert( const automaton::RealTimeHeightDeterministicDPDA & pda ) { diff --git a/alib2algo/src/grammar/properties/NonterminalUnitRuleCycle.cpp b/alib2algo/src/grammar/properties/NonterminalUnitRuleCycle.cpp index e969139dfc..2534518e51 100644 --- a/alib2algo/src/grammar/properties/NonterminalUnitRuleCycle.cpp +++ b/alib2algo/src/grammar/properties/NonterminalUnitRuleCycle.cpp @@ -17,7 +17,7 @@ #include <grammar/Regular/RightLG.h> #include <grammar/Regular/RightRG.h> -#include <std/set.hpp> +#include <set> #include <deque> namespace grammar { diff --git a/alib2algo/src/grammar/simplify/LeftRecursionRemover.cpp b/alib2algo/src/grammar/simplify/LeftRecursionRemover.cpp index ca28199255..64cc8d1101 100644 --- a/alib2algo/src/grammar/simplify/LeftRecursionRemover.cpp +++ b/alib2algo/src/grammar/simplify/LeftRecursionRemover.cpp @@ -8,7 +8,7 @@ #include "LeftRecursionRemover.h" #include "../convert/ToGrammarRightRG.h" -#include "std/vector.hpp" +#include <vector> namespace grammar { diff --git a/alib2algo/src/grammar/simplify/UnproductiveSymbolsRemover.cpp b/alib2algo/src/grammar/simplify/UnproductiveSymbolsRemover.cpp index 43d2044ab0..c6dcdefbf3 100644 --- a/alib2algo/src/grammar/simplify/UnproductiveSymbolsRemover.cpp +++ b/alib2algo/src/grammar/simplify/UnproductiveSymbolsRemover.cpp @@ -17,7 +17,7 @@ #include <grammar/Regular/RightLG.h> #include <grammar/Regular/RightRG.h> -#include <std/set.hpp> +#include <set> #include "../properties/ProductiveNonterminals.h" diff --git a/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.cpp b/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.cpp index 627d6d469f..0aa86a1a88 100644 --- a/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.cpp +++ b/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.cpp @@ -17,7 +17,7 @@ #include <grammar/Regular/RightLG.h> #include <grammar/Regular/RightRG.h> -#include <std/set.hpp> +#include <set> #include "../properties/UnreachableSymbols.h" diff --git a/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp b/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp index 54810cbcc9..701a81f9fc 100644 --- a/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp +++ b/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp @@ -13,7 +13,7 @@ #include <vector> #include <string/LinearString.h> -#include <std/hexavigesimal.h> +#include <hexavigesimal> #include "../transform/RegExpDerivation.h" #include "../simplify/RegExpOptimize.h" diff --git a/alib2algo/src/regexp/convert/ToGrammarRightRGDerivation.cpp b/alib2algo/src/regexp/convert/ToGrammarRightRGDerivation.cpp index 1f9106c2a9..b11a8941fd 100644 --- a/alib2algo/src/regexp/convert/ToGrammarRightRGDerivation.cpp +++ b/alib2algo/src/regexp/convert/ToGrammarRightRGDerivation.cpp @@ -12,7 +12,7 @@ #include <set> #include <vector> -#include <std/hexavigesimal.h> +#include <hexavigesimal> #include "../simplify/RegExpOptimize.h" #include "../transform/RegExpDerivation.h" diff --git a/alib2algo/src/string/simplify/NormalizeAlphabet.cpp b/alib2algo/src/string/simplify/NormalizeAlphabet.cpp index ef83a38e1d..34f4709f24 100644 --- a/alib2algo/src/string/simplify/NormalizeAlphabet.cpp +++ b/alib2algo/src/string/simplify/NormalizeAlphabet.cpp @@ -7,7 +7,7 @@ #include "NormalizeAlphabet.h" -#include "std/map.hpp" +#include <map> #include <deque> #include <vector> #include <set> diff --git a/alib2algo/test-src/grammar/simplify/GrammarSimpleRulesRemoverTest.cpp b/alib2algo/test-src/grammar/simplify/GrammarSimpleRulesRemoverTest.cpp index 4496970975..c93902552f 100644 --- a/alib2algo/test-src/grammar/simplify/GrammarSimpleRulesRemoverTest.cpp +++ b/alib2algo/test-src/grammar/simplify/GrammarSimpleRulesRemoverTest.cpp @@ -5,7 +5,7 @@ #include "grammar/ContextFree/CFG.h" #include "grammar/ContextFree/EpsilonFreeCFG.h" -#include "std/pair.hpp" +#include <pair> #define CPPUNIT_IMPLY(x, y) CPPUNIT_ASSERT(!(x) || (y)) diff --git a/alib2algo/test-src/grammar/simplify/GrammarToCNFTest.cpp b/alib2algo/test-src/grammar/simplify/GrammarToCNFTest.cpp index eebc207ec3..c380d7864a 100644 --- a/alib2algo/test-src/grammar/simplify/GrammarToCNFTest.cpp +++ b/alib2algo/test-src/grammar/simplify/GrammarToCNFTest.cpp @@ -9,7 +9,7 @@ #include "alphabet/UniqueSymbol.h" #include "primitive/Integer.h" -#include "std/pair.hpp" +#include <pair> #include <factory/StringDataFactory.hpp> diff --git a/alib2data/makefile b/alib2data/makefile index 8113758af5..b7f555aeed 100644 --- a/alib2data/makefile +++ b/alib2data/makefile @@ -9,11 +9,11 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-lbfd -liberty -lz -ldl -rdynamic -shared -lxml2 -TEST_LDFLAGS_DEBUG:= -Llib-debug -rdynamic -lxml2 -lalib2data -lcppunit -Wl,-rpath,. +LDFLAGS_DEBUG:=-lbfd -liberty -lz -ldl -L../alib2std/lib-debug -rdynamic -shared -lxml2 +TEST_LDFLAGS_DEBUG:= -Llib-debug -L../alib2std/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lcppunit -Wl,-rpath,. -LDFLAGS_RELEASE:=-rdynamic -shared -lxml2 -TEST_LDFLAGS_RELEASE:= -Llib-release -rdynamic -lxml2 -lalib2data -lcppunit -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -rdynamic -shared -lxml2 +TEST_LDFLAGS_RELEASE:= -Llib-release -L../alib2std/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lcppunit -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) TEST_OBJECTS_DEBUG:=$(patsubst test-src/%.cpp, test-obj-debug/%.o, $(shell find test-src/ -name *cpp)) @@ -41,7 +41,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ @@ -93,7 +93,7 @@ test-obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src/ -I../../\$$(DEPTH)alib2data/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ @@ -201,10 +201,10 @@ build-tests-release: test-bin-release/$(TESTBIN) unit-test-debug: build-tests-debug - LD_LIBRARY_PATH="lib-debug" test-bin-debug/$(TESTBIN) + LD_LIBRARY_PATH="../alib2std/lib-debug;lib-debug" test-bin-debug/$(TESTBIN) unit-test-release: build-tests-release - LD_LIBRARY_PATH="lib-release" test-bin-release/$(TESTBIN) + LD_LIBRARY_PATH="../alib2std/lib-release;lib-release" test-bin-release/$(TESTBIN) diff --git a/alib2data/src/alphabet/Symbol.h b/alib2data/src/alphabet/Symbol.h index 7ed432233d..ed9020385e 100644 --- a/alib2data/src/alphabet/Symbol.h +++ b/alib2data/src/alphabet/Symbol.h @@ -8,8 +8,6 @@ #ifndef SYMBOL_H_ #define SYMBOL_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "SymbolBase.h" #include "../common/wrapper.hpp" diff --git a/alib2data/src/alphabet/SymbolBase.h b/alib2data/src/alphabet/SymbolBase.h index 6bbf45e44b..44781e16d1 100644 --- a/alib2data/src/alphabet/SymbolBase.h +++ b/alib2data/src/alphabet/SymbolBase.h @@ -8,7 +8,6 @@ #ifndef SYMBOL_BASE_H_ #define SYMBOL_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" namespace alphabet { diff --git a/alib2data/src/alphabet/SymbolPairSymbol.cpp b/alib2data/src/alphabet/SymbolPairSymbol.cpp index 247598e259..963974706e 100644 --- a/alib2data/src/alphabet/SymbolPairSymbol.cpp +++ b/alib2data/src/alphabet/SymbolPairSymbol.cpp @@ -6,7 +6,6 @@ */ #include "SymbolPairSymbol.h" -#include "../std/pair.hpp" #include <sstream> namespace alphabet { diff --git a/alib2data/src/alphabet/SymbolPairSymbol.h b/alib2data/src/alphabet/SymbolPairSymbol.h index 66d0b15bf1..b44583e9a3 100644 --- a/alib2data/src/alphabet/SymbolPairSymbol.h +++ b/alib2data/src/alphabet/SymbolPairSymbol.h @@ -13,7 +13,7 @@ #include "Symbol.h" #include "SymbolBase.h" -#include <set> +#include <pair> namespace alphabet { diff --git a/alib2data/src/alphabet/SymbolSetSymbol.cpp b/alib2data/src/alphabet/SymbolSetSymbol.cpp index ebc35d6eb9..e3506b8986 100644 --- a/alib2data/src/alphabet/SymbolSetSymbol.cpp +++ b/alib2data/src/alphabet/SymbolSetSymbol.cpp @@ -6,7 +6,6 @@ */ #include "SymbolSetSymbol.h" -#include "../std/set.hpp" #include <sstream> namespace alphabet { diff --git a/alib2data/src/alphabet/UniqueSymbol.cpp b/alib2data/src/alphabet/UniqueSymbol.cpp index c5ef63b65f..9508191b2b 100644 --- a/alib2data/src/alphabet/UniqueSymbol.cpp +++ b/alib2data/src/alphabet/UniqueSymbol.cpp @@ -6,7 +6,6 @@ */ #include "UniqueSymbol.h" -#include "../std/set.hpp" #include <sstream> namespace alphabet { diff --git a/alib2data/src/automaton/Automaton.h b/alib2data/src/automaton/Automaton.h index 41a7ec159b..c86b6636bc 100644 --- a/alib2data/src/automaton/Automaton.h +++ b/alib2data/src/automaton/Automaton.h @@ -8,8 +8,6 @@ #ifndef AUTOMATON_H_ #define AUTOMATON_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "AutomatonBase.h" #include "../common/wrapper.hpp" diff --git a/alib2data/src/automaton/AutomatonBase.h b/alib2data/src/automaton/AutomatonBase.h index 088b3b2d24..e98ef8e7ca 100644 --- a/alib2data/src/automaton/AutomatonBase.h +++ b/alib2data/src/automaton/AutomatonBase.h @@ -8,7 +8,6 @@ #ifndef AUTOMATON_BASE_H_ #define AUTOMATON_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" #include "../exception/AlibException.h" diff --git a/alib2data/src/automaton/AutomatonFromStringLexer.cpp b/alib2data/src/automaton/AutomatonFromStringLexer.cpp index d0bae416bc..974028c2b0 100644 --- a/alib2data/src/automaton/AutomatonFromStringLexer.cpp +++ b/alib2data/src/automaton/AutomatonFromStringLexer.cpp @@ -6,7 +6,7 @@ */ #include "AutomatonFromStringLexer.h" -#include "../std/istream.h" +#include <istream> namespace automaton { diff --git a/alib2data/src/automaton/AutomatonFromStringParser.h b/alib2data/src/automaton/AutomatonFromStringParser.h index 8f6289449e..640b1b7dee 100644 --- a/alib2data/src/automaton/AutomatonFromStringParser.h +++ b/alib2data/src/automaton/AutomatonFromStringParser.h @@ -15,7 +15,7 @@ #include "common/State.h" #include <tuple> -#include "../std/variant.hpp" +#include <variant> #include "../string/Epsilon.h" namespace alib { diff --git a/alib2data/src/automaton/AutomatonFromXMLParser.cpp b/alib2data/src/automaton/AutomatonFromXMLParser.cpp index d57e4e0bdc..893d816a4f 100644 --- a/alib2data/src/automaton/AutomatonFromXMLParser.cpp +++ b/alib2data/src/automaton/AutomatonFromXMLParser.cpp @@ -463,7 +463,6 @@ OneTapeDTM AutomatonFromXMLParser::parseOneTapeDTM(std::deque<sax::Token>& input automaton.setStates(std::move(states)); automaton.setTapeAlphabet(std::move(tapeSymbols)); automaton.setInputAlphabet(std::move(inputSymbols)); - automaton.setInitialState(std::move(initialState)); automaton.setFinalStates(std::move(finalStates)); parseTransitions<OneTapeDTM>(input, automaton); diff --git a/alib2data/src/automaton/AutomatonFromXMLParser.h b/alib2data/src/automaton/AutomatonFromXMLParser.h index 5dd4f29fde..9e4a3eb64c 100644 --- a/alib2data/src/automaton/AutomatonFromXMLParser.h +++ b/alib2data/src/automaton/AutomatonFromXMLParser.h @@ -31,7 +31,7 @@ #include <list> #include <set> -#include "../std/variant.hpp" +#include <variant> #include "../sax/Token.h" namespace alib { diff --git a/alib2data/src/automaton/AutomatonToStringComposer.h b/alib2data/src/automaton/AutomatonToStringComposer.h index d520fcfc6a..d0b324f8a0 100644 --- a/alib2data/src/automaton/AutomatonToStringComposer.h +++ b/alib2data/src/automaton/AutomatonToStringComposer.h @@ -8,7 +8,7 @@ #ifndef AUTOMATON_TO_STRING_COMPOSER_H_ #define AUTOMATON_TO_STRING_COMPOSER_H_ -#include <sstream> +#include <ostream> #include "Automaton.h" #include "FSM/DFA.h" #include "FSM/NFA.h" diff --git a/alib2data/src/automaton/FSM/CompactNFA.cpp b/alib2data/src/automaton/FSM/CompactNFA.cpp index 377b2322fa..17fcf59619 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.cpp +++ b/alib2data/src/automaton/FSM/CompactNFA.cpp @@ -11,7 +11,6 @@ #include "NFA.h" #include "DFA.h" #include "../Automaton.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include "../../string/StringAlphabetGetter.h" #include <ostream> diff --git a/alib2data/src/automaton/FSM/DFA.cpp b/alib2data/src/automaton/FSM/DFA.cpp index 469d7fbd6e..37eeec4bc3 100644 --- a/alib2data/src/automaton/FSM/DFA.cpp +++ b/alib2data/src/automaton/FSM/DFA.cpp @@ -6,8 +6,6 @@ */ #include "DFA.h" -#include "../../std/set.hpp" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <ostream> #include <sstream> diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.cpp b/alib2data/src/automaton/FSM/EpsilonNFA.cpp index 7f8f4c2153..7ca5ab09f0 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.cpp +++ b/alib2data/src/automaton/FSM/EpsilonNFA.cpp @@ -9,7 +9,6 @@ #include "MultiInitialStateNFA.h" #include "NFA.h" #include "DFA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include "../Automaton.h" #include <ostream> diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h index b81c21ca57..ff1c13f705 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.h +++ b/alib2data/src/automaton/FSM/EpsilonNFA.h @@ -9,7 +9,7 @@ #define EPSILON_NFA_H_ #include <map> -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.cpp b/alib2data/src/automaton/FSM/ExtendedNFA.cpp index cd47758857..f79bbabbf4 100644 --- a/alib2data/src/automaton/FSM/ExtendedNFA.cpp +++ b/alib2data/src/automaton/FSM/ExtendedNFA.cpp @@ -11,7 +11,6 @@ #include "MultiInitialStateNFA.h" #include "NFA.h" #include "DFA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include "../Automaton.h" #include "../../regexp/RegExp.h" diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h index 2259342664..ee1a836d2a 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h +++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h @@ -9,7 +9,6 @@ #define MULTI_INITIAL_STATE_NFA_H_ #include <map> -#include "../../std/map.hpp" #include "../AutomatonBase.h" #include "../common/MultiInitialStates.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h index 29f83698eb..878b3ae068 100644 --- a/alib2data/src/automaton/FSM/NFA.h +++ b/alib2data/src/automaton/FSM/NFA.h @@ -9,7 +9,6 @@ #define NFA_H_ #include <map> -#include "../../std/map.hpp" #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/PDA/DPDA.cpp b/alib2data/src/automaton/PDA/DPDA.cpp index c68924fe3f..cad653a7b7 100644 --- a/alib2data/src/automaton/PDA/DPDA.cpp +++ b/alib2data/src/automaton/PDA/DPDA.cpp @@ -6,7 +6,6 @@ */ #include "DPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h index 9c51d6e5dd..c160cb4829 100644 --- a/alib2data/src/automaton/PDA/DPDA.h +++ b/alib2data/src/automaton/PDA/DPDA.h @@ -11,7 +11,7 @@ #include <set> #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/SingleInitialSymbolPushdownStoreAlphabet.h" diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/PDA/InputDrivenDPDA.h index 97b6d2fceb..b256d93128 100644 --- a/alib2data/src/automaton/PDA/InputDrivenDPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.h @@ -8,7 +8,8 @@ #ifndef INPUT_DRIVEN_DPDA_H_ #define INPUT_DRIVEN_DPDA_H_ -#include "../../std/map.hpp" +#include <map> +#include <vector> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h index 1835d1cb1a..a7ad529c2b 100644 --- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h @@ -8,7 +8,8 @@ #ifndef INPUT_DRIVEN_NPDA_H_ #define INPUT_DRIVEN_NPDA_H_ -#include "../../std/map.hpp" +#include <map> +#include <vector> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/PDA/NPDA.cpp b/alib2data/src/automaton/PDA/NPDA.cpp index 6c63d11433..120ba5ed18 100644 --- a/alib2data/src/automaton/PDA/NPDA.cpp +++ b/alib2data/src/automaton/PDA/NPDA.cpp @@ -6,7 +6,6 @@ */ #include "NPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h index 9710870219..e5ff3ec5e1 100644 --- a/alib2data/src/automaton/PDA/NPDA.h +++ b/alib2data/src/automaton/PDA/NPDA.h @@ -11,7 +11,7 @@ #include <set> #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/SingleInitialSymbolPushdownStoreAlphabet.h" diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp index 6213167443..662109e69b 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp @@ -6,7 +6,6 @@ */ #include "RealTimeHeightDeterministicDPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h index fffde3d5bf..63aa389073 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h @@ -10,8 +10,7 @@ #include <map> #include <vector> -#include "../../std/map.hpp" -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp index b4724843e0..394fe736c8 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp @@ -6,7 +6,6 @@ */ #include "RealTimeHeightDeterministicNPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h index b3b6911b20..e1c6a23886 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h @@ -10,8 +10,7 @@ #include <map> #include <vector> -#include "../../std/map.hpp" -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/MultiInitialStates.h" #include "../common/InputAlphabet.h" diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.cpp b/alib2data/src/automaton/PDA/SinglePopDPDA.cpp index ba7a558be4..2b1edfcce3 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.cpp +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.cpp @@ -6,7 +6,6 @@ */ #include "SinglePopDPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h index dd9a248a14..b14fb3f948 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h @@ -11,7 +11,7 @@ #include <set> #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/SingleInitialSymbolPushdownStoreAlphabet.h" diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.cpp b/alib2data/src/automaton/PDA/SinglePopNPDA.cpp index 2a14234aaf..e4d5a14765 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.cpp +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.cpp @@ -6,7 +6,6 @@ */ #include "SinglePopNPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h index cb3e381a99..8284bf1c14 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h @@ -11,7 +11,7 @@ #include <set> #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/SingleInitialSymbolPushdownStoreAlphabet.h" diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp index c4447ac516..f805b38f8b 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp @@ -6,7 +6,6 @@ */ #include "VisiblyPushdownDPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h index 2331ef5caa..516f5305a1 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h @@ -10,7 +10,6 @@ #include <map> #include <vector> -#include "../../std/map.hpp" #include "../AutomatonBase.h" #include "../common/SingleInitialState.h" #include "../common/CallReturnLocalInputAlphabet.h" diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp index d332756b87..69d45f5cd6 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp @@ -6,7 +6,6 @@ */ #include "VisiblyPushdownNPDA.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h index 721e31babc..9b3cb34b67 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h @@ -10,7 +10,6 @@ #include <map> #include <vector> -#include "../../std/map.hpp" #include "../AutomatonBase.h" #include "../common/MultiInitialStates.h" #include "../common/CallReturnLocalInputAlphabet.h" diff --git a/alib2data/src/automaton/TM/OneTapeDTM.cpp b/alib2data/src/automaton/TM/OneTapeDTM.cpp index f4043e36fa..c4a86cd0cc 100644 --- a/alib2data/src/automaton/TM/OneTapeDTM.cpp +++ b/alib2data/src/automaton/TM/OneTapeDTM.cpp @@ -6,7 +6,6 @@ */ #include "OneTapeDTM.h" -#include "../../std/map.hpp" #include "../AutomatonException.h" #include <sstream> diff --git a/alib2data/src/automaton/common/InputAlphabet.cpp b/alib2data/src/automaton/common/InputAlphabet.cpp index 8485d9485b..9d880c1fa3 100644 --- a/alib2data/src/automaton/common/InputAlphabet.cpp +++ b/alib2data/src/automaton/common/InputAlphabet.cpp @@ -9,7 +9,6 @@ #include <algorithm> #include "../AutomatonException.h" -#include "../../std/set.hpp" namespace automaton { diff --git a/alib2data/src/automaton/common/Shift.h b/alib2data/src/automaton/common/Shift.h index 751783b426..9bd37b10f1 100644 --- a/alib2data/src/automaton/common/Shift.h +++ b/alib2data/src/automaton/common/Shift.h @@ -9,7 +9,7 @@ #define SHIFT_H_ #include <string> -#include "../../std/compare.hpp" +#include <compare> namespace automaton { diff --git a/alib2data/src/std/visitor.hpp b/alib2data/src/common/visitor.hpp similarity index 100% rename from alib2data/src/std/visitor.hpp rename to alib2data/src/common/visitor.hpp diff --git a/alib2data/src/container/Container.h b/alib2data/src/container/Container.h index 88b2471702..07e00c9289 100644 --- a/alib2data/src/container/Container.h +++ b/alib2data/src/container/Container.h @@ -8,8 +8,6 @@ #ifndef CONTAINER_H_ #define CONTAINER_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "ContainerBase.h" #include "../common/wrapper.hpp" diff --git a/alib2data/src/container/ContainerBase.h b/alib2data/src/container/ContainerBase.h index 58ae13185c..84608d550e 100644 --- a/alib2data/src/container/ContainerBase.h +++ b/alib2data/src/container/ContainerBase.h @@ -8,7 +8,6 @@ #ifndef CONTAINER_BASE_H_ #define CONTAINER_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" namespace container { diff --git a/alib2data/src/container/ContainerFromXMLParser.hpp b/alib2data/src/container/ContainerFromXMLParser.hpp index 84dc6df019..11750428cb 100644 --- a/alib2data/src/container/ContainerFromXMLParser.hpp +++ b/alib2data/src/container/ContainerFromXMLParser.hpp @@ -8,7 +8,7 @@ #ifndef CONTAINER_FROM_XML_PARSER_H_ #define CONTAINER_FROM_XML_PARSER_H_ -#include "../std/variant.hpp" +#include <variant> #include "../sax/FromXMLParserHelper.h" #include "ContainerFeatures.h" diff --git a/alib2data/src/container/ContainerToXMLComposer.hpp b/alib2data/src/container/ContainerToXMLComposer.hpp index fd4d685995..e643f66264 100644 --- a/alib2data/src/container/ContainerToXMLComposer.hpp +++ b/alib2data/src/container/ContainerToXMLComposer.hpp @@ -9,7 +9,7 @@ #define CONTAINER_TO_XML_COMPOSER_H_ #include <deque> -#include "../std/variant.hpp" +#include <variant> #include "../sax/Token.h" #include "Container.h" diff --git a/alib2data/src/container/ObjectsMap.cpp b/alib2data/src/container/ObjectsMap.cpp index 21e4e8b4e5..6e79bb8b47 100644 --- a/alib2data/src/container/ObjectsMap.cpp +++ b/alib2data/src/container/ObjectsMap.cpp @@ -6,7 +6,6 @@ */ #include "ObjectsMap.h" -#include "../std/map.hpp" #include <cstdlib> #include <iostream> diff --git a/alib2data/src/container/ObjectsPair.cpp b/alib2data/src/container/ObjectsPair.cpp index 0fa960ff2d..27734988fa 100644 --- a/alib2data/src/container/ObjectsPair.cpp +++ b/alib2data/src/container/ObjectsPair.cpp @@ -6,7 +6,6 @@ */ #include "ObjectsPair.h" -#include "../std/map.hpp" #include <cstdlib> #include <iostream> diff --git a/alib2data/src/container/ObjectsPair.h b/alib2data/src/container/ObjectsPair.h index 6fbfa24c82..f3830f13c3 100644 --- a/alib2data/src/container/ObjectsPair.h +++ b/alib2data/src/container/ObjectsPair.h @@ -8,7 +8,7 @@ #ifndef OBJECTS_PAIR_H_ #define OBJECTS_PAIR_H_ -#include <map> +#include <pair> #include <string> #include "../object/Object.h" diff --git a/alib2data/src/container/ObjectsSet.cpp b/alib2data/src/container/ObjectsSet.cpp index f4437f3ee8..fb3c089a29 100644 --- a/alib2data/src/container/ObjectsSet.cpp +++ b/alib2data/src/container/ObjectsSet.cpp @@ -6,7 +6,6 @@ */ #include "ObjectsSet.h" -#include "../std/set.hpp" #include <cstdlib> #include <iostream> diff --git a/alib2data/src/container/ObjectsVector.cpp b/alib2data/src/container/ObjectsVector.cpp index 2e2de86647..d88e87e15a 100644 --- a/alib2data/src/container/ObjectsVector.cpp +++ b/alib2data/src/container/ObjectsVector.cpp @@ -6,7 +6,6 @@ */ #include "ObjectsVector.h" -#include "../std/vector.hpp" #include <cstdlib> #include <iostream> diff --git a/alib2data/src/debug/bfdStacktrace.cpp b/alib2data/src/debug/bfdStacktrace.cpp index 6f51fe19ea..02b2ca0c14 100644 --- a/alib2data/src/debug/bfdStacktrace.cpp +++ b/alib2data/src/debug/bfdStacktrace.cpp @@ -13,7 +13,7 @@ #include <sstream> #include <string> -#include "../std/map.hpp" +#include <map> #include "addr2line.h" diff --git a/alib2data/src/debug/sigHandler.h b/alib2data/src/debug/sigHandler.h index 76bf4ad5f2..4de86c251b 100644 --- a/alib2data/src/debug/sigHandler.h +++ b/alib2data/src/debug/sigHandler.h @@ -1,7 +1,6 @@ #ifndef SIG_HANDLER_H_ #define SIG_HANDLER_H_ -#include <sstream> #include <string> namespace std { diff --git a/alib2data/src/grammar/ContextFree/CFG.cpp b/alib2data/src/grammar/ContextFree/CFG.cpp index d29574b514..4944b190e1 100644 --- a/alib2data/src/grammar/ContextFree/CFG.cpp +++ b/alib2data/src/grammar/ContextFree/CFG.cpp @@ -6,7 +6,6 @@ */ #include "CFG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> diff --git a/alib2data/src/grammar/ContextFree/CNF.cpp b/alib2data/src/grammar/ContextFree/CNF.cpp index a25118884c..628a472912 100644 --- a/alib2data/src/grammar/ContextFree/CNF.cpp +++ b/alib2data/src/grammar/ContextFree/CNF.cpp @@ -6,7 +6,6 @@ */ #include "CNF.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h index 8f0ac76232..5b30c24170 100644 --- a/alib2data/src/grammar/ContextFree/CNF.h +++ b/alib2data/src/grammar/ContextFree/CNF.h @@ -12,7 +12,7 @@ #include <map> #include <vector> #include <sstream> -#include "../../std/variant.hpp" +#include <variant> #include "../common/TerminalNonterminalAlphabetInitialSymbol.h" namespace grammar { diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp index bcebe12a7e..9203549150 100644 --- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp +++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp @@ -6,7 +6,6 @@ */ #include "EpsilonFreeCFG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> diff --git a/alib2data/src/grammar/ContextFree/GNF.cpp b/alib2data/src/grammar/ContextFree/GNF.cpp index bbda9516ff..fa63307907 100644 --- a/alib2data/src/grammar/ContextFree/GNF.cpp +++ b/alib2data/src/grammar/ContextFree/GNF.cpp @@ -6,7 +6,6 @@ */ #include "GNF.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> diff --git a/alib2data/src/grammar/ContextFree/LG.cpp b/alib2data/src/grammar/ContextFree/LG.cpp index 57f77675b0..22217ef54e 100644 --- a/alib2data/src/grammar/ContextFree/LG.cpp +++ b/alib2data/src/grammar/ContextFree/LG.cpp @@ -6,7 +6,6 @@ */ #include "LG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h index e8300c5b67..07299fa747 100644 --- a/alib2data/src/grammar/ContextFree/LG.h +++ b/alib2data/src/grammar/ContextFree/LG.h @@ -13,7 +13,7 @@ #include <tuple> #include <vector> #include <sstream> -#include "../../std/variant.hpp" +#include <variant> #include "../common/TerminalNonterminalAlphabetInitialSymbol.h" namespace grammar { diff --git a/alib2data/src/grammar/ContextSensitive/CSG.cpp b/alib2data/src/grammar/ContextSensitive/CSG.cpp index f036943d62..99cb1f35be 100644 --- a/alib2data/src/grammar/ContextSensitive/CSG.cpp +++ b/alib2data/src/grammar/ContextSensitive/CSG.cpp @@ -6,7 +6,6 @@ */ #include "CSG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp index 143a423ba0..d153d4f79d 100644 --- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp +++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp @@ -6,7 +6,6 @@ */ #include "NonContractingGrammar.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/Grammar.h b/alib2data/src/grammar/Grammar.h index f1fc2dc274..4e26f7b034 100644 --- a/alib2data/src/grammar/Grammar.h +++ b/alib2data/src/grammar/Grammar.h @@ -8,8 +8,6 @@ #ifndef GRAMMAR_H_ #define GRAMMAR_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "GrammarBase.h" #include "../common/wrapper.hpp" diff --git a/alib2data/src/grammar/GrammarBase.h b/alib2data/src/grammar/GrammarBase.h index 0777ad1f82..cc08c8f71f 100644 --- a/alib2data/src/grammar/GrammarBase.h +++ b/alib2data/src/grammar/GrammarBase.h @@ -8,7 +8,6 @@ #ifndef GRAMMAR_BASE_H_ #define GRAMMAR_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" #include "../exception/AlibException.h" diff --git a/alib2data/src/grammar/GrammarFromStringLexer.cpp b/alib2data/src/grammar/GrammarFromStringLexer.cpp index 79a2a2e1bd..23c22495e8 100644 --- a/alib2data/src/grammar/GrammarFromStringLexer.cpp +++ b/alib2data/src/grammar/GrammarFromStringLexer.cpp @@ -6,7 +6,7 @@ */ #include "GrammarFromStringLexer.h" -#include "../std/istream.h" +#include <istream> namespace grammar { diff --git a/alib2data/src/grammar/GrammarFromStringParser.h b/alib2data/src/grammar/GrammarFromStringParser.h index a77ae036c1..5cbc736073 100644 --- a/alib2data/src/grammar/GrammarFromStringParser.h +++ b/alib2data/src/grammar/GrammarFromStringParser.h @@ -14,6 +14,7 @@ #include "../alphabet/Symbol.h" #include <set> #include <vector> +#include <map> namespace alib { diff --git a/alib2data/src/grammar/GrammarFromXMLParser.h b/alib2data/src/grammar/GrammarFromXMLParser.h index 44ffacb3b9..d999109163 100644 --- a/alib2data/src/grammar/GrammarFromXMLParser.h +++ b/alib2data/src/grammar/GrammarFromXMLParser.h @@ -27,7 +27,7 @@ #include <deque> #include <set> -#include "../std/variant.hpp" +#include <variant> #include "../sax/Token.h" namespace alib { diff --git a/alib2data/src/grammar/Regular/LeftLG.cpp b/alib2data/src/grammar/Regular/LeftLG.cpp index 34f3ea41cc..e8ae9f5998 100644 --- a/alib2data/src/grammar/Regular/LeftLG.cpp +++ b/alib2data/src/grammar/Regular/LeftLG.cpp @@ -6,7 +6,6 @@ */ #include "LeftLG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h index 187228f9b0..5cbc3a41f3 100644 --- a/alib2data/src/grammar/Regular/LeftLG.h +++ b/alib2data/src/grammar/Regular/LeftLG.h @@ -11,7 +11,7 @@ #include "../GrammarBase.h" #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../common/TerminalNonterminalAlphabetInitialSymbol.h" namespace grammar { diff --git a/alib2data/src/grammar/Regular/LeftRG.cpp b/alib2data/src/grammar/Regular/LeftRG.cpp index d0b7c723f0..1299f241d9 100644 --- a/alib2data/src/grammar/Regular/LeftRG.cpp +++ b/alib2data/src/grammar/Regular/LeftRG.cpp @@ -6,7 +6,6 @@ */ #include "LeftRG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h index 16da0c4e13..f036487d47 100644 --- a/alib2data/src/grammar/Regular/LeftRG.h +++ b/alib2data/src/grammar/Regular/LeftRG.h @@ -11,7 +11,7 @@ #include "../GrammarBase.h" #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../common/TerminalNonterminalAlphabetInitialSymbol.h" namespace grammar { diff --git a/alib2data/src/grammar/Regular/RightLG.cpp b/alib2data/src/grammar/Regular/RightLG.cpp index 2adadf07fb..f15aaddbf1 100644 --- a/alib2data/src/grammar/Regular/RightLG.cpp +++ b/alib2data/src/grammar/Regular/RightLG.cpp @@ -6,7 +6,6 @@ */ #include "RightLG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h index e3b5275ffb..69f53a1ec3 100644 --- a/alib2data/src/grammar/Regular/RightLG.h +++ b/alib2data/src/grammar/Regular/RightLG.h @@ -11,7 +11,7 @@ #include "../GrammarBase.h" #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../common/TerminalNonterminalAlphabetInitialSymbol.h" namespace grammar { diff --git a/alib2data/src/grammar/Regular/RightRG.cpp b/alib2data/src/grammar/Regular/RightRG.cpp index 59da54bc99..0fb6ad414e 100644 --- a/alib2data/src/grammar/Regular/RightRG.cpp +++ b/alib2data/src/grammar/Regular/RightRG.cpp @@ -6,7 +6,6 @@ */ #include "RightRG.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h index 9431d9e4fb..ff32ca9644 100644 --- a/alib2data/src/grammar/Regular/RightRG.h +++ b/alib2data/src/grammar/Regular/RightRG.h @@ -11,7 +11,7 @@ #include "../GrammarBase.h" #include <map> #include <vector> -#include "../../std/variant.hpp" +#include <variant> #include "../common/TerminalNonterminalAlphabetInitialSymbol.h" namespace grammar { diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp index 04f10d30e2..699f874d0a 100644 --- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp +++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp @@ -6,7 +6,6 @@ */ #include "ContextPreservingUnrestrictedGrammar.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp index 19186121a5..50702a8e80 100644 --- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp +++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp @@ -6,7 +6,6 @@ */ #include "UnrestrictedGrammar.h" -#include "../../std/map.hpp" #include "../GrammarException.h" #include <algorithm> #include <sstream> diff --git a/alib2data/src/graph/Graph.h b/alib2data/src/graph/Graph.h index 7d47b0c256..f4fe5bb2b9 100644 --- a/alib2data/src/graph/Graph.h +++ b/alib2data/src/graph/Graph.h @@ -1,8 +1,6 @@ #ifndef GRAPH_H_ #define GRAPH_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "../common/wrapper.hpp" #include "GraphBase.h" diff --git a/alib2data/src/graph/GraphBase.h b/alib2data/src/graph/GraphBase.h index e3539fef1a..aafa9ff94c 100644 --- a/alib2data/src/graph/GraphBase.h +++ b/alib2data/src/graph/GraphBase.h @@ -2,7 +2,6 @@ #define GRAPH_BASE_H_ #include "common/Macros.h" -#include "../common/base.hpp" #include "../object/ObjectBase.h" namespace graph { diff --git a/alib2data/src/graph/GraphToStringComposer.h b/alib2data/src/graph/GraphToStringComposer.h index 54ecda9ddc..052bf35671 100644 --- a/alib2data/src/graph/GraphToStringComposer.h +++ b/alib2data/src/graph/GraphToStringComposer.h @@ -9,7 +9,6 @@ #include "common/GraphElement.h" #include "directed/DirectedGraph.h" #include "undirected/UndirectedGraph.h" -#include "../std/visitor.hpp" #include "../sax/Token.h" namespace graph { diff --git a/alib2data/src/graph/GraphToXMLComposer.cpp b/alib2data/src/graph/GraphToXMLComposer.cpp index 5bba12af36..f8891e1786 100644 --- a/alib2data/src/graph/GraphToXMLComposer.cpp +++ b/alib2data/src/graph/GraphToXMLComposer.cpp @@ -2,7 +2,7 @@ #include "GraphRepresentation.h" #include "../XmlApi.hpp" -#include "../std/itos.h" +#include <string> namespace graph { diff --git a/alib2data/src/graph/GraphToXMLComposer.h b/alib2data/src/graph/GraphToXMLComposer.h index f1b32c46ea..ef876f3668 100644 --- a/alib2data/src/graph/GraphToXMLComposer.h +++ b/alib2data/src/graph/GraphToXMLComposer.h @@ -8,7 +8,6 @@ #include "common/GraphElement.h" #include "directed/DirectedGraph.h" #include "undirected/UndirectedGraph.h" -#include "../std/visitor.hpp" #include "../sax/Token.h" namespace alib { diff --git a/alib2data/src/graph/common/GraphElement.h b/alib2data/src/graph/common/GraphElement.h index ac6a1d8ff0..cf60cae928 100644 --- a/alib2data/src/graph/common/GraphElement.h +++ b/alib2data/src/graph/common/GraphElement.h @@ -5,7 +5,7 @@ #include <string> #include <functional> -#include "../../std/visitor.hpp" +#include "../../common/visitor.hpp" #include "../../object/Object.h" namespace graph { diff --git a/alib2data/src/graph/directed/AdjacencyListDirectedGraph.cpp b/alib2data/src/graph/directed/AdjacencyListDirectedGraph.cpp index 183b78b7d9..565567c454 100644 --- a/alib2data/src/graph/directed/AdjacencyListDirectedGraph.cpp +++ b/alib2data/src/graph/directed/AdjacencyListDirectedGraph.cpp @@ -1,5 +1,5 @@ #include "AdjacencyListDirectedGraph.h" -#include "../../std/compare.hpp" +#include <compare> #include <algorithm> diff --git a/alib2data/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp b/alib2data/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp index 0f1598b82a..d4631d8d15 100644 --- a/alib2data/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp +++ b/alib2data/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp @@ -1,5 +1,5 @@ #include "AdjacencyMatrixDirectedGraph.h" -#include "../../std/compare.hpp" +#include <compare> namespace graph { diff --git a/alib2data/src/graph/directed/DirectedGraph.cpp b/alib2data/src/graph/directed/DirectedGraph.cpp index c7b2349c38..a2dfc1f4cb 100644 --- a/alib2data/src/graph/directed/DirectedGraph.cpp +++ b/alib2data/src/graph/directed/DirectedGraph.cpp @@ -2,7 +2,6 @@ #include "IDirectedGraph.h" #include "AdjacencyListDirectedGraph.h" #include "AdjacencyMatrixDirectedGraph.h" -#include "../../std/set.hpp" #include <iostream> #include <algorithm> diff --git a/alib2data/src/graph/directed/DirectedGraph.h b/alib2data/src/graph/directed/DirectedGraph.h index dc6ff344e6..e1c309ec22 100644 --- a/alib2data/src/graph/directed/DirectedGraph.h +++ b/alib2data/src/graph/directed/DirectedGraph.h @@ -2,6 +2,7 @@ #define DIRECTED_GRAPH_H_ #include <unordered_map> +#include <set> #include "../GraphBase.h" #include "../GraphRepresentation.h" diff --git a/alib2data/src/graph/undirected/AdjacencyListUndirectedGraph.cpp b/alib2data/src/graph/undirected/AdjacencyListUndirectedGraph.cpp index 3d54453729..b1365d3241 100644 --- a/alib2data/src/graph/undirected/AdjacencyListUndirectedGraph.cpp +++ b/alib2data/src/graph/undirected/AdjacencyListUndirectedGraph.cpp @@ -1,5 +1,5 @@ #include "AdjacencyListUndirectedGraph.h" -#include "../../std/compare.hpp" +#include <compare> #include "utils.h" namespace graph { diff --git a/alib2data/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp b/alib2data/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp index a1d42d0921..25818ebfc4 100644 --- a/alib2data/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp +++ b/alib2data/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp @@ -1,5 +1,5 @@ #include "AdjacencyMatrixUndirectedGraph.h" -#include "../../std/compare.hpp" +#include <compare> #include "utils.h" namespace graph { diff --git a/alib2data/src/graph/undirected/UndirectedGraph.cpp b/alib2data/src/graph/undirected/UndirectedGraph.cpp index 2c35fa8600..b88aadf2f8 100644 --- a/alib2data/src/graph/undirected/UndirectedGraph.cpp +++ b/alib2data/src/graph/undirected/UndirectedGraph.cpp @@ -2,7 +2,6 @@ #include "IUndirectedGraph.h" #include "AdjacencyListUndirectedGraph.h" #include "AdjacencyMatrixUndirectedGraph.h" -#include "../../std/set.hpp" #include <iostream> #include <algorithm> diff --git a/alib2data/src/graph/undirected/UndirectedGraph.h b/alib2data/src/graph/undirected/UndirectedGraph.h index b99bdb086b..cff66b121b 100644 --- a/alib2data/src/graph/undirected/UndirectedGraph.h +++ b/alib2data/src/graph/undirected/UndirectedGraph.h @@ -2,6 +2,7 @@ #define UNDIRECTED_GRAPH_H_ #include <unordered_map> +#include <set> #include "../GraphBase.h" #include "../GraphRepresentation.h" diff --git a/alib2data/src/graph/undirected/utils.h b/alib2data/src/graph/undirected/utils.h index 706c19ba0d..a95114ff70 100644 --- a/alib2data/src/graph/undirected/utils.h +++ b/alib2data/src/graph/undirected/utils.h @@ -1,6 +1,7 @@ #ifndef GRAPH_UTILS_H_ #define GRAPH_UTILS_H_ +#include <list> #include <algorithm> #include "../common/Node.h" diff --git a/alib2data/src/label/HexavigesimalLabel.cpp b/alib2data/src/label/HexavigesimalLabel.cpp index 3c767facc4..4184327309 100644 --- a/alib2data/src/label/HexavigesimalLabel.cpp +++ b/alib2data/src/label/HexavigesimalLabel.cpp @@ -6,7 +6,6 @@ */ #include "HexavigesimalLabel.h" -#include "../std/hexavigesimal.h" namespace label { diff --git a/alib2data/src/label/HexavigesimalLabel.h b/alib2data/src/label/HexavigesimalLabel.h index 65aa7a6e7e..eca737c5dd 100644 --- a/alib2data/src/label/HexavigesimalLabel.h +++ b/alib2data/src/label/HexavigesimalLabel.h @@ -8,7 +8,7 @@ #ifndef HEXAVIGESIMAL_LABEL_H_ #define HEXAVIGESIMAL_LABEL_H_ -#include "../std/hexavigesimal.h" +#include <hexavigesimal> #include <ostream> #include "LabelBase.h" diff --git a/alib2data/src/label/Label.h b/alib2data/src/label/Label.h index 40c8719d70..a9463ce23b 100644 --- a/alib2data/src/label/Label.h +++ b/alib2data/src/label/Label.h @@ -8,8 +8,6 @@ #ifndef LABEL_H_ #define LABEL_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "../common/wrapper.hpp" #include "LabelBase.h" diff --git a/alib2data/src/label/LabelBase.h b/alib2data/src/label/LabelBase.h index 2180e896c0..fe0b81816a 100644 --- a/alib2data/src/label/LabelBase.h +++ b/alib2data/src/label/LabelBase.h @@ -8,7 +8,6 @@ #ifndef LABEL_BASE_H_ #define LABEL_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" namespace label { diff --git a/alib2data/src/label/LabelPairLabel.cpp b/alib2data/src/label/LabelPairLabel.cpp index 508464828f..4932d395c8 100644 --- a/alib2data/src/label/LabelPairLabel.cpp +++ b/alib2data/src/label/LabelPairLabel.cpp @@ -6,7 +6,7 @@ */ #include "LabelPairLabel.h" -#include "../std/pair.hpp" +#include <pair> #include <sstream> namespace label { diff --git a/alib2data/src/label/LabelSetLabel.cpp b/alib2data/src/label/LabelSetLabel.cpp index b82adeafdb..a6e66aff4a 100644 --- a/alib2data/src/label/LabelSetLabel.cpp +++ b/alib2data/src/label/LabelSetLabel.cpp @@ -6,7 +6,7 @@ */ #include "LabelSetLabel.h" -#include "../std/set.hpp" +#include <set> #include <sstream> namespace label { diff --git a/alib2data/src/label/LabelToStringComposer.h b/alib2data/src/label/LabelToStringComposer.h index a70d52b61f..8448977750 100644 --- a/alib2data/src/label/LabelToStringComposer.h +++ b/alib2data/src/label/LabelToStringComposer.h @@ -8,7 +8,7 @@ #ifndef LABEL_TO_STRING_COMPOSER_H_ #define LABEL_TO_STRING_COMPOSER_H_ -#include <sstream> +#include <ostream> #include "Label.h" namespace label { diff --git a/alib2data/src/label/LabelToXMLComposer.cpp b/alib2data/src/label/LabelToXMLComposer.cpp index b8672a5b05..3b9db387f5 100644 --- a/alib2data/src/label/LabelToXMLComposer.cpp +++ b/alib2data/src/label/LabelToXMLComposer.cpp @@ -6,7 +6,7 @@ */ #include "LabelToXMLComposer.h" -#include "../std/itos.h" +#include <string> #include "../XmlApi.hpp" diff --git a/alib2data/src/label/NextLabel.cpp b/alib2data/src/label/NextLabel.cpp index f7642b5db0..cf13a230c6 100644 --- a/alib2data/src/label/NextLabel.cpp +++ b/alib2data/src/label/NextLabel.cpp @@ -9,7 +9,7 @@ #include "../primitive/NextPrimitive.h" #include "PrimitiveLabel.h" #include "HexavigesimalLabel.h" -#include "../std/itos.h" +#include <string> #include "../exception/AlibException.h" #include "LabelSetLabel.h" #include "ObjectLabel.h" diff --git a/alib2data/src/label/UniqueLabel.cpp b/alib2data/src/label/UniqueLabel.cpp index ff4364899e..496ab15813 100644 --- a/alib2data/src/label/UniqueLabel.cpp +++ b/alib2data/src/label/UniqueLabel.cpp @@ -6,7 +6,6 @@ */ #include "UniqueLabel.h" -#include "../std/set.hpp" #include <sstream> namespace label { diff --git a/alib2data/src/object/Object.h b/alib2data/src/object/Object.h index b29d8b5764..bcb7209ef9 100644 --- a/alib2data/src/object/Object.h +++ b/alib2data/src/object/Object.h @@ -9,7 +9,6 @@ #define OBJECT_H_ #include "../common/wrapper.hpp" -#include "../std/compare.hpp" namespace alib { @@ -22,7 +21,7 @@ typedef alib::wrapper<ObjectBase> Object; } /* namespace alib */ -#include "ObjectBase.h" +#include "ObjectBase.h" //TODO potreba? namespace std { diff --git a/alib2data/src/object/ObjectBase.h b/alib2data/src/object/ObjectBase.h index cf2dd385cb..42204a9f23 100644 --- a/alib2data/src/object/ObjectBase.h +++ b/alib2data/src/object/ObjectBase.h @@ -8,8 +8,8 @@ #ifndef OBJECT_BASE_H_ #define OBJECT_BASE_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" +#include "../common/visitor.hpp" +#include <compare> #include "../common/base.hpp" namespace alib { diff --git a/alib2data/src/object/Void.h b/alib2data/src/object/Void.h index bd1fa9f57a..cd400bed8f 100644 --- a/alib2data/src/object/Void.h +++ b/alib2data/src/object/Void.h @@ -9,8 +9,6 @@ #define VOID_H_ #include "ObjectBase.h" -#include "../std/visitor.hpp" -#include "../common/wrapper.hpp" namespace alib { diff --git a/alib2data/src/primitive/NextPrimitive.cpp b/alib2data/src/primitive/NextPrimitive.cpp index 4a77fbb256..35155773da 100644 --- a/alib2data/src/primitive/NextPrimitive.cpp +++ b/alib2data/src/primitive/NextPrimitive.cpp @@ -11,7 +11,7 @@ #include "Character.h" #include "Unsigned.h" #include "Bool.h" -#include "../std/itos.h" +#include <string> namespace primitive { diff --git a/alib2data/src/primitive/Primitive.h b/alib2data/src/primitive/Primitive.h index a6a8521e60..4e11ba5f3d 100644 --- a/alib2data/src/primitive/Primitive.h +++ b/alib2data/src/primitive/Primitive.h @@ -8,8 +8,6 @@ #ifndef PRIMITIVE_H_ #define PRIMITIVE_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "../common/wrapper.hpp" #include "PrimitiveBase.h" diff --git a/alib2data/src/primitive/PrimitiveBase.h b/alib2data/src/primitive/PrimitiveBase.h index 8414ce2e7d..4ff1465fc6 100644 --- a/alib2data/src/primitive/PrimitiveBase.h +++ b/alib2data/src/primitive/PrimitiveBase.h @@ -8,7 +8,6 @@ #ifndef PRIMITIVE_BASE_H_ #define PRIMITIVE_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" namespace primitive { diff --git a/alib2data/src/primitive/PrimitiveFromXMLParser.cpp b/alib2data/src/primitive/PrimitiveFromXMLParser.cpp index 39390e4485..e95ef5e99a 100644 --- a/alib2data/src/primitive/PrimitiveFromXMLParser.cpp +++ b/alib2data/src/primitive/PrimitiveFromXMLParser.cpp @@ -8,7 +8,7 @@ #include "PrimitiveFromXMLParser.h" #include "../sax/ParserException.h" #include <algorithm> -#include "../std/stou.h" +#include <string> #include "../XmlApi.hpp" diff --git a/alib2data/src/primitive/PrimitiveToXMLComposer.cpp b/alib2data/src/primitive/PrimitiveToXMLComposer.cpp index da87f5b4e4..5991f919df 100644 --- a/alib2data/src/primitive/PrimitiveToXMLComposer.cpp +++ b/alib2data/src/primitive/PrimitiveToXMLComposer.cpp @@ -9,8 +9,7 @@ #include "Integer.h" #include "String.h" #include "Character.h" -#include "../std/itos.h" -#include "../std/utos.h" +#include <string> #include "../XmlApi.hpp" diff --git a/alib2data/src/regexp/RegExp.h b/alib2data/src/regexp/RegExp.h index b989f65b92..f36003ba6a 100644 --- a/alib2data/src/regexp/RegExp.h +++ b/alib2data/src/regexp/RegExp.h @@ -8,8 +8,6 @@ #ifndef REG_EXP_H_ #define REG_EXP_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" #include "../common/wrapper.hpp" #include "RegExpBase.h" #include "../alphabet/Symbol.h" diff --git a/alib2data/src/regexp/RegExpBase.h b/alib2data/src/regexp/RegExpBase.h index 5c34c32882..103f005fa7 100644 --- a/alib2data/src/regexp/RegExpBase.h +++ b/alib2data/src/regexp/RegExpBase.h @@ -8,7 +8,6 @@ #ifndef REG_EXP_BASE_H_ #define REG_EXP_BASE_H_ -#include "../common/base.hpp" #include "../object/ObjectBase.h" namespace regexp { diff --git a/alib2data/src/regexp/RegExpToXMLComposer.h b/alib2data/src/regexp/RegExpToXMLComposer.h index 8a231d3991..e544dfb963 100644 --- a/alib2data/src/regexp/RegExpToXMLComposer.h +++ b/alib2data/src/regexp/RegExpToXMLComposer.h @@ -12,7 +12,6 @@ #include "RegExp.h" #include "unbounded/UnboundedRegExpElements.h" #include "formal/FormalRegExpElements.h" -#include "../std/visitor.hpp" #include "../sax/Token.h" namespace alib { @@ -27,15 +26,15 @@ namespace regexp { /** * This class contains methods to print XML representation of regular expression to the output stream. */ -class RegExpToXMLComposer :public UnboundedRegExpElement::const_visitor_type, public FormalRegExpElement::const_visitor_type { +class RegExpToXMLComposer : public UnboundedRegExpElement::const_visitor_type, public FormalRegExpElement::const_visitor_type { void Visit(void*, const UnboundedRegExpAlternation& alternation) const; void Visit(void*, const UnboundedRegExpConcatenation& concatenation) const; void Visit(void*, const UnboundedRegExpIteration& iteration) const; void Visit(void*, const UnboundedRegExpSymbol& symbol) const; void Visit(void*, const UnboundedRegExpEpsilon& epsilon) const; void Visit(void*, const UnboundedRegExpEmpty& empty) const; - - + + void Visit(void*, const FormalRegExpAlternation& alternation) const; void Visit(void*, const FormalRegExpConcatenation& concatenation) const; void Visit(void*, const FormalRegExpIteration& iteration) const; diff --git a/alib2data/src/regexp/formal/FormalRegExp.cpp b/alib2data/src/regexp/formal/FormalRegExp.cpp index 5ee5062e11..7fca860131 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.cpp +++ b/alib2data/src/regexp/formal/FormalRegExp.cpp @@ -14,7 +14,6 @@ #include <algorithm> #include <sstream> -#include "../../std/set.hpp" #include "../unbounded/UnboundedRegExp.h" namespace regexp { diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h index 3f986b0ffc..40dd4fc51b 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.h +++ b/alib2data/src/regexp/formal/FormalRegExp.h @@ -13,7 +13,6 @@ #include <string> #include <set> #include "FormalRegExpElement.h" -#include "../../std/visitor.hpp" #include "../RegExpBase.h" #include "../common/RegExpAlphabet.h" diff --git a/alib2data/src/regexp/formal/FormalRegExpElement.h b/alib2data/src/regexp/formal/FormalRegExpElement.h index 4a1e923935..a0e44de665 100644 --- a/alib2data/src/regexp/formal/FormalRegExpElement.h +++ b/alib2data/src/regexp/formal/FormalRegExpElement.h @@ -8,7 +8,7 @@ #ifndef FORMAL_REG_EXP_ELEMENT_H_ #define FORMAL_REG_EXP_ELEMENT_H_ -#include "../../std/visitor.hpp" +#include "../../common/visitor.hpp" #include "../../alphabet/Symbol.h" #include "FormalRegExp.h" #include <set> diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp index cd3f15d6a5..6ca3a15e48 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp @@ -14,7 +14,6 @@ #include <algorithm> #include <sstream> -#include "../../std/set.hpp" #include "../formal/FormalRegExp.h" namespace regexp { diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.h b/alib2data/src/regexp/unbounded/UnboundedRegExp.h index 3d2e654d31..c6ccb04384 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExp.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.h @@ -13,7 +13,6 @@ #include <string> #include <set> #include "UnboundedRegExpElement.h" -#include "../../std/visitor.hpp" #include "../RegExpBase.h" #include "../common/RegExpAlphabet.h" diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h b/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h index 684a2e35bd..1dfe5ed183 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h @@ -8,7 +8,7 @@ #ifndef UNBOUNDED_REG_EXP_ELEMENT_H_ #define UNBOUNDED_REG_EXP_ELEMENT_H_ -#include "../../std/visitor.hpp" +#include "../../common/visitor.hpp" #include "../../alphabet/Symbol.h" #include "UnboundedRegExp.h" #include <set> diff --git a/alib2data/src/std/compare.hpp b/alib2data/src/std/compare.hpp deleted file mode 100644 index 7a22279d58..0000000000 --- a/alib2data/src/std/compare.hpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - * compare.hpp - * - * Created on: Apr 1, 2013 - * Author: Jan Travnicek - */ - -#ifndef COMPARE_HPP_ -#define COMPARE_HPP_ - -#include <set> -#include <list> -#include <vector> -#include <string> -#include <map> -#include <unordered_map> -#include <tuple> - -namespace std { - -template<class T> -struct compare { - int operator()(T first, T second) const; -}; - -template<> -struct compare<bool> { - int operator()(bool first, bool second) const { - return first - second; - } -}; - -template<> -struct compare<int> { - int operator()(int first, int second) const { - return first - second; - } -}; - -template<> -struct compare<double> { - int operator()(double first, double second) const { - return first - second; - } -}; - -template<class T> -struct compare<set<T>> { - int operator()(const set<T>& first, const set<T>& second) const { - if(first.size() < second.size()) return -1; - if(first.size() > second.size()) return 1; - - compare<T> comp; - for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { - int res = comp(*iterF, *iterS); - if(res != 0) return res; - } - return 0; - } -}; - -template<class T> -struct compare<list<T>> { - int operator()(const list<T>& first, const list<T>& second) const { - if(first.size() < second.size()) return -1; - if(first.size() > second.size()) return 1; - - compare<T> comp; - for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { - int res = comp(*iterF, *iterS); - if(res != 0) return res; - } - return 0; - } -}; - -template<class T> -struct compare<vector<T>> { - int operator()(const vector<T>& first, const vector<T>& second) const { - if(first.size() < second.size()) return -1; - if(first.size() > second.size()) return 1; - - compare<T> comp; - for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { - int res = comp(*iterF, *iterS); - if(res != 0) return res; - } - return 0; - } -}; - -template<class T, class R> -struct compare<pair<T, R>> { - int operator()(const pair<T, R>& first, const pair<T, R>& second) const { - compare<T> compT; - compare<R> compR; - - int res = compT(first.first, second.first); - if(res == 0) res = compR(first.second, second.second); - return res; - } -}; - -template<class T, class R> -struct compare<map<T, R>> { - int operator()(const map<T, R>& first, const map<T, R>& second) const { - if(first.size() < second.size()) return -1; - if(first.size() > second.size()) return 1; - - compare<std::pair<T, R>> comp; - for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { - int res = comp(*iterF, *iterS); - if(res != 0) return res; - } - return 0; - } -}; - -template<class T, class R> -struct compare<unordered_map<T, R>> { - int operator()(const unordered_map<T, R>& first, const unordered_map<T, R>& second) const { - if(first.size() < second.size()) return -1; - if(first.size() > second.size()) return 1; - - compare<R> comp; - for(auto iter = first.begin(); iter != first.end(); iter++) { - auto search = second.find(iter->first); - if(search == second.end()) return -1; - int res = comp(iter->second, search->second); - if(res != 0) return res; - } - return 0; - } -}; - -template<int I, typename Tuple> -struct compareTupleHelper; - -template<int I, typename Tuple> -struct compareTupleHelper { - static int compHelp(const Tuple& t1, const Tuple& t2) { - compare<typename tuple_element<I, Tuple>::type> comp; - int res = comp(std::get<I>(t1), std::get<I>(t2)); - if(res != 0) return res; - return compareTupleHelper<I - 1, Tuple>::compHelp(t1, t2); - } -}; - -template<class Tuple> -struct compareTupleHelper<0, Tuple> { - static int compHelp(const Tuple& t1, const Tuple& t2) { - compare<typename tuple_element<0, Tuple>::type> comp; - return comp(std::get<0>(t1), std::get<0>(t2)); - } -}; - - -template<typename ... Ts> -struct compare<tuple<Ts...>> { - int operator()(const tuple<Ts...>& first, const tuple<Ts...>& second) const { - return compareTupleHelper<tuple_size<std::tuple<Ts...>>::value - 1, std::tuple<Ts...>>::compHelp(first, second); - } -}; - -template<> -struct compare<string> { - int operator()(const string& first, const string& second) const { - return first.compare(second); - } -}; - - -template<int I, typename Tie> -struct compareTieHelper; - -template<int I, typename Tie> -struct compareTieHelper { - static int compHelp(const Tie& t1, const Tie& t2) { - compare<typename std::remove_const<typename std::remove_reference<typename tuple_element<I, Tie>::type>::type>::type> comp; - int res = comp(std::get<I>(t1), std::get<I>(t2)); - if(res != 0) return res; - return compareTieHelper<I - 1, Tie>::compHelp(t1, t2); - } -}; - -template<class Tie> -struct compareTieHelper<0, Tie> { - static int compHelp(const Tie& t1, const Tie& t2) { - compare<typename std::remove_const<typename std::remove_reference<typename tuple_element<0, Tie>::type>::type>::type> comp; - return comp(std::get<0>(t1), std::get<0>(t2)); - } -}; - - -template<typename ... Ts> -struct compare<tuple<Ts&...>> { - int operator()(const tuple<Ts&...>& first, const tuple<Ts&...>& second) const { - return compareTieHelper<tuple_size<std::tuple<Ts&...>>::value - 1, std::tuple<Ts&...>>::compHelp(first, second); - } -}; - -} /* namespace std */ - -#endif /* COMPARE_HPP_ */ diff --git a/alib2data/src/std/itos.cpp b/alib2data/src/std/itos.cpp deleted file mode 100644 index 66423b2181..0000000000 --- a/alib2data/src/std/itos.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "itos.h" - -namespace std { - -string itos(int integer, int) { - stringstream ss; - ss << integer; - return ss.str(); -} - -} diff --git a/alib2data/src/std/itos.h b/alib2data/src/std/itos.h deleted file mode 100644 index 219df670d0..0000000000 --- a/alib2data/src/std/itos.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ITOS_H_ -#define ITOS_H_ - -#include <sstream> -#include <string> - -namespace std { - -string itos(int integer, int base = 10); - -} /* namespace std */ - -#endif /* ITOS_H_ */ diff --git a/alib2data/src/std/list.hpp b/alib2data/src/std/list.hpp deleted file mode 100644 index 4e37432e62..0000000000 --- a/alib2data/src/std/list.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __LIST_HPP_ -#define __LIST_HPP_ - -#include <list> - -namespace std { - -template< class T > -std::ostream& operator<<(std::ostream& out, const std::list<T>& list); - -} - -#include "deque.hpp" -#include "set.hpp" -#include "map.hpp" -#include "pair.hpp" -#include "tuple.hpp" -#include "vector.hpp" -#include <iostream> - -namespace std { - -template< class T > -std::ostream& operator<<(std::ostream& out, const std::list<T>& list) { - out << "["; - - bool first = true; - for(const T& item : list) { - if(!first) out << ", "; - first = false; - out << item; - } - - out << "]"; - return out; -} - -} /* namespace std */ - -#endif /* __LIST_HPP_ */ - diff --git a/alib2data/src/std/pair.hpp b/alib2data/src/std/pair.hpp deleted file mode 100644 index a1a7e4eb52..0000000000 --- a/alib2data/src/std/pair.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __PAIR_HPP_ -#define __PAIR_HPP_ - -#include <map> - -namespace std { - -template< class T, class R > -std::ostream& operator<<(std::ostream& out, const std::pair<T, R>& pair); - -} - -#include "deque.hpp" -#include "set.hpp" -#include "map.hpp" -#include "list.hpp" -#include "tuple.hpp" -#include "vector.hpp" -#include <iostream> - -namespace std { - -template< class T, class R > -std::ostream& operator<<(std::ostream& out, const std::pair<T, R>& pair) { - out << "(" << pair.first << ", " << pair.second << ")"; - return out; -} - -} /* namespace std */ - -#endif /* __PAIR_HPP_ */ - diff --git a/alib2data/src/std/stou.cpp b/alib2data/src/std/stou.cpp deleted file mode 100644 index d1de978dc7..0000000000 --- a/alib2data/src/std/stou.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "stou.h" - -namespace std { - -unsigned stou(const std::string& string, int) { - stringstream ss(string); - unsigned integer; - ss >> integer; - return integer; -} - -} diff --git a/alib2data/src/std/stou.h b/alib2data/src/std/stou.h deleted file mode 100644 index c6a04fe3fe..0000000000 --- a/alib2data/src/std/stou.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef STOU_H_ -#define STOU_H_ - -#include <sstream> -#include <string> - -namespace std { - -unsigned stou(const std::string&, int base = 10); - -} /* namespace std */ - -#endif /* STOU_H_ */ diff --git a/alib2data/src/std/tuple.hpp b/alib2data/src/std/tuple.hpp deleted file mode 100644 index 1c10279aaf..0000000000 --- a/alib2data/src/std/tuple.hpp +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __TUPLE_HPP_ -#define __TUPLE_HPP_ - -#include <tuple> - -namespace std { - -template< class... Ts> -std::ostream& operator<<(std::ostream& out, const std::tuple<Ts...>& tuple); - -} - -#include "deque.hpp" -#include "set.hpp" -#include "map.hpp" -#include "list.hpp" -#include "pair.hpp" -#include "vector.hpp" -#include <iostream> - -namespace std { - -template<int I, class Tuple> -struct operator_shift_left_impl; - -template<int I, class Tuple> -struct operator_shift_left_impl { - static void operator_shift_left(ostream& out, const Tuple& t) { - operator_shift_left_impl<I - 1, Tuple>::operator_shift_left(out, t); - out << ", " << get<I>(t); - } -}; - -template<class Tuple> -struct operator_shift_left_impl<0, Tuple> { - static void operator_shift_left(ostream& out, const Tuple& t) { - out << get<0>(t); - } -}; - -template< class... Ts> -std::ostream& operator<<(std::ostream& out, const std::tuple<Ts...>& tuple) { - out << "("; - operator_shift_left_impl<tuple_size<std::tuple<Ts...>>::value - 1, std::tuple<Ts...>>::operator_shift_left(out, tuple); - out << ")"; - return out; -} - -} /* namespace std */ - -#endif /* __TUPLE_HPP_ */ - diff --git a/alib2data/src/std/utos.cpp b/alib2data/src/std/utos.cpp deleted file mode 100644 index fbec7d462b..0000000000 --- a/alib2data/src/std/utos.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "utos.h" - -namespace std { - -string utos(unsigned integer, int) { - stringstream ss; - ss << integer; - return ss.str(); -} - -} diff --git a/alib2data/src/std/utos.h b/alib2data/src/std/utos.h deleted file mode 100644 index 726d5e0430..0000000000 --- a/alib2data/src/std/utos.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef UTOS_H_ -#define UTOS_H_ - -#include <sstream> -#include <string> - -namespace std { - -string utos(unsigned integer, int base = 10); - -} /* namespace std */ - -#endif /* UTOS_H_ */ diff --git a/alib2data/src/std/vector.hpp b/alib2data/src/std/vector.hpp deleted file mode 100644 index f5c76371af..0000000000 --- a/alib2data/src/std/vector.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __VECTOR_HPP_ -#define __VECTOR_HPP_ - -#include <vector> - -namespace std { - -template< class T > -std::ostream& operator<<(std::ostream& out, const std::vector<T>& vector); - -} - -#include "deque.hpp" -#include "set.hpp" -#include "map.hpp" -#include "pair.hpp" -#include "tuple.hpp" -#include "list.hpp" -#include <iostream> - -namespace std { - -template< class T > -std::ostream& operator<<(std::ostream& out, const std::vector<T>& vector) { - out << "["; - - bool first = true; - for(const T& item : vector) { - if(!first) out << ", "; - first = false; - out << item; - } - - out << "]"; - return out; -} - -} /* namespace std */ - -#endif /* __VECTOR_HPP_ */ - diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h index 18a63a7f47..779ec6ab14 100644 --- a/alib2data/src/string/CyclicString.h +++ b/alib2data/src/string/CyclicString.h @@ -12,7 +12,6 @@ #include <set> #include <vector> -#include "../std/visitor.hpp" #include "../alphabet/Symbol.h" #include "StringBase.h" #include "common/StringAlphabet.h" diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h index 30621a85c0..305072d4de 100644 --- a/alib2data/src/string/Epsilon.h +++ b/alib2data/src/string/Epsilon.h @@ -12,7 +12,6 @@ #include <set> #include <vector> -#include "../std/visitor.hpp" #include "../alphabet/Symbol.h" #include "StringBase.h" #include "common/StringAlphabet.h" diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h index 5138e70158..208799eef1 100644 --- a/alib2data/src/string/LinearString.h +++ b/alib2data/src/string/LinearString.h @@ -12,7 +12,6 @@ #include <set> #include <vector> -#include "../std/visitor.hpp" #include "../alphabet/Symbol.h" #include "StringBase.h" #include "common/StringAlphabet.h" diff --git a/alib2data/src/string/String.h b/alib2data/src/string/String.h index 2ef1e18001..fe4514b8a2 100644 --- a/alib2data/src/string/String.h +++ b/alib2data/src/string/String.h @@ -8,10 +8,8 @@ #ifndef STRING_H_ #define STRING_H_ -#include "../std/visitor.hpp" -#include "../std/compare.hpp" -#include "../common/wrapper.hpp" #include "StringBase.h" +#include "../common/wrapper.hpp" #include "../alphabet/Symbol.h" namespace string { diff --git a/alib2data/src/string/StringBase.h b/alib2data/src/string/StringBase.h index cda2b7a8dc..bd7627fb72 100644 --- a/alib2data/src/string/StringBase.h +++ b/alib2data/src/string/StringBase.h @@ -8,7 +8,6 @@ #ifndef STRING_BASE_H_ #define STRING_BASE_H_ -#include "../std/visitor.hpp" #include "../object/ObjectBase.h" namespace string { diff --git a/alib2data/src/string/StringFromStringParser.h b/alib2data/src/string/StringFromStringParser.h index 46e35acacc..0212a952ad 100644 --- a/alib2data/src/string/StringFromStringParser.h +++ b/alib2data/src/string/StringFromStringParser.h @@ -12,6 +12,8 @@ #include "StringFeatures.h" #include "StringFromStringLexer.h" +#include <vector> + namespace alib { template<typename T> diff --git a/alib2data/test-src/std/StdVisitorTest.cpp b/alib2data/test-src/common/VisitorTest.cpp similarity index 93% rename from alib2data/test-src/std/StdVisitorTest.cpp rename to alib2data/test-src/common/VisitorTest.cpp index 7963d0820c..a59db252bb 100644 --- a/alib2data/test-src/std/StdVisitorTest.cpp +++ b/alib2data/test-src/common/VisitorTest.cpp @@ -1,16 +1,16 @@ -#include "StdVisitorTest.h" -#include "std/visitor.hpp" +#include "VisitorTest.h" +#include "common/visitor.hpp" #include "common/base.hpp" #include <set> #include <string> -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( StdVisitorTest, "std" ); -CPPUNIT_TEST_SUITE_REGISTRATION( StdVisitorTest ); +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( VisitorTest, "std" ); +CPPUNIT_TEST_SUITE_REGISTRATION( VisitorTest ); -void StdVisitorTest::setUp() { +void VisitorTest::setUp() { } -void StdVisitorTest::tearDown() { +void VisitorTest::tearDown() { } class Tmp1; @@ -225,7 +225,7 @@ class TmpPromotingVisitor : public VisitableTmpBase::const_promoting_visitor_typ } }; -void StdVisitorTest::testVisitor() { +void VisitorTest::testVisitor() { TmpVisitor visitor; Tmp1 tmp1(2); @@ -236,7 +236,7 @@ void StdVisitorTest::testVisitor() { CPPUNIT_ASSERT(a == 1); } -void StdVisitorTest::testSameVisitor() { +void VisitorTest::testSameVisitor() { TmpSameVisitor visitor; Tmp2 tmpA(2); @@ -247,7 +247,8 @@ void StdVisitorTest::testSameVisitor() { CPPUNIT_ASSERT(a == 2); } -void StdVisitorTest::testPromoteVisitor() { + +void VisitorTest::testPromoteVisitor() { TmpPromotingVisitor visitor; Tmp1 tmp1(1); diff --git a/alib2data/test-src/std/StdVisitorTest.h b/alib2data/test-src/common/VisitorTest.h similarity index 80% rename from alib2data/test-src/std/StdVisitorTest.h rename to alib2data/test-src/common/VisitorTest.h index bb2890cd70..3991d37c80 100644 --- a/alib2data/test-src/std/StdVisitorTest.h +++ b/alib2data/test-src/common/VisitorTest.h @@ -3,9 +3,9 @@ #include <cppunit/extensions/HelperMacros.h> -class StdVisitorTest : public CppUnit::TestFixture +class VisitorTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE( StdVisitorTest ); + CPPUNIT_TEST_SUITE( VisitorTest ); CPPUNIT_TEST( testPromoteVisitor ); CPPUNIT_TEST( testSameVisitor ); CPPUNIT_TEST( testVisitor ); diff --git a/alib2data/test-src/std/StdTest.cpp b/alib2data/test-src/std/StdTest.cpp deleted file mode 100644 index d64d5fb65c..0000000000 --- a/alib2data/test-src/std/StdTest.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#include "StdTest.h" -#include "std/variant.hpp" -#include <set> - -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( StdTest, "std" ); -CPPUNIT_TEST_SUITE_REGISTRATION( StdTest ); - -void StdTest::setUp() { -} - -void StdTest::tearDown() { -} - -void StdTest::testIsBaseOf() { - CPPUNIT_ASSERT( ( std::is_base_of_any<int, int, std::string, StdTest::test>::value ) == true ); - CPPUNIT_ASSERT( ( std::is_base_of<int, int>::value ) == true ); - CPPUNIT_ASSERT( ( std::is_base_of<int, std::string>::value ) == false ); - CPPUNIT_ASSERT( ( std::is_base_of<int, StdTest::test>::value ) == false ); -} - -void StdTest::testVariant() { - std::variant<int, std::string, StdTest::test> d(10); - CPPUNIT_ASSERT( d.is<int>() ); - CPPUNIT_ASSERT( d.get<int>() == 10 ); - - std::string str = "abcde"; - d.set<std::string>(str); - CPPUNIT_ASSERT( d.is<std::string>() ); - CPPUNIT_ASSERT( d.get<std::string>() == str ); - - d.set<StdTest::test>(StdTest::test()); - *(d.get<StdTest::test>().holder) = 42; - - StdTest::test tmp; - *(tmp.holder) = 42; - CPPUNIT_ASSERT( d.is<StdTest::test>() ); - CPPUNIT_ASSERT( d.get<StdTest::test>() == tmp ); - - std::variant<int, std::string, StdTest::test> e(d); - CPPUNIT_ASSERT( e.get<StdTest::test>() == tmp ); - - *(e.get<StdTest::test>().holder) = 43; - - CPPUNIT_ASSERT( (d < e) == true ); - CPPUNIT_ASSERT( (e < d) == false ); - - CPPUNIT_ASSERT( (e == d) == false ); - - d = std::variant<int, std::string, StdTest::test>(0); - d = e; - - CPPUNIT_ASSERT( *(d.get<StdTest::test>().holder) == 43 ); - - CPPUNIT_ASSERT( (d < e) == false ); - CPPUNIT_ASSERT( (e < d) == false ); - - CPPUNIT_ASSERT( (e == d) == true ); -} - -void StdTest::testVariantSet() { - StdTest::test tmp; - *(tmp.holder) = 42; - - std::string str = "abcde"; - - std::variant<int, std::string, StdTest::test> d(StdTest::test {}); - *(d.get<StdTest::test>().holder) = 42; - std::variant<int, std::string, StdTest::test> e(d); - - std::variant<int, std::string, StdTest::test> f(5); - - std::variant<int, std::string, StdTest::test> g(str); - - std::set<std::variant<int, std::string, StdTest::test>> testSet; - testSet.insert(d); - testSet.insert(e); - testSet.insert(f); - testSet.insert(g); - - CPPUNIT_ASSERT( testSet.size() == 3 ); - - for(std::set<std::variant<int, std::string, StdTest::test>>::const_iterator iter = testSet.begin(); iter != testSet.end(); iter++) { - if(iter->is<int>()) - CPPUNIT_ASSERT( iter->get<int>() == 5); - if(iter->is<std::string>()) - CPPUNIT_ASSERT( iter->get<std::string>() == str ); - if(iter->is<StdTest::test>()) - CPPUNIT_ASSERT( iter->get<StdTest::test>() == tmp ); - } - - std::variant<StdTest::test2, std::string, StdTest::test> h("aa"); - CPPUNIT_ASSERT( h.is<std::string>() ); - - std::map<std::variant<std::string, int>, int> testMap; - testMap.insert(std::make_pair(std::variant<std::string, int> {"aa"}, 10)); - - CPPUNIT_ASSERT( testMap.size() == 1 ); - CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {"aa"}) != testMap.end() ); - CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {10}) == testMap.end() ); - - testMap.insert(std::make_pair(std::variant<std::string, int> {"ab"}, 11)); - testMap.insert(std::make_pair(std::variant<std::string, int> {3}, 13)); - - CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {"aa"}) != testMap.end() ); - CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {10}) == testMap.end() ); -} diff --git a/alib2elgo/makefile b/alib2elgo/makefile index 06337bb233..e7a302f306 100644 --- a/alib2elgo/makefile +++ b/alib2elgo/makefile @@ -9,11 +9,11 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -rdynamic -shared -lxml2 -TEST_LDFLAGS_DEBUG:= -Llib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -lcppunit -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -rdynamic -shared -lxml2 +TEST_LDFLAGS_DEBUG:= -Llib-debug -L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -lcppunit -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-debug -rdynamic -shared -lxml2 -TEST_LDFLAGS_RELEASE:= -Llib-release -L../alib2data/lib-release -L../alib2algo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -lcppunit -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-debug -rdynamic -shared -lxml2 +TEST_LDFLAGS_RELEASE:= -Llib-release -L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -lcppunit -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) TEST_OBJECTS_DEBUG:=$(patsubst test-src/%.cpp, test-obj-debug/%.o, $(shell find test-src/ -name *cpp)) @@ -43,7 +43,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ @@ -95,7 +95,7 @@ test-obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../\$$(DEPTH)src/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../\$$(DEPTH)src/ -I../../\$$(DEPTH)alib2std/src/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ @@ -203,10 +203,10 @@ build-tests-release: test-bin-release/$(TESTBIN) unit-test-debug: build-tests-debug - LD_LIBRARY_PATH="../alib2data/lib-debug;../alib2algo/lib-debug;lib-debug" test-bin-debug/$(TESTBIN) + LD_LIBRARY_PATH="../alib2std/lib-debug;../alib2data/lib-debug;../alib2algo/lib-debug;lib-debug" test-bin-debug/$(TESTBIN) unit-test-release: build-tests-release - LD_LIBRARY_PATH="../alib2data/lib-release;../alib2algo/lib-release;lib-release" test-bin-release/$(TESTBIN) + LD_LIBRARY_PATH="../alib2std/lib-release;../alib2data/lib-release;../alib2algo/lib-release;lib-release" test-bin-release/$(TESTBIN) diff --git a/alib2elgo/src/automaton/properties/efficient/AllEpsilonClosure.cpp b/alib2elgo/src/automaton/properties/efficient/AllEpsilonClosure.cpp index 8171e797a3..148ff0fcc9 100644 --- a/alib2elgo/src/automaton/properties/efficient/AllEpsilonClosure.cpp +++ b/alib2elgo/src/automaton/properties/efficient/AllEpsilonClosure.cpp @@ -17,7 +17,6 @@ #include <set> #include <map> -#include <std/map.hpp> #include <iostream> #include <regexp/properties/RegExpEpsilon.h> diff --git a/alib2std/makefile b/alib2std/makefile new file mode 100644 index 0000000000..4d60b8ac75 --- /dev/null +++ b/alib2std/makefile @@ -0,0 +1,225 @@ +SHELL:=/bin/bash +LIBRARY:=libalib2std.so +TESTBIN:=alib2test + +define NEW_LINE + + +endef + +export NEW_LINE + +LDFLAGS_DEBUG:=-lbfd -liberty -lz -ldl -rdynamic -shared -lxml2 +TEST_LDFLAGS_DEBUG:= -Llib-debug -rdynamic -lxml2 -lalib2std -lcppunit -Wl,-rpath,. + +LDFLAGS_RELEASE:=-rdynamic -shared -lxml2 +TEST_LDFLAGS_RELEASE:= -Llib-release -rdynamic -lxml2 -lalib2std -lcppunit -Wl,-rpath,. + +OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) +TEST_OBJECTS_DEBUG:=$(patsubst test-src/%.cpp, test-obj-debug/%.o, $(shell find test-src/ -name *cpp)) + +OBJECTS_RELEASE:=$(patsubst src/%.cpp, obj-release/%.o, $(filter-out $(wildcard src/debug/*), $(shell find src/ -name *cpp))) +TEST_OBJECTS_RELEASE:=$(patsubst test-src/%.cpp, test-obj-release/%.o, $(shell find test-src/ -name *cpp)) + +.PHONY: all build-debug build-tests-debug clean-debug doc + +all: + @echo "What to do master?" + +obj%/makefile: makefile + mkdir -p $(dir $@) + echo "\ + SHELL:=/bin/bash$${NEW_LINE}\ + SRCDIR:=$${NEW_LINE}\ + DEPTH:=$${NEW_LINE}\ + OBJECTS_BASE_DIR:=$${NEW_LINE}\ + $${NEW_LINE}\ + define NEW_LINE$${NEW_LINE}\ + $${NEW_LINE}\ + $${NEW_LINE}\ + endef$${NEW_LINE}\ + $${NEW_LINE}\ + export NEW_LINE$${NEW_LINE}\ + $${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/$${NEW_LINE}\ + $${NEW_LINE}\ + SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ + DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ + OBJECTS:= \$$(patsubst %.d, %.o, \$$(DEPENDENCIES))$${NEW_LINE}\ + SOURCES_DIRS:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -mindepth 1 -type d)$${NEW_LINE}\ + OBJECTS_DIRS:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%, %/, \$$(SOURCES_DIRS))$${NEW_LINE}\ + OBJECTS_DIRS_MAKEFILES:= \$$(patsubst %, %makefile, \$$(OBJECTS_DIRS))$${NEW_LINE}\ + $${NEW_LINE}\ + .PHONY: all$${NEW_LINE}\ + .PRECIOUS: \$$(DEPENDECIES) \$$(OBJECTS_DIRS_MAKEFILES)$${NEW_LINE}\ + $${NEW_LINE}\ + all: \$$(OBJECTS_DIRS) \$$(OBJECTS)$${NEW_LINE}\ + $${NEW_LINE}\ + %.d: makefile$${NEW_LINE}\ + @echo \"\\$${NEW_LINE}\ + \$$(shell sha1sum <<< \"\$$@\" | sed \"s/ -//g\") = \\$$\$$(shell (\\$$\$$(CXX) -MM \\$$\$$(CXXFLAGS) \$$(patsubst ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d,../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, \$$@) 2>/dev/null || echo \\\"\$$(patsubst ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d,../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, \$$@) FORCE\\\") | sed \\\"s/.*://g;s/\\\\\\\\\\\\\\\\//g\\\")\$$\$${NEW_LINE}\\$${NEW_LINE}\ + \$$(patsubst %.d,%.o, \$$@): \\$$\$$(\$$(shell sha1sum <<< \"\$$@\" | sed \"s/ -//g\")) makefile\$$\$${NEW_LINE}\\$${NEW_LINE}\ + \\$$\$$(CXX) \\$$\$$(CXXFLAGS) \\$$\$$< -o \$$(patsubst %.d,%.o, \$$@)\$$\$${NEW_LINE}\\$${NEW_LINE}\ + \" > \$$@$${NEW_LINE}\ + $${NEW_LINE}\ + %/makefile: makefile$${NEW_LINE}\ + mkdir -p \$$(dir \$$@)$${NEW_LINE}\ + cp makefile \$$@$${NEW_LINE}\ + $${NEW_LINE}\ + %/: FORCE | %/makefile$${NEW_LINE}\ + @accesstime=\`stat -c %Y \$$@\` && \\$${NEW_LINE}\ + \$$(MAKE) -C \$$@ SRCDIR=\$$(SRCDIR)\$$(notdir \$$(patsubst %/, %, \$$@))/ DEPTH=\$$(DEPTH)../ OBJECTS_BASE_DIR=\$$(OBJECTS_BASE_DIR) SOURCES_BASE_DIR=\$$(SOURCES_BASE_DIR) CXX_OTHER_FLAGS=\"\$$(CXX_OTHER_FLAGS)\" && \\$${NEW_LINE}\ + accesstime2=\`stat -c %Y \$$@\` && \\$${NEW_LINE}\ + if [ "\$$\$$accesstime" -ne "\$$\$$accesstime2" ]; then \\$${NEW_LINE}\ + touch .; \\$${NEW_LINE}\ + fi$${NEW_LINE}\ + $${NEW_LINE}\ + FORCE:$${NEW_LINE}\ + $${NEW_LINE}\ + -include \$$(DEPENDENCIES)" > $@ + +test-obj%/makefile: makefile + mkdir -p $(dir $@) + echo "\ + SHELL:=/bin/bash$${NEW_LINE}\ + SRCDIR:=$${NEW_LINE}\ + DEPTH:=$${NEW_LINE}\ + OBJECTS_BASE_DIR:=$${NEW_LINE}\ + $${NEW_LINE}\ + define NEW_LINE$${NEW_LINE}\ + $${NEW_LINE}\ + $${NEW_LINE}\ + endef$${NEW_LINE}\ + $${NEW_LINE}\ + export NEW_LINE$${NEW_LINE}\ + $${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src/$${NEW_LINE}\ + $${NEW_LINE}\ + SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ + DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ + OBJECTS:= \$$(patsubst %.d, %.o, \$$(DEPENDENCIES))$${NEW_LINE}\ + SOURCES_DIRS:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -mindepth 1 -type d)$${NEW_LINE}\ + OBJECTS_DIRS:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%, %/, \$$(SOURCES_DIRS))$${NEW_LINE}\ + OBJECTS_DIRS_MAKEFILES:= \$$(patsubst %, %makefile, \$$(OBJECTS_DIRS))$${NEW_LINE}\ + $${NEW_LINE}\ + .PHONY: all$${NEW_LINE}\ + .PRECIOUS: \$$(DEPENDECIES) \$$(OBJECTS_DIRS_MAKEFILES)$${NEW_LINE}\ + $${NEW_LINE}\ + all: \$$(OBJECTS_DIRS) \$$(OBJECTS)$${NEW_LINE}\ + $${NEW_LINE}\ + %.d: makefile$${NEW_LINE}\ + @echo \"\\$${NEW_LINE}\ + \$$(shell sha1sum <<< \"\$$@\" | sed \"s/ -//g\") = \\$$\$$(shell (\\$$\$$(CXX) -MM \\$$\$$(CXXFLAGS) \$$(patsubst ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d,../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, \$$@) 2>/dev/null || echo \\\"\$$(patsubst ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d,../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, \$$@) FORCE\\\") | sed \\\"s/.*://g;s/\\\\\\\\\\\\\\\\//g\\\")\$$\$${NEW_LINE}\\$${NEW_LINE}\ + \$$(patsubst %.d,%.o, \$$@): \\$$\$$(\$$(shell sha1sum <<< \"\$$@\" | sed \"s/ -//g\")) makefile\$$\$${NEW_LINE}\\$${NEW_LINE}\ + \\$$\$$(CXX) \\$$\$$(CXXFLAGS) \\$$\$$< -o \$$(patsubst %.d,%.o, \$$@)\$$\$${NEW_LINE}\\$${NEW_LINE}\ + \" > \$$@$${NEW_LINE}\ + $${NEW_LINE}\ + %/makefile: makefile$${NEW_LINE}\ + mkdir -p \$$(dir \$$@)$${NEW_LINE}\ + cp makefile \$$@$${NEW_LINE}\ + $${NEW_LINE}\ + %/: FORCE | %/makefile$${NEW_LINE}\ + @accesstime=\`stat -c %Y \$$@\` && \\$${NEW_LINE}\ + \$$(MAKE) -C \$$@ SRCDIR=\$$(SRCDIR)\$$(notdir \$$(patsubst %/, %, \$$@))/ DEPTH=\$$(DEPTH)../ OBJECTS_BASE_DIR=\$$(OBJECTS_BASE_DIR) SOURCES_BASE_DIR=\$$(SOURCES_BASE_DIR) CXX_OTHER_FLAGS=\"\$$(CXX_OTHER_FLAGS)\" && \\$${NEW_LINE}\ + accesstime2=\`stat -c %Y \$$@\` && \\$${NEW_LINE}\ + if [ "\$$\$$accesstime" -ne "\$$\$$accesstime2" ]; then \\$${NEW_LINE}\ + touch .; \\$${NEW_LINE}\ + fi$${NEW_LINE}\ + $${NEW_LINE}\ + FORCE:$${NEW_LINE}\ + $${NEW_LINE}\ + -include \$$(DEPENDENCIES)" > $@ + +debug: unit-test-debug + +release: unit-test-release + +clean: clean-debug clean-release + $(RM) -r doc + +test: unit-test-debug unit-test-release + + + +lib-debug/$(LIBRARY): $(OBJECTS_DEBUG) obj-debug/ + mkdir -p $(dir $@) + $(CXX) $(OBJECTS_DEBUG) -o $@ $(LDFLAGS_DEBUG) + +lib-release/$(LIBRARY): $(OBJECTS_RELEASE) obj-release/ + mkdir -p $(dir $@) + $(CXX) $(OBJECTS_RELEASE) -o $@ $(LDFLAGS_RELEASE) + + + +obj-debug/: FORCE obj-debug/makefile + $(MAKE) -C $@ OBJECTS_BASE_DIR=obj-debug SOURCES_BASE_DIR=src CXX_OTHER_FLAGS="-g -O0 -DDEBUG" + +obj-release/: FORCE obj-release/makefile + $(MAKE) -C $@ OBJECTS_BASE_DIR=obj-release SOURCES_BASE_DIR=src CXX_OTHER_FLAGS="-O3 -DRELEASE" + + + +$(OBJECTS_DEBUG): obj-debug/ + +$(OBJECTS_RELEASE): obj-release/ + + +build-debug: lib-debug/$(LIBRARY) + +build-release: lib-release/$(LIBRARY) + + + +test-bin-debug/$(TESTBIN): lib-debug/$(LIBRARY) $(TEST_OBJECTS_DEBUG) test-obj-debug/ + mkdir -p $(dir $@) + $(CXX) $(TEST_OBJECTS_DEBUG) -o $@ $(TEST_LDFLAGS_DEBUG) + +test-bin-release/$(TESTBIN): lib-release/$(LIBRARY) $(TEST_OBJECTS_RELEASE) test-obj-release/ + mkdir -p $(dir $@) + $(CXX) $(TEST_OBJECTS_RELEASE) -o $@ $(TEST_LDFLAGS_RELEASE) + + + +test-obj-debug/: FORCE test-obj-debug/makefile + $(MAKE) -C $@ OBJECTS_BASE_DIR=test-obj-debug SOURCES_BASE_DIR=test-src CXX_OTHER_FLAGS="-g -O0 -DDEBUG" + +test-obj-release/: FORCE test-obj-release/makefile + $(MAKE) -C $@ OBJECTS_BASE_DIR=test-obj-release SOURCES_BASE_DIR=test-src CXX_OTHER_FLAGS="-O3 -DRELEASE" + + + +$(TEST_OBJECTS_DEBUG): test-obj-debug/ + +$(TEST_OBJECTS_RELEASE): test-obj-release/ + + + +build-tests-debug: test-bin-debug/$(TESTBIN) + +build-tests-release: test-bin-release/$(TESTBIN) + + + +unit-test-debug: build-tests-debug + LD_LIBRARY_PATH="lib-debug" test-bin-debug/$(TESTBIN) + +unit-test-release: build-tests-release + LD_LIBRARY_PATH="lib-release" test-bin-release/$(TESTBIN) + + + +clean-debug: + $(RM) -r *.o *.d lib-debug obj-debug test-bin-debug test-obj-debug CppUnitTestResults.xml + +clean-release: + $(RM) -r *.o *.d lib-release obj-release test-bin-release test-obj-release CppUnitTestResults.xml + + + +FORCE: + + + +doc: + doxygen + diff --git a/alib2std/src/compare b/alib2std/src/compare new file mode 100644 index 0000000000..9a9cd74051 --- /dev/null +++ b/alib2std/src/compare @@ -0,0 +1,6 @@ +#ifndef __COMPARE_HEADER_WRAPPER_ +#define __COMPARE_HEADER_WRAPPER_ + +#include "extensions/compare.hpp" + +#endif /* __COMPARE_HEADER_WRAPPER_ */ diff --git a/alib2std/src/deque b/alib2std/src/deque new file mode 100644 index 0000000000..1d29e1d263 --- /dev/null +++ b/alib2std/src/deque @@ -0,0 +1,10 @@ +#ifndef __DEQUE_HEADER_WRAPPER_ +#define __DEQUE_HEADER_WRAPPER_ + +#include <bits/../deque> +#include <ostream> +#include "compare" +#include "extensions/deque.hpp" + +#endif /* __DEQUE_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/extensions/compare.hpp b/alib2std/src/extensions/compare.hpp new file mode 100644 index 0000000000..08f4869e56 --- /dev/null +++ b/alib2std/src/extensions/compare.hpp @@ -0,0 +1,41 @@ +/* + * compare.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef COMPARE_HPP_ +#define COMPARE_HPP_ + +namespace std { + +template<class T> +struct compare { + int operator()(T first, T second) const; +}; + +template<> +struct compare<bool> { + int operator()(bool first, bool second) const { + return first - second; + } +}; + +template<> +struct compare<int> { + int operator()(int first, int second) const { + return first - second; + } +}; + +template<> +struct compare<double> { + int operator()(double first, double second) const { + return first - second; + } +}; + +} /* namespace std */ + +#endif /* COMPARE_HPP_ */ diff --git a/alib2data/src/std/deque.hpp b/alib2std/src/extensions/deque.hpp similarity index 56% rename from alib2data/src/std/deque.hpp rename to alib2std/src/extensions/deque.hpp index b649e2e06b..0b317937c2 100644 --- a/alib2data/src/std/deque.hpp +++ b/alib2std/src/extensions/deque.hpp @@ -1,23 +1,13 @@ +/* + * deque.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + #ifndef __DEQUE_HPP_ #define __DEQUE_HPP_ -#include <deque> - -namespace std { - -template< class T > -std::ostream& operator<<(std::ostream& out, const std::deque<T>& list); - -} - -#include "set.hpp" -#include "map.hpp" -#include "pair.hpp" -#include "list.hpp" -#include "tuple.hpp" -#include "vector.hpp" -#include <iostream> - namespace std { template< class T > diff --git a/alib2data/src/std/hexavigesimal.cpp b/alib2std/src/extensions/hexavigesimal.cpp similarity index 89% rename from alib2data/src/std/hexavigesimal.cpp rename to alib2std/src/extensions/hexavigesimal.cpp index cc544a4400..8364817467 100644 --- a/alib2data/src/std/hexavigesimal.cpp +++ b/alib2std/src/extensions/hexavigesimal.cpp @@ -1,11 +1,11 @@ /* - * Hexavigesimal.cpp + * hexavigesimal.cpp * - * Created on: 19. 4. 2014 - * Author: Tomas Pecka + * Created on: 19. 4. 2014 + * Author: Tomas Pecka */ -#include "hexavigesimal.h" +#include "../hexavigesimal" #include <stdexcept> namespace std { diff --git a/alib2data/src/std/hexavigesimal.h b/alib2std/src/extensions/hexavigesimal.h similarity index 92% rename from alib2data/src/std/hexavigesimal.h rename to alib2std/src/extensions/hexavigesimal.h index 1d3be3bcfe..91f5d2369d 100644 --- a/alib2data/src/std/hexavigesimal.h +++ b/alib2std/src/extensions/hexavigesimal.h @@ -1,8 +1,8 @@ /* - * Hexavigesimal.h + * hexavigesimal.h * - * Created on: 19. 4. 2014 - * Author: Tomas Pecka + * Created on: 19. 4. 2014 + * Author: Tomas Pecka */ #ifndef HEXAVIGESIMAL_H_ diff --git a/alib2data/src/std/istream.cpp b/alib2std/src/extensions/istream.cpp similarity index 86% rename from alib2data/src/std/istream.cpp rename to alib2std/src/extensions/istream.cpp index 206bad4005..80e2536a9e 100644 --- a/alib2data/src/std/istream.cpp +++ b/alib2std/src/extensions/istream.cpp @@ -1,4 +1,11 @@ -#include "istream.h" +/* + * istream.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "../istream" std::istream& oprr(std::istream& in, const std::string& str, bool start) { if(str.size() == 0) return in; diff --git a/alib2data/src/std/istream.h b/alib2std/src/extensions/istream.h similarity index 59% rename from alib2data/src/std/istream.h rename to alib2std/src/extensions/istream.h index 3d5167191f..2fad59c8eb 100644 --- a/alib2data/src/std/istream.h +++ b/alib2std/src/extensions/istream.h @@ -1,9 +1,15 @@ +/* + * istream.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + #ifndef ISTREAM_H_ #define ISTREAM_H_ -#include <iostream> #include <string> std::istream& operator>>(std::istream& in, const std::string& str); -#endif \ No newline at end of file +#endif diff --git a/alib2std/src/extensions/list.hpp b/alib2std/src/extensions/list.hpp new file mode 100644 index 0000000000..389234eb55 --- /dev/null +++ b/alib2std/src/extensions/list.hpp @@ -0,0 +1,46 @@ +/* + * list.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef __LIST_HPP_ +#define __LIST_HPP_ + +namespace std { + +template< class T > +std::ostream& operator<<(std::ostream& out, const std::list<T>& list) { + out << "["; + + bool first = true; + for(const T& item : list) { + if(!first) out << ", "; + first = false; + out << item; + } + + out << "]"; + return out; +} + +template<class T> +struct compare<list<T>> { + int operator()(const list<T>& first, const list<T>& second) const { + if(first.size() < second.size()) return -1; + if(first.size() > second.size()) return 1; + + compare<T> comp; + for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { + int res = comp(*iterF, *iterS); + if(res != 0) return res; + } + return 0; + } +}; + +} /* namespace std */ + +#endif /* __LIST_HPP_ */ + diff --git a/alib2data/src/std/map.hpp b/alib2std/src/extensions/map.hpp similarity index 69% rename from alib2data/src/std/map.hpp rename to alib2std/src/extensions/map.hpp index c968dbf65e..9b1f6313a0 100644 --- a/alib2data/src/std/map.hpp +++ b/alib2std/src/extensions/map.hpp @@ -1,22 +1,14 @@ +/* + * map.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + #ifndef __MAP_HPP_ #define __MAP_HPP_ -#include <map> - -namespace std { - -template< class T, class R > -std::ostream& operator<<(std::ostream& out, const std::map<T, R>& map); - -} - -#include "deque.hpp" -#include "set.hpp" #include "pair.hpp" -#include "list.hpp" -#include "tuple.hpp" -#include "vector.hpp" -#include <iostream> namespace std { @@ -35,6 +27,21 @@ std::ostream& operator<<(std::ostream& out, const std::map<T, R>& map) { return out; } +template<class T, class R> +struct compare<map<T, R>> { + int operator()(const map<T, R>& first, const map<T, R>& second) const { + if(first.size() < second.size()) return -1; + if(first.size() > second.size()) return 1; + + compare<std::pair<T, R>> comp; + for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { + int res = comp(*iterF, *iterS); + if(res != 0) return res; + } + return 0; + } +}; + template<typename map_type> class key_iterator : public map_type::const_iterator { public: diff --git a/alib2std/src/extensions/pair.hpp b/alib2std/src/extensions/pair.hpp new file mode 100644 index 0000000000..a6dae53526 --- /dev/null +++ b/alib2std/src/extensions/pair.hpp @@ -0,0 +1,34 @@ +/* + * pair.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef __PAIR_HPP_ +#define __PAIR_HPP_ + +namespace std { + +template< class T, class R > +std::ostream& operator<<(std::ostream& out, const std::pair<T, R>& pair) { + out << "(" << pair.first << ", " << pair.second << ")"; + return out; +} + +template<class T, class R> +struct compare<pair<T, R>> { + int operator()(const pair<T, R>& first, const pair<T, R>& second) const { + compare<T> compT; + compare<R> compR; + + int res = compT(first.first, second.first); + if(res == 0) res = compR(first.second, second.second); + return res; + } +}; + +} /* namespace std */ + +#endif /* __PAIR_HPP_ */ + diff --git a/alib2data/src/std/pointer.hpp b/alib2std/src/extensions/pointer.hpp similarity index 90% rename from alib2data/src/std/pointer.hpp rename to alib2std/src/extensions/pointer.hpp index 46c9e710e2..13fb81a282 100644 --- a/alib2data/src/std/pointer.hpp +++ b/alib2std/src/extensions/pointer.hpp @@ -1,3 +1,10 @@ +/* + * pointer.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + #ifndef __POINTER_HPP_ #define __POINTER_HPP_ diff --git a/alib2data/src/std/set.hpp b/alib2std/src/extensions/set.hpp similarity index 82% rename from alib2data/src/std/set.hpp rename to alib2std/src/extensions/set.hpp index a3f2c611b8..96904208e3 100644 --- a/alib2data/src/std/set.hpp +++ b/alib2std/src/extensions/set.hpp @@ -1,23 +1,13 @@ +/* + * std.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + #ifndef __SET_HPP_ #define __SET_HPP_ -#include <set> - -namespace std { - -template< class T > -std::ostream& operator<<(std::ostream& out, const std::set<T>& list); - -} - -#include "deque.hpp" -#include "map.hpp" -#include "pair.hpp" -#include "list.hpp" -#include "tuple.hpp" -#include "vector.hpp" -#include <iostream> - namespace std { template< class T > @@ -35,6 +25,21 @@ std::ostream& operator<<(std::ostream& out, const std::set<T>& list) { return out; } +template<class T> +struct compare<set<T>> { + int operator()(const set<T>& first, const set<T>& second) const { + if(first.size() < second.size()) return -1; + if(first.size() > second.size()) return 1; + + compare<T> comp; + for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { + int res = comp(*iterF, *iterS); + if(res != 0) return res; + } + return 0; + } +}; + template<class T> bool empty_intersection(const set<T>& x, const set<T>& y) { auto i = x.begin(); diff --git a/alib2std/src/extensions/string.cpp b/alib2std/src/extensions/string.cpp new file mode 100644 index 0000000000..84da99c394 --- /dev/null +++ b/alib2std/src/extensions/string.cpp @@ -0,0 +1,33 @@ +/* + * string.hpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "../compare" +#include "../string" +#include <sstream> + +namespace std { + +string itos(int integer, int) { + stringstream ss; + ss << integer; + return ss.str(); +} + +unsigned stou(const std::string& string, int) { + stringstream ss(string); + unsigned integer; + ss >> integer; + return integer; +} + +string utos(unsigned integer, int) { + stringstream ss; + ss << integer; + return ss.str(); +} + +} diff --git a/alib2std/src/extensions/string.hpp b/alib2std/src/extensions/string.hpp new file mode 100644 index 0000000000..ab70ebfb18 --- /dev/null +++ b/alib2std/src/extensions/string.hpp @@ -0,0 +1,28 @@ +/* + * string.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef STRING_HPP_ +#define STIRNG_HPP_ + +namespace std { + +string itos(int integer, int base = 10); + +unsigned stou(const std::string&, int base = 10); + +string utos(unsigned integer, int base = 10); + +template<> +struct compare<string> { + int operator()(const string& first, const string& second) const { + return first.compare(second); + } +}; + +} /* namespace std */ + +#endif /* STRING_HPP_ */ diff --git a/alib2std/src/extensions/tuple.hpp b/alib2std/src/extensions/tuple.hpp new file mode 100644 index 0000000000..8c85a5c943 --- /dev/null +++ b/alib2std/src/extensions/tuple.hpp @@ -0,0 +1,104 @@ +/* + * tuple.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef __TUPLE_HPP_ +#define __TUPLE_HPP_ + +namespace std { + +template<int I, class Tuple> +struct operator_shift_left_impl; + +template<int I, class Tuple> +struct operator_shift_left_impl { + static void operator_shift_left(ostream& out, const Tuple& t) { + operator_shift_left_impl<I - 1, Tuple>::operator_shift_left(out, t); + out << ", " << get<I>(t); + } +}; + +template<class Tuple> +struct operator_shift_left_impl<0, Tuple> { + static void operator_shift_left(ostream& out, const Tuple& t) { + out << get<0>(t); + } +}; + +template< class... Ts> +std::ostream& operator<<(std::ostream& out, const std::tuple<Ts...>& tuple) { + out << "("; + operator_shift_left_impl<tuple_size<std::tuple<Ts...>>::value - 1, std::tuple<Ts...>>::operator_shift_left(out, tuple); + out << ")"; + return out; +} + + + +template<int I, typename Tuple> +struct compareTupleHelper; + +template<int I, typename Tuple> +struct compareTupleHelper { + static int compHelp(const Tuple& t1, const Tuple& t2) { + compare<typename tuple_element<I, Tuple>::type> comp; + int res = comp(std::get<I>(t1), std::get<I>(t2)); + if(res != 0) return res; + return compareTupleHelper<I - 1, Tuple>::compHelp(t1, t2); + } +}; + +template<class Tuple> +struct compareTupleHelper<0, Tuple> { + static int compHelp(const Tuple& t1, const Tuple& t2) { + compare<typename tuple_element<0, Tuple>::type> comp; + return comp(std::get<0>(t1), std::get<0>(t2)); + } +}; + + +template<typename ... Ts> +struct compare<tuple<Ts...>> { + int operator()(const tuple<Ts...>& first, const tuple<Ts...>& second) const { + return compareTupleHelper<tuple_size<std::tuple<Ts...>>::value - 1, std::tuple<Ts...>>::compHelp(first, second); + } +}; + + + +template<int I, typename Tie> +struct compareTieHelper; + +template<int I, typename Tie> +struct compareTieHelper { + static int compHelp(const Tie& t1, const Tie& t2) { + compare<typename std::remove_const<typename std::remove_reference<typename tuple_element<I, Tie>::type>::type>::type> comp; + int res = comp(std::get<I>(t1), std::get<I>(t2)); + if(res != 0) return res; + return compareTieHelper<I - 1, Tie>::compHelp(t1, t2); + } +}; + +template<class Tie> +struct compareTieHelper<0, Tie> { + static int compHelp(const Tie& t1, const Tie& t2) { + compare<typename std::remove_const<typename std::remove_reference<typename tuple_element<0, Tie>::type>::type>::type> comp; + return comp(std::get<0>(t1), std::get<0>(t2)); + } +}; + + +template<typename ... Ts> +struct compare<tuple<Ts&...>> { + int operator()(const tuple<Ts&...>& first, const tuple<Ts&...>& second) const { + return compareTieHelper<tuple_size<std::tuple<Ts&...>>::value - 1, std::tuple<Ts&...>>::compHelp(first, second); + } +}; + +} /* namespace std */ + +#endif /* __TUPLE_HPP_ */ + diff --git a/alib2data/src/std/type_traits.hpp b/alib2std/src/extensions/type_traits.hpp similarity index 89% rename from alib2data/src/std/type_traits.hpp rename to alib2std/src/extensions/type_traits.hpp index d357fcdbe6..ed02b7d8ad 100644 --- a/alib2data/src/std/type_traits.hpp +++ b/alib2std/src/extensions/type_traits.hpp @@ -1,6 +1,8 @@ -/** - * Created on: Feb 28, 2014 - * Author: Jan Travnicek +/* + * tuple.hpp + * + * Created on: Feb 28, 2014 + * Author: Jan Travnicek */ #ifndef TYPE_TRAITS_HPP_ diff --git a/alib2std/src/extensions/unordered_map.hpp b/alib2std/src/extensions/unordered_map.hpp new file mode 100644 index 0000000000..e05f46314f --- /dev/null +++ b/alib2std/src/extensions/unordered_map.hpp @@ -0,0 +1,48 @@ +/* + * unordered_map.hpp + * + * Created on: Feb 28, 2014 + * Author: Jan Travnicek + */ + +#ifndef __UNORDERED_MAP_HPP_ +#define __UNORDERED_MAP_HPP_ + +namespace std { + +template< class T, class R > +std::ostream& operator<<(std::ostream& out, const std::unordered_map<T, R>& map) { + out << "{"; + + bool first = true; + for(const std::pair<T, R>& item : map) { + if(!first) out << ", "; + first = false; + out << item; + } + + out << "}"; + return out; +} + +template<class T, class R> +struct compare<unordered_map<T, R>> { + int operator()(const unordered_map<T, R>& first, const unordered_map<T, R>& second) const { + if(first.size() < second.size()) return -1; + if(first.size() > second.size()) return 1; + + compare<R> comp; + for(auto iter = first.begin(); iter != first.end(); iter++) { + auto search = second.find(iter->first); + if(search == second.end()) return -1; + int res = comp(iter->second, search->second); + if(res != 0) return res; + } + return 0; + } +}; + +} /* namespace std */ + +#endif /* __UNORDERED_MAP_HPP_ */ + diff --git a/alib2data/src/std/variant.hpp b/alib2std/src/extensions/variant.hpp similarity index 97% rename from alib2data/src/std/variant.hpp rename to alib2std/src/extensions/variant.hpp index 22352c0477..7d5dc25a29 100644 --- a/alib2data/src/std/variant.hpp +++ b/alib2std/src/extensions/variant.hpp @@ -1,8 +1,9 @@ /** - * https://gist.github.com/tibordp/6909880 - * Created on: Feb 28, 2014 - * Author: Tibor Djurica Potpara - * Modified: Jan Travnicek + * https://gist.github.com/tibordp/6909880 + * + * Created on: Feb 28, 2014 + * Author: Tibor Djurica Potpara + * Modified: Jan Travnicek */ #ifndef VATIANT_HPP_ diff --git a/alib2std/src/extensions/vector.hpp b/alib2std/src/extensions/vector.hpp new file mode 100644 index 0000000000..088bd50e33 --- /dev/null +++ b/alib2std/src/extensions/vector.hpp @@ -0,0 +1,46 @@ +/* + * vector.hpp + * + * Created on: Feb 28, 2014 + * Author: Jan Travnicek + */ + +#ifndef __VECTOR_HPP_ +#define __VECTOR_HPP_ + +namespace std { + +template< class T > +std::ostream& operator<<(std::ostream& out, const std::vector<T>& vector) { + out << "["; + + bool first = true; + for(const T& item : vector) { + if(!first) out << ", "; + first = false; + out << item; + } + + out << "]"; + return out; +} + +template<class T> +struct compare<vector<T>> { + int operator()(const vector<T>& first, const vector<T>& second) const { + if(first.size() < second.size()) return -1; + if(first.size() > second.size()) return 1; + + compare<T> comp; + for(auto iterF = first.begin(), iterS = second.begin(); iterF != first.end(); iterF++, iterS++) { + int res = comp(*iterF, *iterS); + if(res != 0) return res; + } + return 0; + } +}; + +} /* namespace std */ + +#endif /* __VECTOR_HPP_ */ + diff --git a/alib2std/src/hexavigesimal b/alib2std/src/hexavigesimal new file mode 100644 index 0000000000..087b94ce5d --- /dev/null +++ b/alib2std/src/hexavigesimal @@ -0,0 +1,7 @@ +#ifndef __HEXAVIGESIMAL_HEADER_WRAPPER_ +#define __HEXAVIGESIMAL_HEADER_WRAPPER_ + +#include "string" +#include "extensions/hexavigesimal.h" + +#endif /* __HEXAVIGESIMAL_HEADER_WRAPPER_ */ diff --git a/alib2std/src/istream b/alib2std/src/istream new file mode 100644 index 0000000000..0ba827946f --- /dev/null +++ b/alib2std/src/istream @@ -0,0 +1,8 @@ +#ifndef __ISTREAM_HEADER_WRAPPER_ +#define __ISTREAM_HEADER_WRAPPER_ + +#include <bits/../istream> +#include "string" +#include "extensions/istream.h" + +#endif /* __ISTREAM_HEADER_WRAPPER_ */ diff --git a/alib2std/src/list b/alib2std/src/list new file mode 100644 index 0000000000..0a88a69cec --- /dev/null +++ b/alib2std/src/list @@ -0,0 +1,10 @@ +#ifndef __LIST_HEADER_WRAPPER_ +#define __LIST_HEADER_WRAPPER_ + +#include <bits/../list> +#include <ostream> +#include "compare" +#include "extensions/list.hpp" + +#endif /* __LIST_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/map b/alib2std/src/map new file mode 100644 index 0000000000..24511250b0 --- /dev/null +++ b/alib2std/src/map @@ -0,0 +1,10 @@ +#ifndef __MAP_HEADER_WRAPPER_ +#define __MAP_HEADER_WRAPPER_ + +#include <bits/../map> +#include <ostream> +#include "compare" +#include "extensions/map.hpp" + +#endif /* __MAP_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/pair b/alib2std/src/pair new file mode 100644 index 0000000000..f0d1d51b37 --- /dev/null +++ b/alib2std/src/pair @@ -0,0 +1,8 @@ +#ifndef __PAIR_HEADER_WRAPPER_ +#define __PAIR_HEADER_WRAPPER_ + +#include "map" +#include "extensions/pair.hpp" + +#endif /* __PAIR_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/pointer b/alib2std/src/pointer new file mode 100644 index 0000000000..59d9352ddf --- /dev/null +++ b/alib2std/src/pointer @@ -0,0 +1,8 @@ +#ifndef __POINTER_HEADER_WRAPPER_ +#define __POINTER_HEADER_WRAPPER_ + +#include <cstdlib> +#include "extensions/pointer.hpp" + +#endif /* __POINTER_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/set b/alib2std/src/set new file mode 100644 index 0000000000..d8778ef34c --- /dev/null +++ b/alib2std/src/set @@ -0,0 +1,10 @@ +#ifndef __SET_HEADER_WRAPPER_ +#define __SET_HEADER_WRAPPER_ + +#include <bits/../set> +#include <ostream> +#include "compare" +#include "extensions/set.hpp" + +#endif /* __SET_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/string b/alib2std/src/string new file mode 100644 index 0000000000..9546b1983a --- /dev/null +++ b/alib2std/src/string @@ -0,0 +1,9 @@ +#ifndef __STRING_HEADER_WRAPPER_ +#define __STRING_HEADER_WRAPPER_ + +#include <bits/../string> +#include <ostream> +#include "compare" +#include "extensions/string.hpp" + +#endif /* __STRING_HEADER_WRAPPER_ */ diff --git a/alib2std/src/tuple b/alib2std/src/tuple new file mode 100644 index 0000000000..ab88dc49df --- /dev/null +++ b/alib2std/src/tuple @@ -0,0 +1,10 @@ +#ifndef __TUPLE_HEADER_WRAPPER_ +#define __TUPLE_HEADER_WRAPPER_ + +#include <bits/../tuple> +#include <ostream> +#include "compare" +#include "extensions/tuple.hpp" + +#endif /* __TUPLE_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/type_traits b/alib2std/src/type_traits new file mode 100644 index 0000000000..c612cf162b --- /dev/null +++ b/alib2std/src/type_traits @@ -0,0 +1,7 @@ +#ifndef __TYPE_TRAITS_HEADER_WRAPPER_ +#define __TYPE_TRAITS_HEADER_WRAPPER_ + +#include <bits/../type_traits> +#include "extensions/type_traits.hpp" + +#endif /* __TYPE_TRAITS_HEADER_WRAPPER_ */ diff --git a/alib2std/src/unordered_map b/alib2std/src/unordered_map new file mode 100644 index 0000000000..ed74cc5939 --- /dev/null +++ b/alib2std/src/unordered_map @@ -0,0 +1,10 @@ +#ifndef __UNORDERED_MAP_HEADER_WRAPPER_ +#define __UNORDERED_MAP_HEADER_WRAPPER_ + +#include <bits/../unordered_map> +#include <ostream> +#include "compare" +#include "extensions/unordered_map.hpp" + +#endif /* __UNORDERED_MAP_HEADER_WRAPPER_ */ + diff --git a/alib2std/src/variant b/alib2std/src/variant new file mode 100644 index 0000000000..6a41110066 --- /dev/null +++ b/alib2std/src/variant @@ -0,0 +1,13 @@ +#ifndef __VATIANT_HEADER_WRAPPER_ +#define __VATIANT_HEADER_WRAPPER_ + +#include <iostream> +#include <utility> +#include <typeinfo> +#include "type_traits" +#include "string" +#include "compare" +#include "extensions/variant.hpp" + +#endif /* __VARIANT_HEADER_WRAPPER */ + diff --git a/alib2std/src/vector b/alib2std/src/vector new file mode 100644 index 0000000000..5df5bd52eb --- /dev/null +++ b/alib2std/src/vector @@ -0,0 +1,10 @@ +#ifndef __VECTOR_HEADER_WRAPPER_ +#define __VECTOR_HEADER_WRAPPER_ + +#include <bits/../vector> +#include <ostream> +#include "compare" +#include "extensions/vector.hpp" + +#endif /* __VECTOR_HEADER_WRAPPER_ */ + diff --git a/alib2std/test-src/extensions/CompareTest.cpp b/alib2std/test-src/extensions/CompareTest.cpp new file mode 100644 index 0000000000..014405b436 --- /dev/null +++ b/alib2std/test-src/extensions/CompareTest.cpp @@ -0,0 +1,35 @@ +#include "CompareTest.h" +#include <set> +#include <vector> +#include <pair> + + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( CompareTest, "bits" ); +CPPUNIT_TEST_SUITE_REGISTRATION( CompareTest ); + +void CompareTest::setUp() { +} + +void CompareTest::tearDown() { +} + +void CompareTest::testCompare() { + std::vector<int> vector1 {1, 2, 3}; + std::vector<int> vector2 {2, 3, 4}; + + std::compare<std::vector<int>> comp1; + CPPUNIT_ASSERT(comp1(vector1, vector2) < 0); + + std::set<std::vector<int>> set1 {vector1}; + std::set<std::vector<int>> set2 {vector2}; + + std::compare<std::set<std::vector<int>>> comp2; + CPPUNIT_ASSERT(comp2(set1, set2) < 0); + + std::pair<std::set<std::vector<int>>, std::set<std::vector<int>>> pair1 {set1, set2}; + std::pair<std::set<std::vector<int>>, std::set<std::vector<int>>> pair2 {set2, set1}; + + std::compare<std::pair<std::set<std::vector<int>>, std::set<std::vector<int>>>> comp3; + CPPUNIT_ASSERT(comp3(pair1, pair2) < 0); +} + diff --git a/alib2std/test-src/extensions/CompareTest.h b/alib2std/test-src/extensions/CompareTest.h new file mode 100644 index 0000000000..b56c879e93 --- /dev/null +++ b/alib2std/test-src/extensions/CompareTest.h @@ -0,0 +1,19 @@ +#ifndef COMPARE_TEST_H_ +#define COMPARE_TEST_H_ + +#include <cppunit/extensions/HelperMacros.h> + +class CompareTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( CompareTest ); + CPPUNIT_TEST( testCompare ); + CPPUNIT_TEST_SUITE_END(); + +public: + void setUp(); + void tearDown(); + + void testCompare(); +}; + +#endif // COMPARE_TEST_H_ diff --git a/alib2data/test-src/std/StdTestHexavigesimal.cpp b/alib2std/test-src/extensions/HexavigesimalTest.cpp similarity index 84% rename from alib2data/test-src/std/StdTestHexavigesimal.cpp rename to alib2std/test-src/extensions/HexavigesimalTest.cpp index 48d0d644b3..06634be2ec 100644 --- a/alib2data/test-src/std/StdTestHexavigesimal.cpp +++ b/alib2std/test-src/extensions/HexavigesimalTest.cpp @@ -1,16 +1,16 @@ -#include "StdTestHexavigesimal.h" -#include "std/hexavigesimal.h" +#include "HexavigesimalTest.h" +#include <hexavigesimal> -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( StdTestHexavigesimal, "std" ); -CPPUNIT_TEST_SUITE_REGISTRATION( StdTestHexavigesimal ); +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HexavigesimalTest, "bits" ); +CPPUNIT_TEST_SUITE_REGISTRATION( HexavigesimalTest ); -void StdTestHexavigesimal::setUp() { +void HexavigesimalTest::setUp() { } -void StdTestHexavigesimal::tearDown() { +void HexavigesimalTest::tearDown() { } -void StdTestHexavigesimal::test1() { +void HexavigesimalTest::test1() { CPPUNIT_ASSERT_EQUAL(std::string("A") , std::toBase26(0)); CPPUNIT_ASSERT_EQUAL(std::string("B") , std::toBase26(1)); CPPUNIT_ASSERT_EQUAL(std::string("Z") , std::toBase26(25)); diff --git a/alib2data/test-src/std/StdTestHexavigesimal.h b/alib2std/test-src/extensions/HexavigesimalTest.h similarity index 71% rename from alib2data/test-src/std/StdTestHexavigesimal.h rename to alib2std/test-src/extensions/HexavigesimalTest.h index 8e313dbdd9..a201d2e9fd 100644 --- a/alib2data/test-src/std/StdTestHexavigesimal.h +++ b/alib2std/test-src/extensions/HexavigesimalTest.h @@ -3,9 +3,9 @@ #include <cppunit/extensions/HelperMacros.h> -class StdTestHexavigesimal : public CppUnit::TestFixture +class HexavigesimalTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE( StdTestHexavigesimal ); + CPPUNIT_TEST_SUITE( HexavigesimalTest ); CPPUNIT_TEST( test1 ); CPPUNIT_TEST_SUITE_END(); diff --git a/alib2std/test-src/extensions/OstreamTest.cpp b/alib2std/test-src/extensions/OstreamTest.cpp new file mode 100644 index 0000000000..263cb84024 --- /dev/null +++ b/alib2std/test-src/extensions/OstreamTest.cpp @@ -0,0 +1,42 @@ +#include "OstreamTest.h" +#include <set> +#include <vector> +#include <pair> +#include <sstream> + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( OstreamTest, "bits" ); +CPPUNIT_TEST_SUITE_REGISTRATION( OstreamTest ); + +void OstreamTest::setUp() { +} + +void OstreamTest::tearDown() { +} + +void OstreamTest::testOstream() { + std::vector<int> vector1 {1, 2, 3}; + std::vector<int> vector2 {2, 3, 4}; + + std::stringstream ss1; + ss1 << vector1; + std::cout << ss1.str() << std::endl; + CPPUNIT_ASSERT("[1, 2, 3]" == ss1.str()); + + std::set<std::vector<int>> set1 {vector1}; + std::set<std::vector<int>> set2 {vector2}; + + std::stringstream ss2; + ss2 << set1; + std::cout << ss2.str() << std::endl; + CPPUNIT_ASSERT("{[1, 2, 3]}" == ss2.str()); + + std::pair<std::set<std::vector<int>>, std::set<std::vector<int>>> pair1 {set1, set2}; + std::pair<std::set<std::vector<int>>, std::set<std::vector<int>>> pair2 {set2, set1}; + + std::stringstream ss3; + ss3 << pair1; + std::cout << ss3.str() << std::endl; + CPPUNIT_ASSERT("({[1, 2, 3]}, {[2, 3, 4]})" == ss3.str()); + +} + diff --git a/alib2std/test-src/extensions/OstreamTest.h b/alib2std/test-src/extensions/OstreamTest.h new file mode 100644 index 0000000000..c2cf462681 --- /dev/null +++ b/alib2std/test-src/extensions/OstreamTest.h @@ -0,0 +1,19 @@ +#ifndef OSTREAM_TEST_H_ +#define OSTREAM_TEST_H_ + +#include <cppunit/extensions/HelperMacros.h> + +class OstreamTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( OstreamTest ); + CPPUNIT_TEST( testOstream ); + CPPUNIT_TEST_SUITE_END(); + +public: + void setUp(); + void tearDown(); + + void testOstream(); +}; + +#endif // OSTREAM_TEST_H_ diff --git a/alib2data/test-src/std/StdSet.cpp b/alib2std/test-src/extensions/SetTest.cpp similarity index 63% rename from alib2data/test-src/std/StdSet.cpp rename to alib2std/test-src/extensions/SetTest.cpp index 8fc9e8ed9f..f5c4cbcc78 100644 --- a/alib2data/test-src/std/StdSet.cpp +++ b/alib2std/test-src/extensions/SetTest.cpp @@ -1,19 +1,17 @@ -#include "StdSet.h" +#include "SetTest.h" #include <set> #include <algorithm> -#include "alphabet/Symbol.h" +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SetTest, "bits" ); +CPPUNIT_TEST_SUITE_REGISTRATION( SetTest ); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( StdSet, "std" ); -CPPUNIT_TEST_SUITE_REGISTRATION( StdSet ); - -void StdSet::setUp() { +void SetTest::setUp() { } -void StdSet::tearDown() { +void SetTest::tearDown() { } -void StdSet::test1() { +void SetTest::test1() { int first[] = {5,10,15,20,25}; int second[] = {50,40,30,20,10}; std::vector<int> v(10); // 0 0 0 0 0 0 0 0 0 0 @@ -31,12 +29,12 @@ void StdSet::test1() { } -void StdSet::test2() { - std::set<alphabet::Symbol> first = {alphabet::symbolFrom(1)}; - std::set<alphabet::Symbol> second = {alphabet::symbolFrom(1), alphabet::symbolFrom(2), alphabet::symbolFrom(3)}; +void SetTest::test2() { + std::set<int> first = {1}; + std::set<int> second = {1, 2, 3}; - std::set<alphabet::Symbol> firstMinusSecond; - std::set<alphabet::Symbol> secondMinusFirst; + std::set<int> firstMinusSecond; + std::set<int> secondMinusFirst; std::set_difference (first.begin(), first.end(), second.begin(), second.end(), std::inserter(firstMinusSecond, firstMinusSecond.end())); std::set_difference (second.begin(), second.end(), first.begin(), first.end(), std::inserter(secondMinusFirst, secondMinusFirst.end())); diff --git a/alib2data/test-src/std/StdSet.h b/alib2std/test-src/extensions/SetTest.h similarity index 77% rename from alib2data/test-src/std/StdSet.h rename to alib2std/test-src/extensions/SetTest.h index 42578867d3..bdad1fd298 100644 --- a/alib2data/test-src/std/StdSet.h +++ b/alib2std/test-src/extensions/SetTest.h @@ -3,9 +3,9 @@ #include <cppunit/extensions/HelperMacros.h> -class StdSet : public CppUnit::TestFixture +class SetTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE( StdSet ); + CPPUNIT_TEST_SUITE( SetTest ); CPPUNIT_TEST( test1 ); CPPUNIT_TEST( test2 ); CPPUNIT_TEST_SUITE_END(); diff --git a/alib2data/test-src/std/TypeInfoTest.cpp b/alib2std/test-src/extensions/TypeInfoTest.cpp similarity index 96% rename from alib2data/test-src/std/TypeInfoTest.cpp rename to alib2std/test-src/extensions/TypeInfoTest.cpp index da7a5c11fa..068160f889 100644 --- a/alib2data/test-src/std/TypeInfoTest.cpp +++ b/alib2std/test-src/extensions/TypeInfoTest.cpp @@ -4,7 +4,7 @@ #define CPPUNIT_EXCLUSIVE_OR(x, y) CPPUNIT_ASSERT((!(x) && (y)) || ((x) && !(y))) -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TypeInfoTest, "std" ); +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TypeInfoTest, "bits" ); CPPUNIT_TEST_SUITE_REGISTRATION( TypeInfoTest ); void TypeInfoTest::setUp() { diff --git a/alib2data/test-src/std/TypeInfoTest.h b/alib2std/test-src/extensions/TypeInfoTest.h similarity index 100% rename from alib2data/test-src/std/TypeInfoTest.h rename to alib2std/test-src/extensions/TypeInfoTest.h diff --git a/alib2std/test-src/extensions/TypeTraitsTest.cpp b/alib2std/test-src/extensions/TypeTraitsTest.cpp new file mode 100644 index 0000000000..b353a2bf52 --- /dev/null +++ b/alib2std/test-src/extensions/TypeTraitsTest.cpp @@ -0,0 +1,19 @@ +#include "TypeTraitsTest.h" +#include <type_traits> + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TypeTraitsTest, "bits" ); +CPPUNIT_TEST_SUITE_REGISTRATION( TypeTraitsTest ); + +void TypeTraitsTest::setUp() { +} + +void TypeTraitsTest::tearDown() { +} + +void TypeTraitsTest::testIsBaseOf() { + CPPUNIT_ASSERT( ( std::is_base_of_any<int, int, std::string, TypeTraitsTest::test>::value ) == true ); + CPPUNIT_ASSERT( ( std::is_base_of<int, int>::value ) == true ); + CPPUNIT_ASSERT( ( std::is_base_of<int, std::string>::value ) == false ); + CPPUNIT_ASSERT( ( std::is_base_of<int, TypeTraitsTest::test>::value ) == false ); +} + diff --git a/alib2std/test-src/extensions/TypeTraitsTest.h b/alib2std/test-src/extensions/TypeTraitsTest.h new file mode 100644 index 0000000000..4154ebf443 --- /dev/null +++ b/alib2std/test-src/extensions/TypeTraitsTest.h @@ -0,0 +1,68 @@ +#ifndef TYPE_TRAITS_TEST_H_ +#define TYPE_TRAITS_TEST_H_ + +#include <cppunit/extensions/HelperMacros.h> + +class TypeTraitsTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( TypeTraitsTest ); + CPPUNIT_TEST( testIsBaseOf ); + CPPUNIT_TEST_SUITE_END(); + +public: +struct test { + int * holder; + + test() { + //std::cout << "test()" << std::endl; + holder = new int(); + } + + test(test&& old) : holder(nullptr) { + //std::cout << "test(test&&)" << std::endl; + std::swap(holder,old.holder); + } + + test(const test& old) { + //std::cout << "test(const test&)" << std::endl; + holder = new int(*old.holder); + } + + ~test() + { + //std::cout << "~test()" << std::endl; + delete holder; + } + + bool operator<(const test& other) const { + return *(this->holder) < *(other.holder); + } + + bool operator==(const test& other) const { + return *(this->holder) == *(other.holder); + } + + int compare(const test& other) const { + return *(this->holder) - *(other.holder); + } + + friend std::ostream& operator<<(std::ostream& out, const test& other) { + out << *(other.holder); + return out; + } +}; + +struct test2 { + int i; + + test2(int i) : i(i) {} +}; + +public: + void setUp(); + void tearDown(); + + void testIsBaseOf(); +}; + +#endif // TYPE_TRAITS_TEST_H_ diff --git a/alib2std/test-src/extensions/VariantTest.cpp b/alib2std/test-src/extensions/VariantTest.cpp new file mode 100644 index 0000000000..d6cad62fdd --- /dev/null +++ b/alib2std/test-src/extensions/VariantTest.cpp @@ -0,0 +1,99 @@ +#include "VariantTest.h" +#include <variant> +#include <set> + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( VariantTest, "bits" ); +CPPUNIT_TEST_SUITE_REGISTRATION( VariantTest ); + +void VariantTest::setUp() { +} + +void VariantTest::tearDown() { +} + +void VariantTest::testVariant() { + std::variant<int, std::string, VariantTest::test> d(10); + CPPUNIT_ASSERT( d.is<int>() ); + CPPUNIT_ASSERT( d.get<int>() == 10 ); + + std::string str = "abcde"; + d.set<std::string>(str); + CPPUNIT_ASSERT( d.is<std::string>() ); + CPPUNIT_ASSERT( d.get<std::string>() == str ); + + d.set<VariantTest::test>(VariantTest::test()); + *(d.get<VariantTest::test>().holder) = 42; + + VariantTest::test tmp; + *(tmp.holder) = 42; + CPPUNIT_ASSERT( d.is<VariantTest::test>() ); + CPPUNIT_ASSERT( d.get<VariantTest::test>() == tmp ); + + std::variant<int, std::string, VariantTest::test> e(d); + CPPUNIT_ASSERT( e.get<VariantTest::test>() == tmp ); + + *(e.get<VariantTest::test>().holder) = 43; + + CPPUNIT_ASSERT( (d < e) == true ); + CPPUNIT_ASSERT( (e < d) == false ); + + CPPUNIT_ASSERT( (e == d) == false ); + + d = std::variant<int, std::string, VariantTest::test>(0); + d = e; + + CPPUNIT_ASSERT( *(d.get<VariantTest::test>().holder) == 43 ); + + CPPUNIT_ASSERT( (d < e) == false ); + CPPUNIT_ASSERT( (e < d) == false ); + + CPPUNIT_ASSERT( (e == d) == true ); +} + +void VariantTest::testVariantSet() { + VariantTest::test tmp; + *(tmp.holder) = 42; + + std::string str = "abcde"; + + std::variant<int, std::string, VariantTest::test> d(VariantTest::test {}); + *(d.get<VariantTest::test>().holder) = 42; + std::variant<int, std::string, VariantTest::test> e(d); + + std::variant<int, std::string, VariantTest::test> f(5); + + std::variant<int, std::string, VariantTest::test> g(str); + + std::set<std::variant<int, std::string, VariantTest::test>> testSet; + testSet.insert(d); + testSet.insert(e); + testSet.insert(f); + testSet.insert(g); + + CPPUNIT_ASSERT( testSet.size() == 3 ); + + for(std::set<std::variant<int, std::string, VariantTest::test>>::const_iterator iter = testSet.begin(); iter != testSet.end(); iter++) { + if(iter->is<int>()) + CPPUNIT_ASSERT( iter->get<int>() == 5); + if(iter->is<std::string>()) + CPPUNIT_ASSERT( iter->get<std::string>() == str ); + if(iter->is<VariantTest::test>()) + CPPUNIT_ASSERT( iter->get<VariantTest::test>() == tmp ); + } + + std::variant<VariantTest::test2, std::string, VariantTest::test> h("aa"); + CPPUNIT_ASSERT( h.is<std::string>() ); + + std::map<std::variant<std::string, int>, int> testMap; + testMap.insert(std::make_pair(std::variant<std::string, int> {"aa"}, 10)); + + CPPUNIT_ASSERT( testMap.size() == 1 ); + CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {"aa"}) != testMap.end() ); + CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {10}) == testMap.end() ); + + testMap.insert(std::make_pair(std::variant<std::string, int> {"ab"}, 11)); + testMap.insert(std::make_pair(std::variant<std::string, int> {3}, 13)); + + CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {"aa"}) != testMap.end() ); + CPPUNIT_ASSERT( testMap.find(std::variant<std::string, int> {10}) == testMap.end() ); +} diff --git a/alib2data/test-src/std/StdTest.h b/alib2std/test-src/extensions/VariantTest.h similarity index 84% rename from alib2data/test-src/std/StdTest.h rename to alib2std/test-src/extensions/VariantTest.h index 20f727dd4c..30451770d0 100644 --- a/alib2data/test-src/std/StdTest.h +++ b/alib2std/test-src/extensions/VariantTest.h @@ -2,12 +2,11 @@ #define VARIANT_TEST_H_ #include <cppunit/extensions/HelperMacros.h> -#include "std/compare.hpp" +#include <compare> -class StdTest : public CppUnit::TestFixture +class VariantTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE( StdTest ); - CPPUNIT_TEST( testIsBaseOf ); + CPPUNIT_TEST_SUITE( VariantTest ); CPPUNIT_TEST( testVariant ); CPPUNIT_TEST( testVariantSet ); CPPUNIT_TEST_SUITE_END(); @@ -73,8 +72,8 @@ public: namespace std { template<> -struct compare<StdTest::test> { - int operator()(const StdTest::test& first, const StdTest::test& second) { +struct compare<VariantTest::test> { + int operator()(const VariantTest::test& first, const VariantTest::test& second) { return first.compare(second); } }; diff --git a/alib2std/test-src/main.cpp b/alib2std/test-src/main.cpp new file mode 100644 index 0000000000..0c2f15bc1c --- /dev/null +++ b/alib2std/test-src/main.cpp @@ -0,0 +1,162 @@ +#include <tclap/CmdLine.h> + +#include <cppunit/CompilerOutputter.h> +#include <cppunit/extensions/TestFactoryRegistry.h> +#include <cppunit/ui/text/TestRunner.h> +#include <cppunit/TestResultCollector.h> +#include <cppunit/TestResult.h> +#include <cppunit/XmlOutputter.h> + +#include <cppunit/Test.h> +#include <cppunit/TestFailure.h> +#include <cppunit/portability/Stream.h> +#include <cppunit/TestListener.h> +#include <cppunit/SourceLine.h> +#include <cppunit/Exception.h> + +CPPUNIT_NS_BEGIN + +class CPPUNIT_API TestProgressListener : public TestListener +{ +public: + TestProgressListener(); + + virtual ~TestProgressListener(); + + void startTest( Test *test ); + + void addFailure( const TestFailure &failure ); + + void endTest( Test *test ); + + int getResult() const; + + void printResults() const; + +private: + TestProgressListener( const TestProgressListener © ); + + void operator =( const TestProgressListener © ); + +private: + int m_Failures; + int m_Tests; + int m_Assertions; + bool m_lastTestFailed; +}; + +TestProgressListener::TestProgressListener() : m_Failures( 0 ), m_Tests(0), m_Assertions(0), m_lastTestFailed( false ) +{ +} + +TestProgressListener::~TestProgressListener() +{ +} + +void TestProgressListener::startTest( Test * test ) +{ + stdCOut() << test->getName() << ":" << "\n"; + stdCOut().flush(); + + m_lastTestFailed = false; + m_Tests++; +} + +void TestProgressListener::addFailure( const TestFailure &failure ) +{ + stdCOut() << (failure.isError() ? "error" : "assertion") << " : " << failure.failedTestName() << " : " << failure.sourceLine().lineNumber() << "\n"; + stdCOut() << "Exception " << failure.thrownException()->message().details(); + + m_lastTestFailed = true; + if(failure.isError()) m_Failures++; else m_Assertions++; +} + +void TestProgressListener::endTest( Test * test) +{ + stdCOut() << "Result (" << test->getName() << ")"; + stdCOut().flush(); + + if ( !m_lastTestFailed ) + stdCOut() << " : OK"; + else + stdCOut() << " : Fail"; + stdCOut() << "\n\n"; +} + +int TestProgressListener::getResult() const { + return m_Failures + m_Assertions; +} + +void TestProgressListener::printResults() const { + stdCOut() << "Overal result: Tests: " << m_Tests << " Assertions: " << m_Assertions << " Failures: " << m_Failures << "\n"; +} + +CPPUNIT_NS_END + +int main(int argc, char* argv[]) { + try { + TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + + TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); + cmd.add( testPathSegments ); + + cmd.parse(argc, argv); + + CppUnit::TestResult controller; + + CppUnit::TestResultCollector result; + controller.addListener( &result ); + + CppUnit::TestProgressListener progressListener; + controller.addListener( &progressListener ); + + CppUnit::Test *suite = NULL; + std::string testPath = ""; + if(testPathSegments.getValue().size() == 0) { + // Get the top level suite from the registry + suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); + } else if(testPathSegments.getValue().size() == 1) { + suite = CppUnit::TestFactoryRegistry::getRegistry(testPathSegments.getValue()[0]).makeTest(); + } else { + suite = CppUnit::TestFactoryRegistry::getRegistry(testPathSegments.getValue()[0]).makeTest(); + bool first = true; + for(const std::string& path : testPathSegments.getValue()) { + if(first) { + first = false; + continue; + } + testPath += path + "/"; + } + testPath.pop_back(); + } + + // Adds the test to the list of test to run + CppUnit::TextUi::TestRunner runner; + runner.addTest( suite ); + + // Change the default outputter to a compiler error format outputter + runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), std::cerr ) ); + // Run the tests. + runner.run( controller, testPath ); + + progressListener.printResults(); + + std::ofstream xmlFileResults("CppUnitTestResults.xml"); + CppUnit::XmlOutputter xmlOut(&result, xmlFileResults); + xmlOut.write(); + + return progressListener.getResult(); +/* } catch(const exception::AlibException& exception) { + std::cerr << exception.getCause() << std::endl; + return 1;*/ + } catch(const TCLAP::ArgException& exception) { + std::cerr << exception.error() << std::endl; + return 2; + } catch (const std::exception& exception) { + std::cerr << "Exception caught: " << exception.what() << std::endl; + return 3; + } catch(...) { + std::cerr << "Unknown exception caught." << std::endl; + return 127; + } +} diff --git a/aminimize2/makefile b/aminimize2/makefile index 07fa40b3ef..b4a6e5b3fb 100644 --- a/aminimize2/makefile +++ b/aminimize2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/anormalize2/makefile b/anormalize2/makefile index 034230062e..5d970992e8 100644 --- a/anormalize2/makefile +++ b/anormalize2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/arand2/makefile b/arand2/makefile index 955b428f8d..9d80d0d805 100644 --- a/arand2/makefile +++ b/arand2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/arename2/makefile b/arename2/makefile index d2fc5a53cf..1e732d9fc1 100644 --- a/arename2/makefile +++ b/arename2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/areverse2/makefile b/areverse2/makefile index 602d9de77d..351302c292 100644 --- a/areverse2/makefile +++ b/areverse2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/arun2/makefile b/arun2/makefile index 196a16df98..b453ecf1f1 100644 --- a/arun2/makefile +++ b/arun2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/astat2/makefile b/astat2/makefile index d801990c51..9585bc05e7 100644 --- a/astat2/makefile +++ b/astat2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/astringology2/makefile b/astringology2/makefile index 7c5563bcab..909750dc95 100644 --- a/astringology2/makefile +++ b/astringology2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/atrim2/makefile b/atrim2/makefile index 93a759e66f..aa5ad097b8 100644 --- a/atrim2/makefile +++ b/atrim2/makefile @@ -8,9 +8,9 @@ endef export NEW_LINE -LDFLAGS_DEBUG:=-L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_DEBUG:=-L../alib2std/lib-debug -L../alib2data/lib-debug -L../alib2algo/lib-debug -L../alib2elgo/lib-debug -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. -LDFLAGS_RELEASE:=-L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. +LDFLAGS_RELEASE:=-L../alib2std/lib-release -L../alib2data/lib-release -L../alib2algo/lib-release -L../alib2elgo/lib-release -rdynamic -lxml2 -lalib2std -lalib2data -lalib2algo -lalib2elgo -Wl,-rpath,. OBJECTS_DEBUG:=$(patsubst src/%.cpp, obj-debug/%.o, $(shell find src/ -name *cpp)) @@ -36,7 +36,7 @@ obj%/makefile: makefile $${NEW_LINE}\ export NEW_LINE$${NEW_LINE}\ $${NEW_LINE}\ - CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ + CXXFLAGS:= -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC -I/usr/include/libxml2/ -I../../\$$(DEPTH)alib2std/src -I../../\$$(DEPTH)alib2data/src/ -I../../\$$(DEPTH)alib2algo/src/ -I../../\$$(DEPTH)alib2elgo/src/$${NEW_LINE}\ $${NEW_LINE}\ SOURCES:= \$$(shell find ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\ DEPENDENCIES:= \$$(patsubst ../\$$(DEPTH)\$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, ../\$$(DEPTH)\$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\ diff --git a/makefile b/makefile index b9872ba03a..ceb618d20e 100644 --- a/makefile +++ b/makefile @@ -3,6 +3,7 @@ APPPATH = /usr/bin LIBPATH = /usr/lib BINFOLDER = bin +STD_LIB = alib2std CORE_LIB = alib2data ALGO_LIB = alib2algo ELGO_LIB = alib2elgo @@ -50,12 +51,12 @@ endif SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile)) -.PHONY: $(addsuffix .all-debug , $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) \ - $(addsuffix .all-release, $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS))\ - $(addsuffix .build-debug , $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) \ - $(addsuffix .build-release, $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS))\ - $(addsuffix .build-debug-tests , $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) \ - $(addsuffix .build-release-tests, $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS))\ +.PHONY: $(addsuffix .all-debug , $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) \ + $(addsuffix .all-release, $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS))\ + $(addsuffix .build-debug , $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) \ + $(addsuffix .build-release, $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS))\ + $(addsuffix .build-debug-tests , $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) \ + $(addsuffix .build-release-tests, $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS))\ all-debug build-debug build-test-debug unit-test-debug clean-debug \ all-release build-release build-test-release unit-test-release clean-release \ debug release clean doc all @@ -68,7 +69,7 @@ all: debug: all-debug mkdir -p $(addsuffix -debug, $(BINFOLDER)) rm -rf $(addsuffix -debug, $(BINFOLDER))/* - for dir in $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB); do \ + for dir in $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB); do \ cp $$dir/lib-debug/* $(addsuffix -debug, $(BINFOLDER)); \ done for dir in $(SUBDIRS_BINS); do \ @@ -84,7 +85,7 @@ debug: all-debug release: all-release mkdir -p $(addsuffix -release, $(BINFOLDER)) rm -rf $(addsuffix -release, $(BINFOLDER))/* - for dir in $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB); do \ + for dir in $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB); do \ cp $$dir/lib-release/* $(addsuffix -release, $(BINFOLDER)); \ done for dir in $(SUBDIRS_BINS); do \ @@ -102,25 +103,28 @@ clean : clean-debug clean-release -all-debug : $(addsuffix .all-debug , $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) +all-debug : $(addsuffix .all-debug , $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) -all-release : $(addsuffix .all-release, $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) +all-release : $(addsuffix .all-release, $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) -build-debug : $(addsuffix .build-debug , $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) +build-debug : $(addsuffix .build-debug , $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) -build-release: $(addsuffix .build-release, $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) +build-release: $(addsuffix .build-release, $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB) $(SUBDIRS_BINS)) -build-tests-debug : $(addsuffix .build-tests-debug , $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB)) +build-tests-debug : $(addsuffix .build-tests-debug , $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB)) -build-tests-release: $(addsuffix .build-tests-release, $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB)) +build-tests-release: $(addsuffix .build-tests-release, $(STD_LIB) $(CORE_LIB) $(ALGO_LIB) $(ELGO_LIB)) -$(addsuffix .all-debug, $(CORE_LIB)): +$(addsuffix .all-debug, $(STD_LIB)): + $(MAKE) debug -C $(basename $@) + +$(addsuffix .all-debug, $(CORE_LIB)): $(addsuffix .all-debug, $(STD_LIB)) $(MAKE) debug -C $(basename $@) $(addsuffix .all-debug, $(ALGO_LIB)): $(addsuffix .all-debug, $(CORE_LIB)) @@ -134,7 +138,10 @@ $(addsuffix .all-debug, $(SUBDIRS_BINS)): $(addsuffix .all-debug, $(ELGO_LIB)) -$(addsuffix .all-release, $(CORE_LIB)): +$(addsuffix .all-release, $(STD_LIB)): + $(MAKE) release -C $(basename $@) + +$(addsuffix .all-release, $(CORE_LIB)): $(addsuffix .all-release, $(STD_LIB)) $(MAKE) release -C $(basename $@) $(addsuffix .all-release, $(ALGO_LIB)): $(addsuffix .all-release, $(CORE_LIB)) @@ -148,7 +155,10 @@ $(addsuffix .all-release, $(SUBDIRS_BINS)): $(addsuffix .all-release, $(ELGO_LIB -$(addsuffix .build-debug, $(CORE_LIB)): +$(addsuffix .build-debug, $(STD_LIB)): + $(MAKE) build-debug -C $(basename $@) + +$(addsuffix .build-debug, $(CORE_LIB)): $(addsuffix .build-debug, $(STD_LIB)) $(MAKE) build-debug -C $(basename $@) $(addsuffix .build-debug, $(ALGO_LIB)): $(addsuffix .build-debug, $(CORE_LIB)) @@ -162,7 +172,10 @@ $(addsuffix .build-debug, $(SUBDIRS_BINS)): $(addsuffix .build-debug, $(ELGO_LIB -$(addsuffix .build-release, $(CORE_LIB)): +$(addsuffix .build-release, $(STD_LIB)): + $(MAKE) build-release -C $(basename $@) + +$(addsuffix .build-release, $(CORE_LIB)): $(addsuffix .build-release, $(STD_LIB)) $(MAKE) build-release -C $(basename $@) $(addsuffix .build-release, $(ALGO_LIB)): $(addsuffix .build-release, $(CORE_LIB)) @@ -176,15 +189,24 @@ $(addsuffix .build-release, $(SUBDIRS_BINS)): $(addsuffix .build-release, $(ELGO -$(addsuffix .build-tests-debug, $(CORE_LIB)): $(addsuffix .build-debug, $(CORE_LIB)) +$(addsuffix .build-tests-debug, $(STD_LIB)): $(addsuffix .build-debug, $(STD_LIB)) + $(MAKE) build-tests-debug -C $(basename $@) + +$(addsuffix .build-tests-debug, $(CORE_LIB)): $(addsuffix .build-tests-debug, $(STD_LIB)) $(addsuffix .build-debug, $(CORE_LIB)) $(MAKE) build-tests-debug -C $(basename $@) $(addsuffix .build-tests-debug, $(ALGO_LIB)): $(addsuffix .build-tests-debug, $(CORE_LIB)) $(addsuffix .build-debug, $(ALGO_LIB)) $(MAKE) build-tests-debug -C $(basename $@) +$(addsuffix .build-tests-debug, $(ELGO_LIB)): $(addsuffix .build-tests-debug, $(ALGO_LIB)) $(addsuffix .build-debug, $(ELGO_LIB)) + $(MAKE) build-tests-debug -C $(basename $@) -$(addsuffix .build-tests-release, $(CORE_LIB)): $(addsuffix .build-release, $(CORE_LIB)) + +$(addsuffix .build-tests-release, $(STD_LIB)): $(addsuffix .build-release, $(STD_LIB)) + $(MAKE) build-tests-release -C $(basename $@) + +$(addsuffix .build-tests-release, $(CORE_LIB)): $(addsuffix .build-tests-release, $(STD_LIB)) $(addsuffix .build-release, $(CORE_LIB)) $(MAKE) build-tests-release -C $(basename $@) $(addsuffix .build-tests-release, $(ALGO_LIB)): $(addsuffix .build-tests-release, $(CORE_LIB)) $(addsuffix .build-release, $(ALGO_LIB)) -- GitLab