From a8554a9654f112692e5aac0e0424d3315e5fa877 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Fri, 22 Sep 2017 14:55:13 +0200 Subject: [PATCH] split alib2common to common measure and xml --- aaccess2/makefile.conf | 6 +- aaccess2/src/aaccess.cpp | 4 +- aarbology2/makefile.conf | 6 +- acast2/makefile.conf | 6 +- acompaction2/makefile.conf | 6 +- acompare2/makefile.conf | 6 +- aconversions2/makefile.conf | 6 +- aconvert2/makefile.conf | 6 +- aderivation2/makefile.conf | 6 +- adeterminize2/makefile.conf | 6 +- aecho2/makefile.conf | 6 +- aepsilon2/makefile.conf | 6 +- agenerate2/makefile.conf | 6 +- aintegral2/makefile.conf | 6 +- aintrospection2/makefile.conf | 8 +- alangop2/makefile.conf | 6 +- alib2algo/makefile.conf | 6 +- .../determinize/common/RHDPDACommon.cpp | 3 +- .../ToPostfixPushdownAutomatonGlushkov.h | 3 +- alib2algo_experimental/makefile.conf | 6 +- alib2aux/makefile.conf | 6 +- alib2aux/src/access/AutomatonAccess.cpp | 14 +- alib2aux/src/access/ExceptionAccess.cpp | 14 +- alib2aux/src/access/GrammarAccess.cpp | 14 +- alib2aux/src/access/PairSetAccess.cpp | 14 +- alib2aux/src/access/RegExpAccess.cpp | 14 +- alib2aux/src/access/StringAccess.cpp | 14 +- alib2aux/src/access/TreeAccess.cpp | 14 +- alib2cli/makefile.conf | 6 +- alib2cli/src/ast/params/FileParam.h | 6 +- .../ast/statements/ContainerFileStatement.cpp | 4 +- alib2cli/src/ast/statements/FileStatement.cpp | 6 +- .../src/ast/statements/ResultFileStatement.h | 3 +- .../src/ast/statements/ResultPrintStatement.h | 1 + .../command/DataTypesIntrospectionCommand.h | 6 +- alib2common/makefile.conf | 4 +- .../src/abstraction/AlgorithmRegistry.hpp | 2 + alib2common/src/abstraction/CastRegistry.cpp | 2 + .../src/abstraction/ContainerRegistry.cpp | 19 +- .../src/abstraction/ContainerRegistry.hpp | 10 - .../src/abstraction/PrimitiveRegistrator.cpp | 23 +- alib2common/src/abstraction/Registry.cpp | 27 - alib2common/src/abstraction/Registry.h | 9 +- .../common/AlgorithmCategories.cpp | 29 +- .../common/AlgorithmCategories.hpp | 15 - .../abstraction/common/ParamQualifiers.hpp | 14 - alib2common/src/container/ObjectsBitset.h | 103 - alib2common/src/container/ObjectsDeque.cpp | 9 - alib2common/src/container/ObjectsDeque.h | 72 - alib2common/src/container/ObjectsList.cpp | 9 - alib2common/src/container/ObjectsList.h | 72 - alib2common/src/container/ObjectsMap.cpp | 9 - alib2common/src/container/ObjectsMap.h | 74 - alib2common/src/container/ObjectsPair.cpp | 9 - alib2common/src/container/ObjectsPair.h | 77 - alib2common/src/container/ObjectsSet.cpp | 9 - alib2common/src/container/ObjectsSet.h | 72 - alib2common/src/container/ObjectsTree.cpp | 9 - alib2common/src/container/ObjectsTree.h | 111 - alib2common/src/container/ObjectsTrie.cpp | 9 - alib2common/src/container/ObjectsTrie.h | 105 - alib2common/src/container/ObjectsTuple.h | 102 - alib2common/src/container/ObjectsVector.cpp | 9 - alib2common/src/container/ObjectsVector.h | 72 - alib2common/src/exception/CommonException.cpp | 70 +- alib2common/src/exception/CommonException.h | 15 - .../measurements/MeasurementResultsXml.hpp | 70 - alib2common/src/object/AnyObject.h | 39 - alib2common/src/object/Object.cpp | 1 - alib2common/src/object/ObjectBase.h | 2 - alib2common/src/object/UniqueObject.cpp | 39 - alib2common/src/object/UniqueObject.h | 12 - alib2common/src/object/Void.cpp | 50 +- alib2common/src/object/Void.h | 23 - alib2common/src/primitive/Bool.cpp | 68 - alib2common/src/primitive/Bool.h | 21 - alib2common/src/primitive/Character.cpp | 55 - alib2common/src/primitive/Character.h | 21 - alib2common/src/primitive/Double.cpp | 54 - alib2common/src/primitive/Double.h | 21 - alib2common/src/primitive/Integer.cpp | 54 - alib2common/src/primitive/Integer.h | 21 - alib2common/src/primitive/Primitive.cpp | 1 - alib2common/src/primitive/String.cpp | 56 - alib2common/src/primitive/String.h | 23 +- alib2common/src/primitive/Unsigned.cpp | 54 - alib2common/src/primitive/Unsigned.h | 21 - alib2common/src/primitive/UnsignedLong.cpp | 54 - alib2common/src/primitive/UnsignedLong.h | 21 - .../test-src/container/ContainerTest.cpp | 123 - .../test-src/container/ContainerTest.h | 8 - alib2common/test-src/object/ObjectTest.cpp | 3 - alib2data/makefile.conf | 6 +- alib2data/src/alphabet/BarSymbol.cpp | 19 - alib2data/src/alphabet/BarSymbol.h | 10 - alib2data/src/alphabet/BlankSymbol.cpp | 19 - alib2data/src/alphabet/BlankSymbol.h | 10 - .../src/alphabet/BottomOfTheStackSymbol.cpp | 19 - .../src/alphabet/BottomOfTheStackSymbol.h | 10 - alib2data/src/alphabet/EndSymbol.cpp | 19 - alib2data/src/alphabet/EndSymbol.h | 10 - alib2data/src/alphabet/InitialSymbol.cpp | 19 - alib2data/src/alphabet/InitialSymbol.h | 10 - alib2data/src/alphabet/LabeledSymbol.cpp | 21 - alib2data/src/alphabet/LabeledSymbol.h | 12 +- .../src/alphabet/NonlinearVariableSymbol.cpp | 7 - .../src/alphabet/NonlinearVariableSymbol.h | 28 - alib2data/src/alphabet/RankedSymbol.cpp | 8 - alib2data/src/alphabet/RankedSymbol.h | 70 - alib2data/src/alphabet/StartSymbol.cpp | 19 - alib2data/src/alphabet/StartSymbol.h | 10 - .../src/alphabet/SubtreeWildcardSymbol.cpp | 19 - .../src/alphabet/SubtreeWildcardSymbol.h | 10 - alib2data/src/alphabet/SymbolBase.h | 26 - alib2data/src/alphabet/UniqueSymbol.cpp | 26 - alib2data/src/alphabet/UniqueSymbol.h | 10 - alib2data/src/alphabet/VariablesBarSymbol.cpp | 20 - alib2data/src/alphabet/VariablesBarSymbol.h | 10 - alib2data/src/alphabet/xml/BarSymbol.cpp | 47 + alib2data/src/alphabet/xml/BarSymbol.h | 26 + alib2data/src/alphabet/xml/BlankSymbol.cpp | 47 + alib2data/src/alphabet/xml/BlankSymbol.h | 26 + .../alphabet/xml/BottomOfTheStackSymbol.cpp | 47 + .../src/alphabet/xml/BottomOfTheStackSymbol.h | 26 + alib2data/src/alphabet/xml/EndSymbol.cpp | 47 + alib2data/src/alphabet/xml/EndSymbol.h | 26 + alib2data/src/alphabet/xml/InitialSymbol.cpp | 47 + alib2data/src/alphabet/xml/InitialSymbol.h | 26 + alib2data/src/alphabet/xml/LabeledSymbol.cpp | 49 + alib2data/src/alphabet/xml/LabeledSymbol.h | 26 + .../alphabet/xml/NonlinearVariableSymbol.cpp | 22 + .../alphabet/xml/NonlinearVariableSymbol.h | 54 + alib2data/src/alphabet/xml/RankedSymbol.cpp | 22 + alib2data/src/alphabet/xml/RankedSymbol.h | 84 + alib2data/src/alphabet/xml/StartSymbol.cpp | 47 + alib2data/src/alphabet/xml/StartSymbol.h | 26 + .../alphabet/xml/SubtreeWildcardSymbol.cpp | 47 + .../src/alphabet/xml/SubtreeWildcardSymbol.h | 26 + alib2data/src/alphabet/xml/UniqueSymbol.cpp | 54 + alib2data/src/alphabet/xml/UniqueSymbol.h | 26 + .../src/alphabet/xml/VariablesBarSymbol.cpp | 47 + .../src/alphabet/xml/VariablesBarSymbol.h | 26 + alib2data/src/automaton/TA/DFTA.h | 1 + ...istrator2.cpp => PrimitiveRegistrator.cpp} | 41 +- alib2data/src/common/SparseBoolVector.hpp | 2 + .../arbology/CompressedBitParallelTreeIndex.h | 7 + .../src/indexes/arbology/FullAndLinearIndex.h | 4 + .../NonlinearCompressedBitParallelTreeIndex.h | 6 + .../arbology/NonlinearFullAndLinearIndex.h | 4 + .../src/indexes/stringology/BNDMMatcher.h | 8 +- .../indexes/stringology/BitParallelIndex.h | 6 + .../stringology/CompressedBitParallelIndex.h | 6 + .../src/indexes/stringology/PositionHeap.h | 5 + .../src/indexes/stringology/SuffixArray.h | 4 + .../src/indexes/stringology/SuffixTrie.h | 7 +- alib2data/src/label/UniqueLabel.cpp | 2 + alib2data/src/rte/formal/FormalRTEElement.h | 1 + alib2data/src/tree/ranked/PostfixRankedTree.h | 1 + .../ranked/PrefixRankedBarNonlinearPattern.h | 1 + .../src/tree/ranked/PrefixRankedBarPattern.h | 1 + .../src/tree/ranked/PrefixRankedBarTree.h | 1 + .../ranked/PrefixRankedNonlinearPattern.h | 1 + .../src/tree/ranked/PrefixRankedPattern.h | 1 + alib2data/src/tree/ranked/PrefixRankedTree.h | 1 + .../src/tree/ranked/RankedNonlinearPattern.h | 1 + alib2data/src/tree/ranked/RankedPattern.h | 1 + alib2data/src/tree/ranked/RankedTree.h | 1 + .../automaton/AutomatonTemplatesTest.cpp | 2 + alib2data/test-src/string/StringTest.cpp | 2 + alib2data_experimental/makefile.conf | 6 +- .../SuffixTrieNodeTerminatingSymbol.h | 1 + .../src/label/LR0ItemsLabel.cpp | 5 + alib2elgo/makefile.conf | 6 +- alib2measure/Doxyfile | 2280 +++++++++++++++++ alib2measure/makefile | 3 + alib2measure/makefile.conf | 5 + .../src/allocator/StealthAllocator.hpp | 0 .../src/allocator/StealthTypes.cpp | 0 .../src/allocator/StealthTypes.hpp | 0 .../src/debug/New.cpp | 0 {alib2common => alib2measure}/src/measure | 0 .../src/measurements/MeasurementEngine.cpp | 2 +- .../src/measurements/MeasurementEngine.hpp | 0 .../src/measurements/MeasurementFrame.cpp | 0 .../src/measurements/MeasurementFrame.hpp | 0 .../src/measurements/MeasurementNew.cpp | 0 .../src/measurements/MeasurementNew.hpp | 0 .../src/measurements/MeasurementResults.cpp | 8 +- .../src/measurements/MeasurementResults.hpp | 3 +- .../src/measurements/MeasurementTypes.cpp | 2 +- .../src/measurements/MeasurementTypes.hpp | 2 +- .../measurements/frames/CounterDataFrame.cpp | 0 .../measurements/frames/CounterDataFrame.hpp | 0 .../measurements/frames/MemoryDataFrame.cpp | 0 .../measurements/frames/MemoryDataFrame.hpp | 0 .../src/measurements/frames/TimeDataFrame.cpp | 0 .../src/measurements/frames/TimeDataFrame.hpp | 0 .../src/measurements/measurements.cpp | 0 .../src/measurements/measurements.hpp | 1 - alib2measure/test-src/main.cpp | 164 ++ .../measurements/MeasurementsTest.cpp | 84 - .../test-src/measurements/MeasurementsTest.h | 3 - alib2raw/makefile.conf | 6 +- alib2std/makefile.conf | 4 +- alib2str/makefile.conf | 6 +- alib2str_experimental/makefile.conf | 6 +- alib2xml/Doxyfile | 2280 +++++++++++++++++ alib2xml/makefile | 3 + alib2xml/makefile.conf | 5 + .../src/abstraction/PrimitiveRegistrator.cpp | 46 + .../abstraction/XmlComposerAbstraction.hpp | 6 +- .../src/abstraction/XmlComposerRegistry.cpp | 0 .../src/abstraction/XmlComposerRegistry.hpp | 0 .../src/abstraction/XmlContainerRegistry.cpp | 56 + .../src/abstraction/XmlContainerRegistry.hpp | 84 + .../abstraction/XmlFileWriterAbstraction.hpp | 0 .../src/abstraction/XmlFileWriterRegistry.cpp | 0 .../src/abstraction/XmlFileWriterRegistry.hpp | 0 .../src/abstraction/XmlParserAbstraction.hpp | 0 .../src/abstraction/XmlParserRegistry.cpp | 0 .../src/abstraction/XmlParserRegistry.hpp | 0 alib2xml/src/abstraction/XmlRegistry.cpp | 43 + alib2xml/src/abstraction/XmlRegistry.h | 34 + .../common/xml/AlgorithmCategories.cpp | 29 + .../common/xml/AlgorithmCategories.hpp | 19 + .../common/xml}/ParamQualifiers.cpp | 2 +- .../common/xml/ParamQualifiers.hpp | 19 + alib2xml/src/container/xml/ObjectsBitset.h | 64 + alib2xml/src/container/xml/ObjectsDeque.cpp | 21 + alib2xml/src/container/xml/ObjectsDeque.h | 89 + alib2xml/src/container/xml/ObjectsList.cpp | 21 + alib2xml/src/container/xml/ObjectsList.h | 89 + alib2xml/src/container/xml/ObjectsMap.cpp | 21 + alib2xml/src/container/xml/ObjectsMap.h | 90 + alib2xml/src/container/xml/ObjectsPair.cpp | 21 + alib2xml/src/container/xml/ObjectsPair.h | 94 + alib2xml/src/container/xml/ObjectsSet.cpp | 22 + alib2xml/src/container/xml/ObjectsSet.h | 89 + alib2xml/src/container/xml/ObjectsTree.cpp | 22 + alib2xml/src/container/xml/ObjectsTree.h | 128 + alib2xml/src/container/xml/ObjectsTrie.cpp | 21 + alib2xml/src/container/xml/ObjectsTrie.h | 122 + alib2xml/src/container/xml/ObjectsTuple.h | 70 + .../src/container/xml}/ObjectsVariant.h | 57 +- alib2xml/src/container/xml/ObjectsVector.cpp | 21 + alib2xml/src/container/xml/ObjectsVector.h | 89 + {alib2common => alib2xml}/src/core/xmlApi.hpp | 0 .../src/exception/xml/CommonException.cpp | 74 + alib2xml/src/exception/xml/CommonException.h | 27 + .../src/factory/XmlDataFactory.hpp | 35 +- .../src/measure/xml/MeasurementResults.cpp | 157 +- .../src/measure/xml/MeasurementResults.hpp | 69 + .../src/object/xml}/AnyObject.cpp | 9 +- alib2xml/src/object/xml/AnyObject.h | 46 + alib2xml/src/object/xml/UniqueObject.cpp | 51 + alib2xml/src/object/xml/UniqueObject.h | 26 + alib2xml/src/object/xml/Void.cpp | 60 + alib2xml/src/object/xml/Void.h | 34 + alib2xml/src/primitive/xml/Bool.cpp | 77 + alib2xml/src/primitive/xml/Bool.h | 34 + alib2xml/src/primitive/xml/Character.cpp | 65 + alib2xml/src/primitive/xml/Character.h | 34 + alib2xml/src/primitive/xml/Double.cpp | 65 + alib2xml/src/primitive/xml/Double.h | 34 + alib2xml/src/primitive/xml/Integer.cpp | 65 + alib2xml/src/primitive/xml/Integer.h | 34 + alib2xml/src/primitive/xml/String.cpp | 67 + alib2xml/src/primitive/xml/String.h | 34 + alib2xml/src/primitive/xml/Unsigned.cpp | 65 + alib2xml/src/primitive/xml/Unsigned.h | 34 + alib2xml/src/primitive/xml/UnsignedLong.cpp | 65 + alib2xml/src/primitive/xml/UnsignedLong.h | 34 + .../src/registration/XmlRegistration.hpp | 0 .../src/sax/ComposerException.cpp | 0 .../src/sax/ComposerException.h | 2 +- .../src/sax/FromXMLParserHelper.cpp | 2 +- .../src/sax/FromXMLParserHelper.h | 0 .../src/sax/ParserException.cpp | 0 .../src/sax/ParserException.h | 2 +- .../src/sax/SaxComposeInterface.cpp | 2 +- .../src/sax/SaxComposeInterface.h | 0 .../src/sax/SaxParseInterface.cpp | 4 +- .../src/sax/SaxParseInterface.h | 0 {alib2common => alib2xml}/src/sax/Token.cpp | 0 {alib2common => alib2xml}/src/sax/Token.h | 0 alib2xml/test-src/container/ContainerTest.cpp | 132 + alib2xml/test-src/container/ContainerTest.h | 24 + alib2xml/test-src/main.cpp | 164 ++ .../measurements/MeasurementsTest.cpp | 96 + .../test-src/measurements/MeasurementsTest.h | 18 + .../test-src/object/AnyObjectTest.cpp | 13 +- .../test-src/object/AnyObjectTest.h | 0 .../test-src/primitive/PrimitiveTest.cpp | 10 +- .../test-src/primitive/PrimitiveTest.h | 0 .../test-src/sax/SaxTest.cpp | 0 .../test-src/sax/SaxTest.h | 0 aminimize2/makefile.conf | 6 +- anormalize2/makefile.conf | 6 +- aql2/makefile.conf | 6 +- aquery2/makefile.conf | 6 +- arand2/makefile.conf | 6 +- araw2/makefile.conf | 6 +- arename2/makefile.conf | 6 +- areverse2/makefile.conf | 6 +- arun2/makefile.conf | 6 +- astat2/makefile.conf | 6 +- astringology2/makefile.conf | 6 +- atrim2/makefile.conf | 6 +- makefile | 2 + tniceprint/makefile.conf | 6 +- 310 files changed, 9068 insertions(+), 2972 deletions(-) delete mode 100644 alib2common/src/container/ObjectsBitset.h delete mode 100644 alib2common/src/container/ObjectsTuple.h delete mode 100644 alib2common/src/measurements/MeasurementResultsXml.hpp create mode 100644 alib2data/src/alphabet/xml/BarSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/BarSymbol.h create mode 100644 alib2data/src/alphabet/xml/BlankSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/BlankSymbol.h create mode 100644 alib2data/src/alphabet/xml/BottomOfTheStackSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/BottomOfTheStackSymbol.h create mode 100644 alib2data/src/alphabet/xml/EndSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/EndSymbol.h create mode 100644 alib2data/src/alphabet/xml/InitialSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/InitialSymbol.h create mode 100644 alib2data/src/alphabet/xml/LabeledSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/LabeledSymbol.h create mode 100644 alib2data/src/alphabet/xml/NonlinearVariableSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/NonlinearVariableSymbol.h create mode 100644 alib2data/src/alphabet/xml/RankedSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/RankedSymbol.h create mode 100644 alib2data/src/alphabet/xml/StartSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/StartSymbol.h create mode 100644 alib2data/src/alphabet/xml/SubtreeWildcardSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/SubtreeWildcardSymbol.h create mode 100644 alib2data/src/alphabet/xml/UniqueSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/UniqueSymbol.h create mode 100644 alib2data/src/alphabet/xml/VariablesBarSymbol.cpp create mode 100644 alib2data/src/alphabet/xml/VariablesBarSymbol.h rename alib2data/src/common/{PrimitiveRegistrator2.cpp => PrimitiveRegistrator.cpp} (77%) create mode 100644 alib2measure/Doxyfile create mode 100644 alib2measure/makefile create mode 100644 alib2measure/makefile.conf rename {alib2common => alib2measure}/src/allocator/StealthAllocator.hpp (100%) rename {alib2common => alib2measure}/src/allocator/StealthTypes.cpp (100%) rename {alib2common => alib2measure}/src/allocator/StealthTypes.hpp (100%) rename {alib2common => alib2measure}/src/debug/New.cpp (100%) rename {alib2common => alib2measure}/src/measure (100%) rename {alib2common => alib2measure}/src/measurements/MeasurementEngine.cpp (98%) rename {alib2common => alib2measure}/src/measurements/MeasurementEngine.hpp (100%) rename {alib2common => alib2measure}/src/measurements/MeasurementFrame.cpp (100%) rename {alib2common => alib2measure}/src/measurements/MeasurementFrame.hpp (100%) rename {alib2common => alib2measure}/src/measurements/MeasurementNew.cpp (100%) rename {alib2common => alib2measure}/src/measurements/MeasurementNew.hpp (100%) rename {alib2common => alib2measure}/src/measurements/MeasurementResults.cpp (94%) rename {alib2common => alib2measure}/src/measurements/MeasurementResults.hpp (94%) rename {alib2common => alib2measure}/src/measurements/MeasurementTypes.cpp (96%) rename {alib2common => alib2measure}/src/measurements/MeasurementTypes.hpp (92%) rename {alib2common => alib2measure}/src/measurements/frames/CounterDataFrame.cpp (100%) rename {alib2common => alib2measure}/src/measurements/frames/CounterDataFrame.hpp (100%) rename {alib2common => alib2measure}/src/measurements/frames/MemoryDataFrame.cpp (100%) rename {alib2common => alib2measure}/src/measurements/frames/MemoryDataFrame.hpp (100%) rename {alib2common => alib2measure}/src/measurements/frames/TimeDataFrame.cpp (100%) rename {alib2common => alib2measure}/src/measurements/frames/TimeDataFrame.hpp (100%) rename {alib2common => alib2measure}/src/measurements/measurements.cpp (100%) rename {alib2common => alib2measure}/src/measurements/measurements.hpp (93%) create mode 100644 alib2measure/test-src/main.cpp rename {alib2common => alib2measure}/test-src/measurements/MeasurementsTest.cpp (63%) rename {alib2common => alib2measure}/test-src/measurements/MeasurementsTest.h (88%) create mode 100644 alib2xml/Doxyfile create mode 100644 alib2xml/makefile create mode 100644 alib2xml/makefile.conf create mode 100644 alib2xml/src/abstraction/PrimitiveRegistrator.cpp rename {alib2common => alib2xml}/src/abstraction/XmlComposerAbstraction.hpp (83%) rename {alib2common => alib2xml}/src/abstraction/XmlComposerRegistry.cpp (100%) rename {alib2common => alib2xml}/src/abstraction/XmlComposerRegistry.hpp (100%) create mode 100644 alib2xml/src/abstraction/XmlContainerRegistry.cpp create mode 100644 alib2xml/src/abstraction/XmlContainerRegistry.hpp rename {alib2common => alib2xml}/src/abstraction/XmlFileWriterAbstraction.hpp (100%) rename {alib2common => alib2xml}/src/abstraction/XmlFileWriterRegistry.cpp (100%) rename {alib2common => alib2xml}/src/abstraction/XmlFileWriterRegistry.hpp (100%) rename {alib2common => alib2xml}/src/abstraction/XmlParserAbstraction.hpp (100%) rename {alib2common => alib2xml}/src/abstraction/XmlParserRegistry.cpp (100%) rename {alib2common => alib2xml}/src/abstraction/XmlParserRegistry.hpp (100%) create mode 100644 alib2xml/src/abstraction/XmlRegistry.cpp create mode 100644 alib2xml/src/abstraction/XmlRegistry.h create mode 100644 alib2xml/src/abstraction/common/xml/AlgorithmCategories.cpp create mode 100644 alib2xml/src/abstraction/common/xml/AlgorithmCategories.hpp rename {alib2common/src/abstraction/common => alib2xml/src/abstraction/common/xml}/ParamQualifiers.cpp (97%) create mode 100644 alib2xml/src/abstraction/common/xml/ParamQualifiers.hpp create mode 100644 alib2xml/src/container/xml/ObjectsBitset.h create mode 100644 alib2xml/src/container/xml/ObjectsDeque.cpp create mode 100644 alib2xml/src/container/xml/ObjectsDeque.h create mode 100644 alib2xml/src/container/xml/ObjectsList.cpp create mode 100644 alib2xml/src/container/xml/ObjectsList.h create mode 100644 alib2xml/src/container/xml/ObjectsMap.cpp create mode 100644 alib2xml/src/container/xml/ObjectsMap.h create mode 100644 alib2xml/src/container/xml/ObjectsPair.cpp create mode 100644 alib2xml/src/container/xml/ObjectsPair.h create mode 100644 alib2xml/src/container/xml/ObjectsSet.cpp create mode 100644 alib2xml/src/container/xml/ObjectsSet.h create mode 100644 alib2xml/src/container/xml/ObjectsTree.cpp create mode 100644 alib2xml/src/container/xml/ObjectsTree.h create mode 100644 alib2xml/src/container/xml/ObjectsTrie.cpp create mode 100644 alib2xml/src/container/xml/ObjectsTrie.h create mode 100644 alib2xml/src/container/xml/ObjectsTuple.h rename {alib2common/src/container => alib2xml/src/container/xml}/ObjectsVariant.h (73%) create mode 100644 alib2xml/src/container/xml/ObjectsVector.cpp create mode 100644 alib2xml/src/container/xml/ObjectsVector.h rename {alib2common => alib2xml}/src/core/xmlApi.hpp (100%) create mode 100644 alib2xml/src/exception/xml/CommonException.cpp create mode 100644 alib2xml/src/exception/xml/CommonException.h rename {alib2common => alib2xml}/src/factory/XmlDataFactory.hpp (81%) rename alib2common/src/measurements/MeasurementResultsXml.cpp => alib2xml/src/measure/xml/MeasurementResults.cpp (67%) create mode 100644 alib2xml/src/measure/xml/MeasurementResults.hpp rename {alib2common/src/object => alib2xml/src/object/xml}/AnyObject.cpp (52%) create mode 100644 alib2xml/src/object/xml/AnyObject.h create mode 100644 alib2xml/src/object/xml/UniqueObject.cpp create mode 100644 alib2xml/src/object/xml/UniqueObject.h create mode 100644 alib2xml/src/object/xml/Void.cpp create mode 100644 alib2xml/src/object/xml/Void.h create mode 100644 alib2xml/src/primitive/xml/Bool.cpp create mode 100644 alib2xml/src/primitive/xml/Bool.h create mode 100644 alib2xml/src/primitive/xml/Character.cpp create mode 100644 alib2xml/src/primitive/xml/Character.h create mode 100644 alib2xml/src/primitive/xml/Double.cpp create mode 100644 alib2xml/src/primitive/xml/Double.h create mode 100644 alib2xml/src/primitive/xml/Integer.cpp create mode 100644 alib2xml/src/primitive/xml/Integer.h create mode 100644 alib2xml/src/primitive/xml/String.cpp create mode 100644 alib2xml/src/primitive/xml/String.h create mode 100644 alib2xml/src/primitive/xml/Unsigned.cpp create mode 100644 alib2xml/src/primitive/xml/Unsigned.h create mode 100644 alib2xml/src/primitive/xml/UnsignedLong.cpp create mode 100644 alib2xml/src/primitive/xml/UnsignedLong.h rename {alib2common => alib2xml}/src/registration/XmlRegistration.hpp (100%) rename {alib2common => alib2xml}/src/sax/ComposerException.cpp (100%) rename {alib2common => alib2xml}/src/sax/ComposerException.h (92%) rename {alib2common => alib2xml}/src/sax/FromXMLParserHelper.cpp (98%) rename {alib2common => alib2xml}/src/sax/FromXMLParserHelper.h (100%) rename {alib2common => alib2xml}/src/sax/ParserException.cpp (100%) rename {alib2common => alib2xml}/src/sax/ParserException.h (92%) rename {alib2common => alib2xml}/src/sax/SaxComposeInterface.cpp (99%) rename {alib2common => alib2xml}/src/sax/SaxComposeInterface.h (100%) rename {alib2common => alib2xml}/src/sax/SaxParseInterface.cpp (97%) rename {alib2common => alib2xml}/src/sax/SaxParseInterface.h (100%) rename {alib2common => alib2xml}/src/sax/Token.cpp (100%) rename {alib2common => alib2xml}/src/sax/Token.h (100%) create mode 100644 alib2xml/test-src/container/ContainerTest.cpp create mode 100644 alib2xml/test-src/container/ContainerTest.h create mode 100644 alib2xml/test-src/main.cpp create mode 100644 alib2xml/test-src/measurements/MeasurementsTest.cpp create mode 100644 alib2xml/test-src/measurements/MeasurementsTest.h rename {alib2common => alib2xml}/test-src/object/AnyObjectTest.cpp (75%) rename {alib2common => alib2xml}/test-src/object/AnyObjectTest.h (100%) rename {alib2common => alib2xml}/test-src/primitive/PrimitiveTest.cpp (85%) rename {alib2common => alib2xml}/test-src/primitive/PrimitiveTest.h (100%) rename {alib2common => alib2xml}/test-src/sax/SaxTest.cpp (100%) rename {alib2common => alib2xml}/test-src/sax/SaxTest.h (100%) diff --git a/aaccess2/makefile.conf b/aaccess2/makefile.conf index e999072fe8..4718744795 100644 --- a/aaccess2/makefile.conf +++ b/aaccess2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aaccess2 -LINK_PATHS=../alib2aux/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2aux alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2aux/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2aux/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2aux alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2aux/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aaccess2/src/aaccess.cpp b/aaccess2/src/aaccess.cpp index 66355cd49a..daf91b7e4f 100644 --- a/aaccess2/src/aaccess.cpp +++ b/aaccess2/src/aaccess.cpp @@ -24,8 +24,8 @@ #include <access/settings/OperationSettings.h> -#include <container/ObjectsSet.h> -#include <container/ObjectsPair.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsPair.h> int main ( int argc, char * argv[] ) { try { diff --git a/aarbology2/makefile.conf b/aarbology2/makefile.conf index 5ada1c8807..d93f3f663e 100644 --- a/aarbology2/makefile.conf +++ b/aarbology2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aarbology2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/acast2/makefile.conf b/acast2/makefile.conf index 1dc893db80..7222840b5b 100644 --- a/acast2/makefile.conf +++ b/acast2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=acast2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2xml alib2measure alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/acompaction2/makefile.conf b/acompaction2/makefile.conf index 8dd4c0f398..1df00310e3 100644 --- a/acompaction2/makefile.conf +++ b/acompaction2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=acompaction2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/acompare2/makefile.conf b/acompare2/makefile.conf index 39ef739e68..d992ab93d3 100644 --- a/acompare2/makefile.conf +++ b/acompare2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=acompare2 -LINK_PATHS= ../alib2aux/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2aux alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2aux/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS= ../alib2aux/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2aux alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2aux/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aconversions2/makefile.conf b/aconversions2/makefile.conf index 40c3b813b6..8d41c34432 100644 --- a/aconversions2/makefile.conf +++ b/aconversions2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aconversions2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aconvert2/makefile.conf b/aconvert2/makefile.conf index 9161a2fab0..2d054d2226 100644 --- a/aconvert2/makefile.conf +++ b/aconvert2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aconvert2 -LINK_PATHS=../alib2aux/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2aux alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2aux/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2aux/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2aux alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2aux/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aderivation2/makefile.conf b/aderivation2/makefile.conf index 67c50ae125..1aa99a7328 100644 --- a/aderivation2/makefile.conf +++ b/aderivation2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aderivation2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/adeterminize2/makefile.conf b/adeterminize2/makefile.conf index 020e07e7f3..811196f666 100644 --- a/adeterminize2/makefile.conf +++ b/adeterminize2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=adeterminize2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aecho2/makefile.conf b/aecho2/makefile.conf index 53c9e667bb..511dfb1cf9 100644 --- a/aecho2/makefile.conf +++ b/aecho2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aecho2 -LINK_PATHS=../alib2cli/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aepsilon2/makefile.conf b/aepsilon2/makefile.conf index ed5d5f4f8a..1f77f99f69 100644 --- a/aepsilon2/makefile.conf +++ b/aepsilon2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aepsilon2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/agenerate2/makefile.conf b/agenerate2/makefile.conf index dff9303bc8..53dc58f371 100644 --- a/agenerate2/makefile.conf +++ b/agenerate2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=agenerate2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aintegral2/makefile.conf b/aintegral2/makefile.conf index 891a6e9eb1..93be2a4da5 100644 --- a/aintegral2/makefile.conf +++ b/aintegral2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aintegral2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aintrospection2/makefile.conf b/aintrospection2/makefile.conf index 32ca1026a1..213b4f1c2e 100644 --- a/aintrospection2/makefile.conf +++ b/aintrospection2/makefile.conf @@ -1,6 +1,6 @@ EXECUTABLE:=aintrospection2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo_experimental/ ../alib2algo/ ../alib2raw/ ../alib2raw/ ../alib2str_experimental/ ../alib2str/ ../alib2data_experimental/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo_experimental alib2algo alib2raw alib2str_experimental alib2str alib2data_experimental alib2data alib2common alib2std xml2 +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo_experimental/ ../alib2algo/ ../alib2raw/ ../alib2raw/ ../alib2str_experimental/ ../alib2str/ ../alib2data_experimental/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo_experimental alib2algo alib2raw alib2str_experimental alib2str alib2data_experimental alib2data alib2xml alib2measure alib2common alib2std xml2 INCLUDE_PATHS=\ \$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \ \$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \ @@ -12,6 +12,8 @@ INCLUDE_PATHS=\ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \ \$$(SOURCES_BASE_DIR)/../../alib2data_experimental/src/ \ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \ - \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \ + \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \ + \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \ + \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ \ /usr/include/libxml2/ diff --git a/alangop2/makefile.conf b/alangop2/makefile.conf index d17072d5dd..5088a81102 100644 --- a/alangop2/makefile.conf +++ b/alangop2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=alangop2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2algo/makefile.conf b/alib2algo/makefile.conf index ca3e031071..7e7388d75b 100644 --- a/alib2algo/makefile.conf +++ b/alib2algo/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2algo TESTBIN:=alib2test -LINK_PATHS=../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2algo/src/automaton/determinize/common/RHDPDACommon.cpp b/alib2algo/src/automaton/determinize/common/RHDPDACommon.cpp index 2925f4c7f4..53965d1da8 100644 --- a/alib2algo/src/automaton/determinize/common/RHDPDACommon.cpp +++ b/alib2algo/src/automaton/determinize/common/RHDPDACommon.cpp @@ -3,7 +3,8 @@ #include "object/Object.h" #include <container/ObjectsPair.h> #include <container/ObjectsSet.h> -#include <container/ObjectsVariant.h> + +#include <variant> #include "automaton/PDA/VisiblyPushdownNPDA.h" #include "automaton/PDA/RealTimeHeightDeterministicNPDA.h" diff --git a/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.h b/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.h index e6c6636258..9aa92b8a28 100644 --- a/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.h +++ b/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.h @@ -14,9 +14,10 @@ #include <rte/formal/FormalRTE.h> -#include <container/ObjectsVariant.h> #include <container/ObjectsSet.h> +#include <variant> + namespace rte { namespace convert { diff --git a/alib2algo_experimental/makefile.conf b/alib2algo_experimental/makefile.conf index 614b42fe26..e2ff4fbee4 100644 --- a/alib2algo_experimental/makefile.conf +++ b/alib2algo_experimental/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2algo_experimental TESTBIN:=alib2test -LINK_PATHS=../alib2algo/ ../alib2str_experimental/ ../alib2str/ ../alib2data_experimental/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2algo alib2str_experimental alib2str alib2data_experimental alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2str_experimental/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data_experimental/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2algo/ ../alib2str_experimental/ ../alib2str/ ../alib2data_experimental/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2algo alib2str_experimental alib2str alib2data_experimental alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2str_experimental/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data_experimental/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2aux/makefile.conf b/alib2aux/makefile.conf index 5fca70053d..d5e0051bca 100644 --- a/alib2aux/makefile.conf +++ b/alib2aux/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2aux TESTBIN:=alib2test -LINK_PATHS=../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2aux/src/access/AutomatonAccess.cpp b/alib2aux/src/access/AutomatonAccess.cpp index f10008f9ea..0c2561ae80 100644 --- a/alib2aux/src/access/AutomatonAccess.cpp +++ b/alib2aux/src/access/AutomatonAccess.cpp @@ -17,13 +17,13 @@ #include <automaton/PDA/NPDA.h> #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> #include "common/AccessHelpers.hpp" #include <registration/AlgoRegistration.hpp> diff --git a/alib2aux/src/access/ExceptionAccess.cpp b/alib2aux/src/access/ExceptionAccess.cpp index b2d982b5de..8067d00cf7 100644 --- a/alib2aux/src/access/ExceptionAccess.cpp +++ b/alib2aux/src/access/ExceptionAccess.cpp @@ -8,13 +8,13 @@ #include "ExceptionAccess.h" #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> namespace dataAccess { diff --git a/alib2aux/src/access/GrammarAccess.cpp b/alib2aux/src/access/GrammarAccess.cpp index 11cd5ed396..82ec360fef 100644 --- a/alib2aux/src/access/GrammarAccess.cpp +++ b/alib2aux/src/access/GrammarAccess.cpp @@ -11,13 +11,13 @@ #include <grammar/Regular/RightLG.h> #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> #include "common/AccessHelpers.hpp" #include <registration/AlgoRegistration.hpp> diff --git a/alib2aux/src/access/PairSetAccess.cpp b/alib2aux/src/access/PairSetAccess.cpp index 3177d594ce..67e6522fad 100644 --- a/alib2aux/src/access/PairSetAccess.cpp +++ b/alib2aux/src/access/PairSetAccess.cpp @@ -8,13 +8,13 @@ #include "PairSetAccess.h" #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> namespace dataAccess { diff --git a/alib2aux/src/access/RegExpAccess.cpp b/alib2aux/src/access/RegExpAccess.cpp index def8356f2b..3769912066 100644 --- a/alib2aux/src/access/RegExpAccess.cpp +++ b/alib2aux/src/access/RegExpAccess.cpp @@ -15,13 +15,13 @@ #include <regexp/unbounded/UnboundedRegExpElement.h> #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> #include "common/AccessHelpers.hpp" #include <registration/AlgoRegistration.hpp> diff --git a/alib2aux/src/access/StringAccess.cpp b/alib2aux/src/access/StringAccess.cpp index 80a99f0b5a..b50c582941 100644 --- a/alib2aux/src/access/StringAccess.cpp +++ b/alib2aux/src/access/StringAccess.cpp @@ -11,13 +11,13 @@ #include <string/CyclicString.h> #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> #include "common/AccessHelpers.hpp" #include <registration/AlgoRegistration.hpp> diff --git a/alib2aux/src/access/TreeAccess.cpp b/alib2aux/src/access/TreeAccess.cpp index fb586d5991..a296586e8b 100644 --- a/alib2aux/src/access/TreeAccess.cpp +++ b/alib2aux/src/access/TreeAccess.cpp @@ -13,13 +13,13 @@ #include <tree/unranked/UnrankedTree.h> #include <factory/XmlDataFactory.hpp> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsTuple.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsVariant.h> -#include <container/ObjectsPair.h> -#include <container/ObjectsTree.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsTuple.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsPair.h> +#include <container/xml/ObjectsTree.h> #include "common/AccessHelpers.hpp" #include <registration/AlgoRegistration.hpp> diff --git a/alib2cli/makefile.conf b/alib2cli/makefile.conf index e9866d5a04..c2eda967ed 100644 --- a/alib2cli/makefile.conf +++ b/alib2cli/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2cli TESTBIN:=alib2test -LINK_PATHS=../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2cli/src/ast/params/FileParam.h b/alib2cli/src/ast/params/FileParam.h index 4a83ee066c..c73b20b324 100644 --- a/alib2cli/src/ast/params/FileParam.h +++ b/alib2cli/src/ast/params/FileParam.h @@ -2,7 +2,9 @@ #define _CLI_FILE_PARAM_H_ #include <ast/Param.h> -#include <abstraction/Registry.h> +#include <abstraction/XmlRegistry.h> + +#include <sax/FromXMLParserHelper.h> namespace cli { @@ -16,7 +18,7 @@ public: virtual std::shared_ptr < abstraction::OperationAbstraction > translateAndEval ( const std::shared_ptr < abstraction::OperationAbstraction > &, Environment & environment ) const override { ext::deque < sax::Token > tokens = sax::FromXMLParserHelper::parseInput ( m_arg->eval ( environment ) ); std::string type = tokens [ 0 ].getData ( ); - std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::Registry::getXmlParserAbstraction ( type, tokens ); + std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::XmlRegistry::getXmlParserAbstraction ( type, tokens ); res->eval ( ); return res; } diff --git a/alib2cli/src/ast/statements/ContainerFileStatement.cpp b/alib2cli/src/ast/statements/ContainerFileStatement.cpp index 601899fbc9..01c1d1b2a0 100644 --- a/alib2cli/src/ast/statements/ContainerFileStatement.cpp +++ b/alib2cli/src/ast/statements/ContainerFileStatement.cpp @@ -2,7 +2,7 @@ #include <ast/Statement.h> #include <ast/Option.h> #include <ast/Arg.h> -#include <abstraction/Registry.h> +#include <abstraction/XmlRegistry.h> namespace cli { @@ -10,7 +10,7 @@ ContainerFileStatement::ContainerFileStatement ( std::string container, std::uni } std::shared_ptr < abstraction::OperationAbstraction > ContainerFileStatement::translateAndEval ( const std::shared_ptr < abstraction::OperationAbstraction > &, Environment & environment ) const { - return abstraction::Registry::getContainerAbstraction ( m_container, m_type->getType ( ), m_file->eval ( environment ) ); + return abstraction::XmlRegistry::getXmlContainerAbstraction ( m_container, m_type->getType ( ), m_file->eval ( environment ) ); } } /* namespace cli */ diff --git a/alib2cli/src/ast/statements/FileStatement.cpp b/alib2cli/src/ast/statements/FileStatement.cpp index 15920e32ee..b9652ba422 100644 --- a/alib2cli/src/ast/statements/FileStatement.cpp +++ b/alib2cli/src/ast/statements/FileStatement.cpp @@ -2,7 +2,9 @@ #include <ast/Statement.h> #include <ast/Option.h> #include <ast/Arg.h> -#include <abstraction/Registry.h> +#include <abstraction/XmlRegistry.h> + +#include <sax/FromXMLParserHelper.h> namespace cli { @@ -18,7 +20,7 @@ std::shared_ptr < abstraction::OperationAbstraction > FileStatement::translateAn if ( type == "" ) type = tokens [ 0 ].getData ( ); - std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::Registry::getXmlParserAbstraction ( type, std::move ( tokens ) ); + std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::XmlRegistry::getXmlParserAbstraction ( type, std::move ( tokens ) ); res->eval ( ); return res; } diff --git a/alib2cli/src/ast/statements/ResultFileStatement.h b/alib2cli/src/ast/statements/ResultFileStatement.h index f327bff8c7..3ed61f80aa 100644 --- a/alib2cli/src/ast/statements/ResultFileStatement.h +++ b/alib2cli/src/ast/statements/ResultFileStatement.h @@ -2,6 +2,7 @@ #define _CLI_RESULT_FILE_STATEMENT_H_ #include <ast/Statement.h> +#include <abstraction/XmlRegistry.h> namespace cli { @@ -13,7 +14,7 @@ public: } virtual std::shared_ptr < abstraction::OperationAbstraction > translateAndEval ( const std::shared_ptr < abstraction::OperationAbstraction > & prev, Environment & environment ) const override { - std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::Registry::getXmlFileWriterAbstraction ( prev->getReturnType ( ), m_file->eval ( environment ) ); + std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::XmlRegistry::getXmlFileWriterAbstraction ( prev->getReturnType ( ), m_file->eval ( environment ) ); if ( ! res->attachInput ( prev, 0, false ) ) throw exception::CommonException ( "Can't connect param at 0 of result file statement with result of type " + prev->getReturnType ( ) + "." ); if ( ! res->eval ( ) ) diff --git a/alib2cli/src/ast/statements/ResultPrintStatement.h b/alib2cli/src/ast/statements/ResultPrintStatement.h index 1eb472a503..932a3aae9b 100644 --- a/alib2cli/src/ast/statements/ResultPrintStatement.h +++ b/alib2cli/src/ast/statements/ResultPrintStatement.h @@ -3,6 +3,7 @@ #include <ast/Statement.h> #include <global/GlobalData.h> +#include <abstraction/Registry.h> namespace cli { diff --git a/alib2cli/src/command/DataTypesIntrospectionCommand.h b/alib2cli/src/command/DataTypesIntrospectionCommand.h index ab80a3c445..18c4e4e344 100644 --- a/alib2cli/src/command/DataTypesIntrospectionCommand.h +++ b/alib2cli/src/command/DataTypesIntrospectionCommand.h @@ -4,6 +4,8 @@ #include <command/Command.h> #include <environment/Environment.h> +#include <abstraction/XmlRegistry.h> + namespace cli { class DataTypesIntrospectionCommand : public Command { @@ -24,9 +26,9 @@ public: param = m_param->eval ( environment ); if ( param == "" ) { - printTypes ( abstraction::Registry::listDataTypes ( ) ); + printTypes ( abstraction::XmlRegistry::listDataTypes ( ) ); } else if ( param.find ( "::", param.size ( ) - 2 ) != std::string::npos ) { - printTypes ( abstraction::Registry::listDataTypeGroup ( param ) ); + printTypes ( abstraction::XmlRegistry::listDataTypeGroup ( param ) ); } else { throw exception::CommonException ( "Invalid DataType introspection param" ); } diff --git a/alib2common/makefile.conf b/alib2common/makefile.conf index f297c94352..500838667b 100644 --- a/alib2common/makefile.conf +++ b/alib2common/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2common TESTBIN:=alib2test LINK_PATHS=../alib2std/ -LINK_LIBRARIES=alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_LIBRARIES=alib2std +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2std/src/ diff --git a/alib2common/src/abstraction/AlgorithmRegistry.hpp b/alib2common/src/abstraction/AlgorithmRegistry.hpp index d2afb44304..ae0c0b63d0 100644 --- a/alib2common/src/abstraction/AlgorithmRegistry.hpp +++ b/alib2common/src/abstraction/AlgorithmRegistry.hpp @@ -13,6 +13,8 @@ #include <vector> #include <string> #include <set> +#include <map> +#include <algorithm> #include <exception/CommonException.h> #include <abstraction/OperationAbstraction.hpp> diff --git a/alib2common/src/abstraction/CastRegistry.cpp b/alib2common/src/abstraction/CastRegistry.cpp index 4ba258e807..aa97741cae 100644 --- a/alib2common/src/abstraction/CastRegistry.cpp +++ b/alib2common/src/abstraction/CastRegistry.cpp @@ -9,6 +9,8 @@ #include <core/namingApi.hpp> +#include <algorithm> + namespace abstraction { std::shared_ptr < abstraction::OperationAbstraction > CastRegistry::getAbstraction ( const std::string & target, const std::string & param, bool & normalize ) { diff --git a/alib2common/src/abstraction/ContainerRegistry.cpp b/alib2common/src/abstraction/ContainerRegistry.cpp index 198ffb7d38..e3a3793aef 100644 --- a/alib2common/src/abstraction/ContainerRegistry.cpp +++ b/alib2common/src/abstraction/ContainerRegistry.cpp @@ -7,6 +7,7 @@ #include <abstraction/ContainerRegistry.hpp> #include <foreach> +#include <algorithm> namespace abstraction { @@ -32,24 +33,6 @@ std::shared_ptr < abstraction::OperationAbstraction > ContainerRegistry::getAbst throw exception::CommonException ( "Entry for " + container + " parametrized with " + paramType + " not available." ); } -std::shared_ptr < abstraction::OperationAbstraction > ContainerRegistry::getAbstraction ( const std::string & container, const std::string & paramType, const std::string & filename ) { - std::set < std::string > paramTypes; - if ( alib::namingApi::hasTypes ( paramType ) ) - paramTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( paramType ), [ ] ( const ext::type_index & type ) { return ext::to_string ( type ); } ); - else - paramTypes.insert ( paramType ); - - auto group = getEntries ( ).find ( container ); - if ( group == getEntries ( ).end ( ) ) - throw exception::CommonException ( "Entry " + container + " not available" ); - - for ( const ext::pair < std::string, std::shared_ptr < Entry > > & entry : group->second ) - if ( paramTypes.count ( entry.first ) ) - return entry.second->getAbstraction ( filename ); - - throw exception::CommonException ( "Entry for " + container + " parametrized with " + paramType + " not available." ); -} - ext::set < std::string > ContainerRegistry::listOverloads ( const std::string & container ) { auto group = getEntries ( ).find ( container ); if ( group == getEntries ( ).end ( ) ) diff --git a/alib2common/src/abstraction/ContainerRegistry.hpp b/alib2common/src/abstraction/ContainerRegistry.hpp index 9a2d3b7a54..24962f7eb2 100644 --- a/alib2common/src/abstraction/ContainerRegistry.hpp +++ b/alib2common/src/abstraction/ContainerRegistry.hpp @@ -25,14 +25,12 @@ class ContainerRegistry { class Entry { public: virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( ) const = 0; - virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & filename ) const = 0; }; template < class Params > class SetEntryImpl : public Entry { public: virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( ) const override; - virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & filename ) const override; }; static ext::map < std::string, ext::vector < ext::pair < std::string, std::shared_ptr < Entry > > > > & getEntries ( ) { @@ -63,7 +61,6 @@ public: static bool hasAbstraction ( const std::string & container ); static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & container, const std::string & paramType ); - static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & container, const std::string & paramType, const std::string & filename ); static ext::set < std::string > listOverloads ( const std::string & algorithm ); @@ -73,7 +70,6 @@ public: } /* namespace abstraction */ #include <abstraction/SetAbstraction.hpp> -#include <abstraction/XmlParserAbstraction.hpp> namespace abstraction { @@ -82,12 +78,6 @@ std::shared_ptr < abstraction::OperationAbstraction > ContainerRegistry::SetEntr return std::make_shared < abstraction::SetAbstraction < Param > > ( ); } -template < class Param > -std::shared_ptr < abstraction::OperationAbstraction > ContainerRegistry::SetEntryImpl < Param >::getAbstraction ( const std::string & filename ) const { - ext::deque < sax::Token > tokens = sax::FromXMLParserHelper::parseInput ( filename ); - return std::make_shared < abstraction::XmlParserAbstraction < ext::set < Param > > > ( std::move ( tokens ) ); -} - } /* namespace abstraction */ #endif /* _CONTAINER_REGISTRY_HPP_ */ diff --git a/alib2common/src/abstraction/PrimitiveRegistrator.cpp b/alib2common/src/abstraction/PrimitiveRegistrator.cpp index fa16f2a902..9e1c09738f 100644 --- a/alib2common/src/abstraction/PrimitiveRegistrator.cpp +++ b/alib2common/src/abstraction/PrimitiveRegistrator.cpp @@ -6,8 +6,6 @@ */ #include <abstraction/CastRegistry.hpp> -#include <abstraction/XmlFileWriterRegistry.hpp> -#include <abstraction/XmlParserRegistry.hpp> #include <abstraction/NormalizeRegistry.hpp> #include <abstraction/ValuePrinterRegistry.hpp> #include <abstraction/ImmediateRegistry.hpp> @@ -20,10 +18,7 @@ #include <primitive/UnsignedLong.h> #include <primitive/String.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsSet.h> - -namespace abstraction { +namespace { class PrimitiveRegistrator { public: @@ -47,20 +42,6 @@ public: abstraction::ContainerRegistry::registerSet < int > ( ); - abstraction::XmlParserRegistry::registerXmlParser < int > ( "int" ); - - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < bool > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < int > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < double > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < std::string > ( ); - - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::vector < size_t > > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::vector < unsigned > > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::vector < int > > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::set < size_t > > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::set < unsigned > > ( ); - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::set < int > > ( ); - abstraction::ValuePrinterRegistry::registerValuePrinter < int > ( ); abstraction::ValuePrinterRegistry::registerValuePrinter < double > ( ); abstraction::ValuePrinterRegistry::registerValuePrinter < std::string > ( ); @@ -73,4 +54,4 @@ public: auto primitiveRegistrator = PrimitiveRegistrator ( ); -} /* namespace abstraction */ +} /* namespace */ diff --git a/alib2common/src/abstraction/Registry.cpp b/alib2common/src/abstraction/Registry.cpp index 500a7e06c3..48b58db362 100644 --- a/alib2common/src/abstraction/Registry.cpp +++ b/alib2common/src/abstraction/Registry.cpp @@ -9,9 +9,6 @@ #include <abstraction/AlgorithmRegistry.hpp> #include <abstraction/ImmediateRegistry.hpp> -#include <abstraction/XmlParserRegistry.hpp> -#include <abstraction/XmlFileWriterRegistry.hpp> -#include <abstraction/XmlComposerRegistry.hpp> #include <abstraction/ValuePrinterRegistry.hpp> #include <abstraction/CastRegistry.hpp> #include <abstraction/NormalizeRegistry.hpp> @@ -30,14 +27,6 @@ ext::set < std::string > Registry::listAlgorithms ( ) { return AlgorithmRegistry::list ( ); } -ext::set < std::string > Registry::listDataTypes ( ) { - return XmlFileWriterRegistry::list ( ); -} - -ext::set < std::string > Registry::listDataTypeGroup ( const std::string & group ) { - return XmlFileWriterRegistry::listGroup ( group ); -} - ext::set < std::string > Registry::listCastsFrom ( const std::string & type ) { return CastRegistry::listFrom ( type ); } @@ -62,10 +51,6 @@ std::shared_ptr < abstraction::OperationAbstraction > Registry::getContainerAbst return ContainerRegistry::getAbstraction ( container, type ); } -std::shared_ptr < abstraction::OperationAbstraction > Registry::getContainerAbstraction ( const std::string & container, const std::string & type, const std::string & filename ) { - return ContainerRegistry::getAbstraction ( container, type, filename ); -} - std::shared_ptr < abstraction::OperationAbstraction > Registry::getAlgorithmAbstraction ( const std::string & name, const ext::vector < std::string > & paramTypes, AlgorithmCategories::AlgorithmCategory category ) { return AlgorithmRegistry::getAbstraction ( name, paramTypes, category ); } @@ -98,16 +83,4 @@ std::shared_ptr < abstraction::OperationAbstraction > Registry::getValuePrinterA return ValuePrinterRegistry::getAbstraction ( param, os ); } -std::shared_ptr < abstraction::OperationAbstraction > Registry::getXmlFileWriterAbstraction ( const std::string & param, std::string filename ) { - return XmlFileWriterRegistry::getAbstraction ( param, std::move ( filename ) ); -} - -std::shared_ptr < abstraction::OperationAbstraction > Registry::getXmlComposerAbstraction ( const std::string & param ) { - return XmlComposerRegistry::getAbstraction ( param ); -} - -std::shared_ptr < abstraction::OperationAbstraction > Registry::getXmlParserAbstraction ( const std::string & typeName, ext::deque < sax::Token > tokens ) { - return XmlParserRegistry::getAbstraction ( typeName, std::move ( tokens ) ); -} - } /* namespace abstraction */ diff --git a/alib2common/src/abstraction/Registry.h b/alib2common/src/abstraction/Registry.h index 8da6504e69..9c7fd569c1 100644 --- a/alib2common/src/abstraction/Registry.h +++ b/alib2common/src/abstraction/Registry.h @@ -12,6 +12,8 @@ #include <abstraction/common/ParamQualifiers.hpp> #include <abstraction/common/AlgorithmCategories.hpp> +#include <pair> + namespace abstraction { class Registry { @@ -19,9 +21,6 @@ public: static ext::set < std::string > listAlgorithmGroup ( const std::string & group ); static ext::set < std::string > listAlgorithms ( ); - static ext::set < std::string > listDataTypes ( ); - static ext::set < std::string > listDataTypeGroup ( const std::string & group ); - static ext::set < std::string > listCastsFrom ( const std::string & type ); static ext::set < std::string > listCastsTo ( const std::string & type ); static ext::set < ext::pair < std::string, std::string > > listCasts ( ); @@ -31,7 +30,6 @@ public: static ext::set < ext::pair < std::string, ext::set < std::string > > > listNames ( ); static std::shared_ptr < abstraction::OperationAbstraction > getContainerAbstraction ( const std::string & container, const std::string & type ); - static std::shared_ptr < abstraction::OperationAbstraction > getContainerAbstraction ( const std::string & container, const std::string & type, const std::string & filename ); static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( const std::string & name, const ext::vector < std::string > & paramTypes, AlgorithmCategories::AlgorithmCategory ); static std::shared_ptr < abstraction::OperationAbstraction > getAlgorithmAbstraction ( const std::string & name, const ext::vector < std::string > & paramTypes, AlgorithmCategories::AlgorithmCategory, bool & unwrap, bool & normalize ); static std::shared_ptr < abstraction::OperationAbstraction > getCastAbstraction ( const std::string & target, const std::string & param, bool & normalize ); @@ -40,9 +38,6 @@ public: static std::shared_ptr < abstraction::OperationAbstraction > getNormalizeAbstraction ( const std::string & param ); static std::shared_ptr < abstraction::OperationAbstraction > getDowncastAbstraction ( const std::string & concrete, const std::string & base ); static std::shared_ptr < abstraction::OperationAbstraction > getValuePrinterAbstraction ( const std::string & param, std::ostream & os ); - static std::shared_ptr < abstraction::OperationAbstraction > getXmlFileWriterAbstraction ( const std::string & param, std::string filename ); - static std::shared_ptr < abstraction::OperationAbstraction > getXmlComposerAbstraction ( const std::string & param ); - static std::shared_ptr < abstraction::OperationAbstraction > getXmlParserAbstraction ( const std::string & typeName, ext::deque < sax::Token > tokens ); }; } /* namespace abstraction */ diff --git a/alib2common/src/abstraction/common/AlgorithmCategories.cpp b/alib2common/src/abstraction/common/AlgorithmCategories.cpp index 359aa01552..ddb55a5ac8 100644 --- a/alib2common/src/abstraction/common/AlgorithmCategories.cpp +++ b/alib2common/src/abstraction/common/AlgorithmCategories.cpp @@ -1,4 +1,5 @@ #include <abstraction/common/AlgorithmCategories.hpp> +#include <exception/CommonException.h> namespace abstraction { @@ -39,31 +40,3 @@ std::ostream & operator << ( std::ostream & os, AlgorithmCategories::AlgorithmCa } } /* namespace abstraction */ - -namespace alib { - -abstraction::AlgorithmCategories::AlgorithmCategory xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - std::string data = sax::FromXMLParserHelper::popTokenData(input, sax::Token::TokenType::CHARACTER); - abstraction::AlgorithmCategories::AlgorithmCategory res = abstraction::AlgorithmCategories::algorithmCategory ( data ); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - - return res; -} - -bool xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -std::string xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::xmlTagName ( ) { - return "AlgorithmCategory"; -} - -void xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::compose ( ext::deque < sax::Token > & out, abstraction::AlgorithmCategories::AlgorithmCategory category ) { - out.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT); - out.emplace_back ( abstraction::AlgorithmCategories::toString ( category ), sax::Token::TokenType::CHARACTER); - out.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT); -} - -} /* namespace alib */ diff --git a/alib2common/src/abstraction/common/AlgorithmCategories.hpp b/alib2common/src/abstraction/common/AlgorithmCategories.hpp index 9faf9e251e..f534e9d4e2 100644 --- a/alib2common/src/abstraction/common/AlgorithmCategories.hpp +++ b/alib2common/src/abstraction/common/AlgorithmCategories.hpp @@ -1,9 +1,6 @@ #ifndef _ALGORITHM_CATEGORY_HPP_ #define _ALGORITHM_CATEGORY_HPP_ -#include <set> -#include <type_traits> -#include <core/xmlApi.hpp> #include <string> namespace abstraction { @@ -28,16 +25,4 @@ std::ostream & operator << ( std::ostream & os, AlgorithmCategories::AlgorithmCa } /* namespace abstraction */ -namespace alib { - -template < > -struct xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory > { - static abstraction::AlgorithmCategories::AlgorithmCategory parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static std::string xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, abstraction::AlgorithmCategories::AlgorithmCategory category ); -}; - -} /* namespace alib */ - #endif // _ALGORITHM_CATEGORY_HPP_ diff --git a/alib2common/src/abstraction/common/ParamQualifiers.hpp b/alib2common/src/abstraction/common/ParamQualifiers.hpp index ed5b151384..ab729b9dd0 100644 --- a/alib2common/src/abstraction/common/ParamQualifiers.hpp +++ b/alib2common/src/abstraction/common/ParamQualifiers.hpp @@ -3,8 +3,6 @@ #include <set> #include <type_traits> -#include <core/xmlApi.hpp> -#include <string> namespace abstraction { @@ -35,16 +33,4 @@ public: } /* namespace abstraction */ -namespace alib { - -template < > -struct xmlApi < abstraction::ParamQualifiers::ParamQualifier > { - static abstraction::ParamQualifiers::ParamQualifier parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static std::string xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, abstraction::ParamQualifiers::ParamQualifier ); -}; - -} /* namespace alib */ - #endif // _PARAM_QUALIFIERS_HPP_ diff --git a/alib2common/src/container/ObjectsBitset.h b/alib2common/src/container/ObjectsBitset.h deleted file mode 100644 index a64289a770..0000000000 --- a/alib2common/src/container/ObjectsBitset.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Tuple.h - * - * Created on: May 4, 2017 - * Author: Jan Travnicek - */ - -#ifndef OBJECTS_BITSET_H_ -#define OBJECTS_BITSET_H_ - -#include <bitset> -#include <string> - -#include <core/xmlApi.hpp> -#include <exception/CommonException.h> - -#include <primitive/Bool.h> - -namespace container { - -/** - * Basic container from which are derived all other containers. - * Contains reason why the container occurred. - */ -class ObjectsBitset { -private: - explicit ObjectsBitset ( ); - -public: - static const std::string & getXmlTagName() { - static std::string xmlTagName = "Bitset"; - - return xmlTagName; - } - - template < size_t N > - static ext::bitset < N > parseRaw ( ext::deque < sax::Token >::iterator & input ); - - template < size_t N > - static void compose ( ext::deque < sax::Token > & out, const ext::bitset < N > & input ); -}; - - - -template < size_t N > -ext::bitset < N > ObjectsBitset::parseRaw ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, ObjectsBitset::getXmlTagName() ); - - ext::bitset < N > res; - - for ( size_t i = 0; i < N; ++i ) - res [ i ] = alib::xmlApi < bool >::parse ( input ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, ObjectsBitset::getXmlTagName() ); - - return res; -} - -template < size_t N > -void ObjectsBitset::compose ( ext::deque < sax::Token > & out, const ext::bitset < N > & container ) { - out.emplace_back ( ObjectsBitset::getXmlTagName(), sax::Token::TokenType::START_ELEMENT ); - - for ( size_t i = 0; i < N; ++i ) - alib::xmlApi < bool >::compose ( out, container [ i ] ); - - out.emplace_back ( ObjectsBitset::getXmlTagName(), sax::Token::TokenType::END_ELEMENT ); -} - -} /* namespace container */ - -namespace alib { - -template < size_t N > -struct xmlApi < ext::bitset < N > > { - static ext::bitset < N > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static std::string xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::bitset < N > & data ); -}; - -template < size_t N > -ext::bitset < N > xmlApi < ext::bitset < N > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsBitset::parseRaw < N > ( input ); -} - -template < size_t N > -bool xmlApi < ext::bitset < N > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); -} - -template < size_t N > -std::string xmlApi < ext::bitset < N > >::xmlTagName ( ) { - return container::ObjectsBitset::getXmlTagName(); -} - -template < size_t N > -void xmlApi < ext::bitset < N > >::compose ( ext::deque < sax::Token > & output, const ext::bitset < N > & input ) { - return container::ObjectsBitset::compose < N > ( output, input ); -} - -} /* namespace alib */ - -#endif /* OBJECTS_BITSET_H_ */ diff --git a/alib2common/src/container/ObjectsDeque.cpp b/alib2common/src/container/ObjectsDeque.cpp index 136de63da1..97a3852156 100644 --- a/alib2common/src/container/ObjectsDeque.cpp +++ b/alib2common/src/container/ObjectsDeque.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsDeque.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsDeque < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsDeque < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsDeque < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsDeque < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsDeque < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsDeque.h b/alib2common/src/container/ObjectsDeque.h index 7a2ae3acc1..86142b77a1 100644 --- a/alib2common/src/container/ObjectsDeque.h +++ b/alib2common/src/container/ObjectsDeque.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -100,77 +99,6 @@ alib::ObjectBase* ObjectsDeque < ElementType >::inc() && { namespace alib { -template < typename T > -struct xmlApi < ext::deque < T > > { - static ext::deque < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::deque < T > & data ); -}; - -template < typename T > -ext::deque < T > xmlApi < ext::deque < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - ext::deque < T > set; - - while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) - set.push_back ( alib::xmlApi < T >::parse ( input ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return set; -} - -template < typename T > -bool xmlApi < ext::deque < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T > -const std::string & xmlApi < ext::deque < T > >::xmlTagName ( ) { - static std::string xmlTagName = "Deque"; - - return xmlTagName; -} - -template < typename T > -void xmlApi < ext::deque < T > >::compose ( ext::deque < sax::Token > & output, const ext::deque < T > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - - for ( const T & item : input ) - alib::xmlApi < T >::compose ( output, item ); - - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T > -struct xmlApi < container::ObjectsDeque < T > > { - static container::ObjectsDeque < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsDeque < T > & data ); -}; - -template < typename T > -container::ObjectsDeque < T > xmlApi < container::ObjectsDeque < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsDeque < T > ( xmlApi < ext::deque < T > >::parse ( input ) ); -} - -template < typename T > -bool xmlApi < container::ObjectsDeque < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return xmlApi < ext::deque < T > >::first ( input ); -} - -template < typename T > -const std::string & xmlApi < container::ObjectsDeque < T > >::xmlTagName ( ) { - return xmlApi < ext::deque < T > >::xmlTagName ( ); -} - -template < typename T > -void xmlApi < container::ObjectsDeque < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsDeque < T > & input ) { - return xmlApi < ext::deque < T > >::compose ( output, input ); -} - template < > struct normalize < ext::deque < alib::Object > > { static ext::deque < alib::Object > && eval ( ext::deque < alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsList.cpp b/alib2common/src/container/ObjectsList.cpp index 9b3e430354..733a9c663e 100644 --- a/alib2common/src/container/ObjectsList.cpp +++ b/alib2common/src/container/ObjectsList.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsList.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsList < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsList < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsList < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsList < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsList < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsList.h b/alib2common/src/container/ObjectsList.h index a80fc01d9d..1c1646ffc9 100644 --- a/alib2common/src/container/ObjectsList.h +++ b/alib2common/src/container/ObjectsList.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -100,77 +99,6 @@ alib::ObjectBase* ObjectsList < ElementType >::inc() && { namespace alib { -template < typename T > -struct xmlApi < ext::list < T > > { - static ext::list < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::list < T > & data ); -}; - -template < typename T > -ext::list < T > xmlApi < ext::list < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - ext::list < T > set; - - while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) - set.push_back ( alib::xmlApi < T >::parse ( input ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return set; -} - -template < typename T > -bool xmlApi < ext::list < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T > -const std::string & xmlApi < ext::list < T > >::xmlTagName ( ) { - static std::string xmlTagName = "List"; - - return xmlTagName; -} - -template < typename T > -void xmlApi < ext::list < T > >::compose ( ext::deque < sax::Token > & output, const ext::list < T > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - - for ( const T & item : input ) - alib::xmlApi < T >::compose ( output, item ); - - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T > -struct xmlApi < container::ObjectsList < T > > { - static container::ObjectsList < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsList < T > & data ); -}; - -template < typename T > -container::ObjectsList < T > xmlApi < container::ObjectsList < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsList < T > ( xmlApi < ext::list < T > >::parse ( input ) ); -} - -template < typename T > -bool xmlApi < container::ObjectsList < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return xmlApi < ext::list < T > >::first ( input ); -} - -template < typename T > -const std::string & xmlApi < container::ObjectsList < T > >::xmlTagName ( ) { - return xmlApi < ext::list < T > >::xmlTagName ( ); -} - -template < typename T > -void xmlApi < container::ObjectsList < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsList < T > & input ) { - return xmlApi < ext::list < T > >::compose ( output, input ); -} - template < > struct normalize < ext::list < alib::Object > > { static ext::list < alib::Object > && eval ( ext::list < alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsMap.cpp b/alib2common/src/container/ObjectsMap.cpp index 70b1abe6fa..2473efec59 100644 --- a/alib2common/src/container/ObjectsMap.cpp +++ b/alib2common/src/container/ObjectsMap.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsMap.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsMap < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsMap < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsMap < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsMap < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsMap < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsMap.h b/alib2common/src/container/ObjectsMap.h index eade458d38..7ecf0540d2 100644 --- a/alib2common/src/container/ObjectsMap.h +++ b/alib2common/src/container/ObjectsMap.h @@ -15,12 +15,9 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> -#include "ObjectsPair.h" - #include <core/normalize.hpp> namespace container { @@ -103,77 +100,6 @@ alib::ObjectBase* ObjectsMap < KeyType, ValueType >::inc() && { namespace alib { -template < typename T, typename R > -struct xmlApi < ext::map < T, R > > { - static ext::map < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::map < T, R > & data ); -}; - -template < typename T, typename R > -ext::map < T, R > xmlApi < ext::map < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - ext::map < T, R > map; - - while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) - map.insert ( alib::xmlApi < ext::pair < T, R > >::parse ( input ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return map; -} - -template < typename T, typename R > -bool xmlApi < ext::map < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T, typename R > -const std::string & xmlApi < ext::map < T, R > >::xmlTagName ( ) { - static std::string xmlTagName = "Map"; - - return xmlTagName; -} - -template < typename T, typename R > -void xmlApi < ext::map < T, R > >::compose ( ext::deque < sax::Token > & output, const ext::map < T, R > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - - for ( const std::pair < const T, R > & item : input ) - alib::xmlApi < ext::pair < const T, R > >::compose ( output, item ); - - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T, typename R > -struct xmlApi < container::ObjectsMap < T, R > > { - static container::ObjectsMap < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsMap < T, R > & data ); -}; - -template < typename T, typename R > -container::ObjectsMap < T, R > xmlApi < container::ObjectsMap < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsMap < T, R > ( xmlApi < ext::map < T, R > >::parse ( input ) ); -} - -template < typename T, typename R > -bool xmlApi < container::ObjectsMap < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T, typename R > -const std::string & xmlApi < container::ObjectsMap < T, R > >::xmlTagName ( ) { - return xmlApi < ext::map < T, R > >::xmlTagName ( ); -} - -template < typename T, typename R > -void xmlApi < container::ObjectsMap < T, R > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsMap < T, R > & input ) { - xmlApi < ext::map < T, R > >::compose ( output, input ); -} - template < > struct normalize < ext::map < alib::Object, alib::Object > > { static ext::map < alib::Object, alib::Object > && eval ( ext::map < alib::Object, alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsPair.cpp b/alib2common/src/container/ObjectsPair.cpp index b604eadfa8..84cc357b1c 100644 --- a/alib2common/src/container/ObjectsPair.cpp +++ b/alib2common/src/container/ObjectsPair.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsPair.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsPair < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsPair < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsPair < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsPair < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsPair < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsPair.h b/alib2common/src/container/ObjectsPair.h index ff7ac257bf..d35d354aa3 100644 --- a/alib2common/src/container/ObjectsPair.h +++ b/alib2common/src/container/ObjectsPair.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -101,82 +100,6 @@ alib::ObjectBase* ObjectsPair < FirstType, SecondType >::inc() && { namespace alib { -template < typename T, typename R > -struct xmlApi < ext::pair < T, R > > { - static ext::pair < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::pair < T, R > & data ); - static void compose ( ext::deque < sax::Token > & output, const std::pair < T, R > & data ); -}; - -template < typename T, typename R > -ext::pair < T, R > xmlApi < ext::pair < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - T first = alib::xmlApi < T >::parse ( input ); - R second = alib::xmlApi < R >::parse ( input ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - - return ext::make_pair ( std::move ( first ), std::move ( second ) ); -} - -template < typename T, typename R > -bool xmlApi < ext::pair < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T, typename R > -const std::string & xmlApi < ext::pair < T, R > >::xmlTagName ( ) { - static std::string xmlTagName = "Pair"; - - return xmlTagName; -} - -template < typename T, typename R > -void xmlApi < ext::pair < T, R > >::compose ( ext::deque < sax::Token > & output, const ext::pair < T, R > & input ) { - compose ( output, static_cast < const std::pair < T, R > > ( input ) ); -} - -template < typename T, typename R > -void xmlApi < ext::pair < T, R > >::compose ( ext::deque < sax::Token > & output, const std::pair < T, R > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - - alib::xmlApi < typename std::decay < T >::type >::compose ( output, input.first ); - alib::xmlApi < R >::compose ( output, input.second ); - - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T, typename R > -struct xmlApi < container::ObjectsPair < T, R > > { - static container::ObjectsPair < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsPair < T, R > & data ); -}; - -template < typename T, typename R > -container::ObjectsPair < T, R > xmlApi < container::ObjectsPair < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsPair < T, R > ( xmlApi < ext::pair < T, R > >::parse ( input ) ); -} - -template < typename T, typename R > -bool xmlApi < container::ObjectsPair < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return xmlApi < ext::pair < T, R > >::first ( input ); -} - -template < typename T, typename R > -const std::string & xmlApi < container::ObjectsPair < T, R > >::xmlTagName ( ) { - return xmlApi < ext::pair < T, R > >::xmlTagName ( ); -} - -template < typename T, typename R > -void xmlApi < container::ObjectsPair < T, R > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsPair < T, R > & input ) { - xmlApi < ext::pair < T, R > >::compose ( output, input ); -} - template < > struct normalize < std::pair < alib::Object, alib::Object > > { static std::pair < alib::Object, alib::Object > && eval ( std::pair < alib::Object, alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsSet.cpp b/alib2common/src/container/ObjectsSet.cpp index 5b46bdf26c..e2b7f57e08 100644 --- a/alib2common/src/container/ObjectsSet.cpp +++ b/alib2common/src/container/ObjectsSet.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsSet.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsSet < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsSet < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsSet < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsSet < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsSet < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsSet.h b/alib2common/src/container/ObjectsSet.h index 5eefd37f57..1fc34c166a 100644 --- a/alib2common/src/container/ObjectsSet.h +++ b/alib2common/src/container/ObjectsSet.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -101,77 +100,6 @@ alib::ObjectBase* ObjectsSet < ElementType >::inc() && { namespace alib { -template < typename T > -struct xmlApi < ext::set < T > > { - static ext::set < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::set < T > & data ); -}; - -template < typename T > -ext::set < T > xmlApi < ext::set < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - ext::set < T > set; - - while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) - set.insert ( alib::xmlApi < T >::parse ( input ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return set; -} - -template < typename T > -bool xmlApi < ext::set < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T > -const std::string & xmlApi < ext::set < T > >::xmlTagName ( ) { - static std::string xmlTagName = "Set"; - - return xmlTagName; -} - -template < typename T > -void xmlApi < ext::set < T > >::compose ( ext::deque < sax::Token > & output, const ext::set < T > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - - for ( const T & item : input ) - alib::xmlApi < T >::compose ( output, item ); - - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T > -struct xmlApi < container::ObjectsSet < T > > { - static container::ObjectsSet < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsSet < T > & data ); -}; - -template < typename T > -container::ObjectsSet < T > xmlApi < container::ObjectsSet < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsSet < T > ( xmlApi < ext::set < T > >::parse ( input ) ); -} - -template < typename T > -bool xmlApi < container::ObjectsSet < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return xmlApi < ext::set < T > >::first ( input ); -} - -template < typename T > -const std::string & xmlApi < container::ObjectsSet < T > >::xmlTagName ( ) { - return xmlApi < ext::set < T > >::xmlTagName ( ); -} - -template < typename T > -void xmlApi < container::ObjectsSet < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsSet < T > & input ) { - return xmlApi < ext::set < T > >::compose ( output, input ); -} - template < > struct normalize < ext::set < alib::Object > > { static ext::set < alib::Object > && eval ( ext::set < alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsTree.cpp b/alib2common/src/container/ObjectsTree.cpp index d3b81dffbc..bc2c842fca 100644 --- a/alib2common/src/container/ObjectsTree.cpp +++ b/alib2common/src/container/ObjectsTree.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsTree.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsTree < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsTree < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsTree < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsTree < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsTree < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsTree.h b/alib2common/src/container/ObjectsTree.h index 1fc52342c2..c88821d4bb 100644 --- a/alib2common/src/container/ObjectsTree.h +++ b/alib2common/src/container/ObjectsTree.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -95,116 +94,6 @@ alib::ObjectBase* ObjectsTree < ElementType >::inc() && { namespace alib { -template < typename T > -struct xmlApi < ext::tree < T > > { - static ext::tree < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::tree < T > & data ); -}; - -template < typename T > -ext::tree < T > xmlApi < ext::tree < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "Root" ); - - ext::tree < T > tree ( alib::xmlApi < T >::parse ( input ) ); - - typename ext::tree < T >::const_children_iterator under = tree.root ( ); - - unsigned level = 0; - - while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) { - if ( sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, "Children" ) ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "Children" ); - - if ( level > 0 ) - under = std::prev ( under->end ( ) ); - - ++level; - } - - tree.push_back ( under, alib::xmlApi < T >::parse ( input ) ); - - while ( sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::END_ELEMENT, "Children" ) ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, "Children" ); - - under = under->parent ( ); - --level; - } - } - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, "Root" ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return tree; -} - -template < typename T > -bool xmlApi < ext::tree < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T > -const std::string & xmlApi < ext::tree < T > >::xmlTagName ( ) { - static std::string xmlTagName = "Tree"; - - return xmlTagName; -} - -template < typename T > -void xmlApi < ext::tree < T > >::compose ( ext::deque < sax::Token > & output, const ext::tree < T > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( "Root", sax::Token::TokenType::START_ELEMENT ); - - unsigned level = 0; - - for ( typename ext::tree < T >::const_prefix_iterator iter = input.prefix_begin ( ); iter != input.prefix_end ( ); ) { - while ( iter.getLevel ( ) > level ) { - output.emplace_back ( "Children", sax::Token::TokenType::START_ELEMENT ); - ++level; - } - - alib::xmlApi < T >::compose ( output, * iter ); - ++iter; - - while ( iter.getLevel ( ) < level ) { - output.emplace_back ( "Children", sax::Token::TokenType::END_ELEMENT ); - --level; - } - } - - output.emplace_back ( "Root", sax::Token::TokenType::END_ELEMENT ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T > -struct xmlApi < container::ObjectsTree < T > > { - static container::ObjectsTree < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsTree < T > & data ); -}; - -template < typename T > -container::ObjectsTree < T > xmlApi < container::ObjectsTree < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsTree < T > ( xmlApi < ext::tree < T > >::parse ( input ) ); -} - -template < typename T > -bool xmlApi < container::ObjectsTree < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return xmlApi < ext::tree < T > >::first ( input ); -} - -template < typename T > -const std::string & xmlApi < container::ObjectsTree < T > >::xmlTagName ( ) { - return xmlApi < ext::tree < T > >::xmlTagName ( ); -} - -template < typename T > -void xmlApi < container::ObjectsTree < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsTree < T > & input ) { - return xmlApi < ext::tree < T > >::compose ( output, input ); -} - template < > struct normalize < ext::tree < alib::Object > > { static ext::tree < alib::Object > && eval ( ext::tree < alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsTrie.cpp b/alib2common/src/container/ObjectsTrie.cpp index 967cebb72f..12c1453f22 100644 --- a/alib2common/src/container/ObjectsTrie.cpp +++ b/alib2common/src/container/ObjectsTrie.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsTrie.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsTrie < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsTrie < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsTrie < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsTrie < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsTrie < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsTrie.h b/alib2common/src/container/ObjectsTrie.h index 5454767293..515894b3bb 100644 --- a/alib2common/src/container/ObjectsTrie.h +++ b/alib2common/src/container/ObjectsTrie.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -95,110 +94,6 @@ alib::ObjectBase* ObjectsTrie < KeyType, ValueType >::inc() && { namespace alib { -template < typename T, typename R > -struct xmlApi < ext::trie < T, R > > { - static ext::trie < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::trie < T, R > & data ); - -private: - static ext::map < T, ext::trie < T, R > > parseChildren ( ext::deque < sax::Token >::iterator & input ); - static void composeChildren ( ext::deque < sax::Token > & out, const ext::map < T, ext::trie < T, R > > & children ); -}; - -template < typename T, typename R > -ext::map < T, ext::trie < T, R > > xmlApi < ext::trie < T, R > >::parseChildren ( ext::deque < sax::Token >::iterator & input ) { - ext::map < T, ext::trie < T, R > > children; - - while ( sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, "Child" ) ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "Child" ); - - T key = alib::xmlApi < T >::parse ( input ); - R value = alib::xmlApi < R >::parse ( input ); - ext::map < T, ext::trie < T, R > > innerChildren = parseChildren ( input ); - - children.insert ( std::make_pair ( std::move ( key ), ext::trie < T, R > ( std::move ( value ), std::move ( innerChildren ) ) ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, "Child" ); - } - - return children; -} - -template < typename T, typename R > -ext::trie < T, R > xmlApi < ext::trie < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - R value = alib::xmlApi < R >::parse ( input ); - ext::map < T, ext::trie < T, R > > children = parseChildren ( input ); - - ext::trie < T, R > trie ( std::move ( value ), std::move ( children ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return trie; -} - -template < typename T, typename R > -bool xmlApi < ext::trie < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T, typename R > -const std::string & xmlApi < ext::trie < T, R > >::xmlTagName ( ) { - static std::string xmlTagName = "Trie"; - - return xmlTagName; -} - -template < typename T, typename R > -void xmlApi < ext::trie < T, R > >::composeChildren ( ext::deque < sax::Token > & out, const ext::map < T, ext::trie < T, R > > & children ) { - for ( const std::pair < const T, ext::trie < T, R > > & child : children ) { - out.emplace_back ( "Child", sax::Token::TokenType::START_ELEMENT ); - - alib::xmlApi < T >::compose ( out, child.first ); - alib::xmlApi < R >::compose ( out, child.second.getData ( ) ); - composeChildren ( out, child.second.getChildren ( ) ); - - out.emplace_back ( "Child", sax::Token::TokenType::END_ELEMENT ); - } -} - -template < typename T, typename R > -void xmlApi < ext::trie < T, R > >::compose ( ext::deque < sax::Token > & output, const ext::trie < T, R > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - alib::xmlApi < R >::compose ( output, input.getData ( ) ); - composeChildren ( output, input.getChildren ( ) ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T, typename R > -struct xmlApi < container::ObjectsTrie < T, R > > { - static container::ObjectsTrie < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsTrie < T, R > & data ); -}; - -template < typename T, typename R > -container::ObjectsTrie < T, R > xmlApi < container::ObjectsTrie < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsTrie < T, R > ( xmlApi < ext::trie < T, R > >::parse ( input ) ); -} - -template < typename T, typename R > -bool xmlApi < container::ObjectsTrie < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T, typename R > -const std::string & xmlApi < container::ObjectsTrie < T, R > >::xmlTagName ( ) { - return xmlApi < ext::trie < T, R > >::xmlTagName ( ); -} - -template < typename T, typename R > -void xmlApi < container::ObjectsTrie < T, R > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsTrie < T, R > & input ) { - xmlApi < ext::trie < T, R > >::compose ( output, input ); -} - template < > struct normalize < ext::trie < alib::Object, alib::Object > > { static ext::trie < alib::Object, alib::Object > && eval ( ext::trie < alib::Object, alib::Object > && source ) { diff --git a/alib2common/src/container/ObjectsTuple.h b/alib2common/src/container/ObjectsTuple.h deleted file mode 100644 index d9fe8a0ccb..0000000000 --- a/alib2common/src/container/ObjectsTuple.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Tuple.h - * - * Created on: May 6, 2016 - * Author: Jan Travnicek - */ - -#ifndef OBJECTS_TUPLE_H_ -#define OBJECTS_TUPLE_H_ - -#include <tuple> -#include <string> - -#include <core/xmlApi.hpp> -#include <exception/CommonException.h> - -namespace container { - -/** - * Basic container from which are derived all other containers. - * Contains reason why the container occurred. - */ -class ObjectsTuple { -private: - explicit ObjectsTuple ( ); - -public: - static const std::string & getXmlTagName() { - static std::string xmlTagName = "Tuple"; - - return xmlTagName; - } - - template < class ... Ts > - static ext::tuple < Ts ... > parseRaw ( ext::deque < sax::Token >::iterator & input ); - - template < class ... Ts > - static void compose ( ext::deque < sax::Token > & out, const ext::tuple < Ts ... > & input ); -}; - - - -template < typename ... Ts > -ext::tuple < Ts ... > ObjectsTuple::parseRaw ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, ObjectsTuple::getXmlTagName() ); - - ext::tuple < Ts ... > res { alib::xmlApi < Ts >::parse ( input ) ... }; // NOTE buggy in gcc < 4.9.1 - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, ObjectsTuple::getXmlTagName() ); - - return res; -} - -template < class ... Ts, size_t ... I > -void tupleComposeHelper ( ext::deque < sax::Token > & out, const ext::tuple < Ts ... > & container, std::index_sequence < I ... > ) { - ( void ) std::initializer_list < int > { ( alib::xmlApi < Ts >::compose ( out, std::get < I > ( container ) ), 0 ) ... }; // FEATURE unpack of multiple packs together -} - -template < typename ... Ts > -void ObjectsTuple::compose ( ext::deque < sax::Token > & out, const ext::tuple < Ts ... > & container ) { - out.emplace_back ( ObjectsTuple::getXmlTagName(), sax::Token::TokenType::START_ELEMENT ); - - tupleComposeHelper ( out, container, std::make_index_sequence < ext::tuple_size < ext::tuple < Ts ... > >::value > { } ); - - out.emplace_back ( ObjectsTuple::getXmlTagName(), sax::Token::TokenType::END_ELEMENT ); -} - -} /* namespace container */ - -namespace alib { - -template < typename ... Ts > -struct xmlApi < ext::tuple < Ts ... > > { - static ext::tuple < Ts ... > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static std::string xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::tuple < Ts ... > & data ); -}; - -template < typename ... Ts > -ext::tuple < Ts ... > xmlApi < ext::tuple < Ts ... > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsTuple::parseRaw < Ts ... > ( input ); -} - -template < typename ... Ts > -bool xmlApi < ext::tuple < Ts ... > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); -} - -template < typename ... Ts > -std::string xmlApi < ext::tuple < Ts ... > >::xmlTagName ( ) { - return container::ObjectsTuple::getXmlTagName(); -} - -template < typename ... Ts > -void xmlApi < ext::tuple < Ts ... > >::compose ( ext::deque < sax::Token > & output, const ext::tuple < Ts ... > & input ) { - return container::ObjectsTuple::compose < Ts ... > ( output, input ); -} - -} /* namespace alib */ - -#endif /* OBJECTS_TUPLE_H_ */ diff --git a/alib2common/src/container/ObjectsVector.cpp b/alib2common/src/container/ObjectsVector.cpp index dc3b27daeb..815b2ee386 100644 --- a/alib2common/src/container/ObjectsVector.cpp +++ b/alib2common/src/container/ObjectsVector.cpp @@ -6,19 +6,10 @@ */ #include "ObjectsVector.h" -#include "Container.h" - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsVector < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsVector < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsVector < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsVector < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsVector < > > ( ); - } /* namespace */ diff --git a/alib2common/src/container/ObjectsVector.h b/alib2common/src/container/ObjectsVector.h index acedb19d74..15c0537f0e 100644 --- a/alib2common/src/container/ObjectsVector.h +++ b/alib2common/src/container/ObjectsVector.h @@ -15,7 +15,6 @@ #include "ContainerBase.h" #include "ContainerFeatures.h" -#include <core/xmlApi.hpp> #include <object/UniqueObject.h> #include <object/AnyObject.h> @@ -100,77 +99,6 @@ alib::ObjectBase* ObjectsVector < ElementType >::inc() && { namespace alib { -template < typename T > -struct xmlApi < ext::vector < T > > { - static ext::vector < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const ext::vector < T > & data ); -}; - -template < typename T > -ext::vector < T > xmlApi < ext::vector < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - ext::vector < T > vector; - - while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) - vector.push_back ( alib::xmlApi < T >::parse ( input ) ); - - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return vector; -} - -template < typename T > -bool xmlApi < ext::vector < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -template < typename T > -const std::string & xmlApi < ext::vector < T > >::xmlTagName ( ) { - static std::string xmlTagName = "Vector"; - - return xmlTagName; -} - -template < typename T > -void xmlApi < ext::vector < T > >::compose ( ext::deque < sax::Token > & output, const ext::vector < T > & input ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - - for ( const T & item : input ) - alib::xmlApi < T >::compose ( output, item ); - - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -template < typename T > -struct xmlApi < container::ObjectsVector < T > > { - static container::ObjectsVector < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const container::ObjectsVector < T > & data ); -}; - -template < typename T > -container::ObjectsVector < T > xmlApi < container::ObjectsVector < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsVector < T > ( xmlApi < ext::vector < T > >::parse ( input ) ); -} - -template < typename T > -bool xmlApi < container::ObjectsVector < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return xmlApi < ext::vector < T > >::first ( input ); -} - -template < typename T > -const std::string & xmlApi < container::ObjectsVector < T > >::xmlTagName ( ) { - return xmlApi < ext::vector < T > >::xmlTagName ( ); -} - -template < typename T > -void xmlApi < container::ObjectsVector < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsVector < T > & input ) { - return xmlApi < ext::vector < T > >::compose ( output, input ); -} - template < > struct normalize < ext::vector < alib::Object > > { static ext::vector < alib::Object > && eval ( ext::vector < alib::Object > && source ) { diff --git a/alib2common/src/exception/CommonException.cpp b/alib2common/src/exception/CommonException.cpp index 27ff39445c..cca1d90f47 100644 --- a/alib2common/src/exception/CommonException.cpp +++ b/alib2common/src/exception/CommonException.cpp @@ -7,17 +7,14 @@ #include "CommonException.h" -#include "../sax/FromXMLParserHelper.h" -#include "../object/Object.h" -#include "../core/xmlApi.hpp" -#include "../object/UniqueObject.h" -#include "../global/GlobalData.h" +#include <object/Object.h> +#include <object/UniqueObject.h> +#include <global/GlobalData.h> #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> #ifdef DEBUG - #include "../debug/simpleStacktrace.h" + #include <debug/simpleStacktrace.h> #endif namespace exception { @@ -84,67 +81,8 @@ alib::ObjectBase* CommonException::inc() && { } /* namespace exception */ -namespace alib { - -exception::CommonException xmlApi < exception::CommonException >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, "cause"); - std::string cause = ""; - if (input->getType() == sax::Token::TokenType::CHARACTER) { - cause = std::move(*input).moveData(); - ++input; - } - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, "cause"); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, "backtrace"); - std::string backtrace = ""; - if (input->getType() == sax::Token::TokenType::CHARACTER) { - backtrace = std::move(*input).moveData(); - ++input; - } - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, "backtrace"); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, "command"); - std::string command = ""; - if (input->getType() == sax::Token::TokenType::CHARACTER) { - command = std::move(*input).moveData(); - ++input; - } - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, "command"); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, xmlTagName()); - return exception::CommonException(std::move(cause), std::move(backtrace), std::move(command)); -} - -bool xmlApi < exception::CommonException >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < exception::CommonException >::xmlTagName ( ) { - static std::string xmlTagName = "CommonException"; - - return xmlTagName; -} - -void xmlApi < exception::CommonException >::compose ( ext::deque < sax::Token > & output, const exception::CommonException & data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( "cause", sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( data.getCause ( ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( "cause", sax::Token::TokenType::END_ELEMENT ); - output.emplace_back ( "backtrace", sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( data.getBacktrace ( ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( "backtrace", sax::Token::TokenType::END_ELEMENT ); - output.emplace_back ( "command", sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( data.getCommand ( ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( "command", sax::Token::TokenType::END_ELEMENT ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < exception::CommonException > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alib::Object, exception::CommonException > ( ); - -static auto xmlReaded = registration::XmlReaderRegister < alib::Object, exception::CommonException > ( ); - } /* namespace */ diff --git a/alib2common/src/exception/CommonException.h b/alib2common/src/exception/CommonException.h index e9bda298d7..cb827b20b4 100644 --- a/alib2common/src/exception/CommonException.h +++ b/alib2common/src/exception/CommonException.h @@ -8,7 +8,6 @@ #ifndef COMMON_EXCEPTION_H_ #define COMMON_EXCEPTION_H_ -#include <deque> #include <exception> #include <string> #include <ostream> @@ -74,18 +73,4 @@ public: } /* namespace exception */ -#include <core/xmlApi.hpp> - -namespace alib { - -template < > -struct xmlApi < exception::CommonException > { - static exception::CommonException parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const exception::CommonException & data ); -}; - -} /* namespace alib */ - #endif /* COMMON_EXCEPTION_H_ */ diff --git a/alib2common/src/measurements/MeasurementResultsXml.hpp b/alib2common/src/measurements/MeasurementResultsXml.hpp deleted file mode 100644 index 38816485da..0000000000 --- a/alib2common/src/measurements/MeasurementResultsXml.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Author: Radovan Cerveny - */ - -#ifndef MEASUREMENT_RESULTS_XML_HPP_ -#define MEASUREMENT_RESULTS_XML_HPP_ - -#include <deque> -#include "../sax/Token.h" -#include "MeasurementResults.hpp" - -namespace measurements { - -class MeasurementResultsXml { - - static std::string MEASUREMENT_RESULTS_TAG; - - static std::string MEASUREMENT_FRAME_TAG; - static std::string MEASUREMENT_FRAME_NAME_TAG; - static std::string MEASUREMENT_FRAME_TYPE_TAG; - - static std::string MEASUREMENT_SUBFRAMES_TAG; - - // TimeDataFrame - static std::string TIME_DATA_FRAME_TAG; - static std::string TIME_DATA_FRAME_DURATION_TAG; - static std::string TIME_DATA_FRAME_IN_FRAME_DURATION_TAG; - - // MemoryDataFrame - static std::string MEMORY_DATA_FRAME_TAG; - static std::string MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG; - static std::string MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG; - static std::string MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG; - static std::string MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG; - - // CounterDataFrame - static std::string COUNTER_DATA_FRAME_TAG; - static std::string COUNTER_DATA_FRAME_COUNTERS_TAG; - static std::string COUNTER_DATA_FRAME_IN_FRAME_COUNTERS_TAG; - static std::string COUNTER_DATA_FRAME_COUNTER_TAG; - static std::string COUNTER_DATA_FRAME_COUNTER_NAME_TAG; - static std::string COUNTER_DATA_FRAME_COUNTER_VALUE_TAG; - - static void composeMeasurementFrames ( ext::deque < sax::Token > &, unsigned, const stealth_vector < MeasurementFrame > & ); - static void composeTimeDataFrame ( ext::deque < sax::Token > &, unsigned, const stealth_vector < MeasurementFrame > & ); - static void composeMemoryDataFrame ( ext::deque < sax::Token > &, unsigned, const stealth_vector < MeasurementFrame > & ); - static void composeCounterDataFrame ( ext::deque < sax::Token > &, unsigned, const stealth_vector < MeasurementFrame > & ); - - static void parseRootMeasurementFrame ( MeasurementResults &, ext::deque < sax::Token >::iterator & ); - static void parseSubframes ( unsigned, MeasurementResults &, ext::deque < sax::Token >::iterator & ); - static void parseMeasurementFrame ( unsigned, MeasurementResults &, ext::deque < sax::Token >::iterator & ); - static void parseTimeDataFrame ( MeasurementFrame &, ext::deque < sax::Token >::iterator & ); - static void parseMemoryDataFrame ( MeasurementFrame &, ext::deque < sax::Token >::iterator & ); - static void parseCounterDataFrame ( MeasurementFrame &, ext::deque < sax::Token >::iterator & ); - static void parseCounterDataFrameCounters ( const std::string &, stealth_map < stealth_string, CounterHint::value_type > &, ext::deque < sax::Token >::iterator & ); - - template < typename T > - static T valueTypeFromString ( const std::string & ); - -public: - static ext::deque < sax::Token > compose ( const MeasurementResults & ); - static void compose ( const MeasurementResults &, ext::deque < sax::Token > & ); - - static MeasurementResults parse ( ext::deque < sax::Token > & ); - static MeasurementResults parse ( ext::deque < sax::Token >::iterator & ); -}; - -} - -#endif /* MEASUREMENT_RESULTS_XML_HPP_ */ diff --git a/alib2common/src/object/AnyObject.h b/alib2common/src/object/AnyObject.h index 8616e9cb8d..da352e9d81 100644 --- a/alib2common/src/object/AnyObject.h +++ b/alib2common/src/object/AnyObject.h @@ -9,12 +9,7 @@ #define ANY_OBJECT_H_ #include "ObjectBase.h" -#include <deque> -#include "../sax/Token.h" - -#include "../sax/FromXMLParserHelper.h" #include "Object.h" -#include "../core/xmlApi.hpp" #include "UniqueObject.h" namespace alib { @@ -50,8 +45,6 @@ public: virtual explicit operator std::string ( ) const; - static void compose ( ext::deque < sax::Token > & out, const AnyObject & input ); - virtual ObjectBase * inc ( ) &&; }; @@ -102,36 +95,4 @@ ObjectBase* AnyObject < T >::inc() && { } /* namespace alib */ -namespace alib { - -template < typename T > -struct xmlApi < alib::AnyObject < T > > { - static alib::AnyObject < T > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const alib::AnyObject < T > & data ); -}; - -template < typename T > -alib::AnyObject < T > xmlApi < alib::AnyObject < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return alib::AnyObject < T > ( alib::xmlApi < T >::parse ( input ) ); -} - -template < typename T > -bool xmlApi < alib::AnyObject < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return alib::xmlApi < T >::first ( input ); -} - -template < typename T > -const std::string & xmlApi < alib::AnyObject < T > >::xmlTagName ( ) { - return alib::xmlApi < T >::xmlTagName ( ); -} - -template < typename T > -void xmlApi < alib::AnyObject < T > >::compose ( ext::deque < sax::Token > & output, const alib::AnyObject < T > & input ) { - alib::xmlApi < T >::compose ( output, input.getData ( ) ); -} - -} /* namespace alib */ - #endif /* ANY_OBJECT_H_ */ diff --git a/alib2common/src/object/Object.cpp b/alib2common/src/object/Object.cpp index 33aad69593..c0848fc0ad 100644 --- a/alib2common/src/object/Object.cpp +++ b/alib2common/src/object/Object.cpp @@ -6,7 +6,6 @@ */ #include "Object.h" -#include <core/xmlApi.hpp> #include <primitive/Integer.h> #include <primitive/Character.h> #include <primitive/String.h> diff --git a/alib2common/src/object/ObjectBase.h b/alib2common/src/object/ObjectBase.h index e202b29819..94d49656bc 100644 --- a/alib2common/src/object/ObjectBase.h +++ b/alib2common/src/object/ObjectBase.h @@ -8,9 +8,7 @@ #ifndef OBJECT_BASE_H_ #define OBJECT_BASE_H_ -#include <deque> #include <memory> -#include "../sax/Token.h" #include "../base/CommonBase.hpp" namespace alib { diff --git a/alib2common/src/object/UniqueObject.cpp b/alib2common/src/object/UniqueObject.cpp index ce04d0a559..cf071ce7be 100644 --- a/alib2common/src/object/UniqueObject.cpp +++ b/alib2common/src/object/UniqueObject.cpp @@ -7,15 +7,12 @@ #include "UniqueObject.h" #include <sstream> -#include <sax/FromXMLParserHelper.h> #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alib { UniqueObject::UniqueObject(Object symbol, primitive::Integer id) : m_symbol(std::move(symbol)), m_id(std::move(id)) { - } ObjectBase* UniqueObject::clone() const { @@ -65,44 +62,8 @@ ObjectBase* UniqueObject::inc() && { } /* namespace alib */ -namespace alib { - -alib::UniqueObject xmlApi < alib::UniqueObject >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - Object firstSymbol = alib::xmlApi < Object >::parse ( input ); - primitive::Integer secondSymbol = alib::xmlApi < primitive::Integer >::parse ( input ); - - UniqueObject data ( std::move ( firstSymbol ), std::move ( secondSymbol ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < alib::UniqueObject >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < alib::UniqueObject >::xmlTagName ( ) { - static std::string xmlTagName = "UniqueObject"; - - return xmlTagName; -} - -void xmlApi < alib::UniqueObject >::compose ( ext::deque < sax::Token > & output, const alib::UniqueObject & object ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - alib::xmlApi < alib::Object >::compose ( output, object.getSymbol ( ) ); - alib::xmlApi < primitive::Integer >::compose ( output, object.getId ( ) ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < alib::UniqueObject > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alib::Object, alib::UniqueObject > ( ); - -static auto xmlReaded = registration::XmlReaderRegister < alib::Object, alib::UniqueObject > ( ); - } /* namespace */ diff --git a/alib2common/src/object/UniqueObject.h b/alib2common/src/object/UniqueObject.h index b3cb9a7328..5e8bd77393 100644 --- a/alib2common/src/object/UniqueObject.h +++ b/alib2common/src/object/UniqueObject.h @@ -58,16 +58,4 @@ public: } /* namespace alib */ -namespace alib { - -template < > -struct xmlApi < alib::UniqueObject > { - static alib::UniqueObject parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const alib::UniqueObject & data ); -}; - -} /* namespace alib */ - #endif /* UNIQUE_OBJECT_H_ */ diff --git a/alib2common/src/object/Void.cpp b/alib2common/src/object/Void.cpp index 78234a8783..e7761e5f15 100644 --- a/alib2common/src/object/Void.cpp +++ b/alib2common/src/object/Void.cpp @@ -6,12 +6,9 @@ */ #include "Void.h" -#include "../sax/FromXMLParserHelper.h" -#include "Object.h" #include "UniqueObject.h" - +#include "Object.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alib { @@ -47,53 +44,8 @@ ObjectBase* Void::inc() && { } /* namespace alib */ -namespace alib { - -void xmlApi < void >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); -} - -bool xmlApi < void >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < void >::xmlTagName ( ) { - static std::string xmlTagName = "Void"; - - return xmlTagName; -} - -void xmlApi < void >::compose ( ext::deque < sax::Token > & output ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -alib::Void xmlApi < alib::Void >::parse ( ext::deque < sax::Token >::iterator & input ) { - xmlApi < void >::parse ( input ); - return alib::Void ( ); -} - -bool xmlApi < alib::Void >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < alib::Void >::xmlTagName ( ) { - return xmlApi < void >::xmlTagName ( ); -} - -void xmlApi < alib::Void >::compose ( ext::deque < sax::Token > & output, const alib::Void & ) { - xmlApi < void >::compose ( output ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < alib::Void > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alib::Object, alib::Void > ( ); - -static auto xmlReaded = registration::XmlReaderRegister < alib::Object, alib::Void > ( ); - } /* namespace */ diff --git a/alib2common/src/object/Void.h b/alib2common/src/object/Void.h index 738da4a25f..7ab4364321 100644 --- a/alib2common/src/object/Void.h +++ b/alib2common/src/object/Void.h @@ -9,9 +9,6 @@ #define VOID_H_ #include "ObjectBase.h" -#include <deque> -#include "../sax/Token.h" -#include "../core/xmlApi.hpp" namespace alib { @@ -48,24 +45,4 @@ public: } /* namespace alib */ -namespace alib { - -template < > -struct xmlApi < void > { - static void parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output ); -}; - -template < > -struct xmlApi < alib::Void > { - static alib::Void parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const alib::Void & data ); -}; - -} /* namespace alib */ - #endif /* VOID_H_ */ diff --git a/alib2common/src/primitive/Bool.cpp b/alib2common/src/primitive/Bool.cpp index cf084a6a0f..48723859f5 100644 --- a/alib2common/src/primitive/Bool.cpp +++ b/alib2common/src/primitive/Bool.cpp @@ -6,18 +6,11 @@ */ #include "Bool.h" -#include <sax/FromXMLParserHelper.h> -#include <exception/CommonException.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { Bool::Bool(bool data) : m_data(data) { - } PrimitiveBase* Bool::clone() const { @@ -59,69 +52,8 @@ PrimitiveBase * Bool::inc() && { } /* namespace primitive */ -namespace alib { - -bool xmlApi < bool >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - - std::string tmp = sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ); - bool data; - if ( tmp == "true" ) - data = true; - else if ( tmp == "false" ) - data = false; - else - throw exception::CommonException ( "Invalid boolean value" ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - - return data; -} - -bool xmlApi < bool >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < bool >::xmlTagName ( ) { - static std::string xmlTagName = "Bool"; - - return xmlTagName; -} - -void xmlApi < bool >::compose ( ext::deque < sax::Token > & output, bool data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT); - if ( data ) - output.emplace_back ( "true", sax::Token::TokenType::CHARACTER ); - else - output.emplace_back ( "false", sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::Bool xmlApi < primitive::Bool >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::Bool ( xmlApi < bool >::parse ( input ) ); -} - -bool xmlApi < primitive::Bool >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::Bool >::xmlTagName ( ) { - return xmlApi < bool >::xmlTagName ( ); -} - -void xmlApi < primitive::Bool >::compose ( ext::deque < sax::Token > & output, const primitive::Bool & data ) { - xmlApi < bool >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::Bool > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Bool > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Bool > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Bool > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Bool > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/Bool.h b/alib2common/src/primitive/Bool.h index de75f2d210..7fa2e72861 100644 --- a/alib2common/src/primitive/Bool.h +++ b/alib2common/src/primitive/Bool.h @@ -9,7 +9,6 @@ #define PRIMITIVE_BOOL_H_ #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> namespace primitive { @@ -60,24 +59,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < bool > { - static bool parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, bool data ); -}; - -template < > -struct xmlApi < primitive::Bool > { - static primitive::Bool parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::Bool & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_BOOL_H_ */ diff --git a/alib2common/src/primitive/Character.cpp b/alib2common/src/primitive/Character.cpp index fc419e30ab..803f264816 100644 --- a/alib2common/src/primitive/Character.cpp +++ b/alib2common/src/primitive/Character.cpp @@ -6,17 +6,11 @@ */ #include "Character.h" -#include <sax/FromXMLParserHelper.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { Character::Character(char data) : m_data(data) { - } PrimitiveBase* Character::clone() const { @@ -58,57 +52,8 @@ PrimitiveBase * Character::inc() && { } /* namespace primitive */ -namespace alib { - -char xmlApi < char >::parse ( ext::deque < sax::Token >::iterator & input) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - char data = sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) [ 0 ]; - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < char >::first ( const ext::deque < sax::Token >::const_iterator & input) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < char >::xmlTagName ( ) { - static std::string xmlTagName = "Character"; - - return xmlTagName; -} - -void xmlApi < char >::compose ( ext::deque < sax::Token > & output, char data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( std::string ( 1, data ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::Character xmlApi < primitive::Character >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::Character ( xmlApi < char >::parse ( input ) ); -} - -bool xmlApi < primitive::Character >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::Character >::xmlTagName ( ) { - return xmlApi < char >::xmlTagName ( ); -} - -void xmlApi < primitive::Character >::compose ( ext::deque < sax::Token > & output, const primitive::Character & data ) { - xmlApi < char >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::Character > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Character > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Character > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Character > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Character > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/Character.h b/alib2common/src/primitive/Character.h index 9c70787a77..ae3173ab4a 100644 --- a/alib2common/src/primitive/Character.h +++ b/alib2common/src/primitive/Character.h @@ -9,7 +9,6 @@ #define PRIMITIVE_CHARACTER_H_ #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> namespace primitive { @@ -60,24 +59,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < char > { - static char parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, char data ); -}; - -template < > -struct xmlApi < primitive::Character > { - static primitive::Character parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::Character & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_CHARACTER_H_ */ diff --git a/alib2common/src/primitive/Double.cpp b/alib2common/src/primitive/Double.cpp index 1a23c408e5..d4d75fb212 100644 --- a/alib2common/src/primitive/Double.cpp +++ b/alib2common/src/primitive/Double.cpp @@ -6,12 +6,7 @@ */ #include "Double.h" -#include <sax/FromXMLParserHelper.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { @@ -63,57 +58,8 @@ PrimitiveBase * Double::inc() && { } /* namespace primitive */ -namespace alib { - -int xmlApi < double >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - double data = ext::from_string < double > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < double >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < double >::xmlTagName ( ) { - static std::string xmlTagName = "Double"; - - return xmlTagName; -} - -void xmlApi < double >::compose ( ext::deque < sax::Token > & output, double data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::Double xmlApi < primitive::Double >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::Double ( xmlApi < double >::parse ( input ) ); -} - -bool xmlApi < primitive::Double >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::Double >::xmlTagName ( ) { - return xmlApi < double >::xmlTagName ( ); -} - -void xmlApi < primitive::Double >::compose ( ext::deque < sax::Token > & output, const primitive::Double & data ) { - xmlApi < double >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::Double > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Double > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Double > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Double > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Double > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/Double.h b/alib2common/src/primitive/Double.h index 615dba2a98..edea5e5373 100644 --- a/alib2common/src/primitive/Double.h +++ b/alib2common/src/primitive/Double.h @@ -9,7 +9,6 @@ #define PRIMITIVE_DOUBLE_H_ #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> namespace primitive { @@ -60,24 +59,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < double > { - static int parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, double data ); -}; - -template < > -struct xmlApi < primitive::Double > { - static primitive::Double parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::Double & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_DOUBLE_H_ */ diff --git a/alib2common/src/primitive/Integer.cpp b/alib2common/src/primitive/Integer.cpp index 39066c3f57..b929407165 100644 --- a/alib2common/src/primitive/Integer.cpp +++ b/alib2common/src/primitive/Integer.cpp @@ -6,12 +6,7 @@ */ #include "Integer.h" -#include <sax/FromXMLParserHelper.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { @@ -58,57 +53,8 @@ PrimitiveBase * Integer::inc() && { } /* namespace primitive */ -namespace alib { - -int xmlApi < int >::parse ( ext::deque < sax::Token >::iterator & input) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - int data = ext::from_string < int > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < int >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < int >::xmlTagName ( ) { - static std::string xmlTagName = "Integer"; - - return xmlTagName; -} - -void xmlApi < int >::compose ( ext::deque < sax::Token > & output, int data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::Integer xmlApi < primitive::Integer >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::Integer ( xmlApi < int >::parse ( input ) ); -} - -bool xmlApi < primitive::Integer >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::Integer >::xmlTagName ( ) { - return xmlApi < int >::xmlTagName ( ); -} - -void xmlApi < primitive::Integer >::compose ( ext::deque < sax::Token > & output, const primitive::Integer & data ) { - xmlApi < int >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::Integer > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Integer > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Integer > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Integer > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Integer > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/Integer.h b/alib2common/src/primitive/Integer.h index 9e8f10a22b..da8589e375 100644 --- a/alib2common/src/primitive/Integer.h +++ b/alib2common/src/primitive/Integer.h @@ -9,7 +9,6 @@ #define PRIMITIVE_INTEGER_H_ #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> namespace primitive { @@ -60,24 +59,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < int > { - static int parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, int data ); -}; - -template < > -struct xmlApi < primitive::Integer > { - static primitive::Integer parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::Integer & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_INTEGER_H_ */ diff --git a/alib2common/src/primitive/Primitive.cpp b/alib2common/src/primitive/Primitive.cpp index 85dde936f9..de81972c1e 100644 --- a/alib2common/src/primitive/Primitive.cpp +++ b/alib2common/src/primitive/Primitive.cpp @@ -11,7 +11,6 @@ #include "String.h" #include "Unsigned.h" #include "Bool.h" -#include <core/xmlApi.hpp> namespace primitive { diff --git a/alib2common/src/primitive/String.cpp b/alib2common/src/primitive/String.cpp index b4359a6c9b..46957fdb78 100644 --- a/alib2common/src/primitive/String.cpp +++ b/alib2common/src/primitive/String.cpp @@ -6,12 +6,7 @@ */ #include "String.h" -#include <sax/FromXMLParserHelper.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { @@ -58,59 +53,8 @@ PrimitiveBase * String::inc() && { } /* namespace primitive */ -namespace alib { - -std::string xmlApi < std::string >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - std::string data = ""; - if ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::CHARACTER ) ) - data = sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < std::string >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < std::string >::xmlTagName ( ) { - static std::string xmlTagName = "String"; - - return xmlTagName; -} - -void xmlApi < std::string >::compose ( ext::deque < sax::Token > & output, const std::string & data) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( data, sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::String xmlApi < primitive::String >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::String ( xmlApi < std::string >::parse ( input ) ); -} - -bool xmlApi < primitive::String >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::String >::xmlTagName ( ) { - return xmlApi < std::string >::xmlTagName ( ); -} - -void xmlApi < primitive::String >::compose ( ext::deque < sax::Token > & output, const primitive::String & data ) { - xmlApi < std::string >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::String > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::String > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::String > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::String > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::String > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/String.h b/alib2common/src/primitive/String.h index 8c65677263..4bcead0a5c 100644 --- a/alib2common/src/primitive/String.h +++ b/alib2common/src/primitive/String.h @@ -8,9 +8,8 @@ #ifndef PRIMITIVE_STRING_H_ #define PRIMITIVE_STRING_H_ -#include <string> #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> +#include <string> namespace primitive { @@ -61,24 +60,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < std::string > { - static std::string parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const std::string & data ); -}; - -template < > -struct xmlApi < primitive::String > { - static primitive::String parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::String & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_STRING_H_ */ diff --git a/alib2common/src/primitive/Unsigned.cpp b/alib2common/src/primitive/Unsigned.cpp index eb5da4270f..1a2aa475d8 100644 --- a/alib2common/src/primitive/Unsigned.cpp +++ b/alib2common/src/primitive/Unsigned.cpp @@ -6,12 +6,7 @@ */ #include "Unsigned.h" -#include <sax/FromXMLParserHelper.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { @@ -62,57 +57,8 @@ PrimitiveBase * Unsigned::inc() && { } /* namespace primitive */ -namespace alib { - -unsigned xmlApi < unsigned >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - unsigned data = ext::from_string < unsigned > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < unsigned >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < unsigned >::xmlTagName ( ) { - static std::string xmlTagName = "Unsigned"; - - return xmlTagName; -} - -void xmlApi < unsigned >::compose ( ext::deque < sax::Token > & output, unsigned data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::Unsigned xmlApi < primitive::Unsigned >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::Unsigned ( xmlApi < unsigned >::parse ( input ) ); -} - -bool xmlApi < primitive::Unsigned >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::Unsigned >::xmlTagName ( ) { - return xmlApi < unsigned >::xmlTagName ( ); -} - -void xmlApi < primitive::Unsigned >::compose ( ext::deque < sax::Token > & output, const primitive::Unsigned & data ) { - xmlApi < unsigned >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::Unsigned > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Unsigned > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Unsigned > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Unsigned > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Unsigned > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/Unsigned.h b/alib2common/src/primitive/Unsigned.h index a4505a15f9..cf9395abc9 100644 --- a/alib2common/src/primitive/Unsigned.h +++ b/alib2common/src/primitive/Unsigned.h @@ -9,7 +9,6 @@ #define PRIMITIVE_UNSIGNED_H_ #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> namespace primitive { @@ -62,24 +61,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < unsigned > { - static unsigned parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, unsigned data ); -}; - -template < > -struct xmlApi < primitive::Unsigned > { - static primitive::Unsigned parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::Unsigned & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_UNSIGNED_H_ */ diff --git a/alib2common/src/primitive/UnsignedLong.cpp b/alib2common/src/primitive/UnsignedLong.cpp index e7c76bdf18..3c5fe36b2b 100644 --- a/alib2common/src/primitive/UnsignedLong.cpp +++ b/alib2common/src/primitive/UnsignedLong.cpp @@ -6,12 +6,7 @@ */ #include "UnsignedLong.h" -#include <sax/FromXMLParserHelper.h> -#include "Primitive.h" -#include <object/Object.h> - #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace primitive { @@ -58,57 +53,8 @@ PrimitiveBase * UnsignedLong::inc() && { } /* namespace primitive */ -namespace alib { - -unsigned long xmlApi < unsigned long >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); - unsigned long data = ext::from_string < unsigned long > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); - return data; -} - -bool xmlApi < unsigned long >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < unsigned long >::xmlTagName ( ) { - static std::string xmlTagName = "UnsignedLong"; - - return xmlTagName; -} - -void xmlApi < unsigned long >::compose ( ext::deque < sax::Token > & output, unsigned long data ) { - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); - output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); - output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); -} - -primitive::UnsignedLong xmlApi < primitive::UnsignedLong >::parse ( ext::deque < sax::Token >::iterator & input ) { - return primitive::UnsignedLong ( xmlApi < unsigned long >::parse ( input ) ); -} - -bool xmlApi < primitive::UnsignedLong >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); -} - -const std::string & xmlApi < primitive::UnsignedLong >::xmlTagName ( ) { - return xmlApi < unsigned long >::xmlTagName ( ); -} - -void xmlApi < primitive::UnsignedLong >::compose ( ext::deque < sax::Token > & output, const primitive::UnsignedLong & data ) { - xmlApi < unsigned long >::compose ( output, data.getData ( ) ); -} - -} /* namespace alib */ - namespace { static auto valuePrinter = registration::ValuePrinterRegister < primitive::UnsignedLong > ( ); -static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::UnsignedLong > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::UnsignedLong > ( ); - -static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::UnsignedLong > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::UnsignedLong > ( ); - } /* namespace */ diff --git a/alib2common/src/primitive/UnsignedLong.h b/alib2common/src/primitive/UnsignedLong.h index 20e47aefe2..78c4aa94e1 100644 --- a/alib2common/src/primitive/UnsignedLong.h +++ b/alib2common/src/primitive/UnsignedLong.h @@ -9,7 +9,6 @@ #define PRIMITIVE_UNSIGNED_LONG_H_ #include "PrimitiveBase.h" -#include <core/xmlApi.hpp> namespace primitive { @@ -60,24 +59,4 @@ public: } /* namespace primitive */ -namespace alib { - -template < > -struct xmlApi < unsigned long > { - static unsigned long parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, unsigned long data ); -}; - -template < > -struct xmlApi < primitive::UnsignedLong > { - static primitive::UnsignedLong parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static const std::string & xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const primitive::UnsignedLong & data ); -}; - -} /* namespace alib */ - #endif /* PRIMITIVE_UNSIGNED_LONG_H_ */ diff --git a/alib2common/test-src/container/ContainerTest.cpp b/alib2common/test-src/container/ContainerTest.cpp index faf174c1af..6c1720fd17 100644 --- a/alib2common/test-src/container/ContainerTest.cpp +++ b/alib2common/test-src/container/ContainerTest.cpp @@ -1,20 +1,8 @@ -#include <list> #include "ContainerTest.h" -#include "sax/SaxParseInterface.h" -#include "sax/SaxComposeInterface.h" - #include "object/Object.h" #include "container/ObjectsSet.h" #include "container/ObjectsDeque.h" -#include "container/ObjectsVariant.h" -#include "container/ObjectsTree.h" -#include "container/ObjectsTrie.h" -#include "primitive/Integer.h" -#include "primitive/Character.h" -#include "primitive/String.h" - -#include "factory/XmlDataFactory.hpp" #include <type_traits> @@ -27,117 +15,6 @@ void ContainerTest::setUp ( ) { void ContainerTest::tearDown ( ) { } -void ContainerTest::testXMLParser ( ) { - - alib::Object tmp ( primitive::String ( "1" ) ); - - container::ObjectsSet < > set; - - set.insert ( tmp ); - - alib::Object object ( set ); - - { - std::string tmp2 = alib::XmlDataFactory::toString ( object ); - - std::cout << tmp2 << std::endl; - - alib::Object object2 = alib::XmlDataFactory::fromString ( tmp2 ); - - CPPUNIT_ASSERT ( object == object2 ); - - ext::set < primitive::String > concrete = alib::XmlDataFactory::fromString ( tmp2 ); - std::string tmp3 = alib::XmlDataFactory::toString ( concrete ); - - std::cout << tmp3 << std::endl; - - alib::Object object3 = alib::XmlDataFactory::fromString ( tmp3 ); - - CPPUNIT_ASSERT ( object == object3 ); - } -} - -void ContainerTest::testVariantParsing ( ) { - { - std::string string = "<String>aaa</String>"; - ext::variant < int, std::string > object = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( "aaa" == object.get < std::string > ( ) ); - - std::string string2 = alib::XmlDataFactory::toString ( object ); - - ext::variant < int, std::string > object2 = alib::XmlDataFactory::fromString ( string2 ); - - CPPUNIT_ASSERT ( object == object2 ); - } -} - -void ContainerTest::testTreeParsing ( ) { - { - ext::tree < int > t ( 1 ); - - std::string string = alib::XmlDataFactory::toString ( t ); - std::cout << string << std::endl; - - ext::tree < int > t2 = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( t == t2 ); - } - { - ext::tree < int > t ( 1, ext::tree < int > ( 2 ), ext::tree < int > ( 4 ) ); - - std::string string = alib::XmlDataFactory::toString ( t ); - std::cout << string << std::endl; - - ext::tree < int > t2 = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( t == t2 ); - } - { - ext::tree < int > t ( 1, ext::tree < int > ( 2, ext::tree < int > ( 3 ) ), ext::tree < int > ( 4 ) ); - - std::string string = alib::XmlDataFactory::toString ( t ); - std::cout << string << std::endl; - - ext::tree < int > t2 = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( t == t2 ); - } -} - -void ContainerTest::testTrieParsing ( ) { - { - ext::trie < char, int > t ( 1 ); - - std::string string = alib::XmlDataFactory::toString ( t ); - std::cout << string << std::endl; - - ext::trie < char, int > t2 = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( t == t2 ); - } - { - ext::trie < char, int > t ( 0, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 1 ) ), std::make_pair ( 'b', ext::trie < char, int > ( 2 ) ) } ); - - std::string string = alib::XmlDataFactory::toString ( t ); - std::cout << string << std::endl; - - ext::trie < char, int > t2 = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( t == t2 ); - } - { - ext::trie < char, int > t ( 0, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 1, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 3 ) ), std::make_pair ( 'b', ext::trie < char, int > ( 4 ) ) } ) ), std::make_pair ( 'b', ext::trie < char, int > ( 2, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 5 ) ), std::make_pair ( 'b', ext::trie < char, int > ( 6 ) ) } ) ) } ); - - std::string string = alib::XmlDataFactory::toString ( t ); - std::cout << string << std::endl; - - ext::trie < char, int > t2 = alib::XmlDataFactory::fromString ( string ); - - CPPUNIT_ASSERT ( t == t2 ); - } -} - void ContainerTest::testProperties ( ) { CPPUNIT_ASSERT ( std::is_nothrow_move_constructible < container::ObjectsSet < alib::Object > >::value ); } diff --git a/alib2common/test-src/container/ContainerTest.h b/alib2common/test-src/container/ContainerTest.h index 543a1df8c7..0a83808293 100644 --- a/alib2common/test-src/container/ContainerTest.h +++ b/alib2common/test-src/container/ContainerTest.h @@ -5,10 +5,6 @@ class ContainerTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE ( ContainerTest ); - CPPUNIT_TEST ( testXMLParser ); - CPPUNIT_TEST ( testVariantParsing ); - CPPUNIT_TEST ( testTreeParsing ); - CPPUNIT_TEST ( testTrieParsing ); CPPUNIT_TEST ( testProperties ); CPPUNIT_TEST ( testNormalize ); CPPUNIT_TEST_SUITE_END ( ); @@ -17,10 +13,6 @@ public: void setUp ( ); void tearDown ( ); - void testXMLParser ( ); - void testVariantParsing ( ); - void testTreeParsing ( ); - void testTrieParsing ( ); void testProperties ( ); void testNormalize ( ); }; diff --git a/alib2common/test-src/object/ObjectTest.cpp b/alib2common/test-src/object/ObjectTest.cpp index 9849f8d4e7..adb4e7f26c 100644 --- a/alib2common/test-src/object/ObjectTest.cpp +++ b/alib2common/test-src/object/ObjectTest.cpp @@ -1,9 +1,6 @@ #include <list> #include "ObjectTest.h" -#include "sax/SaxParseInterface.h" -#include "sax/SaxComposeInterface.h" - #include "object/Object.h" #include <primitive/Unsigned.h> diff --git a/alib2data/makefile.conf b/alib2data/makefile.conf index d6864ad2a9..91396582fb 100644 --- a/alib2data/makefile.conf +++ b/alib2data/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2data TESTBIN:=alib2test -LINK_PATHS=../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2data/src/alphabet/BarSymbol.cpp b/alib2data/src/alphabet/BarSymbol.cpp index 6907b7e1e0..8f125052a9 100644 --- a/alib2data/src/alphabet/BarSymbol.cpp +++ b/alib2data/src/alphabet/BarSymbol.cpp @@ -6,13 +6,11 @@ */ #include "BarSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -40,17 +38,6 @@ BarSymbol::operator std::string () const { return BarSymbol::instance < std::string > ( ); } -BarSymbol BarSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, BarSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, BarSymbol::getXmlTagName()); - return BarSymbol(); -} - -void BarSymbol::compose(ext::deque<sax::Token>& out, const BarSymbol & ) { - out.emplace_back(BarSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(BarSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* BarSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -61,10 +48,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::BarSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::BarSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::BarSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BarSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BarSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/BarSymbol.h b/alib2data/src/alphabet/BarSymbol.h index f7789fa92c..2106d2b18b 100644 --- a/alib2data/src/alphabet/BarSymbol.h +++ b/alib2data/src/alphabet/BarSymbol.h @@ -45,16 +45,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "BarSymbol"; - - return xmlTagName; - } - - static BarSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const BarSymbol & input ); - virtual SymbolBase * inc ( ) &&; typedef BarSymbol normalized_type; diff --git a/alib2data/src/alphabet/BlankSymbol.cpp b/alib2data/src/alphabet/BlankSymbol.cpp index 377c15dc97..a5d0c2026d 100644 --- a/alib2data/src/alphabet/BlankSymbol.cpp +++ b/alib2data/src/alphabet/BlankSymbol.cpp @@ -6,13 +6,11 @@ */ #include "BlankSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -40,17 +38,6 @@ BlankSymbol::operator std::string () const { return BlankSymbol::instance < std::string > ( ); } -BlankSymbol BlankSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, BlankSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, BlankSymbol::getXmlTagName()); - return BlankSymbol(); -} - -void BlankSymbol::compose(ext::deque<sax::Token>& out, const BlankSymbol &) { - out.emplace_back(BlankSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(BlankSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* BlankSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -61,10 +48,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::BlankSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::BlankSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::BlankSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BlankSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BlankSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/BlankSymbol.h b/alib2data/src/alphabet/BlankSymbol.h index db89378d2e..89f2f353d5 100644 --- a/alib2data/src/alphabet/BlankSymbol.h +++ b/alib2data/src/alphabet/BlankSymbol.h @@ -45,16 +45,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "BlankSymbol"; - - return xmlTagName; - } - - static BlankSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const BlankSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef BlankSymbol normalized_type; diff --git a/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp b/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp index b20cdb2b31..e17989dcbb 100644 --- a/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp +++ b/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp @@ -6,13 +6,11 @@ */ #include "BottomOfTheStackSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -41,17 +39,6 @@ BottomOfTheStackSymbol::operator std::string () const { ; } -BottomOfTheStackSymbol BottomOfTheStackSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, BottomOfTheStackSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, BottomOfTheStackSymbol::getXmlTagName()); - return BottomOfTheStackSymbol(); -} - -void BottomOfTheStackSymbol::compose(ext::deque<sax::Token>& out, const BottomOfTheStackSymbol &) { - out.emplace_back(BottomOfTheStackSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(BottomOfTheStackSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* BottomOfTheStackSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -62,10 +49,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::BottomOfTheStackSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::BottomOfTheStackSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::BottomOfTheStackSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BottomOfTheStackSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BottomOfTheStackSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/BottomOfTheStackSymbol.h b/alib2data/src/alphabet/BottomOfTheStackSymbol.h index f0410a7187..c3df105e09 100644 --- a/alib2data/src/alphabet/BottomOfTheStackSymbol.h +++ b/alib2data/src/alphabet/BottomOfTheStackSymbol.h @@ -45,16 +45,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "BottomOfTheStackSymbol"; - - return xmlTagName; - } - - static BottomOfTheStackSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const BottomOfTheStackSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef BottomOfTheStackSymbol normalized_type; diff --git a/alib2data/src/alphabet/EndSymbol.cpp b/alib2data/src/alphabet/EndSymbol.cpp index f4e355e3af..9c65e2ccfe 100644 --- a/alib2data/src/alphabet/EndSymbol.cpp +++ b/alib2data/src/alphabet/EndSymbol.cpp @@ -6,13 +6,11 @@ */ #include "EndSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -40,17 +38,6 @@ EndSymbol::operator std::string () const { return EndSymbol::instance < std::string > ( ); } -EndSymbol EndSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, EndSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, EndSymbol::getXmlTagName()); - return EndSymbol(); -} - -void EndSymbol::compose(ext::deque<sax::Token>& out, const EndSymbol &) { - out.emplace_back(EndSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(EndSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* EndSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -61,10 +48,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::EndSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::EndSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::EndSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::EndSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::EndSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/EndSymbol.h b/alib2data/src/alphabet/EndSymbol.h index 2c60b1b600..ecf0d34421 100644 --- a/alib2data/src/alphabet/EndSymbol.h +++ b/alib2data/src/alphabet/EndSymbol.h @@ -45,16 +45,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "EndSymbol"; - - return xmlTagName; - } - - static EndSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const EndSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef EndSymbol normalized_type; diff --git a/alib2data/src/alphabet/InitialSymbol.cpp b/alib2data/src/alphabet/InitialSymbol.cpp index 40d456705b..ca5d6e2fac 100644 --- a/alib2data/src/alphabet/InitialSymbol.cpp +++ b/alib2data/src/alphabet/InitialSymbol.cpp @@ -6,13 +6,11 @@ */ #include "InitialSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -40,17 +38,6 @@ InitialSymbol::operator std::string() const { return InitialSymbol::instance < std::string > ( ); } -InitialSymbol InitialSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, InitialSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, InitialSymbol::getXmlTagName()); - return InitialSymbol(); -} - -void InitialSymbol::compose(ext::deque<sax::Token>& out, const InitialSymbol & ) { - out.emplace_back(InitialSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(InitialSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* InitialSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -61,10 +48,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::InitialSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::InitialSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::InitialSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::InitialSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::InitialSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/InitialSymbol.h b/alib2data/src/alphabet/InitialSymbol.h index 09cb71d9e0..28e17dc7b9 100644 --- a/alib2data/src/alphabet/InitialSymbol.h +++ b/alib2data/src/alphabet/InitialSymbol.h @@ -46,16 +46,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "InitialSymbol"; - - return xmlTagName; - } - - static InitialSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const InitialSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef InitialSymbol normalized_type; diff --git a/alib2data/src/alphabet/LabeledSymbol.cpp b/alib2data/src/alphabet/LabeledSymbol.cpp index e6e98217bc..9afa849999 100644 --- a/alib2data/src/alphabet/LabeledSymbol.cpp +++ b/alib2data/src/alphabet/LabeledSymbol.cpp @@ -6,12 +6,10 @@ */ #include "LabeledSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -59,19 +57,6 @@ LabeledSymbol::operator std::string () const { return (std::string) m_label; } -LabeledSymbol LabeledSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, LabeledSymbol::getXmlTagName()); - label::Label data = alib::xmlApi<label::Label>::parse(input); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, LabeledSymbol::getXmlTagName()); - return LabeledSymbol(std::move(data)); -} - -void LabeledSymbol::compose(ext::deque<sax::Token>& out, const LabeledSymbol & data ) { - out.emplace_back(LabeledSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - alib::xmlApi<label::Label>::compose(out, data.m_label); - out.emplace_back(LabeledSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* LabeledSymbol::inc() && { m_label.inc(); return NULL; @@ -83,10 +68,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::LabeledSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::LabeledSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::LabeledSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::LabeledSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::LabeledSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/LabeledSymbol.h b/alib2data/src/alphabet/LabeledSymbol.h index a0d8f19c10..8237f26717 100644 --- a/alib2data/src/alphabet/LabeledSymbol.h +++ b/alib2data/src/alphabet/LabeledSymbol.h @@ -8,7 +8,7 @@ #ifndef LABELED_SYMBOL_H_ #define LABELED_SYMBOL_H_ -#include "../label/Label.h" +#include <label/Label.h> #include "SymbolBase.h" namespace alphabet { @@ -53,16 +53,6 @@ public: virtual explicit operator std::string ( ) const; - static const std::string & getXmlTagName() { - static std::string xmlTagName = "LabeledSymbol"; - - return xmlTagName; - } - - static LabeledSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const LabeledSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef LabeledSymbol normalized_type; diff --git a/alib2data/src/alphabet/NonlinearVariableSymbol.cpp b/alib2data/src/alphabet/NonlinearVariableSymbol.cpp index efced9e9a4..f5995316f5 100644 --- a/alib2data/src/alphabet/NonlinearVariableSymbol.cpp +++ b/alib2data/src/alphabet/NonlinearVariableSymbol.cpp @@ -10,16 +10,9 @@ #include <object/Object.h> #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::NonlinearVariableSymbol < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::NonlinearVariableSymbol < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::NonlinearVariableSymbol < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::NonlinearVariableSymbol < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::NonlinearVariableSymbol < > > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/NonlinearVariableSymbol.h b/alib2data/src/alphabet/NonlinearVariableSymbol.h index df21968d9c..022ecfc2ce 100644 --- a/alib2data/src/alphabet/NonlinearVariableSymbol.h +++ b/alib2data/src/alphabet/NonlinearVariableSymbol.h @@ -8,8 +8,6 @@ #ifndef NONLINEAR_VARIABLE_SYMBOL_H_ #define NONLINEAR_VARIABLE_SYMBOL_H_ -#include <sax/FromXMLParserHelper.h> - #include "Symbol.h" #include "SymbolFeatures.h" #include "UniqueSymbol.h" @@ -64,16 +62,6 @@ public: virtual explicit operator std::string ( ) const; - static const std::string & getXmlTagName() { - static std::string xmlTagName = "NonlinearVariableSymbol"; - - return xmlTagName; - } - - static NonlinearVariableSymbol < SymbolType > parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const NonlinearVariableSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef NonlinearVariableSymbol < > normalized_type; @@ -132,22 +120,6 @@ NonlinearVariableSymbol < SymbolType >::operator std::string ( ) const { return "$" + ext::to_string ( m_symbol ); } -template < class SymbolType > -NonlinearVariableSymbol < SymbolType > NonlinearVariableSymbol < SymbolType >::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, NonlinearVariableSymbol::getXmlTagName() ); - SymbolType data = alib::xmlApi < SymbolType >::parse ( input ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, NonlinearVariableSymbol::getXmlTagName() ); - - return NonlinearVariableSymbol < SymbolType > ( data ); -} - -template < class SymbolType > -void NonlinearVariableSymbol < SymbolType >::compose ( ext::deque < sax::Token > & out, const NonlinearVariableSymbol & data ) { - out.emplace_back ( NonlinearVariableSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT ); - alib::xmlApi < SymbolType >::compose ( out, data.m_symbol ); - out.emplace_back ( NonlinearVariableSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT ); -} - template < class SymbolType > SymbolBase * NonlinearVariableSymbol < SymbolType >::inc ( ) && { return new UniqueSymbol ( Symbol ( std::move ( * this ) ), primitive::Integer ( 0 ) ); diff --git a/alib2data/src/alphabet/RankedSymbol.cpp b/alib2data/src/alphabet/RankedSymbol.cpp index 05051b0a5e..6fbcf5fc38 100644 --- a/alib2data/src/alphabet/RankedSymbol.cpp +++ b/alib2data/src/alphabet/RankedSymbol.cpp @@ -6,19 +6,11 @@ */ #include "RankedSymbol.h" -#include <object/Object.h> #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::RankedSymbol < > > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::RankedSymbol < > > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::RankedSymbol < > > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::RankedSymbol < > > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::RankedSymbol < > > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/RankedSymbol.h b/alib2data/src/alphabet/RankedSymbol.h index 334a183acb..388014daf6 100644 --- a/alib2data/src/alphabet/RankedSymbol.h +++ b/alib2data/src/alphabet/RankedSymbol.h @@ -8,10 +8,7 @@ #ifndef RANKED_SYMBOL_H_ #define RANKED_SYMBOL_H_ -#include <sax/FromXMLParserHelper.h> - #include "SymbolBase.h" -#include "Symbol.h" #include "SymbolFeatures.h" #include <common/ranked_symbol.hpp> @@ -54,18 +51,6 @@ public: using SymbolBase::operator >; using SymbolBase::operator >=; - static const std::string & getXmlTagName() { - static std::string xmlTagName = "RankedSymbol"; - - return xmlTagName; - } - - static RankedSymbol parse ( ext::deque < sax::Token >::iterator & input ); - static common::ranked_symbol < SymbolType, RankType > parseRaw ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const RankedSymbol & data ); - static void compose ( ext::deque < sax::Token > & out, const common::ranked_symbol < SymbolType, RankType > & input ); - virtual SymbolBase * inc ( ) &&; typedef RankedSymbol < > normalized_type; @@ -96,33 +81,6 @@ RankedSymbol < SymbolType, RankType >::operator std::string () const { return (std::string) static_cast < const common::ranked_symbol < SymbolType, RankType > & > ( * this ); } -template < class SymbolType, class RankType > -RankedSymbol < SymbolType, RankType > RankedSymbol < SymbolType, RankType >::parse(ext::deque<sax::Token>::iterator& input) { - return RankedSymbol ( parseRaw ( input ) ); -} - -template < class SymbolType, class RankType > -common::ranked_symbol < SymbolType, RankType > RankedSymbol < SymbolType, RankType >::parseRaw(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, RankedSymbol::getXmlTagName()); - SymbolType data = alib::xmlApi<SymbolType>::parse(input); - RankType rank = alib::xmlApi<RankType>::parse(input); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, RankedSymbol::getXmlTagName()); - return common::ranked_symbol < SymbolType, RankType >(std::move(data), std::move(rank)); -} - -template < class SymbolType, class RankType > -void RankedSymbol < SymbolType, RankType >::compose(ext::deque<sax::Token>& out, const RankedSymbol & data ) { - compose ( out, static_cast < const common::ranked_symbol < SymbolType, RankType > > ( data ) ); -} - -template < class SymbolType, class RankType > -void RankedSymbol < SymbolType, RankType >::compose( ext::deque<sax::Token>& out, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - out.emplace_back(RankedSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - alib::xmlApi<SymbolType>::compose(out, symbol.getSymbol ( ) ); - alib::xmlApi<RankType>::compose(out, symbol.getRank ( ) ); - out.emplace_back(RankedSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - template < class SymbolType, class RankType > SymbolBase* RankedSymbol < SymbolType, RankType >::inc() && { this->m_symbol.inc(); @@ -133,34 +91,6 @@ SymbolBase* RankedSymbol < SymbolType, RankType >::inc() && { namespace alib { -template < typename T, typename R > -struct xmlApi < common::ranked_symbol < T, R > > { - static common::ranked_symbol < T, R > parse ( ext::deque < sax::Token >::iterator & input ); - static bool first ( const ext::deque < sax::Token >::const_iterator & input ); - static std::string xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, const common::ranked_symbol < T, R > & data ); -}; - -template < typename T, typename R > -common::ranked_symbol < T, R > xmlApi < common::ranked_symbol < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return alphabet::RankedSymbol < T, R >::parseRaw ( input ); -} - -template < typename T, typename R > -bool xmlApi < common::ranked_symbol < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, alphabet::RankedSymbol < T, R >::getXmlTagName() ); -} - -template < typename T, typename R > -std::string xmlApi < common::ranked_symbol < T, R > >::xmlTagName ( ) { - return alphabet::RankedSymbol < T, R >::getXmlTagName(); -} - -template < typename T, typename R > -void xmlApi < common::ranked_symbol < T, R > >::compose ( ext::deque < sax::Token > & output, const common::ranked_symbol < T, R > & input ) { - return alphabet::RankedSymbol < T, R >::compose( output, input ); -} - template < class SymbolType, class RankType > struct normalize < common::ranked_symbol < SymbolType, RankType >, typename std::enable_if < std::is_same < common::ranked_symbol < SymbolType, RankType >, common::ranked_symbol < > >::value >::type > { static common::ranked_symbol < > && eval ( common::ranked_symbol < SymbolType, RankType > && value ) { diff --git a/alib2data/src/alphabet/StartSymbol.cpp b/alib2data/src/alphabet/StartSymbol.cpp index 7fd991abae..ed445e5756 100644 --- a/alib2data/src/alphabet/StartSymbol.cpp +++ b/alib2data/src/alphabet/StartSymbol.cpp @@ -6,13 +6,11 @@ */ #include "StartSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -40,17 +38,6 @@ StartSymbol::operator std::string () const { return StartSymbol::instance < std::string > ( ); } -StartSymbol StartSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, StartSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, StartSymbol::getXmlTagName()); - return StartSymbol(); -} - -void StartSymbol::compose(ext::deque<sax::Token>& out, const StartSymbol & ) { - out.emplace_back(StartSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(StartSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* StartSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -61,10 +48,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::StartSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::StartSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::StartSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::StartSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::StartSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/StartSymbol.h b/alib2data/src/alphabet/StartSymbol.h index a3481a5425..9fc729fd9a 100644 --- a/alib2data/src/alphabet/StartSymbol.h +++ b/alib2data/src/alphabet/StartSymbol.h @@ -45,16 +45,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "StartSymbol"; - - return xmlTagName; - } - - static StartSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const StartSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef StartSymbol normalized_type; diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp b/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp index d5d1b39964..2a15f90ea0 100644 --- a/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp +++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp @@ -6,13 +6,11 @@ */ #include "SubtreeWildcardSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -40,17 +38,6 @@ SubtreeWildcardSymbol::operator std::string () const { return SubtreeWildcardSymbol::instance < std::string > ( ); } -SubtreeWildcardSymbol SubtreeWildcardSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, SubtreeWildcardSymbol::getXmlTagName()); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, SubtreeWildcardSymbol::getXmlTagName()); - return SubtreeWildcardSymbol(); -} - -void SubtreeWildcardSymbol::compose(ext::deque<sax::Token>& out, const SubtreeWildcardSymbol & ) { - out.emplace_back(SubtreeWildcardSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - out.emplace_back(SubtreeWildcardSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* SubtreeWildcardSymbol::inc() && { return new UniqueSymbol(Symbol(std::move(*this)), primitive::Integer(0)); } @@ -61,10 +48,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::SubtreeWildcardSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::SubtreeWildcardSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::SubtreeWildcardSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::SubtreeWildcardSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::SubtreeWildcardSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.h b/alib2data/src/alphabet/SubtreeWildcardSymbol.h index c99f6b1de2..e528b993a3 100644 --- a/alib2data/src/alphabet/SubtreeWildcardSymbol.h +++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.h @@ -46,16 +46,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "SubtreeWildcardSymbol"; - - return xmlTagName; - } - - static SubtreeWildcardSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const SubtreeWildcardSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef SubtreeWildcardSymbol normalized_type; diff --git a/alib2data/src/alphabet/SymbolBase.h b/alib2data/src/alphabet/SymbolBase.h index 20b0d3b415..031a52ac77 100644 --- a/alib2data/src/alphabet/SymbolBase.h +++ b/alib2data/src/alphabet/SymbolBase.h @@ -10,8 +10,6 @@ #include <object/ObjectBase.h> -#include <core/xmlApi.hpp> - namespace alphabet { /** @@ -27,28 +25,4 @@ public: } /* namespace alphabet */ -namespace alib { - -template < typename Type > -struct xmlApi < Type, typename std::enable_if < std::is_base_of < alphabet::SymbolBase, Type >::value >::type > { - static Type parse ( ext::deque < sax::Token >::iterator & input ) { - return Type::parse ( input ); - } - - static bool first ( const ext::deque < sax::Token >::const_iterator & input ) { - return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); - } - - static std::string xmlTagName ( ) { - return Type::getXmlTagName(); - } - - static void compose ( ext::deque < sax::Token > & output, const Type & data ) { - Type::compose ( output, data ); - } - -}; - -} /* namespace alib */ - #endif /* SYMBOL_BASE_H_ */ diff --git a/alib2data/src/alphabet/UniqueSymbol.cpp b/alib2data/src/alphabet/UniqueSymbol.cpp index ec1e73303c..f854f34b16 100644 --- a/alib2data/src/alphabet/UniqueSymbol.cpp +++ b/alib2data/src/alphabet/UniqueSymbol.cpp @@ -7,12 +7,10 @@ #include "UniqueSymbol.h" #include <sstream> -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -64,24 +62,6 @@ UniqueSymbol::operator std::string() const { return std::move(ss).str(); } -UniqueSymbol UniqueSymbol::parse(ext::deque<sax::Token>::iterator& input) { - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, UniqueSymbol::getXmlTagName()); - - Symbol firstSymbol = alib::xmlApi<Symbol>::parse(input); - primitive::Integer secondSymbol = alib::xmlApi<primitive::Integer>::parse(input); - - UniqueSymbol data(std::move(firstSymbol), std::move(secondSymbol)); - sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, UniqueSymbol::getXmlTagName()); - return data; -} - -void UniqueSymbol::compose(ext::deque<sax::Token>& out, const UniqueSymbol & data ) { - out.emplace_back(UniqueSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); - alib::xmlApi<alphabet::Symbol>::compose(out, data.m_symbol); - alib::xmlApi<primitive::Integer>::compose(out, data. m_id); - out.emplace_back(UniqueSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); -} - SymbolBase* UniqueSymbol::inc() && { std::move(m_id).inc(); return NULL; @@ -93,10 +73,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::UniqueSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::UniqueSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::UniqueSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::UniqueSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::UniqueSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/UniqueSymbol.h b/alib2data/src/alphabet/UniqueSymbol.h index 96087f7fcd..2978159d87 100644 --- a/alib2data/src/alphabet/UniqueSymbol.h +++ b/alib2data/src/alphabet/UniqueSymbol.h @@ -55,16 +55,6 @@ public: virtual explicit operator std::string ( ) const; - static const std::string & getXmlTagName() { - static std::string xmlTagName = "UniqueSymbol"; - - return xmlTagName; - } - - static UniqueSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const UniqueSymbol & data ); - virtual SymbolBase * inc ( ) &&; typedef UniqueSymbol normalized_type; diff --git a/alib2data/src/alphabet/VariablesBarSymbol.cpp b/alib2data/src/alphabet/VariablesBarSymbol.cpp index a654a2fff2..1987c7acb8 100644 --- a/alib2data/src/alphabet/VariablesBarSymbol.cpp +++ b/alib2data/src/alphabet/VariablesBarSymbol.cpp @@ -6,13 +6,11 @@ */ #include "VariablesBarSymbol.h" -#include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> #include "UniqueSymbol.h" #include <registration/ValuePrinterRegistration.hpp> -#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -39,18 +37,6 @@ VariablesBarSymbol::operator std::string ( ) const { return VariablesBarSymbol::instance < std::string > ( ); } -VariablesBarSymbol VariablesBarSymbol::parse ( ext::deque < sax::Token >::iterator & input ) { - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, VariablesBarSymbol::getXmlTagName() ); - sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, VariablesBarSymbol::getXmlTagName() ); - - return VariablesBarSymbol ( ); -} - -void VariablesBarSymbol::compose ( ext::deque < sax::Token > & out, const VariablesBarSymbol & ) { - out.emplace_back ( VariablesBarSymbol::getXmlTagName(), sax::Token::TokenType::START_ELEMENT ); - out.emplace_back ( VariablesBarSymbol::getXmlTagName(), sax::Token::TokenType::END_ELEMENT ); -} - SymbolBase * VariablesBarSymbol::inc ( ) && { return new UniqueSymbol ( Symbol ( std::move ( * this ) ), primitive::Integer ( 0 ) ); } @@ -61,10 +47,4 @@ namespace { static auto valuePrinter = registration::ValuePrinterRegister < alphabet::VariablesBarSymbol > ( ); -static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::VariablesBarSymbol > ( ); -static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::VariablesBarSymbol > ( ); - -static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::VariablesBarSymbol > ( ); -static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::VariablesBarSymbol > ( ); - } /* namespace */ diff --git a/alib2data/src/alphabet/VariablesBarSymbol.h b/alib2data/src/alphabet/VariablesBarSymbol.h index 289b2a9822..b31b481f61 100644 --- a/alib2data/src/alphabet/VariablesBarSymbol.h +++ b/alib2data/src/alphabet/VariablesBarSymbol.h @@ -46,16 +46,6 @@ public: template < typename Base > static inline typename std::enable_if < ! std::is_integral < Base >::value, Base >::type instance ( ); - static const std::string & getXmlTagName() { - static std::string xmlTagName = "VariablesBarSymbol"; - - return xmlTagName; - } - - static VariablesBarSymbol parse ( ext::deque < sax::Token >::iterator & input ); - - static void compose ( ext::deque < sax::Token > & out, const VariablesBarSymbol & ); - virtual SymbolBase * inc ( ) &&; typedef VariablesBarSymbol normalized_type; diff --git a/alib2data/src/alphabet/xml/BarSymbol.cpp b/alib2data/src/alphabet/xml/BarSymbol.cpp new file mode 100644 index 0000000000..9ff39a5475 --- /dev/null +++ b/alib2data/src/alphabet/xml/BarSymbol.cpp @@ -0,0 +1,47 @@ +/* + * BarSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Stepan Plachy + */ + +#include "BarSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::BarSymbol xmlApi < alphabet::BarSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::BarSymbol ( ); +} + +bool xmlApi < alphabet::BarSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::BarSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "BarSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::BarSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::BarSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::BarSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::BarSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BarSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BarSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/BarSymbol.h b/alib2data/src/alphabet/xml/BarSymbol.h new file mode 100644 index 0000000000..457f66d8ce --- /dev/null +++ b/alib2data/src/alphabet/xml/BarSymbol.h @@ -0,0 +1,26 @@ +/* + * BarSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Stepan Plachy + */ + +#ifndef _XML_BAR_SYMBOL_H_ +#define _XML_BAR_SYMBOL_H_ + +#include <alphabet/BarSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::BarSymbol > { + static alphabet::BarSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::BarSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_BAR_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/BlankSymbol.cpp b/alib2data/src/alphabet/xml/BlankSymbol.cpp new file mode 100644 index 0000000000..1a5500735a --- /dev/null +++ b/alib2data/src/alphabet/xml/BlankSymbol.cpp @@ -0,0 +1,47 @@ +/* + * BlankSymbol.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "BlankSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::BlankSymbol xmlApi < alphabet::BlankSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::BlankSymbol ( ); +} + +bool xmlApi < alphabet::BlankSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::BlankSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "BlankSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::BlankSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::BlankSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::BlankSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::BlankSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BlankSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BlankSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/BlankSymbol.h b/alib2data/src/alphabet/xml/BlankSymbol.h new file mode 100644 index 0000000000..9b280642c0 --- /dev/null +++ b/alib2data/src/alphabet/xml/BlankSymbol.h @@ -0,0 +1,26 @@ +/* + * BlankSymbol.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_BLANK_SYMBOL_H_ +#define _XML_BLANK_SYMBOL_H_ + +#include <alphabet/BlankSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::BlankSymbol > { + static alphabet::BlankSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::BlankSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_BLANK_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/BottomOfTheStackSymbol.cpp b/alib2data/src/alphabet/xml/BottomOfTheStackSymbol.cpp new file mode 100644 index 0000000000..29f61ef2e3 --- /dev/null +++ b/alib2data/src/alphabet/xml/BottomOfTheStackSymbol.cpp @@ -0,0 +1,47 @@ +/* + * BottomOfTheStackSymbol.cpp + * + * Created on: Jun 19, 2014 + * Author: Jan Travnicek + */ + +#include "BottomOfTheStackSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::BottomOfTheStackSymbol xmlApi < alphabet::BottomOfTheStackSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::BottomOfTheStackSymbol ( ); +} + +bool xmlApi < alphabet::BottomOfTheStackSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::BottomOfTheStackSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "BottomOfTheStackSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::BottomOfTheStackSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::BottomOfTheStackSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::BottomOfTheStackSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::BottomOfTheStackSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BottomOfTheStackSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BottomOfTheStackSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/BottomOfTheStackSymbol.h b/alib2data/src/alphabet/xml/BottomOfTheStackSymbol.h new file mode 100644 index 0000000000..fc38109167 --- /dev/null +++ b/alib2data/src/alphabet/xml/BottomOfTheStackSymbol.h @@ -0,0 +1,26 @@ +/* + * BottomOfTheStackSymbol.h + * + * Created on: Jun 19, 2014 + * Author: Jan Travnicek + */ + +#ifndef _XML_BOTTOM_OF_THE_STACK_SYMBOL_H_ +#define _XML_BOTTOM_OF_THE_STACK_SYMBOL_H_ + +#include <alphabet/BottomOfTheStackSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::BottomOfTheStackSymbol > { + static alphabet::BottomOfTheStackSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::BottomOfTheStackSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_BOTTOM_OF_THE_STACK_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/EndSymbol.cpp b/alib2data/src/alphabet/xml/EndSymbol.cpp new file mode 100644 index 0000000000..b0795bae42 --- /dev/null +++ b/alib2data/src/alphabet/xml/EndSymbol.cpp @@ -0,0 +1,47 @@ +/* + * EndSymbol.cpp + * + * Created on: Jun 19, 2014 + * Author: Jan Travnicek + */ + +#include "EndSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::EndSymbol xmlApi < alphabet::EndSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::EndSymbol ( ); +} + +bool xmlApi < alphabet::EndSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::EndSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "EndSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::EndSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::EndSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::EndSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::EndSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::EndSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::EndSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/EndSymbol.h b/alib2data/src/alphabet/xml/EndSymbol.h new file mode 100644 index 0000000000..5870222d4b --- /dev/null +++ b/alib2data/src/alphabet/xml/EndSymbol.h @@ -0,0 +1,26 @@ +/* + * EndSymbol.h + * + * Created on: Jun 19, 2014 + * Author: Jan Travnicek + */ + +#ifndef _XML_END_SYMBOL_H_ +#define _XML_END_SYMBOL_H_ + +#include <alphabet/EndSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::EndSymbol > { + static alphabet::EndSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::EndSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_END_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/InitialSymbol.cpp b/alib2data/src/alphabet/xml/InitialSymbol.cpp new file mode 100644 index 0000000000..95cb331bd2 --- /dev/null +++ b/alib2data/src/alphabet/xml/InitialSymbol.cpp @@ -0,0 +1,47 @@ +/* + * InitialSymbol.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travicek + */ + +#include "InitialSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::InitialSymbol xmlApi < alphabet::InitialSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::InitialSymbol ( ); +} + +bool xmlApi < alphabet::InitialSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::InitialSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "InitialSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::InitialSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::InitialSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::InitialSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::InitialSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::InitialSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::InitialSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/InitialSymbol.h b/alib2data/src/alphabet/xml/InitialSymbol.h new file mode 100644 index 0000000000..b9875c917e --- /dev/null +++ b/alib2data/src/alphabet/xml/InitialSymbol.h @@ -0,0 +1,26 @@ +/* + * InitialSymbol.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_INITIAL_SYMBOL_LABEL_H_ +#define _XML_INITIAL_SYMBOL_LABEL_H_ + +#include <alphabet/InitialSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::InitialSymbol > { + static alphabet::InitialSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::InitialSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_INITIAL_SYMBOL_LABEL_H_ */ diff --git a/alib2data/src/alphabet/xml/LabeledSymbol.cpp b/alib2data/src/alphabet/xml/LabeledSymbol.cpp new file mode 100644 index 0000000000..0fda873d08 --- /dev/null +++ b/alib2data/src/alphabet/xml/LabeledSymbol.cpp @@ -0,0 +1,49 @@ +/* + * LabeledSymbol.cpp + * + * Created on: Mar 26, 2013 + * Author: Martin Zak + */ + +#include "LabeledSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::LabeledSymbol xmlApi < alphabet::LabeledSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + label::Label data = alib::xmlApi < label::Label >::parse ( input ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::LabeledSymbol ( std::move ( data ) ); +} + +bool xmlApi < alphabet::LabeledSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::LabeledSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "LabeledSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::LabeledSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::LabeledSymbol & data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + alib::xmlApi < label::Label >::compose ( output, data.getLabel ( ) ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::LabeledSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::LabeledSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::LabeledSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::LabeledSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/LabeledSymbol.h b/alib2data/src/alphabet/xml/LabeledSymbol.h new file mode 100644 index 0000000000..ed08b95068 --- /dev/null +++ b/alib2data/src/alphabet/xml/LabeledSymbol.h @@ -0,0 +1,26 @@ +/* + * LabeledSymbol.h + * + * Created on: Mar 26, 2013 + * Author: Martin Zak + */ + +#ifndef _XML_LABELED_SYMBOL_H_ +#define _XML_LABELED_SYMBOL_H_ + +#include <alphabet/LabeledSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::LabeledSymbol > { + static alphabet::LabeledSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::LabeledSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_LABELED_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/NonlinearVariableSymbol.cpp b/alib2data/src/alphabet/xml/NonlinearVariableSymbol.cpp new file mode 100644 index 0000000000..dd6d69fbe4 --- /dev/null +++ b/alib2data/src/alphabet/xml/NonlinearVariableSymbol.cpp @@ -0,0 +1,22 @@ +/* + * NonlinearVariableSymbol.cpp + * + * Created on: Apr 10, 2013 + * Author: Jan Travnicek + */ + +#include "NonlinearVariableSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::NonlinearVariableSymbol < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::NonlinearVariableSymbol < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::NonlinearVariableSymbol < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::NonlinearVariableSymbol < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/NonlinearVariableSymbol.h b/alib2data/src/alphabet/xml/NonlinearVariableSymbol.h new file mode 100644 index 0000000000..1183975390 --- /dev/null +++ b/alib2data/src/alphabet/xml/NonlinearVariableSymbol.h @@ -0,0 +1,54 @@ +/* + * NonlinearVariableSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_NONLINEAR_VARIABLE_SYMBOL_H_ +#define _XML_NONLINEAR_VARIABLE_SYMBOL_H_ + +#include <alphabet/NonlinearVariableSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < class T > +struct xmlApi < alphabet::NonlinearVariableSymbol < T > > { + static alphabet::NonlinearVariableSymbol < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::NonlinearVariableSymbol < T > & data ); +}; + +template < typename T > +alphabet::NonlinearVariableSymbol < T > xmlApi < alphabet::NonlinearVariableSymbol < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + T data = alib::xmlApi < T >::parse ( input ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + + return alphabet::NonlinearVariableSymbol < T > ( data ); +} + +template < typename T > +bool xmlApi < alphabet::NonlinearVariableSymbol < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T > +const std::string & xmlApi < alphabet::NonlinearVariableSymbol < T > >::xmlTagName ( ) { + static std::string xmlTagName = "NonlinearVariableSymbol"; + + return xmlTagName; +} + +template < typename T > +void xmlApi < alphabet::NonlinearVariableSymbol < T > >::compose ( ext::deque < sax::Token > & output, const alphabet::NonlinearVariableSymbol < T > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + alib::xmlApi < T >::compose ( output, input.getSymbol ( ) ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +#endif /* _XML_NONLINEAR_VARIABLE_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/RankedSymbol.cpp b/alib2data/src/alphabet/xml/RankedSymbol.cpp new file mode 100644 index 0000000000..c3711e5fe5 --- /dev/null +++ b/alib2data/src/alphabet/xml/RankedSymbol.cpp @@ -0,0 +1,22 @@ +/* + * RankedSymbol.cpp + * + * Created on: Apr 10, 2013 + * Author: Stepan Plachy + */ + +#include "RankedSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::RankedSymbol < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::RankedSymbol < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::RankedSymbol < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::RankedSymbol < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/RankedSymbol.h b/alib2data/src/alphabet/xml/RankedSymbol.h new file mode 100644 index 0000000000..da18195af8 --- /dev/null +++ b/alib2data/src/alphabet/xml/RankedSymbol.h @@ -0,0 +1,84 @@ +/* + * RankedSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Stepan Plachy + */ + +#ifndef _XML_RANKED_SYMBOL_H_ +#define _XML_RANKED_SYMBOL_H_ + +#include <alphabet/RankedSymbol.h> +#include <core/xmlApi.hpp> +#include <primitive/xml/Unsigned.h> + +namespace alib { + +template < typename T, typename R > +struct xmlApi < common::ranked_symbol < T, R > > { + static common::ranked_symbol < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const common::ranked_symbol < T, R > & data ); +}; + +template < typename T, typename R > +common::ranked_symbol < T, R > xmlApi < common::ranked_symbol < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + T data = alib::xmlApi < T >::parse ( input ); + R rank = alib::xmlApi < R >::parse ( input ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return common::ranked_symbol < T, R > ( std::move ( data ), std::move ( rank ) ); +} + +template < typename T, typename R > +bool xmlApi < common::ranked_symbol < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName( ) ); +} + +template < typename T, typename R > +const std::string & xmlApi < common::ranked_symbol < T, R > >::xmlTagName ( ) { + static std::string xmlTagName = "RankedSymbol"; + + return xmlTagName; +} + +template < typename T, typename R > +void xmlApi < common::ranked_symbol < T, R > >::compose ( ext::deque < sax::Token > & output, const common::ranked_symbol < T, R > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + alib::xmlApi < T >::compose ( output, input.getSymbol ( ) ); + alib::xmlApi < R >::compose ( output, input.getRank ( ) ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T, typename R > +struct xmlApi < alphabet::RankedSymbol < T, R > > { + static alphabet::RankedSymbol < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::RankedSymbol < T, R > & data ); +}; + +template < typename T, typename R > +alphabet::RankedSymbol < T, R > xmlApi < alphabet::RankedSymbol < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return alphabet::RankedSymbol < T, R > ( xmlApi < common::ranked_symbol < T, R > >::parse ( input ) ); +} + +template < typename T, typename R > +bool xmlApi < alphabet::RankedSymbol < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < common::ranked_symbol < T, R > >::first ( input ); +} + +template < typename T, typename R > +const std::string & xmlApi < alphabet::RankedSymbol < T, R > >::xmlTagName ( ) { + return xmlApi < common::ranked_symbol < T, R > >::xmlTagName ( ); +} + +template < typename T, typename R > +void xmlApi < alphabet::RankedSymbol < T, R > >::compose ( ext::deque < sax::Token > & output, const alphabet::RankedSymbol < T, R > & input ) { + xmlApi < common::ranked_symbol < T, R > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_RANKED_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/StartSymbol.cpp b/alib2data/src/alphabet/xml/StartSymbol.cpp new file mode 100644 index 0000000000..fa4667da3d --- /dev/null +++ b/alib2data/src/alphabet/xml/StartSymbol.cpp @@ -0,0 +1,47 @@ +/* + * StartSymbol.cpp + * + * Created on: Jun 19, 2014 + * Author: Jan Travnicek + */ + +#include "StartSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::StartSymbol xmlApi < alphabet::StartSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::StartSymbol ( ); +} + +bool xmlApi < alphabet::StartSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::StartSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "StartSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::StartSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::StartSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::StartSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::StartSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::StartSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::StartSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/StartSymbol.h b/alib2data/src/alphabet/xml/StartSymbol.h new file mode 100644 index 0000000000..87c5c7222c --- /dev/null +++ b/alib2data/src/alphabet/xml/StartSymbol.h @@ -0,0 +1,26 @@ +/* + * StartSymbol.h + * + * Created on: Jun 19, 2014 + * Author: Jan Travnicek + */ + +#ifndef _XML_START_SYMBOL_H_ +#define _XML_START_SYMBOL_H_ + +#include <alphabet/StartSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::StartSymbol > { + static alphabet::StartSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::StartSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_START_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/SubtreeWildcardSymbol.cpp b/alib2data/src/alphabet/xml/SubtreeWildcardSymbol.cpp new file mode 100644 index 0000000000..f00b4cd37c --- /dev/null +++ b/alib2data/src/alphabet/xml/SubtreeWildcardSymbol.cpp @@ -0,0 +1,47 @@ +/* + * SubtreeWildcardSymbol.cpp + * + * Created on: Apr 10, 2013 + * Author: Jan Travnicek + */ + +#include "SubtreeWildcardSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::SubtreeWildcardSymbol xmlApi < alphabet::SubtreeWildcardSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::SubtreeWildcardSymbol ( ); +} + +bool xmlApi < alphabet::SubtreeWildcardSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::SubtreeWildcardSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "SubtreeWildcardSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::SubtreeWildcardSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::SubtreeWildcardSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::SubtreeWildcardSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::SubtreeWildcardSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::SubtreeWildcardSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::SubtreeWildcardSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/SubtreeWildcardSymbol.h b/alib2data/src/alphabet/xml/SubtreeWildcardSymbol.h new file mode 100644 index 0000000000..f8e5f34b3d --- /dev/null +++ b/alib2data/src/alphabet/xml/SubtreeWildcardSymbol.h @@ -0,0 +1,26 @@ +/* + * SubtreeWildcardSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_SUBTREE_WILDCARD_SYMBOL_H_ +#define _XML_SUBTREE_WILDCARD_SYMBOL_H_ + +#include <alphabet/SubtreeWildcardSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::SubtreeWildcardSymbol > { + static alphabet::SubtreeWildcardSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::SubtreeWildcardSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_SUBTREE_WILDCARD_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/UniqueSymbol.cpp b/alib2data/src/alphabet/xml/UniqueSymbol.cpp new file mode 100644 index 0000000000..25df9ea844 --- /dev/null +++ b/alib2data/src/alphabet/xml/UniqueSymbol.cpp @@ -0,0 +1,54 @@ +/* + * UniqueSymbol.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travicek + */ + +#include "UniqueSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> +#include <primitive/xml/Integer.h> + +namespace alib { + +alphabet::UniqueSymbol xmlApi < alphabet::UniqueSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + alphabet::Symbol firstSymbol = alib::xmlApi < alphabet::Symbol >::parse ( input ); + primitive::Integer secondSymbol = alib::xmlApi < primitive::Integer >::parse ( input ); + + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::UniqueSymbol ( std::move ( firstSymbol ), std::move ( secondSymbol ) ); +} + +bool xmlApi < alphabet::UniqueSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::UniqueSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "UniqueSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::UniqueSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::UniqueSymbol & data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + alib::xmlApi < alphabet::Symbol >::compose ( output, data.getSymbol ( ) ); + alib::xmlApi < primitive::Integer >::compose ( output, data.getId ( ) ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::UniqueSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::UniqueSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::UniqueSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::UniqueSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/UniqueSymbol.h b/alib2data/src/alphabet/xml/UniqueSymbol.h new file mode 100644 index 0000000000..88aa5950f5 --- /dev/null +++ b/alib2data/src/alphabet/xml/UniqueSymbol.h @@ -0,0 +1,26 @@ +/* + * UniqueSymbol.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_SYMBOL_ID_SYMBOL_H_ +#define _XML_SYMBOL_ID_SYMBOL_H_ + +#include <alphabet/UniqueSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::UniqueSymbol > { + static alphabet::UniqueSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::UniqueSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_SYMBOL_ID_SYMBOL_H_ */ diff --git a/alib2data/src/alphabet/xml/VariablesBarSymbol.cpp b/alib2data/src/alphabet/xml/VariablesBarSymbol.cpp new file mode 100644 index 0000000000..d13c7a5007 --- /dev/null +++ b/alib2data/src/alphabet/xml/VariablesBarSymbol.cpp @@ -0,0 +1,47 @@ +/* + * VariablesBarSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Jan Travnicek + */ + +#include "VariablesBarSymbol.h" +#include <alphabet/Symbol.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alphabet::VariablesBarSymbol xmlApi < alphabet::VariablesBarSymbol >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return alphabet::VariablesBarSymbol ( ); +} + +bool xmlApi < alphabet::VariablesBarSymbol >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alphabet::VariablesBarSymbol >::xmlTagName ( ) { + static std::string xmlTagName = "VariablesBarSymbol"; + + return xmlTagName; +} + +void xmlApi < alphabet::VariablesBarSymbol >::compose ( ext::deque < sax::Token > & output, const alphabet::VariablesBarSymbol & ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alphabet::Symbol, alphabet::VariablesBarSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, alphabet::VariablesBarSymbol > ( ); + +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::VariablesBarSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::VariablesBarSymbol > ( ); + +} /* namespace */ diff --git a/alib2data/src/alphabet/xml/VariablesBarSymbol.h b/alib2data/src/alphabet/xml/VariablesBarSymbol.h new file mode 100644 index 0000000000..2671c52123 --- /dev/null +++ b/alib2data/src/alphabet/xml/VariablesBarSymbol.h @@ -0,0 +1,26 @@ +/* + * VariablesBarSymbol.h + * + * Created on: Apr 10, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_VARIABLES_BAR_SYMBOL_H_ +#define _XML_VARIABLES_BAR_SYMBOL_H_ + +#include <alphabet/VariablesBarSymbol.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alphabet::VariablesBarSymbol > { + static alphabet::VariablesBarSymbol parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alphabet::VariablesBarSymbol & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_VARIABLES_BAR_SYMBOL_H_ */ diff --git a/alib2data/src/automaton/TA/DFTA.h b/alib2data/src/automaton/TA/DFTA.h index 24d0bbfb53..47ba071ff0 100644 --- a/alib2data/src/automaton/TA/DFTA.h +++ b/alib2data/src/automaton/TA/DFTA.h @@ -17,6 +17,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../AutomatonFeatures.h" #include "../AutomatonException.h" diff --git a/alib2data/src/common/PrimitiveRegistrator2.cpp b/alib2data/src/common/PrimitiveRegistrator.cpp similarity index 77% rename from alib2data/src/common/PrimitiveRegistrator2.cpp rename to alib2data/src/common/PrimitiveRegistrator.cpp index 9f96f4aa63..8d2aa54fd1 100644 --- a/alib2data/src/common/PrimitiveRegistrator2.cpp +++ b/alib2data/src/common/PrimitiveRegistrator.cpp @@ -12,39 +12,44 @@ #include <abstraction/ValuePrinterRegistry.hpp> #include <abstraction/ImmediateRegistry.hpp> #include <abstraction/ContainerRegistry.hpp> +#include <abstraction/XmlContainerRegistry.hpp> -#include <primitive/Double.h> -#include <primitive/Integer.h> -#include <primitive/Unsigned.h> -#include <primitive/Bool.h> -#include <primitive/UnsignedLong.h> -#include <primitive/String.h> +#include <primitive/xml/Double.h> +#include <primitive/xml/Integer.h> +#include <primitive/xml/Unsigned.h> +#include <primitive/xml/Bool.h> +#include <primitive/xml/UnsignedLong.h> +#include <primitive/xml/String.h> -#include <container/ObjectsVector.h> -#include <container/ObjectsSet.h> -#include <container/ObjectsMap.h> -#include <container/ObjectsVariant.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsVariant.h> + +#include <object/xml/AnyObject.h> #include <common/DefaultStateType.h> #include <common/DefaultSymbolType.h> #include <common/DefaultRankType.h> #include <common/ranked_symbol.hpp> -#include <alphabet/RankedSymbol.h> -#include <alphabet/BottomOfTheStackSymbol.h> +#include <alphabet/xml/RankedSymbol.h> +#include <alphabet/xml/BottomOfTheStackSymbol.h> #include <string/LinearString.h> #include <string/Epsilon.h> -namespace abstraction { +namespace { -class PrimitiveRegistrator2 { +class PrimitiveRegistrator { public: - PrimitiveRegistrator2 ( ) { + PrimitiveRegistrator ( ) { + abstraction::ContainerRegistry::registerSet < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::map < DefaultSymbolType, size_t > > ( ); abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::map < common::ranked_symbol < DefaultSymbolType, DefaultRankType >, size_t > > ( ); - abstraction::ContainerRegistry::registerSet < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" ); + abstraction::XmlContainerRegistry::registerSet < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" ); abstraction::XmlParserRegistry::registerXmlParser < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" ); abstraction::XmlParserRegistry::registerXmlParser < DefaultStateType > ( "DefaultStateType" ); @@ -63,6 +68,6 @@ public: } }; -auto primitiveRegistrator2 = PrimitiveRegistrator2 ( ); +auto primitiveRegistrator = PrimitiveRegistrator ( ); -} /* namespace abstraction */ +} /* namespace */ diff --git a/alib2data/src/common/SparseBoolVector.hpp b/alib2data/src/common/SparseBoolVector.hpp index f02de8c02e..914cf54f8b 100644 --- a/alib2data/src/common/SparseBoolVector.hpp +++ b/alib2data/src/common/SparseBoolVector.hpp @@ -12,6 +12,8 @@ #include <core/xmlApi.hpp> #include <primitive/Unsigned.h> #include <primitive/UnsignedLong.h> +#include <primitive/xml/Unsigned.h> +#include <primitive/xml/UnsignedLong.h> #include <tuple> /* Canonical representation kept by all operations is in form of blocks of pairs run and word, where each word must contain at least one set bit, with exception of the last word. diff --git a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h index 65356ef1d3..1e11fe4159 100644 --- a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h +++ b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h @@ -13,6 +13,7 @@ #include <common/DefaultSymbolType.h> #include <alphabet/RankedSymbol.h> +#include <alphabet/xml/RankedSymbol.h> #include <core/components.hpp> #include <exception/CommonException.h> @@ -26,8 +27,14 @@ #include <container/ObjectsSet.h> #include <container/ObjectsMap.h> #include <container/ObjectsVector.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsVector.h> #include <common/SparseBoolVector.hpp> + #include <primitive/Bool.h> +#include <primitive/xml/Bool.h> +#include <primitive/xml/Integer.h> #include <alphabet/common/SymbolNormalize.h> diff --git a/alib2data/src/indexes/arbology/FullAndLinearIndex.h b/alib2data/src/indexes/arbology/FullAndLinearIndex.h index 775af9dbe2..304c9feaa6 100644 --- a/alib2data/src/indexes/arbology/FullAndLinearIndex.h +++ b/alib2data/src/indexes/arbology/FullAndLinearIndex.h @@ -12,6 +12,7 @@ #include <sstream> #include <alphabet/RankedSymbol.h> +#include <alphabet/xml/RankedSymbol.h> #include <object/UniqueObject.h> #include <object/ObjectBase.h> @@ -20,6 +21,9 @@ #include <core/xmlApi.hpp> #include <container/ObjectsVector.h> +#include <container/xml/ObjectsVector.h> + +#include <primitive/xml/Integer.h> #include <indexes/stringology/PositionHeap.h> diff --git a/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.h b/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.h index 9739f2e1c3..e6302ed3af 100644 --- a/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.h +++ b/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.h @@ -12,6 +12,7 @@ #include <sstream> #include <alphabet/RankedSymbol.h> +#include <alphabet/xml/RankedSymbol.h> #include <core/components.hpp> #include <exception/CommonException.h> @@ -25,8 +26,13 @@ #include <container/ObjectsSet.h> #include <container/ObjectsMap.h> #include <container/ObjectsVector.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsVector.h> #include <common/SparseBoolVector.hpp> #include <primitive/Bool.h> +#include <primitive/xml/Bool.h> +#include <primitive/xml/Integer.h> #include <alphabet/common/SymbolNormalize.h> diff --git a/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h b/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h index cf8d4b9eb1..3ba840524d 100644 --- a/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h +++ b/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.h @@ -12,6 +12,7 @@ #include <sstream> #include <alphabet/RankedSymbol.h> +#include <alphabet/xml/RankedSymbol.h> #include <object/UniqueObject.h> #include <object/ObjectBase.h> @@ -20,6 +21,9 @@ #include <core/xmlApi.hpp> #include <container/ObjectsVector.h> +#include <container/xml/ObjectsVector.h> + +#include <primitive/xml/Integer.h> #include <indexes/stringology/PositionHeap.h> diff --git a/alib2data/src/indexes/stringology/BNDMMatcher.h b/alib2data/src/indexes/stringology/BNDMMatcher.h index ad27092f2e..cb8644caed 100644 --- a/alib2data/src/indexes/stringology/BNDMMatcher.h +++ b/alib2data/src/indexes/stringology/BNDMMatcher.h @@ -26,8 +26,14 @@ #include <container/ObjectsSet.h> #include <container/ObjectsMap.h> #include <container/ObjectsVector.h> -#include <container/ObjectsBitset.h> + +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsBitset.h> + #include <primitive/Bool.h> +#include <primitive/xml/Bool.h> #include <bitset> #include <alphabet/common/SymbolNormalize.h> diff --git a/alib2data/src/indexes/stringology/BitParallelIndex.h b/alib2data/src/indexes/stringology/BitParallelIndex.h index 252b7000ad..6d663d72b7 100644 --- a/alib2data/src/indexes/stringology/BitParallelIndex.h +++ b/alib2data/src/indexes/stringology/BitParallelIndex.h @@ -26,7 +26,13 @@ #include <container/ObjectsSet.h> #include <container/ObjectsMap.h> #include <container/ObjectsVector.h> + +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsVector.h> + #include <primitive/Bool.h> +#include <primitive/xml/Bool.h> #include <alphabet/common/SymbolNormalize.h> diff --git a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h index 0d5941a150..b85f3563fc 100644 --- a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h +++ b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h @@ -25,8 +25,14 @@ #include <container/ObjectsSet.h> #include <container/ObjectsMap.h> + +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsMap.h> + #include <common/SparseBoolVector.hpp> + #include <primitive/Bool.h> +#include <primitive/xml/Bool.h> #include <alphabet/common/SymbolNormalize.h> diff --git a/alib2data/src/indexes/stringology/PositionHeap.h b/alib2data/src/indexes/stringology/PositionHeap.h index 0b46267aca..303de9de0a 100644 --- a/alib2data/src/indexes/stringology/PositionHeap.h +++ b/alib2data/src/indexes/stringology/PositionHeap.h @@ -31,7 +31,12 @@ #include <container/ObjectsTrie.h> #include <container/ObjectsVector.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsTrie.h> +#include <container/xml/ObjectsVector.h> + #include <primitive/Unsigned.h> +#include <primitive/xml/Unsigned.h> #include <alphabet/common/SymbolNormalize.h> #include <indexes/common/IndexesNormalize.h> diff --git a/alib2data/src/indexes/stringology/SuffixArray.h b/alib2data/src/indexes/stringology/SuffixArray.h index ca7a27e2c0..7bf6c96852 100644 --- a/alib2data/src/indexes/stringology/SuffixArray.h +++ b/alib2data/src/indexes/stringology/SuffixArray.h @@ -27,10 +27,14 @@ #include <sax/FromXMLParserHelper.h> #include <core/xmlApi.hpp> #include <primitive/Unsigned.h> +#include <primitive/xml/Unsigned.h> #include <container/ObjectsSet.h> #include <container/ObjectsVector.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsVector.h> + #include <alphabet/common/SymbolNormalize.h> namespace indexes { diff --git a/alib2data/src/indexes/stringology/SuffixTrie.h b/alib2data/src/indexes/stringology/SuffixTrie.h index be89b75290..63cba13519 100644 --- a/alib2data/src/indexes/stringology/SuffixTrie.h +++ b/alib2data/src/indexes/stringology/SuffixTrie.h @@ -30,10 +30,15 @@ #include <container/ObjectsSet.h> #include <container/ObjectsTrie.h> -#include <container/ObjectsVariant.h> + +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsTrie.h> #include <object/Void.h> +#include <object/xml/Void.h> #include <primitive/Unsigned.h> +#include <primitive/xml/Unsigned.h> #include <alphabet/common/SymbolNormalize.h> #include <indexes/common/IndexesNormalize.h> diff --git a/alib2data/src/label/UniqueLabel.cpp b/alib2data/src/label/UniqueLabel.cpp index 6ffb8f825d..f51d006c7c 100644 --- a/alib2data/src/label/UniqueLabel.cpp +++ b/alib2data/src/label/UniqueLabel.cpp @@ -14,6 +14,8 @@ #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> +#include <primitive/xml/Integer.h> + namespace label { UniqueLabel::UniqueLabel(Label label, primitive::Integer id) : m_label(std::move(label)), m_id(std::move(id)) { diff --git a/alib2data/src/rte/formal/FormalRTEElement.h b/alib2data/src/rte/formal/FormalRTEElement.h index 314be57800..05ca839121 100644 --- a/alib2data/src/rte/formal/FormalRTEElement.h +++ b/alib2data/src/rte/formal/FormalRTEElement.h @@ -9,6 +9,7 @@ #define FORMAL_RTE_ELEMENT_H_ #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include <set> #include <tree> #include <core/visitor.hpp> diff --git a/alib2data/src/tree/ranked/PostfixRankedTree.h b/alib2data/src/tree/ranked/PostfixRankedTree.h index 29c8a915b4..0dcd7d1d44 100644 --- a/alib2data/src/tree/ranked/PostfixRankedTree.h +++ b/alib2data/src/tree/ranked/PostfixRankedTree.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h index d7ad75dfc6..feba9608ce 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h @@ -19,6 +19,7 @@ #include <core/components.hpp> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h index bb0f1b3b15..a6f581b656 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/ranked/PrefixRankedBarTree.h index 4e10039807..74d8c74692 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h index ad70bca05d..7fb89eb4a0 100644 --- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.h b/alib2data/src/tree/ranked/PrefixRankedPattern.h index a8235d9d7f..b6299a1f60 100644 --- a/alib2data/src/tree/ranked/PrefixRankedPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedPattern.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.h b/alib2data/src/tree/ranked/PrefixRankedTree.h index 25e60c41ea..8f128b6c9b 100644 --- a/alib2data/src/tree/ranked/PrefixRankedTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedTree.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.h b/alib2data/src/tree/ranked/RankedNonlinearPattern.h index cc55e1f5c8..e1b0d5f0e7 100644 --- a/alib2data/src/tree/ranked/RankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/RankedPattern.h b/alib2data/src/tree/ranked/RankedPattern.h index 82276a6c03..977a10b056 100644 --- a/alib2data/src/tree/ranked/RankedPattern.h +++ b/alib2data/src/tree/ranked/RankedPattern.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../TreeException.h" diff --git a/alib2data/src/tree/ranked/RankedTree.h b/alib2data/src/tree/ranked/RankedTree.h index d7454e696b..4eb1677ac5 100644 --- a/alib2data/src/tree/ranked/RankedTree.h +++ b/alib2data/src/tree/ranked/RankedTree.h @@ -19,6 +19,7 @@ #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include <common/ranked_symbol.hpp> +#include <alphabet/xml/RankedSymbol.h> #include "../TreeFeatures.h" #include "../RankedTreeBase.h" diff --git a/alib2data/test-src/automaton/AutomatonTemplatesTest.cpp b/alib2data/test-src/automaton/AutomatonTemplatesTest.cpp index 1674083272..c74f7faab9 100644 --- a/alib2data/test-src/automaton/AutomatonTemplatesTest.cpp +++ b/alib2data/test-src/automaton/AutomatonTemplatesTest.cpp @@ -10,7 +10,9 @@ #include "factory/XmlDataFactory.hpp" #include <primitive/Integer.h> +#include <primitive/xml/Integer.h> #include <primitive/Character.h> +#include <primitive/xml/Character.h> #include <object/Object.h> diff --git a/alib2data/test-src/string/StringTest.cpp b/alib2data/test-src/string/StringTest.cpp index c1c5499ba1..e5b09557fd 100644 --- a/alib2data/test-src/string/StringTest.cpp +++ b/alib2data/test-src/string/StringTest.cpp @@ -17,7 +17,9 @@ #include "alphabet/BlankSymbol.h" #include <primitive/Character.h> +#include <primitive/xml/Character.h> #include <container/ObjectsSet.h> +#include <container/xml/ObjectsSet.h> CPPUNIT_TEST_SUITE_NAMED_REGISTRATION ( StringTest, "string" ); CPPUNIT_TEST_SUITE_REGISTRATION ( StringTest ); diff --git a/alib2data_experimental/makefile.conf b/alib2data_experimental/makefile.conf index aaf0e3281c..0d2ae5773d 100644 --- a/alib2data_experimental/makefile.conf +++ b/alib2data_experimental/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2data_experimental TESTBIN:=alib2test -LINK_PATHS=../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieNodeTerminatingSymbol.h b/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieNodeTerminatingSymbol.h index be5ecaea2b..232d42721a 100644 --- a/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieNodeTerminatingSymbol.h +++ b/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieNodeTerminatingSymbol.h @@ -11,6 +11,7 @@ #include <common/DefaultSymbolType.h> #include <map> #include <set> +#include <core/xmlApi.hpp> namespace indexes { diff --git a/alib2data_experimental/src/label/LR0ItemsLabel.cpp b/alib2data_experimental/src/label/LR0ItemsLabel.cpp index cc70791b4a..6b4935e8ad 100644 --- a/alib2data_experimental/src/label/LR0ItemsLabel.cpp +++ b/alib2data_experimental/src/label/LR0ItemsLabel.cpp @@ -15,6 +15,11 @@ #include <container/ObjectsVector.h> #include <primitive/Unsigned.h> +#include <container/xml/ObjectsMap.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsVector.h> +#include <primitive/xml/Unsigned.h> + #include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> diff --git a/alib2elgo/makefile.conf b/alib2elgo/makefile.conf index dbaae33dfc..75ee8ec479 100644 --- a/alib2elgo/makefile.conf +++ b/alib2elgo/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2elgo TESTBIN:=alib2test -LINK_PATHS=../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2measure/Doxyfile b/alib2measure/Doxyfile new file mode 100644 index 0000000000..abb970f1ba --- /dev/null +++ b/alib2measure/Doxyfile @@ -0,0 +1,2280 @@ +# Doxyfile 1.8.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "alib2measure" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- +# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, +# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, +# Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if <section_label> ... \endif and \cond <section_label> +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# <filter> <input-file> +# +# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = . + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use <access key> + S +# (what the <access key> is depends on the OS and browser, but it is typically +# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down +# key> to jump into the search results window, the results can be navigated +# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel +# the search. The filter options can be selected when the cursor is inside the +# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> +# to select a filter and <Enter> or <escape> to activate or cancel the filter +# option. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a web server instead of a web client using Javascript. There +# are two flavours of web server based searching depending on the +# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for +# searching and an index file used by the script. When EXTERNAL_SEARCH is +# enabled the indexing and searching needs to be provided by external tools. See +# the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SERVER_BASED_SEARCH = NO + +# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP +# script for searching. Instead the search results are written to an XML file +# which needs to be processed by an external indexer. Doxygen will invoke an +# external search engine pointed to by the SEARCHENGINE_URL option to obtain the +# search results. +# +# Doxygen ships with an example indexer ( doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). +# +# See the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH = NO + +# The SEARCHENGINE_URL should point to a search engine hosted by a web server +# which will return the search results when EXTERNAL_SEARCH is enabled. +# +# Doxygen ships with an example indexer ( doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Searching" for details. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHENGINE_URL = + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed +# search data is written to a file for indexing by an external tool. With the +# SEARCHDATA_FILE tag the name of this file can be specified. +# The default file is: searchdata.xml. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHDATA_FILE = searchdata.xml + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +# projects and redirect the results back to the right project. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH_ID = + +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# projects other than the one defined by this configuration file, but that are +# all added to the same external search index. Each project needs to have a +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of +# to a relative location where the documentation can be found. The format is: +# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# The default value is: YES. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. +# +# Note that when enabling USE_PDFLATEX this option is only used for generating +# bitmaps for formulas in the HTML output, but not in the Makefile that is +# written to the output directory. +# The default file is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate +# index for LaTeX. +# The default file is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used by the +# printer. +# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x +# 14 inches) and executive (7.25 x 10.5 inches). +# The default value is: a4. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names +# that should be included in the LaTeX output. To get the times font for +# instance you can specify +# EXTRA_PACKAGES=times +# If left blank no extra packages will be included. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the +# generated LaTeX document. The header should contain everything until the first +# chapter. If it is left blank doxygen will generate a standard header. See +# section "Doxygen usage" for information on how to let doxygen write the +# default header to a separate file. +# +# Note: Only use a user-defined header if you know what you are doing! The +# following commands have a special meaning inside the header: $title, +# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will +# replace them by respectively the title of the page, the current date and time, +# only the current date, the version number of doxygen, the project name (see +# PROJECT_NAME), or the project number (see PROJECT_NUMBER). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the +# generated LaTeX document. The footer should contain everything after the last +# chapter. If it is left blank doxygen will generate a standard footer. +# +# Note: Only use a user-defined footer if you know what you are doing! +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_FOOTER = + +# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the LATEX_OUTPUT output +# directory. Note that the files will be copied as-is; there are no commands or +# markers available. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_FILES = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is +# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will +# contain links (just like the HTML output) instead of page references. This +# makes the output suitable for online browsing using a PDF viewer. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PDF_HYPERLINKS = YES + +# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES to get a +# higher quality PDF documentation. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode +# command to the generated LaTeX files. This will instruct LaTeX to keep running +# if errors occur, instead of asking the user for help. This option is also used +# when generating formulas in HTML. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BATCHMODE = NO + +# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the +# index chapters (such as File Index, Compound Index, etc.) in the output. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HIDE_INDICES = NO + +# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source +# code with syntax highlighting in the LaTeX output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. See +# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# The default value is: plain. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# RTF output is optimized for Word 97 and may not look too pretty with other RTF +# readers/editors. +# The default value is: NO. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: rtf. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will +# contain hyperlink fields. The RTF file will contain links (just like the HTML +# output) instead of page references. This makes the output suitable for online +# browsing using Word or some other Word compatible readers that support those +# fields. +# +# Note: WordPad (write) and others do not support links. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's config +# file, i.e. a series of assignments. You only have to provide replacements, +# missing definitions are set to their default value. +# +# See also section "Doxygen usage" for information on how to generate the +# default style sheet that doxygen normally uses. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an RTF document. Syntax is +# similar to doxygen's config file. A template extensions file can be generated +# using doxygen -e rtf extensionFile. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# classes and files. +# The default value is: NO. + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. A directory man3 will be created inside the directory specified by +# MAN_OUTPUT. +# The default directory is: man. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to the generated +# man pages. In case the manual section does not start with a number, the number +# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is +# optional. +# The default value is: .3. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it +# will generate one additional man file for each entity documented in the real +# man page(s). These additional files only source the real man page, but without +# them the man command would be unable to find the correct page. +# The default value is: NO. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# captures the structure of the code including all documentation. +# The default value is: NO. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: xml. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a +# validating XML parser to check the syntax of the XML files. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify a XML DTD, which can be used by a +# validating XML parser to check the syntax of the XML files. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# listings (including syntax highlighting and cross-referencing information) to +# the XML output. Note that enabling this will significantly increase the size +# of the XML output. +# The default value is: YES. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# that can be used to generate PDF. +# The default value is: NO. + +GENERATE_DOCBOOK = NO + +# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in +# front of it. +# The default directory is: docbook. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_OUTPUT = docbook + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen +# Definitions (see http://autogen.sf.net) file that captures the structure of +# the code including all documentation. Note that this feature is still +# experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# file that captures the structure of the code including all documentation. +# +# Note that this feature is still experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI +# output from the Perl module output. +# The default value is: NO. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# formatted so it can be parsed by a human reader. This is useful if you want to +# understand what is going on. On the other hand, if this tag is set to NO the +# size of the Perl module output will be much smaller and Perl will parse it +# just the same. +# The default value is: YES. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file are +# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful +# so different doxyrules.make files included by the same Makefile don't +# overwrite each other's variables. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# C-preprocessor directives found in the sources and include files. +# The default value is: YES. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names +# in the source code. If set to NO only conditional compilation will be +# performed. Macro expansion can be done in a controlled way by setting +# EXPAND_ONLY_PREDEF to YES. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then +# the macro expansion is limited to the macros specified with the PREDEFINED and +# EXPAND_AS_DEFINED tags. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# INCLUDE_PATH will be searched if a #include is found. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by the +# preprocessor. +# This tag requires that the tag SEARCH_INCLUDES is set to YES. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will be +# used. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that are +# defined before the preprocessor is started (similar to the -D option of e.g. +# gcc). The argument of the tag is a list of macros of the form: name or +# name=definition (no spaces). If the definition and the "=" are omitted, "=1" +# is assumed. To prevent a macro definition from being undefined via #undef or +# recursively expanded use the := operator instead of the = operator. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this +# tag can be used to specify a list of macro names that should be expanded. The +# macro definition that is found in the sources will be used. Use the PREDEFINED +# tag if you want to use a different macro definition that overrules the +# definition found in the source code. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will +# remove all refrences to function-like macros that are alone on a line, have an +# all uppercase name, and do not end with a semicolon. Such function macros are +# typically used for boiler-plate code, and will confuse the parser if not +# removed. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tag files. For each tag +# file the location of the external documentation should be added. The format of +# a tag file without this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where loc1 and loc2 can be relative or absolute paths or URLs. See the +# section "Linking to external documentation" for more information about the use +# of tag files. +# Note: Each tag file must have an unique name (where the name does NOT include +# the path). If a tag file is not located in the directory in which doxygen is +# run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create a +# tag file that is based on the input files it reads. See section "Linking to +# external documentation" for more information about the usage of tag files. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external class will be listed in the +# class index. If set to NO only the inherited external classes will be listed. +# The default value is: NO. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in +# the modules index. If set to NO, only the current project's groups will be +# listed. +# The default value is: YES. + +EXTERNAL_GROUPS = YES + +# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# the related pages index. If set to NO, only the current project's pages will +# be listed. +# The default value is: YES. + +EXTERNAL_PAGES = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of 'which perl'). +# The default file (with absolute path) is: /usr/bin/perl. + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to +# NO turns the diagrams off. Note that this option also works with HAVE_DOT +# disabled, but it is recommended to install and use dot, since it yields more +# powerful graphs. +# The default value is: YES. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see: +# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide inheritance +# and usage relations if the target is undocumented or is not a class. +# The default value is: YES. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz (see: +# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# Bell Labs. The other options in this section have no effect if this option is +# set to NO +# The default value is: NO. + +HAVE_DOT = YES + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed +# to run in parallel. When set to 0 doxygen will base this on the number of +# processors available in the system. You can set it explicitly to a value +# larger than 0 to get control over the balance between CPU load and processing +# speed. +# Minimum value: 0, maximum value: 32, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_NUM_THREADS = 0 + +# When you want a differently looking font n the dot files that doxygen +# generates you can specify the font name using DOT_FONTNAME. You need to make +# sure dot is able to find the font, which can be done by putting it in a +# standard location or by setting the DOTFONTPATH environment variable or by +# setting DOT_FONTPATH to the directory containing the font. +# The default value is: Helvetica. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of +# dot graphs. +# Minimum value: 4, maximum value: 24, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the default font as specified with +# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set +# the path where dot can find it using this tag. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTPATH = + +# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for +# each documented class showing the direct and indirect inheritance relations. +# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a +# graph for each documented class showing the direct and indirect implementation +# dependencies (inheritance, containment, and class references variables) of the +# class with other documented classes. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for +# groups, showing the direct groups dependencies. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside the +# class node. If there are many fields or methods and many nodes the graph may +# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the +# number of items for each type to make the size more manageable. Set this to 0 +# for no limit. Note that the threshold may be exceeded by 50% before the limit +# is enforced. So when you set the threshold to 10, up to 15 fields may appear, +# but if the number exceeds 15, the total amount of fields shown is limited to +# 10. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LIMIT_NUM_FIELDS = 10 + +# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and +# collaboration graphs will show the relations between templates and their +# instances. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +TEMPLATE_RELATIONS = YES + +# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to +# YES then doxygen will generate a graph for each documented file showing the +# direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDE_GRAPH = YES + +# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are +# set to YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH tag is set to YES then doxygen will generate a call +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical +# hierarchy of all classes instead of a textual one. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the +# dependencies a directory has on other directories in a graphical way. The +# dependency relations are determined by the #include relations between the +# files in the directories. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. +# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order +# to make the SVG files visible in IE 9+ (other browsers do not have this +# requirement). +# Possible values are: png, jpg, gif and svg. +# The default value is: png. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# +# Note that this requires a modern browser other than Internet Explorer. Tested +# and working are Firefox, Chrome, Safari, and Opera. +# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make +# the SVG files visible. Older versions of IE do not have SVG support. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +INTERACTIVE_SVG = NO + +# The DOT_PATH tag can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the \dotfile +# command). +# This tag requires that the tag HAVE_DOT is set to YES. + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the \mscfile +# command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes +# that will be shown in the graph. If the number of nodes in a graph becomes +# larger than this value, doxygen will truncate the graph, which is visualized +# by representing a node as a red box. Note that doxygen if the number of direct +# children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that +# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. +# Minimum value: 0, maximum value: 10000, default value: 50. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs +# generated by dot. A depth value of 3 means that only nodes reachable from the +# root by following a path via at most 3 edges will be shown. Nodes that lay +# further from the root node will be omitted. Note that setting this option to 1 +# or 2 may greatly reduce the computation time needed for large code bases. Also +# note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. +# Minimum value: 0, maximum value: 1000, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not seem +# to support this out of the box. +# +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) support +# this, this feature is disabled by default. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page +# explaining the meaning of the various boxes and arrows in the dot generated +# graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# files that are used to generate the various graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_CLEANUP = YES diff --git a/alib2measure/makefile b/alib2measure/makefile new file mode 100644 index 0000000000..0b88694038 --- /dev/null +++ b/alib2measure/makefile @@ -0,0 +1,3 @@ +-include makefile.conf +-include ../build.conf +-include ../makefile-library diff --git a/alib2measure/makefile.conf b/alib2measure/makefile.conf new file mode 100644 index 0000000000..e6594da1c7 --- /dev/null +++ b/alib2measure/makefile.conf @@ -0,0 +1,5 @@ +LIBRARY:=alib2measure +TESTBIN:=alib2test +LINK_PATHS=../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2common alib2std +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ diff --git a/alib2common/src/allocator/StealthAllocator.hpp b/alib2measure/src/allocator/StealthAllocator.hpp similarity index 100% rename from alib2common/src/allocator/StealthAllocator.hpp rename to alib2measure/src/allocator/StealthAllocator.hpp diff --git a/alib2common/src/allocator/StealthTypes.cpp b/alib2measure/src/allocator/StealthTypes.cpp similarity index 100% rename from alib2common/src/allocator/StealthTypes.cpp rename to alib2measure/src/allocator/StealthTypes.cpp diff --git a/alib2common/src/allocator/StealthTypes.hpp b/alib2measure/src/allocator/StealthTypes.hpp similarity index 100% rename from alib2common/src/allocator/StealthTypes.hpp rename to alib2measure/src/allocator/StealthTypes.hpp diff --git a/alib2common/src/debug/New.cpp b/alib2measure/src/debug/New.cpp similarity index 100% rename from alib2common/src/debug/New.cpp rename to alib2measure/src/debug/New.cpp diff --git a/alib2common/src/measure b/alib2measure/src/measure similarity index 100% rename from alib2common/src/measure rename to alib2measure/src/measure diff --git a/alib2common/src/measurements/MeasurementEngine.cpp b/alib2measure/src/measurements/MeasurementEngine.cpp similarity index 98% rename from alib2common/src/measurements/MeasurementEngine.cpp rename to alib2measure/src/measurements/MeasurementEngine.cpp index c927b801b7..9f939dc0ca 100644 --- a/alib2common/src/measurements/MeasurementEngine.cpp +++ b/alib2measure/src/measurements/MeasurementEngine.cpp @@ -3,7 +3,7 @@ */ #include "MeasurementEngine.hpp" -#include "../exception/CommonException.h" +#include <exception/CommonException.h> namespace measurements { diff --git a/alib2common/src/measurements/MeasurementEngine.hpp b/alib2measure/src/measurements/MeasurementEngine.hpp similarity index 100% rename from alib2common/src/measurements/MeasurementEngine.hpp rename to alib2measure/src/measurements/MeasurementEngine.hpp diff --git a/alib2common/src/measurements/MeasurementFrame.cpp b/alib2measure/src/measurements/MeasurementFrame.cpp similarity index 100% rename from alib2common/src/measurements/MeasurementFrame.cpp rename to alib2measure/src/measurements/MeasurementFrame.cpp diff --git a/alib2common/src/measurements/MeasurementFrame.hpp b/alib2measure/src/measurements/MeasurementFrame.hpp similarity index 100% rename from alib2common/src/measurements/MeasurementFrame.hpp rename to alib2measure/src/measurements/MeasurementFrame.hpp diff --git a/alib2common/src/measurements/MeasurementNew.cpp b/alib2measure/src/measurements/MeasurementNew.cpp similarity index 100% rename from alib2common/src/measurements/MeasurementNew.cpp rename to alib2measure/src/measurements/MeasurementNew.cpp diff --git a/alib2common/src/measurements/MeasurementNew.hpp b/alib2measure/src/measurements/MeasurementNew.hpp similarity index 100% rename from alib2common/src/measurements/MeasurementNew.hpp rename to alib2measure/src/measurements/MeasurementNew.hpp diff --git a/alib2common/src/measurements/MeasurementResults.cpp b/alib2measure/src/measurements/MeasurementResults.cpp similarity index 94% rename from alib2common/src/measurements/MeasurementResults.cpp rename to alib2measure/src/measurements/MeasurementResults.cpp index cc8f2625f0..b122a01bb5 100644 --- a/alib2common/src/measurements/MeasurementResults.cpp +++ b/alib2measure/src/measurements/MeasurementResults.cpp @@ -2,7 +2,6 @@ * Author: Radovan Cerveny */ #include "MeasurementResults.hpp" -#include "MeasurementResultsXml.hpp" namespace measurements { @@ -117,7 +116,7 @@ MeasurementResults MeasurementResults::aggregate ( const ext::vector < Measureme const int MeasurementXalloc::FORMAT = std::ios::xalloc ( ); std::ostream & operator <<( std::ostream & os, const MeasurementResults & mr ) { - MeasurementFormat mf = MeasurementFormat::XML; + MeasurementFormat mf = MeasurementFormat::LIST; int os_format = os.iword ( MeasurementXalloc::FORMAT ); @@ -129,14 +128,9 @@ std::ostream & operator <<( std::ostream & os, const MeasurementResults & mr ) { case MeasurementFormat::LIST: mr.printAsList ( os ); break; - case MeasurementFormat::TREE: mr.printAsTree ( os ); break; - - case MeasurementFormat::XML: - sax::SaxComposeInterface::printStream ( os, MeasurementResultsXml::compose ( mr ) ); - break; } return os; diff --git a/alib2common/src/measurements/MeasurementResults.hpp b/alib2measure/src/measurements/MeasurementResults.hpp similarity index 94% rename from alib2common/src/measurements/MeasurementResults.hpp rename to alib2measure/src/measurements/MeasurementResults.hpp index 0445adf847..f3410c210d 100644 --- a/alib2common/src/measurements/MeasurementResults.hpp +++ b/alib2measure/src/measurements/MeasurementResults.hpp @@ -6,14 +6,13 @@ #define MEASUREMENT_RESULTS_HPP_ #include <ostream> -#include "../sax/SaxComposeInterface.h" #include "MeasurementTypes.hpp" #include "MeasurementFrame.hpp" namespace measurements { enum class MeasurementFormat { - LIST = 1, TREE = 2, XML = 4 + LIST = 1, TREE = 2 }; struct MeasurementXalloc { diff --git a/alib2common/src/measurements/MeasurementTypes.cpp b/alib2measure/src/measurements/MeasurementTypes.cpp similarity index 96% rename from alib2common/src/measurements/MeasurementTypes.cpp rename to alib2measure/src/measurements/MeasurementTypes.cpp index 801eb99b1d..7ff2e34e45 100644 --- a/alib2common/src/measurements/MeasurementTypes.cpp +++ b/alib2measure/src/measurements/MeasurementTypes.cpp @@ -2,7 +2,7 @@ * Author: Radovan Cerveny */ #include "MeasurementTypes.hpp" -#include "../exception/CommonException.h" +#include <exception/CommonException.h> namespace measurements { diff --git a/alib2common/src/measurements/MeasurementTypes.hpp b/alib2measure/src/measurements/MeasurementTypes.hpp similarity index 92% rename from alib2common/src/measurements/MeasurementTypes.hpp rename to alib2measure/src/measurements/MeasurementTypes.hpp index 6ae17f626d..eed6db3aed 100644 --- a/alib2common/src/measurements/MeasurementTypes.hpp +++ b/alib2measure/src/measurements/MeasurementTypes.hpp @@ -9,7 +9,7 @@ #include <vector> #include <map> #include "MeasurementNew.hpp" -#include "../allocator/StealthTypes.hpp" +#include <allocator/StealthTypes.hpp> namespace measurements { diff --git a/alib2common/src/measurements/frames/CounterDataFrame.cpp b/alib2measure/src/measurements/frames/CounterDataFrame.cpp similarity index 100% rename from alib2common/src/measurements/frames/CounterDataFrame.cpp rename to alib2measure/src/measurements/frames/CounterDataFrame.cpp diff --git a/alib2common/src/measurements/frames/CounterDataFrame.hpp b/alib2measure/src/measurements/frames/CounterDataFrame.hpp similarity index 100% rename from alib2common/src/measurements/frames/CounterDataFrame.hpp rename to alib2measure/src/measurements/frames/CounterDataFrame.hpp diff --git a/alib2common/src/measurements/frames/MemoryDataFrame.cpp b/alib2measure/src/measurements/frames/MemoryDataFrame.cpp similarity index 100% rename from alib2common/src/measurements/frames/MemoryDataFrame.cpp rename to alib2measure/src/measurements/frames/MemoryDataFrame.cpp diff --git a/alib2common/src/measurements/frames/MemoryDataFrame.hpp b/alib2measure/src/measurements/frames/MemoryDataFrame.hpp similarity index 100% rename from alib2common/src/measurements/frames/MemoryDataFrame.hpp rename to alib2measure/src/measurements/frames/MemoryDataFrame.hpp diff --git a/alib2common/src/measurements/frames/TimeDataFrame.cpp b/alib2measure/src/measurements/frames/TimeDataFrame.cpp similarity index 100% rename from alib2common/src/measurements/frames/TimeDataFrame.cpp rename to alib2measure/src/measurements/frames/TimeDataFrame.cpp diff --git a/alib2common/src/measurements/frames/TimeDataFrame.hpp b/alib2measure/src/measurements/frames/TimeDataFrame.hpp similarity index 100% rename from alib2common/src/measurements/frames/TimeDataFrame.hpp rename to alib2measure/src/measurements/frames/TimeDataFrame.hpp diff --git a/alib2common/src/measurements/measurements.cpp b/alib2measure/src/measurements/measurements.cpp similarity index 100% rename from alib2common/src/measurements/measurements.cpp rename to alib2measure/src/measurements/measurements.cpp diff --git a/alib2common/src/measurements/measurements.hpp b/alib2measure/src/measurements/measurements.hpp similarity index 93% rename from alib2common/src/measurements/measurements.hpp rename to alib2measure/src/measurements/measurements.hpp index d0a2d9a9ed..2579e6216d 100644 --- a/alib2common/src/measurements/measurements.hpp +++ b/alib2measure/src/measurements/measurements.hpp @@ -6,7 +6,6 @@ #define MEASUREMENTS_HPP_ #include "MeasurementEngine.hpp" -#include "MeasurementResultsXml.hpp" namespace measurements { diff --git a/alib2measure/test-src/main.cpp b/alib2measure/test-src/main.cpp new file mode 100644 index 0000000000..fd442ebd12 --- /dev/null +++ b/alib2measure/test-src/main.cpp @@ -0,0 +1,164 @@ +#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> + +#include <exception/CommonException.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::CommonException& 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/alib2common/test-src/measurements/MeasurementsTest.cpp b/alib2measure/test-src/measurements/MeasurementsTest.cpp similarity index 63% rename from alib2common/test-src/measurements/MeasurementsTest.cpp rename to alib2measure/test-src/measurements/MeasurementsTest.cpp index 318d661f29..816b536335 100644 --- a/alib2common/test-src/measurements/MeasurementsTest.cpp +++ b/alib2measure/test-src/measurements/MeasurementsTest.cpp @@ -1,5 +1,4 @@ #include "MeasurementsTest.h" -#include "sax/SaxComposeInterface.h" #include <sstream> #include <thread> #include <cmath> @@ -77,7 +76,6 @@ void MeasurementsTest::testTimeMeasurements ( ) { std::cout << measurements::MeasurementFormat::LIST << measurements::results ( ) << std::endl; std::cout << measurements::MeasurementFormat::TREE << measurements::results ( ) << std::endl; - std::cout << measurements::MeasurementFormat::XML << measurements::results ( ) << std::endl; } #ifdef __clang__ @@ -113,7 +111,6 @@ void __NO_OPTIMIZE_ATTRIBUTE__ MeasurementsTest::testMemoryMeasurements ( ) { std::cout << measurements::MeasurementFormat::LIST << measurements::results ( ) << std::endl; std::cout << measurements::MeasurementFormat::TREE << measurements::results ( ) << std::endl; - std::cout << measurements::MeasurementFormat::XML << measurements::results ( ) << std::endl; #ifdef DEBUG int expectedResultsHW [ ] = { 12000, 2000, 12000 , 12000, 4000, 4000 }; @@ -180,85 +177,4 @@ void MeasurementsTest::testCounterMeasurements ( ) { std::cout << measurements::MeasurementFormat::LIST << measurements::results ( ) << std::endl; std::cout << measurements::MeasurementFormat::TREE << measurements::results ( ) << std::endl; - std::cout << measurements::MeasurementFormat::XML << measurements::results ( ) << std::endl; -} - -void MeasurementsTest::testMeasurementResultsXml ( ) { - measurements::start ( "global", measurements::Type::OVERALL ); - measurements::start ( "init", measurements::Type::INIT ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 100 ) ); - measurements::end ( ); - measurements::hint ( measurements::CounterHint { "counter2", measurements::CounterHint::Type::SUB, 5 } ); - - measurements::start ( "main", measurements::Type::MAIN ); - int * foo = new int[1000]; - - std::this_thread::sleep_for ( std::chrono::milliseconds ( 20 ) ); - measurements::start ( "aux", measurements::Type::AUXILIARY ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); - measurements::hint ( measurements::CounterHint { "counter2", measurements::CounterHint::Type::SUB, 5 } ); - - measurements::end ( ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); - measurements::start ( "aux", measurements::Type::AUXILIARY ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); - measurements::end ( ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); - measurements::end ( ); - measurements::hint ( measurements::CounterHint { "counter2", measurements::CounterHint::Type::SUB, 5 } ); - - measurements::start ( "fin", measurements::Type::FINALIZE ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 30 ) ); - measurements::start ( "aux", measurements::Type::AUXILIARY ); - int * bar = new int[2000]; - - std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); - measurements::end ( ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); - measurements::end ( ); - measurements::hint ( measurements::CounterHint { "counter1", measurements::CounterHint::Type::ADD, 1 } ); - - measurements::end ( ); - measurements::start ( "global2", measurements::Type::OVERALL ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 100 ) ); - measurements::end ( ); - - delete[] foo; - measurements::start ( "global3", measurements::Type::OVERALL ); - measurements::start ( "init", measurements::Type::INIT ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 100 ) ); - measurements::end ( ); - measurements::start ( "main", measurements::Type::MAIN ); - delete[] bar; - std::this_thread::sleep_for ( std::chrono::milliseconds ( 20 ) ); - measurements::start ( "aux", measurements::Type::AUXILIARY ); - measurements::hint ( measurements::CounterHint { "counter1", measurements::CounterHint::Type::ADD, 1 } ); - - std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); - measurements::end ( ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); - measurements::start ( "aux", measurements::Type::AUXILIARY ); - measurements::hint ( measurements::CounterHint { "counter1", measurements::CounterHint::Type::ADD, 1 } ); - - std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); - measurements::end ( ); - std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); - measurements::end ( ); - measurements::end ( ); - - ext::deque < sax::Token > tokens = measurements::MeasurementResultsXml::compose ( measurements::results ( ) ); - - measurements::MeasurementResults convertedResults = measurements::MeasurementResultsXml::parse ( tokens ); - - std::ostringstream ossoriginal; - - ossoriginal << measurements::MeasurementFormat::LIST << measurements::results ( ) << std::endl; - - std::ostringstream ossconverted; - - ossconverted << measurements::MeasurementFormat::LIST << convertedResults << std::endl; - - std::cout << ossoriginal.str ( ) << std::endl << ossconverted.str ( ) << std::endl; - - CPPUNIT_ASSERT ( ossoriginal.str ( ) == ossconverted.str ( ) ); } diff --git a/alib2common/test-src/measurements/MeasurementsTest.h b/alib2measure/test-src/measurements/MeasurementsTest.h similarity index 88% rename from alib2common/test-src/measurements/MeasurementsTest.h rename to alib2measure/test-src/measurements/MeasurementsTest.h index 77a90dd673..4afc116c16 100644 --- a/alib2common/test-src/measurements/MeasurementsTest.h +++ b/alib2measure/test-src/measurements/MeasurementsTest.h @@ -9,7 +9,6 @@ class MeasurementsTest : public CppUnit::TestFixture { CPPUNIT_TEST ( testTimeMeasurements ); CPPUNIT_TEST ( testMemoryMeasurements ); CPPUNIT_TEST ( testCounterMeasurements ); - CPPUNIT_TEST ( testMeasurementResultsXml ); CPPUNIT_TEST_SUITE_END ( ); public: @@ -20,8 +19,6 @@ public: void testTimeMeasurements ( ); void testMemoryMeasurements ( ); void testCounterMeasurements ( ); - - void testMeasurementResultsXml( ); }; #endif // MEASUREMENTS_TEST_H_ diff --git a/alib2raw/makefile.conf b/alib2raw/makefile.conf index 70d4aef9c9..7128162ca0 100644 --- a/alib2raw/makefile.conf +++ b/alib2raw/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2raw TESTBIN:=alib2test -LINK_PATHS=../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2std/makefile.conf b/alib2std/makefile.conf index c6cdccb7d5..51853190d4 100644 --- a/alib2std/makefile.conf +++ b/alib2std/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2std TESTBIN:=alib2test LINK_PATHS= -LINK_LIBRARIES=xml2 -INCLUDE_PATHS=/usr/include/libxml2/ +LINK_LIBRARIES= +INCLUDE_PATHS= diff --git a/alib2str/makefile.conf b/alib2str/makefile.conf index a9b0a71652..490c340ebf 100644 --- a/alib2str/makefile.conf +++ b/alib2str/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2str TESTBIN:=alib2test -LINK_PATHS=../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2str_experimental/makefile.conf b/alib2str_experimental/makefile.conf index 0a3876ca39..66ce4ebd4b 100644 --- a/alib2str_experimental/makefile.conf +++ b/alib2str_experimental/makefile.conf @@ -1,5 +1,5 @@ LIBRARY:=alib2str_experimental TESTBIN:=alib2test -LINK_PATHS=../alib2str/ ../alib2data_experimental/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2str alib2data_experimental alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data_experimental/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2str/ ../alib2data_experimental/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2str alib2data_experimental alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2str/src/ \$$(SOURCES_BASE_DIR)/../../alib2data_experimental/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2xml/Doxyfile b/alib2xml/Doxyfile new file mode 100644 index 0000000000..abb970f1ba --- /dev/null +++ b/alib2xml/Doxyfile @@ -0,0 +1,2280 @@ +# Doxyfile 1.8.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "alib2measure" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- +# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, +# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, +# Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if <section_label> ... \endif and \cond <section_label> +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# <filter> <input-file> +# +# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = . + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use <access key> + S +# (what the <access key> is depends on the OS and browser, but it is typically +# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down +# key> to jump into the search results window, the results can be navigated +# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel +# the search. The filter options can be selected when the cursor is inside the +# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> +# to select a filter and <Enter> or <escape> to activate or cancel the filter +# option. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a web server instead of a web client using Javascript. There +# are two flavours of web server based searching depending on the +# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for +# searching and an index file used by the script. When EXTERNAL_SEARCH is +# enabled the indexing and searching needs to be provided by external tools. See +# the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SERVER_BASED_SEARCH = NO + +# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP +# script for searching. Instead the search results are written to an XML file +# which needs to be processed by an external indexer. Doxygen will invoke an +# external search engine pointed to by the SEARCHENGINE_URL option to obtain the +# search results. +# +# Doxygen ships with an example indexer ( doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). +# +# See the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH = NO + +# The SEARCHENGINE_URL should point to a search engine hosted by a web server +# which will return the search results when EXTERNAL_SEARCH is enabled. +# +# Doxygen ships with an example indexer ( doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Searching" for details. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHENGINE_URL = + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed +# search data is written to a file for indexing by an external tool. With the +# SEARCHDATA_FILE tag the name of this file can be specified. +# The default file is: searchdata.xml. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHDATA_FILE = searchdata.xml + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +# projects and redirect the results back to the right project. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH_ID = + +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# projects other than the one defined by this configuration file, but that are +# all added to the same external search index. Each project needs to have a +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of +# to a relative location where the documentation can be found. The format is: +# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# The default value is: YES. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. +# +# Note that when enabling USE_PDFLATEX this option is only used for generating +# bitmaps for formulas in the HTML output, but not in the Makefile that is +# written to the output directory. +# The default file is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate +# index for LaTeX. +# The default file is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used by the +# printer. +# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x +# 14 inches) and executive (7.25 x 10.5 inches). +# The default value is: a4. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names +# that should be included in the LaTeX output. To get the times font for +# instance you can specify +# EXTRA_PACKAGES=times +# If left blank no extra packages will be included. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the +# generated LaTeX document. The header should contain everything until the first +# chapter. If it is left blank doxygen will generate a standard header. See +# section "Doxygen usage" for information on how to let doxygen write the +# default header to a separate file. +# +# Note: Only use a user-defined header if you know what you are doing! The +# following commands have a special meaning inside the header: $title, +# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will +# replace them by respectively the title of the page, the current date and time, +# only the current date, the version number of doxygen, the project name (see +# PROJECT_NAME), or the project number (see PROJECT_NUMBER). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the +# generated LaTeX document. The footer should contain everything after the last +# chapter. If it is left blank doxygen will generate a standard footer. +# +# Note: Only use a user-defined footer if you know what you are doing! +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_FOOTER = + +# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the LATEX_OUTPUT output +# directory. Note that the files will be copied as-is; there are no commands or +# markers available. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_FILES = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is +# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will +# contain links (just like the HTML output) instead of page references. This +# makes the output suitable for online browsing using a PDF viewer. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PDF_HYPERLINKS = YES + +# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES to get a +# higher quality PDF documentation. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode +# command to the generated LaTeX files. This will instruct LaTeX to keep running +# if errors occur, instead of asking the user for help. This option is also used +# when generating formulas in HTML. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BATCHMODE = NO + +# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the +# index chapters (such as File Index, Compound Index, etc.) in the output. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HIDE_INDICES = NO + +# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source +# code with syntax highlighting in the LaTeX output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. See +# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# The default value is: plain. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# RTF output is optimized for Word 97 and may not look too pretty with other RTF +# readers/editors. +# The default value is: NO. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: rtf. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will +# contain hyperlink fields. The RTF file will contain links (just like the HTML +# output) instead of page references. This makes the output suitable for online +# browsing using Word or some other Word compatible readers that support those +# fields. +# +# Note: WordPad (write) and others do not support links. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's config +# file, i.e. a series of assignments. You only have to provide replacements, +# missing definitions are set to their default value. +# +# See also section "Doxygen usage" for information on how to generate the +# default style sheet that doxygen normally uses. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an RTF document. Syntax is +# similar to doxygen's config file. A template extensions file can be generated +# using doxygen -e rtf extensionFile. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# classes and files. +# The default value is: NO. + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. A directory man3 will be created inside the directory specified by +# MAN_OUTPUT. +# The default directory is: man. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to the generated +# man pages. In case the manual section does not start with a number, the number +# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is +# optional. +# The default value is: .3. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it +# will generate one additional man file for each entity documented in the real +# man page(s). These additional files only source the real man page, but without +# them the man command would be unable to find the correct page. +# The default value is: NO. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# captures the structure of the code including all documentation. +# The default value is: NO. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: xml. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a +# validating XML parser to check the syntax of the XML files. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify a XML DTD, which can be used by a +# validating XML parser to check the syntax of the XML files. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# listings (including syntax highlighting and cross-referencing information) to +# the XML output. Note that enabling this will significantly increase the size +# of the XML output. +# The default value is: YES. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# that can be used to generate PDF. +# The default value is: NO. + +GENERATE_DOCBOOK = NO + +# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in +# front of it. +# The default directory is: docbook. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_OUTPUT = docbook + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen +# Definitions (see http://autogen.sf.net) file that captures the structure of +# the code including all documentation. Note that this feature is still +# experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# file that captures the structure of the code including all documentation. +# +# Note that this feature is still experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI +# output from the Perl module output. +# The default value is: NO. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# formatted so it can be parsed by a human reader. This is useful if you want to +# understand what is going on. On the other hand, if this tag is set to NO the +# size of the Perl module output will be much smaller and Perl will parse it +# just the same. +# The default value is: YES. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file are +# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful +# so different doxyrules.make files included by the same Makefile don't +# overwrite each other's variables. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# C-preprocessor directives found in the sources and include files. +# The default value is: YES. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names +# in the source code. If set to NO only conditional compilation will be +# performed. Macro expansion can be done in a controlled way by setting +# EXPAND_ONLY_PREDEF to YES. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then +# the macro expansion is limited to the macros specified with the PREDEFINED and +# EXPAND_AS_DEFINED tags. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# INCLUDE_PATH will be searched if a #include is found. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by the +# preprocessor. +# This tag requires that the tag SEARCH_INCLUDES is set to YES. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will be +# used. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that are +# defined before the preprocessor is started (similar to the -D option of e.g. +# gcc). The argument of the tag is a list of macros of the form: name or +# name=definition (no spaces). If the definition and the "=" are omitted, "=1" +# is assumed. To prevent a macro definition from being undefined via #undef or +# recursively expanded use the := operator instead of the = operator. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this +# tag can be used to specify a list of macro names that should be expanded. The +# macro definition that is found in the sources will be used. Use the PREDEFINED +# tag if you want to use a different macro definition that overrules the +# definition found in the source code. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will +# remove all refrences to function-like macros that are alone on a line, have an +# all uppercase name, and do not end with a semicolon. Such function macros are +# typically used for boiler-plate code, and will confuse the parser if not +# removed. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tag files. For each tag +# file the location of the external documentation should be added. The format of +# a tag file without this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where loc1 and loc2 can be relative or absolute paths or URLs. See the +# section "Linking to external documentation" for more information about the use +# of tag files. +# Note: Each tag file must have an unique name (where the name does NOT include +# the path). If a tag file is not located in the directory in which doxygen is +# run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create a +# tag file that is based on the input files it reads. See section "Linking to +# external documentation" for more information about the usage of tag files. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external class will be listed in the +# class index. If set to NO only the inherited external classes will be listed. +# The default value is: NO. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in +# the modules index. If set to NO, only the current project's groups will be +# listed. +# The default value is: YES. + +EXTERNAL_GROUPS = YES + +# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# the related pages index. If set to NO, only the current project's pages will +# be listed. +# The default value is: YES. + +EXTERNAL_PAGES = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of 'which perl'). +# The default file (with absolute path) is: /usr/bin/perl. + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to +# NO turns the diagrams off. Note that this option also works with HAVE_DOT +# disabled, but it is recommended to install and use dot, since it yields more +# powerful graphs. +# The default value is: YES. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see: +# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide inheritance +# and usage relations if the target is undocumented or is not a class. +# The default value is: YES. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz (see: +# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# Bell Labs. The other options in this section have no effect if this option is +# set to NO +# The default value is: NO. + +HAVE_DOT = YES + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed +# to run in parallel. When set to 0 doxygen will base this on the number of +# processors available in the system. You can set it explicitly to a value +# larger than 0 to get control over the balance between CPU load and processing +# speed. +# Minimum value: 0, maximum value: 32, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_NUM_THREADS = 0 + +# When you want a differently looking font n the dot files that doxygen +# generates you can specify the font name using DOT_FONTNAME. You need to make +# sure dot is able to find the font, which can be done by putting it in a +# standard location or by setting the DOTFONTPATH environment variable or by +# setting DOT_FONTPATH to the directory containing the font. +# The default value is: Helvetica. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of +# dot graphs. +# Minimum value: 4, maximum value: 24, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the default font as specified with +# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set +# the path where dot can find it using this tag. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTPATH = + +# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for +# each documented class showing the direct and indirect inheritance relations. +# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a +# graph for each documented class showing the direct and indirect implementation +# dependencies (inheritance, containment, and class references variables) of the +# class with other documented classes. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for +# groups, showing the direct groups dependencies. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside the +# class node. If there are many fields or methods and many nodes the graph may +# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the +# number of items for each type to make the size more manageable. Set this to 0 +# for no limit. Note that the threshold may be exceeded by 50% before the limit +# is enforced. So when you set the threshold to 10, up to 15 fields may appear, +# but if the number exceeds 15, the total amount of fields shown is limited to +# 10. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LIMIT_NUM_FIELDS = 10 + +# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and +# collaboration graphs will show the relations between templates and their +# instances. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +TEMPLATE_RELATIONS = YES + +# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to +# YES then doxygen will generate a graph for each documented file showing the +# direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDE_GRAPH = YES + +# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are +# set to YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH tag is set to YES then doxygen will generate a call +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical +# hierarchy of all classes instead of a textual one. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the +# dependencies a directory has on other directories in a graphical way. The +# dependency relations are determined by the #include relations between the +# files in the directories. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. +# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order +# to make the SVG files visible in IE 9+ (other browsers do not have this +# requirement). +# Possible values are: png, jpg, gif and svg. +# The default value is: png. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# +# Note that this requires a modern browser other than Internet Explorer. Tested +# and working are Firefox, Chrome, Safari, and Opera. +# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make +# the SVG files visible. Older versions of IE do not have SVG support. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +INTERACTIVE_SVG = NO + +# The DOT_PATH tag can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the \dotfile +# command). +# This tag requires that the tag HAVE_DOT is set to YES. + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the \mscfile +# command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes +# that will be shown in the graph. If the number of nodes in a graph becomes +# larger than this value, doxygen will truncate the graph, which is visualized +# by representing a node as a red box. Note that doxygen if the number of direct +# children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that +# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. +# Minimum value: 0, maximum value: 10000, default value: 50. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs +# generated by dot. A depth value of 3 means that only nodes reachable from the +# root by following a path via at most 3 edges will be shown. Nodes that lay +# further from the root node will be omitted. Note that setting this option to 1 +# or 2 may greatly reduce the computation time needed for large code bases. Also +# note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. +# Minimum value: 0, maximum value: 1000, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not seem +# to support this out of the box. +# +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) support +# this, this feature is disabled by default. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page +# explaining the meaning of the various boxes and arrows in the dot generated +# graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# files that are used to generate the various graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_CLEANUP = YES diff --git a/alib2xml/makefile b/alib2xml/makefile new file mode 100644 index 0000000000..0b88694038 --- /dev/null +++ b/alib2xml/makefile @@ -0,0 +1,3 @@ +-include makefile.conf +-include ../build.conf +-include ../makefile-library diff --git a/alib2xml/makefile.conf b/alib2xml/makefile.conf new file mode 100644 index 0000000000..ddc254cae3 --- /dev/null +++ b/alib2xml/makefile.conf @@ -0,0 +1,5 @@ +LIBRARY:=alib2xml +TESTBIN:=alib2test +LINK_PATHS=../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/alib2xml/src/abstraction/PrimitiveRegistrator.cpp b/alib2xml/src/abstraction/PrimitiveRegistrator.cpp new file mode 100644 index 0000000000..cbc6dd852b --- /dev/null +++ b/alib2xml/src/abstraction/PrimitiveRegistrator.cpp @@ -0,0 +1,46 @@ +/* + * PrimitiveRegistrator.cpp + * + * Created on: 11. 7. 2017 + * Author: Jan Travnicek + */ + +#include <abstraction/XmlFileWriterRegistry.hpp> +#include <abstraction/XmlParserRegistry.hpp> +#include <abstraction/XmlContainerRegistry.hpp> + +#include <primitive/xml/Double.h> +#include <primitive/xml/Integer.h> +#include <primitive/xml/Unsigned.h> +#include <primitive/xml/Bool.h> +#include <primitive/xml/UnsignedLong.h> +#include <primitive/xml/String.h> + +#include <container/xml/ObjectsVector.h> +#include <container/xml/ObjectsSet.h> + +namespace { + +class PrimitiveRegistrator { +public: + PrimitiveRegistrator ( ) { + abstraction::XmlContainerRegistry::registerSet < int > ( ); + abstraction::XmlParserRegistry::registerXmlParser < int > ( "int" ); + + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < bool > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < int > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < double > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < std::string > ( ); + + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::vector < size_t > > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::vector < unsigned > > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::vector < int > > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::set < size_t > > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::set < unsigned > > ( ); + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < ext::set < int > > ( ); + } +}; + +auto primitiveRegistrator = PrimitiveRegistrator ( ); + +} /* namespace */ diff --git a/alib2common/src/abstraction/XmlComposerAbstraction.hpp b/alib2xml/src/abstraction/XmlComposerAbstraction.hpp similarity index 83% rename from alib2common/src/abstraction/XmlComposerAbstraction.hpp rename to alib2xml/src/abstraction/XmlComposerAbstraction.hpp index d3cd659e2d..4ed85b7e32 100644 --- a/alib2common/src/abstraction/XmlComposerAbstraction.hpp +++ b/alib2xml/src/abstraction/XmlComposerAbstraction.hpp @@ -5,8 +5,8 @@ * Author: Jan Travnicek */ -#ifndef _XML_g_ABSTRACTION_HPP_ -#define _XML_g_ABSTRACTION_HPP_ +#ifndef _XML_COMPOSER_ABSTRACTION_HPP_ +#define _XML_COMPOSER_ABSTRACTION_HPP_ #include <abstraction/UnaryOperationAbstraction.hpp> #include <tuple> @@ -28,4 +28,4 @@ public: } /* namespace abstraction */ -#endif /* _XML_g_ABSTRACTION_HPP_ */ +#endif /* _XML_COMPOSER_ABSTRACTION_HPP_ */ diff --git a/alib2common/src/abstraction/XmlComposerRegistry.cpp b/alib2xml/src/abstraction/XmlComposerRegistry.cpp similarity index 100% rename from alib2common/src/abstraction/XmlComposerRegistry.cpp rename to alib2xml/src/abstraction/XmlComposerRegistry.cpp diff --git a/alib2common/src/abstraction/XmlComposerRegistry.hpp b/alib2xml/src/abstraction/XmlComposerRegistry.hpp similarity index 100% rename from alib2common/src/abstraction/XmlComposerRegistry.hpp rename to alib2xml/src/abstraction/XmlComposerRegistry.hpp diff --git a/alib2xml/src/abstraction/XmlContainerRegistry.cpp b/alib2xml/src/abstraction/XmlContainerRegistry.cpp new file mode 100644 index 0000000000..beb3778386 --- /dev/null +++ b/alib2xml/src/abstraction/XmlContainerRegistry.cpp @@ -0,0 +1,56 @@ +/* + * XmlContainerRegistry.cpp + * + * Created on: 19. 8. 2017 + * Author: Jan Travnicek + */ + +#include <abstraction/XmlContainerRegistry.hpp> +#include <foreach> + +namespace abstraction { + +bool XmlContainerRegistry::hasAbstraction ( const std::string & container ) { + return getEntries ( ).count ( container ); +} + +std::shared_ptr < abstraction::OperationAbstraction > XmlContainerRegistry::getAbstraction ( const std::string & container, const std::string & paramType, const std::string & filename ) { + std::set < std::string > paramTypes; + if ( alib::namingApi::hasTypes ( paramType ) ) + paramTypes = ext::transform < std::string > ( alib::namingApi::getTypes ( paramType ), [ ] ( const ext::type_index & type ) { return ext::to_string ( type ); } ); + else + paramTypes.insert ( paramType ); + + auto group = getEntries ( ).find ( container ); + if ( group == getEntries ( ).end ( ) ) + throw exception::CommonException ( "Entry " + container + " not available" ); + + for ( const ext::pair < std::string, std::shared_ptr < Entry > > & entry : group->second ) + if ( paramTypes.count ( entry.first ) ) + return entry.second->getAbstraction ( filename ); + + throw exception::CommonException ( "Entry for " + container + " parametrized with " + paramType + " not available." ); +} + +ext::set < std::string > XmlContainerRegistry::listOverloads ( const std::string & container ) { + auto group = getEntries ( ).find ( container ); + if ( group == getEntries ( ).end ( ) ) + throw exception::CommonException ( "Entry " + container + " not available" ); + + ext::set < std::string > res; + for ( const ext::pair < std::string, std::shared_ptr < Entry > > & entry : group->second ) + res.insert ( entry.first ); + + return res; +} + +ext::set < std::string > XmlContainerRegistry::list ( ) { + ext::set < std::string > res; + + for ( const std::pair < const std::string, ext::vector < ext::pair < std::string, std::shared_ptr < Entry > > > > & groups : getEntries ( ) ) + res.insert ( groups.first ); + + return res; +} + +} /* namespace abstraction */ diff --git a/alib2xml/src/abstraction/XmlContainerRegistry.hpp b/alib2xml/src/abstraction/XmlContainerRegistry.hpp new file mode 100644 index 0000000000..e89d9e9438 --- /dev/null +++ b/alib2xml/src/abstraction/XmlContainerRegistry.hpp @@ -0,0 +1,84 @@ +/* + * XmlContainerRegistry.hpp + * + * Created on: 11. 7. 2017 + * Author: Jan Travnicek + */ + +#ifndef _XML_CONTAINER_REGISTRY_HPP_ +#define _XML_CONTAINER_REGISTRY_HPP_ + +#include <functional> +#include <memory> +#include <vector> +#include <string> +#include <set> + +#include <exception/CommonException.h> +#include <abstraction/OperationAbstraction.hpp> + +#include <core/namingApi.hpp> + +namespace abstraction { + +class XmlContainerRegistry { + class Entry { + public: + virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & filename ) const = 0; + }; + + template < class Params > + class SetEntryImpl : public Entry { + public: + virtual std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & filename ) const override; + }; + + static ext::map < std::string, ext::vector < ext::pair < std::string, std::shared_ptr < Entry > > > > & getEntries ( ) { + static ext::map < std::string, ext::vector < ext::pair < std::string, std::shared_ptr < Entry > > > > containerGroups; + return containerGroups; + }; + +public: + template < class ParamTypes > + static void registerSet ( std::string param ) { + std::string container = "Set"; + + auto & group = getEntries ( ) [ container ]; + for ( const ext::pair < std::string, std::shared_ptr < Entry > > & entry : group ) + if ( entry.first == param ) + throw exception::CommonException ( "Callback for " + container + " already registered." ); + + std::shared_ptr < Entry > entryValue = std::make_shared < SetEntryImpl < ParamTypes > > ( ); + group.push_back ( ext::make_pair ( param, entryValue ) ); + } + + template < class ParamTypes > + static void registerSet ( ) { + std::string param = ext::to_string < typename std::decay < ParamTypes >::type > ( ); + registerSet < ParamTypes > ( param ); + } + + static bool hasAbstraction ( const std::string & container ); + + static std::shared_ptr < abstraction::OperationAbstraction > getAbstraction ( const std::string & container, const std::string & paramType, const std::string & filename ); + + static ext::set < std::string > listOverloads ( const std::string & algorithm ); + + static ext::set < std::string > list ( ); +}; + +} /* namespace abstraction */ + +#include <abstraction/XmlParserAbstraction.hpp> + +namespace abstraction { + +template < class Param > +std::shared_ptr < abstraction::OperationAbstraction > XmlContainerRegistry::SetEntryImpl < Param >::getAbstraction ( const std::string & filename ) const { + ext::deque < sax::Token > tokens = sax::FromXMLParserHelper::parseInput ( filename ); + return std::make_shared < abstraction::XmlParserAbstraction < ext::set < Param > > > ( std::move ( tokens ) ); +} + +} /* namespace abstraction */ + +#endif /* _XML_CONTAINER_REGISTRY_HPP_ */ diff --git a/alib2common/src/abstraction/XmlFileWriterAbstraction.hpp b/alib2xml/src/abstraction/XmlFileWriterAbstraction.hpp similarity index 100% rename from alib2common/src/abstraction/XmlFileWriterAbstraction.hpp rename to alib2xml/src/abstraction/XmlFileWriterAbstraction.hpp diff --git a/alib2common/src/abstraction/XmlFileWriterRegistry.cpp b/alib2xml/src/abstraction/XmlFileWriterRegistry.cpp similarity index 100% rename from alib2common/src/abstraction/XmlFileWriterRegistry.cpp rename to alib2xml/src/abstraction/XmlFileWriterRegistry.cpp diff --git a/alib2common/src/abstraction/XmlFileWriterRegistry.hpp b/alib2xml/src/abstraction/XmlFileWriterRegistry.hpp similarity index 100% rename from alib2common/src/abstraction/XmlFileWriterRegistry.hpp rename to alib2xml/src/abstraction/XmlFileWriterRegistry.hpp diff --git a/alib2common/src/abstraction/XmlParserAbstraction.hpp b/alib2xml/src/abstraction/XmlParserAbstraction.hpp similarity index 100% rename from alib2common/src/abstraction/XmlParserAbstraction.hpp rename to alib2xml/src/abstraction/XmlParserAbstraction.hpp diff --git a/alib2common/src/abstraction/XmlParserRegistry.cpp b/alib2xml/src/abstraction/XmlParserRegistry.cpp similarity index 100% rename from alib2common/src/abstraction/XmlParserRegistry.cpp rename to alib2xml/src/abstraction/XmlParserRegistry.cpp diff --git a/alib2common/src/abstraction/XmlParserRegistry.hpp b/alib2xml/src/abstraction/XmlParserRegistry.hpp similarity index 100% rename from alib2common/src/abstraction/XmlParserRegistry.hpp rename to alib2xml/src/abstraction/XmlParserRegistry.hpp diff --git a/alib2xml/src/abstraction/XmlRegistry.cpp b/alib2xml/src/abstraction/XmlRegistry.cpp new file mode 100644 index 0000000000..4acd41fa23 --- /dev/null +++ b/alib2xml/src/abstraction/XmlRegistry.cpp @@ -0,0 +1,43 @@ +/* + * XmlRegistry.cpp + * + * Created on: 10. 7. 2017 + * Author: Jan Travnicek + */ + +#include <abstraction/XmlRegistry.h> + +#include <abstraction/XmlParserRegistry.hpp> +#include <abstraction/XmlFileWriterRegistry.hpp> +#include <abstraction/XmlComposerRegistry.hpp> +#include <abstraction/XmlContainerRegistry.hpp> + +#include <core/namingApi.hpp> + +namespace abstraction { + +ext::set < std::string > XmlRegistry::listDataTypes ( ) { + return XmlFileWriterRegistry::list ( ); +} + +ext::set < std::string > XmlRegistry::listDataTypeGroup ( const std::string & group ) { + return XmlFileWriterRegistry::listGroup ( group ); +} + +std::shared_ptr < abstraction::OperationAbstraction > XmlRegistry::getXmlContainerAbstraction ( const std::string & container, const std::string & type, const std::string & filename ) { + return XmlContainerRegistry::getAbstraction ( container, type, filename ); +} + +std::shared_ptr < abstraction::OperationAbstraction > XmlRegistry::getXmlFileWriterAbstraction ( const std::string & param, std::string filename ) { + return XmlFileWriterRegistry::getAbstraction ( param, std::move ( filename ) ); +} + +std::shared_ptr < abstraction::OperationAbstraction > XmlRegistry::getXmlComposerAbstraction ( const std::string & param ) { + return XmlComposerRegistry::getAbstraction ( param ); +} + +std::shared_ptr < abstraction::OperationAbstraction > XmlRegistry::getXmlParserAbstraction ( const std::string & typeName, ext::deque < sax::Token > tokens ) { + return XmlParserRegistry::getAbstraction ( typeName, std::move ( tokens ) ); +} + +} /* namespace abstraction */ diff --git a/alib2xml/src/abstraction/XmlRegistry.h b/alib2xml/src/abstraction/XmlRegistry.h new file mode 100644 index 0000000000..f0dab7ae7a --- /dev/null +++ b/alib2xml/src/abstraction/XmlRegistry.h @@ -0,0 +1,34 @@ +/* + * XmlRegistry.h + * + * Created on: 10. 7. 2017 + * Author: Jan Travnicek + */ + +#ifndef _XML_REGISTRY_H_ +#define _XML_REGISTRY_H_ + +#include <abstraction/OperationAbstraction.hpp> +#include <abstraction/common/ParamQualifiers.hpp> +#include <abstraction/common/AlgorithmCategories.hpp> + +#include <deque> +#include <sax/Token.h> + +namespace abstraction { + +class XmlRegistry { +public: + static ext::set < std::string > listDataTypes ( ); + static ext::set < std::string > listDataTypeGroup ( const std::string & group ); + + static std::shared_ptr < abstraction::OperationAbstraction > getXmlContainerAbstraction ( const std::string & container, const std::string & type, const std::string & filename ); + static std::shared_ptr < abstraction::OperationAbstraction > getXmlFileWriterAbstraction ( const std::string & param, std::string filename ); + static std::shared_ptr < abstraction::OperationAbstraction > getXmlComposerAbstraction ( const std::string & param ); + static std::shared_ptr < abstraction::OperationAbstraction > getXmlParserAbstraction ( const std::string & typeName, ext::deque < sax::Token > tokens ); +}; + +} /* namespace abstraction */ + +#endif /* _XML_REGISTRY_H_ */ + diff --git a/alib2xml/src/abstraction/common/xml/AlgorithmCategories.cpp b/alib2xml/src/abstraction/common/xml/AlgorithmCategories.cpp new file mode 100644 index 0000000000..2c61564019 --- /dev/null +++ b/alib2xml/src/abstraction/common/xml/AlgorithmCategories.cpp @@ -0,0 +1,29 @@ +#include "AlgorithmCategories.hpp" + +namespace alib { + +abstraction::AlgorithmCategories::AlgorithmCategory xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + std::string data = sax::FromXMLParserHelper::popTokenData(input, sax::Token::TokenType::CHARACTER); + abstraction::AlgorithmCategories::AlgorithmCategory res = abstraction::AlgorithmCategories::algorithmCategory ( data ); + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + + return res; +} + +bool xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +std::string xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::xmlTagName ( ) { + return "AlgorithmCategory"; +} + +void xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory >::compose ( ext::deque < sax::Token > & out, abstraction::AlgorithmCategories::AlgorithmCategory category ) { + out.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT); + out.emplace_back ( abstraction::AlgorithmCategories::toString ( category ), sax::Token::TokenType::CHARACTER); + out.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT); +} + +} /* namespace alib */ diff --git a/alib2xml/src/abstraction/common/xml/AlgorithmCategories.hpp b/alib2xml/src/abstraction/common/xml/AlgorithmCategories.hpp new file mode 100644 index 0000000000..7014519438 --- /dev/null +++ b/alib2xml/src/abstraction/common/xml/AlgorithmCategories.hpp @@ -0,0 +1,19 @@ +#ifndef _XML_ALGORITHM_CATEGORY_HPP_ +#define _XML_ALGORITHM_CATEGORY_HPP_ + +#include <abstraction/common/AlgorithmCategories.hpp> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < abstraction::AlgorithmCategories::AlgorithmCategory > { + static abstraction::AlgorithmCategories::AlgorithmCategory parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static std::string xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, abstraction::AlgorithmCategories::AlgorithmCategory category ); +}; + +} /* namespace alib */ + +#endif /* _XML_ALGORITHM_CATEGORY_HPP_ */ diff --git a/alib2common/src/abstraction/common/ParamQualifiers.cpp b/alib2xml/src/abstraction/common/xml/ParamQualifiers.cpp similarity index 97% rename from alib2common/src/abstraction/common/ParamQualifiers.cpp rename to alib2xml/src/abstraction/common/xml/ParamQualifiers.cpp index b89878a262..7f98f132da 100644 --- a/alib2common/src/abstraction/common/ParamQualifiers.cpp +++ b/alib2xml/src/abstraction/common/xml/ParamQualifiers.cpp @@ -1,4 +1,4 @@ -#include <abstraction/common/ParamQualifiers.hpp> +#include "ParamQualifiers.hpp" namespace alib { diff --git a/alib2xml/src/abstraction/common/xml/ParamQualifiers.hpp b/alib2xml/src/abstraction/common/xml/ParamQualifiers.hpp new file mode 100644 index 0000000000..4d94111db2 --- /dev/null +++ b/alib2xml/src/abstraction/common/xml/ParamQualifiers.hpp @@ -0,0 +1,19 @@ +#ifndef _XML_PARAM_QUALIFIERS_HPP_ +#define _XML_PARAM_QUALIFIERS_HPP_ + +#include <abstraction/common/ParamQualifiers.hpp> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < abstraction::ParamQualifiers::ParamQualifier > { + static abstraction::ParamQualifiers::ParamQualifier parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static std::string xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, abstraction::ParamQualifiers::ParamQualifier ); +}; + +} /* namespace alib */ + +#endif /* _PARAM_QUALIFIERS_HPP_ */ diff --git a/alib2xml/src/container/xml/ObjectsBitset.h b/alib2xml/src/container/xml/ObjectsBitset.h new file mode 100644 index 0000000000..c4177f51ff --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsBitset.h @@ -0,0 +1,64 @@ +/* + * Tuple.h + * + * Created on: May 4, 2017 + * Author: Jan Travnicek + */ + +#ifndef OBJECTS_BITSET_H_ +#define OBJECTS_BITSET_H_ + +#include <bitset> +#include <core/xmlApi.hpp> + +#include <primitive/xml/Bool.h> + +namespace alib { + +template < size_t N > +struct xmlApi < ext::bitset < N > > { + static ext::bitset < N > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::bitset < N > & data ); +}; + +template < size_t N > +ext::bitset < N > xmlApi < ext::bitset < N > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); + + ext::bitset < N > res; + + for ( size_t i = 0; i < N; ++i ) + res [ i ] = alib::xmlApi < bool >::parse ( input ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName() ); + + return res; +} + +template < size_t N > +bool xmlApi < ext::bitset < N > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); +} + +template < size_t N > +const std::string & xmlApi < ext::bitset < N > >::xmlTagName ( ) { + static std::string xmlTagName = "Bitset"; + + return xmlTagName; +} + +template < size_t N > +void xmlApi < ext::bitset < N > >::compose ( ext::deque < sax::Token > & output, const ext::bitset < N > & input ) { + output.emplace_back ( xmlTagName(), sax::Token::TokenType::START_ELEMENT ); + + for ( size_t i = 0; i < N; ++i ) + alib::xmlApi < bool >::compose ( output, input [ i ] ); + + output.emplace_back ( xmlTagName(), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +#endif /* OBJECTS_BITSET_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsDeque.cpp b/alib2xml/src/container/xml/ObjectsDeque.cpp new file mode 100644 index 0000000000..6dd9fe831d --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsDeque.cpp @@ -0,0 +1,21 @@ +/* + * Deque.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsDeque.h" +#include <container/Container.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsDeque < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsDeque < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsDeque < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsDeque < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsDeque.h b/alib2xml/src/container/xml/ObjectsDeque.h new file mode 100644 index 0000000000..4418219023 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsDeque.h @@ -0,0 +1,89 @@ +/* + * Deque.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_DEQUE_H_ +#define _XML_OBJECTS_DEQUE_H_ + +#include <container/ObjectsDeque.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T > +struct xmlApi < ext::deque < T > > { + static ext::deque < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::deque < T > & data ); +}; + +template < typename T > +ext::deque < T > xmlApi < ext::deque < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + ext::deque < T > set; + + while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) + set.push_back ( alib::xmlApi < T >::parse ( input ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return set; +} + +template < typename T > +bool xmlApi < ext::deque < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T > +const std::string & xmlApi < ext::deque < T > >::xmlTagName ( ) { + static std::string xmlTagName = "Deque"; + + return xmlTagName; +} + +template < typename T > +void xmlApi < ext::deque < T > >::compose ( ext::deque < sax::Token > & output, const ext::deque < T > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + + for ( const T & item : input ) + alib::xmlApi < T >::compose ( output, item ); + + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T > +struct xmlApi < container::ObjectsDeque < T > > { + static container::ObjectsDeque < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsDeque < T > & data ); +}; + +template < typename T > +container::ObjectsDeque < T > xmlApi < container::ObjectsDeque < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsDeque < T > ( xmlApi < ext::deque < T > >::parse ( input ) ); +} + +template < typename T > +bool xmlApi < container::ObjectsDeque < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < ext::deque < T > >::first ( input ); +} + +template < typename T > +const std::string & xmlApi < container::ObjectsDeque < T > >::xmlTagName ( ) { + return xmlApi < ext::deque < T > >::xmlTagName ( ); +} + +template < typename T > +void xmlApi < container::ObjectsDeque < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsDeque < T > & input ) { + xmlApi < ext::deque < T > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_DEQUE_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsList.cpp b/alib2xml/src/container/xml/ObjectsList.cpp new file mode 100644 index 0000000000..ba4a8cd901 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsList.cpp @@ -0,0 +1,21 @@ +/* + * List.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsList.h" +#include <container/Container.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsList < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsList < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsList < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsList < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsList.h b/alib2xml/src/container/xml/ObjectsList.h new file mode 100644 index 0000000000..876538398c --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsList.h @@ -0,0 +1,89 @@ +/* + * List.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_LIST_H_ +#define _XML_OBJECTS_LIST_H_ + +#include <container/ObjectsList.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T > +struct xmlApi < ext::list < T > > { + static ext::list < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::list < T > & data ); +}; + +template < typename T > +ext::list < T > xmlApi < ext::list < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + ext::list < T > set; + + while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) + set.push_back ( alib::xmlApi < T >::parse ( input ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return set; +} + +template < typename T > +bool xmlApi < ext::list < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T > +const std::string & xmlApi < ext::list < T > >::xmlTagName ( ) { + static std::string xmlTagName = "List"; + + return xmlTagName; +} + +template < typename T > +void xmlApi < ext::list < T > >::compose ( ext::deque < sax::Token > & output, const ext::list < T > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + + for ( const T & item : input ) + alib::xmlApi < T >::compose ( output, item ); + + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T > +struct xmlApi < container::ObjectsList < T > > { + static container::ObjectsList < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsList < T > & data ); +}; + +template < typename T > +container::ObjectsList < T > xmlApi < container::ObjectsList < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsList < T > ( xmlApi < ext::list < T > >::parse ( input ) ); +} + +template < typename T > +bool xmlApi < container::ObjectsList < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < ext::list < T > >::first ( input ); +} + +template < typename T > +const std::string & xmlApi < container::ObjectsList < T > >::xmlTagName ( ) { + return xmlApi < ext::list < T > >::xmlTagName ( ); +} + +template < typename T > +void xmlApi < container::ObjectsList < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsList < T > & input ) { + xmlApi < ext::list < T > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_LIST_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsMap.cpp b/alib2xml/src/container/xml/ObjectsMap.cpp new file mode 100644 index 0000000000..6d674a3272 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsMap.cpp @@ -0,0 +1,21 @@ +/* + * Map.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsMap.h" +#include <container/Container.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsMap < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsMap < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsMap < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsMap < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsMap.h b/alib2xml/src/container/xml/ObjectsMap.h new file mode 100644 index 0000000000..305e5afa84 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsMap.h @@ -0,0 +1,90 @@ +/* + * Map.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_MAP_H_ +#define _XML_OBJECTS_MAP_H_ + +#include <container/ObjectsMap.h> +#include <core/xmlApi.hpp> +#include <container/xml/ObjectsPair.h> + +namespace alib { + +template < typename T, typename R > +struct xmlApi < ext::map < T, R > > { + static ext::map < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::map < T, R > & data ); +}; + +template < typename T, typename R > +ext::map < T, R > xmlApi < ext::map < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + ext::map < T, R > map; + + while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) + map.insert ( alib::xmlApi < ext::pair < T, R > >::parse ( input ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return map; +} + +template < typename T, typename R > +bool xmlApi < ext::map < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T, typename R > +const std::string & xmlApi < ext::map < T, R > >::xmlTagName ( ) { + static std::string xmlTagName = "Map"; + + return xmlTagName; +} + +template < typename T, typename R > +void xmlApi < ext::map < T, R > >::compose ( ext::deque < sax::Token > & output, const ext::map < T, R > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + + for ( const std::pair < const T, R > & item : input ) + alib::xmlApi < ext::pair < const T, R > >::compose ( output, item ); + + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T, typename R > +struct xmlApi < container::ObjectsMap < T, R > > { + static container::ObjectsMap < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsMap < T, R > & data ); +}; + +template < typename T, typename R > +container::ObjectsMap < T, R > xmlApi < container::ObjectsMap < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsMap < T, R > ( xmlApi < ext::map < T, R > >::parse ( input ) ); +} + +template < typename T, typename R > +bool xmlApi < container::ObjectsMap < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T, typename R > +const std::string & xmlApi < container::ObjectsMap < T, R > >::xmlTagName ( ) { + return xmlApi < ext::map < T, R > >::xmlTagName ( ); +} + +template < typename T, typename R > +void xmlApi < container::ObjectsMap < T, R > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsMap < T, R > & input ) { + xmlApi < ext::map < T, R > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_MAP_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsPair.cpp b/alib2xml/src/container/xml/ObjectsPair.cpp new file mode 100644 index 0000000000..b7d4f95ddf --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsPair.cpp @@ -0,0 +1,21 @@ +/* + * Pair.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsPair.h" +#include <container/Container.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsPair < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsPair < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsPair < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsPair < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsPair.h b/alib2xml/src/container/xml/ObjectsPair.h new file mode 100644 index 0000000000..a436f7851c --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsPair.h @@ -0,0 +1,94 @@ +/* + * Pair.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_PAIR_H_ +#define _XML_OBJECTS_PAIR_H_ + +#include <container/ObjectsPair.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T, typename R > +struct xmlApi < ext::pair < T, R > > { + static ext::pair < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::pair < T, R > & data ); + static void compose ( ext::deque < sax::Token > & output, const std::pair < T, R > & data ); +}; + +template < typename T, typename R > +ext::pair < T, R > xmlApi < ext::pair < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + T first = alib::xmlApi < T >::parse ( input ); + R second = alib::xmlApi < R >::parse ( input ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + + return ext::make_pair ( std::move ( first ), std::move ( second ) ); +} + +template < typename T, typename R > +bool xmlApi < ext::pair < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T, typename R > +const std::string & xmlApi < ext::pair < T, R > >::xmlTagName ( ) { + static std::string xmlTagName = "Pair"; + + return xmlTagName; +} + +template < typename T, typename R > +void xmlApi < ext::pair < T, R > >::compose ( ext::deque < sax::Token > & output, const ext::pair < T, R > & input ) { + compose ( output, static_cast < const std::pair < T, R > > ( input ) ); +} + +template < typename T, typename R > +void xmlApi < ext::pair < T, R > >::compose ( ext::deque < sax::Token > & output, const std::pair < T, R > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + + alib::xmlApi < typename std::decay < T >::type >::compose ( output, input.first ); + alib::xmlApi < R >::compose ( output, input.second ); + + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T, typename R > +struct xmlApi < container::ObjectsPair < T, R > > { + static container::ObjectsPair < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsPair < T, R > & data ); +}; + +template < typename T, typename R > +container::ObjectsPair < T, R > xmlApi < container::ObjectsPair < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsPair < T, R > ( xmlApi < ext::pair < T, R > >::parse ( input ) ); +} + +template < typename T, typename R > +bool xmlApi < container::ObjectsPair < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < ext::pair < T, R > >::first ( input ); +} + +template < typename T, typename R > +const std::string & xmlApi < container::ObjectsPair < T, R > >::xmlTagName ( ) { + return xmlApi < ext::pair < T, R > >::xmlTagName ( ); +} + +template < typename T, typename R > +void xmlApi < container::ObjectsPair < T, R > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsPair < T, R > & input ) { + xmlApi < ext::pair < T, R > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_PAIR_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsSet.cpp b/alib2xml/src/container/xml/ObjectsSet.cpp new file mode 100644 index 0000000000..dd110114d2 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsSet.cpp @@ -0,0 +1,22 @@ +/* + * Set.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsSet.h" +#include <container/Container.h> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsSet < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsSet < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsSet < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsSet < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsSet.h b/alib2xml/src/container/xml/ObjectsSet.h new file mode 100644 index 0000000000..8cbce46cd6 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsSet.h @@ -0,0 +1,89 @@ +/* + * Set.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_SET_H_ +#define _XML_OBJECTS_SET_H_ + +#include <container/ObjectsSet.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T > +struct xmlApi < ext::set < T > > { + static ext::set < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::set < T > & data ); +}; + +template < typename T > +ext::set < T > xmlApi < ext::set < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + ext::set < T > set; + + while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) + set.insert ( alib::xmlApi < T >::parse ( input ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return set; +} + +template < typename T > +bool xmlApi < ext::set < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T > +const std::string & xmlApi < ext::set < T > >::xmlTagName ( ) { + static std::string xmlTagName = "Set"; + + return xmlTagName; +} + +template < typename T > +void xmlApi < ext::set < T > >::compose ( ext::deque < sax::Token > & output, const ext::set < T > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + + for ( const T & item : input ) + alib::xmlApi < T >::compose ( output, item ); + + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T > +struct xmlApi < container::ObjectsSet < T > > { + static container::ObjectsSet < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsSet < T > & data ); +}; + +template < typename T > +container::ObjectsSet < T > xmlApi < container::ObjectsSet < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsSet < T > ( xmlApi < ext::set < T > >::parse ( input ) ); +} + +template < typename T > +bool xmlApi < container::ObjectsSet < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < ext::set < T > >::first ( input ); +} + +template < typename T > +const std::string & xmlApi < container::ObjectsSet < T > >::xmlTagName ( ) { + return xmlApi < ext::set < T > >::xmlTagName ( ); +} + +template < typename T > +void xmlApi < container::ObjectsSet < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsSet < T > & input ) { + xmlApi < ext::set < T > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_SET_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsTree.cpp b/alib2xml/src/container/xml/ObjectsTree.cpp new file mode 100644 index 0000000000..e415511eb4 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsTree.cpp @@ -0,0 +1,22 @@ +/* + * ObjectsTree.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsTree.h" +#include <container/Container.h> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsTree < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsTree < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsTree.h b/alib2xml/src/container/xml/ObjectsTree.h new file mode 100644 index 0000000000..a3fd2bf76a --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsTree.h @@ -0,0 +1,128 @@ +/* + * ObjectsTree.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_TREE_H_ +#define _XML_OBJECTS_TREE_H_ + +#include <container/ObjectsTree.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T > +struct xmlApi < ext::tree < T > > { + static ext::tree < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::tree < T > & data ); +}; + +template < typename T > +ext::tree < T > xmlApi < ext::tree < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "Root" ); + + ext::tree < T > tree ( alib::xmlApi < T >::parse ( input ) ); + + typename ext::tree < T >::const_children_iterator under = tree.root ( ); + + unsigned level = 0; + + while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) { + if ( sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, "Children" ) ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "Children" ); + + if ( level > 0 ) + under = std::prev ( under->end ( ) ); + + ++level; + } + + tree.push_back ( under, alib::xmlApi < T >::parse ( input ) ); + + while ( sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::END_ELEMENT, "Children" ) ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, "Children" ); + + under = under->parent ( ); + --level; + } + } + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, "Root" ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return tree; +} + +template < typename T > +bool xmlApi < ext::tree < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T > +const std::string & xmlApi < ext::tree < T > >::xmlTagName ( ) { + static std::string xmlTagName = "Tree"; + + return xmlTagName; +} + +template < typename T > +void xmlApi < ext::tree < T > >::compose ( ext::deque < sax::Token > & output, const ext::tree < T > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( "Root", sax::Token::TokenType::START_ELEMENT ); + + unsigned level = 0; + + for ( typename ext::tree < T >::const_prefix_iterator iter = input.prefix_begin ( ); iter != input.prefix_end ( ); ) { + while ( iter.getLevel ( ) > level ) { + output.emplace_back ( "Children", sax::Token::TokenType::START_ELEMENT ); + ++level; + } + + alib::xmlApi < T >::compose ( output, * iter ); + ++iter; + + while ( iter.getLevel ( ) < level ) { + output.emplace_back ( "Children", sax::Token::TokenType::END_ELEMENT ); + --level; + } + } + + output.emplace_back ( "Root", sax::Token::TokenType::END_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T > +struct xmlApi < container::ObjectsTree < T > > { + static container::ObjectsTree < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsTree < T > & data ); +}; + +template < typename T > +container::ObjectsTree < T > xmlApi < container::ObjectsTree < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsTree < T > ( xmlApi < ext::tree < T > >::parse ( input ) ); +} + +template < typename T > +bool xmlApi < container::ObjectsTree < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < ext::tree < T > >::first ( input ); +} + +template < typename T > +const std::string & xmlApi < container::ObjectsTree < T > >::xmlTagName ( ) { + return xmlApi < ext::tree < T > >::xmlTagName ( ); +} + +template < typename T > +void xmlApi < container::ObjectsTree < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsTree < T > & input ) { + xmlApi < ext::tree < T > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_TREE_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsTrie.cpp b/alib2xml/src/container/xml/ObjectsTrie.cpp new file mode 100644 index 0000000000..11f4fe94c2 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsTrie.cpp @@ -0,0 +1,21 @@ +/* + * ObjectsTrie.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsTrie.h" +#include <container/Container.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsTrie < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsTrie < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsTrie < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsTrie < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsTrie.h b/alib2xml/src/container/xml/ObjectsTrie.h new file mode 100644 index 0000000000..5c5a64d977 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsTrie.h @@ -0,0 +1,122 @@ +/* + * ObjectsTrie.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_TRIE_H_ +#define _XML_OBJECTS_TRIE_H_ + +#include <container/ObjectsTrie.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T, typename R > +struct xmlApi < ext::trie < T, R > > { + static ext::trie < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::trie < T, R > & data ); + +private: + static ext::map < T, ext::trie < T, R > > parseChildren ( ext::deque < sax::Token >::iterator & input ); + static void composeChildren ( ext::deque < sax::Token > & out, const ext::map < T, ext::trie < T, R > > & children ); +}; + +template < typename T, typename R > +ext::map < T, ext::trie < T, R > > xmlApi < ext::trie < T, R > >::parseChildren ( ext::deque < sax::Token >::iterator & input ) { + ext::map < T, ext::trie < T, R > > children; + + while ( sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, "Child" ) ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "Child" ); + + T key = alib::xmlApi < T >::parse ( input ); + R value = alib::xmlApi < R >::parse ( input ); + ext::map < T, ext::trie < T, R > > innerChildren = parseChildren ( input ); + + children.insert ( std::make_pair ( std::move ( key ), ext::trie < T, R > ( std::move ( value ), std::move ( innerChildren ) ) ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, "Child" ); + } + + return children; +} + +template < typename T, typename R > +ext::trie < T, R > xmlApi < ext::trie < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + R value = alib::xmlApi < R >::parse ( input ); + ext::map < T, ext::trie < T, R > > children = parseChildren ( input ); + + ext::trie < T, R > trie ( std::move ( value ), std::move ( children ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return trie; +} + +template < typename T, typename R > +bool xmlApi < ext::trie < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T, typename R > +const std::string & xmlApi < ext::trie < T, R > >::xmlTagName ( ) { + static std::string xmlTagName = "Trie"; + + return xmlTagName; +} + +template < typename T, typename R > +void xmlApi < ext::trie < T, R > >::composeChildren ( ext::deque < sax::Token > & out, const ext::map < T, ext::trie < T, R > > & children ) { + for ( const std::pair < const T, ext::trie < T, R > > & child : children ) { + out.emplace_back ( "Child", sax::Token::TokenType::START_ELEMENT ); + + alib::xmlApi < T >::compose ( out, child.first ); + alib::xmlApi < R >::compose ( out, child.second.getData ( ) ); + composeChildren ( out, child.second.getChildren ( ) ); + + out.emplace_back ( "Child", sax::Token::TokenType::END_ELEMENT ); + } +} + +template < typename T, typename R > +void xmlApi < ext::trie < T, R > >::compose ( ext::deque < sax::Token > & output, const ext::trie < T, R > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + alib::xmlApi < R >::compose ( output, input.getData ( ) ); + composeChildren ( output, input.getChildren ( ) ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T, typename R > +struct xmlApi < container::ObjectsTrie < T, R > > { + static container::ObjectsTrie < T, R > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsTrie < T, R > & data ); +}; + +template < typename T, typename R > +container::ObjectsTrie < T, R > xmlApi < container::ObjectsTrie < T, R > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsTrie < T, R > ( xmlApi < ext::trie < T, R > >::parse ( input ) ); +} + +template < typename T, typename R > +bool xmlApi < container::ObjectsTrie < T, R > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T, typename R > +const std::string & xmlApi < container::ObjectsTrie < T, R > >::xmlTagName ( ) { + return xmlApi < ext::trie < T, R > >::xmlTagName ( ); +} + +template < typename T, typename R > +void xmlApi < container::ObjectsTrie < T, R > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsTrie < T, R > & input ) { + xmlApi < ext::trie < T, R > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_TRIE_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsTuple.h b/alib2xml/src/container/xml/ObjectsTuple.h new file mode 100644 index 0000000000..534eb55476 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsTuple.h @@ -0,0 +1,70 @@ +/* + * Tuple.h + * + * Created on: May 6, 2016 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_TUPLE_H_ +#define _XML_OBJECTS_TUPLE_H_ + +#include <tuple> +#include <string> + +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename ... Ts > +struct xmlApi < ext::tuple < Ts ... > > { + static ext::tuple < Ts ... > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::tuple < Ts ... > & data ); +private: + + template < size_t ... I > + static void tupleComposeHelper ( ext::deque < sax::Token > & out, const ext::tuple < Ts ... > & container, std::index_sequence < I ... > ); +}; + +template < typename ... Ts > +ext::tuple < Ts ... > xmlApi < ext::tuple < Ts ... > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); + + ext::tuple < Ts ... > res { alib::xmlApi < Ts >::parse ( input ) ... }; // NOTE buggy in gcc < 4.9.1 + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName() ); + + return res; +} + +template < typename ... Ts > +bool xmlApi < ext::tuple < Ts ... > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName() ); +} + +template < typename ... Ts > +const std::string & xmlApi < ext::tuple < Ts ... > >::xmlTagName ( ) { + static std::string xmlTagName = "Tuple"; + + return xmlTagName; +} + +template < typename ... Ts > +void xmlApi < ext::tuple < Ts ... > >::compose ( ext::deque < sax::Token > & output, const ext::tuple < Ts ... > & input ) { + output.emplace_back ( xmlTagName(), sax::Token::TokenType::START_ELEMENT ); + + tupleComposeHelper ( output, input, std::make_index_sequence < ext::tuple_size < ext::tuple < Ts ... > >::value > { } ); + + output.emplace_back ( xmlTagName(), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename ... Ts > +template < size_t ... I > +void xmlApi < ext::tuple < Ts ... > >::tupleComposeHelper ( ext::deque < sax::Token > & out, const ext::tuple < Ts ... > & container, std::index_sequence < I ... > ) { + ( void ) std::initializer_list < int > { ( alib::xmlApi < Ts >::compose ( out, std::get < I > ( container ) ), 0 ) ... }; // FEATURE unpack of multiple packs together +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_TUPLE_H_ */ diff --git a/alib2common/src/container/ObjectsVariant.h b/alib2xml/src/container/xml/ObjectsVariant.h similarity index 73% rename from alib2common/src/container/ObjectsVariant.h rename to alib2xml/src/container/xml/ObjectsVariant.h index 7659dfaa28..cee05d7ffe 100644 --- a/alib2common/src/container/ObjectsVariant.h +++ b/alib2xml/src/container/xml/ObjectsVariant.h @@ -1,36 +1,18 @@ /* - * Map.h + * Variant.h * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ -#ifndef OBJECTS_VARIANT_H_ -#define OBJECTS_VARIANT_H_ +#ifndef _XML_OBJECTS_VARIANT_H_ +#define _XML_OBJECTS_VARIANT_H_ #include <variant> -#include <string> - -#include <core/xmlApi.hpp> #include <exception/CommonException.h> +#include <core/xmlApi.hpp> -namespace container { - -/** - * Basic container from which are derived all other containers. - * Contains reason why the container occured. - */ -class ObjectsVariant { -private: - explicit ObjectsVariant ( ); - -public: - template < class ... Ts > - static ext::variant < Ts ... > parseRaw ( ext::deque < sax::Token >::iterator & input ); - - template < class ... Ts > - static void compose ( ext::deque < sax::Token > & out, const ext::variant < Ts ... > & input ); -}; +namespace alib { template < typename T > T parseVariantHelper ( ext::deque < sax::Token >::iterator & ) { @@ -57,16 +39,6 @@ T parseVariantHelper ( ext::deque < sax::Token >::iterator & input ) { return parseVariantHelper < T, Ts ... > ( input ); } -template < typename ... Ts > -ext::variant < Ts ... > ObjectsVariant::parseRaw ( ext::deque < sax::Token >::iterator & input ) { - return parseVariantHelper < ext::variant < Ts ... >, Ts ... > ( input ); -} - -template < typename T > -bool firstVariantHelper ( ext::deque < sax::Token >::iterator & ) { - return false; -} - template < typename T, typename R, typename ... Ts > T firstVariantHelper ( ext::deque < sax::Token >::iterator & input ) { if ( alib::xmlApi < R >::first ( input ) ) return true; @@ -98,15 +70,6 @@ void composeVariantHelper ( ext::deque < sax::Token > & out, const T & container composeVariantHelper < T, Ts ... > ( out, container ); } -template < typename ... Ts > -void ObjectsVariant::compose ( ext::deque < sax::Token > & out, const ext::variant < Ts ... > & container ) { - composeVariantHelper < ext::variant < Ts ... >, Ts ... > ( out, container ); -} - -} /* namespace container */ - -namespace alib { - template < typename ... Ts > struct xmlApi < ext::variant < Ts ... > > { static ext::variant < Ts ... > parse ( ext::deque < sax::Token >::iterator & input ); @@ -117,12 +80,12 @@ struct xmlApi < ext::variant < Ts ... > > { template < typename ... Ts > ext::variant < Ts ... > xmlApi < ext::variant < Ts ... > >::parse ( ext::deque < sax::Token >::iterator & input ) { - return container::ObjectsVariant::parseRaw < Ts ... > ( input ); + return parseVariantHelper < ext::variant < Ts ... >, Ts ... > ( input ); } template < typename ... Ts > -bool xmlApi < ext::variant < Ts ... > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { - return container::firstVariantHelper < ext::variant < Ts ... >, Ts ... > ( input ); +bool xmlApi < ext::variant < Ts ... > >::first ( const ext::deque < sax::Token >::const_iterator & ) { + return false; } template < typename ... Ts > @@ -132,9 +95,9 @@ std::string xmlApi < ext::variant < Ts ... > >::xmlTagName ( ) { template < typename ... Ts > void xmlApi < ext::variant < Ts ... > >::compose ( ext::deque < sax::Token > & output, const ext::variant < Ts ... > & input ) { - return container::ObjectsVariant::compose < Ts ... > ( output, input ); + composeVariantHelper < ext::variant < Ts ... >, Ts ... > ( output, input ); } } /* namespace alib */ -#endif /* OBJECTS_VARIANT_H_ */ +#endif /* _XML_OBJECTS_VARIANT_H_ */ diff --git a/alib2xml/src/container/xml/ObjectsVector.cpp b/alib2xml/src/container/xml/ObjectsVector.cpp new file mode 100644 index 0000000000..becaf5eca1 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsVector.cpp @@ -0,0 +1,21 @@ +/* + * Vector.cpp + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#include "ObjectsVector.h" +#include <container/Container.h> + +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < container::Container, container::ObjectsVector < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, container::ObjectsVector < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < container::Container, container::ObjectsVector < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, container::ObjectsVector < > > ( ); + +} /* namespace */ diff --git a/alib2xml/src/container/xml/ObjectsVector.h b/alib2xml/src/container/xml/ObjectsVector.h new file mode 100644 index 0000000000..83a6583fa3 --- /dev/null +++ b/alib2xml/src/container/xml/ObjectsVector.h @@ -0,0 +1,89 @@ +/* + * vector.h + * + * Created on: Apr 1, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_OBJECTS_VECTOR_H_ +#define _XML_OBJECTS_VECTOR_H_ + +#include <container/ObjectsVector.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T > +struct xmlApi < ext::vector < T > > { + static ext::vector < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const ext::vector < T > & data ); +}; + +template < typename T > +ext::vector < T > xmlApi < ext::vector < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + ext::vector < T > vector; + + while ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::START_ELEMENT ) ) + vector.push_back ( alib::xmlApi < T >::parse ( input ) ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return vector; +} + +template < typename T > +bool xmlApi < ext::vector < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +template < typename T > +const std::string & xmlApi < ext::vector < T > >::xmlTagName ( ) { + static std::string xmlTagName = "Vector"; + + return xmlTagName; +} + +template < typename T > +void xmlApi < ext::vector < T > >::compose ( ext::deque < sax::Token > & output, const ext::vector < T > & input ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + + for ( const T & item : input ) + alib::xmlApi < T >::compose ( output, item ); + + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +template < typename T > +struct xmlApi < container::ObjectsVector < T > > { + static container::ObjectsVector < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const container::ObjectsVector < T > & data ); +}; + +template < typename T > +container::ObjectsVector < T > xmlApi < container::ObjectsVector < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return container::ObjectsVector < T > ( xmlApi < ext::vector < T > >::parse ( input ) ); +} + +template < typename T > +bool xmlApi < container::ObjectsVector < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return xmlApi < ext::vector < T > >::first ( input ); +} + +template < typename T > +const std::string & xmlApi < container::ObjectsVector < T > >::xmlTagName ( ) { + return xmlApi < ext::vector < T > >::xmlTagName ( ); +} + +template < typename T > +void xmlApi < container::ObjectsVector < T > >::compose ( ext::deque < sax::Token > & output, const container::ObjectsVector < T > & input ) { + xmlApi < ext::vector < T > >::compose ( output, input ); +} + +} /* namespace alib */ + +#endif /* _XML_OBJECTS_VECTOR_H_ */ diff --git a/alib2common/src/core/xmlApi.hpp b/alib2xml/src/core/xmlApi.hpp similarity index 100% rename from alib2common/src/core/xmlApi.hpp rename to alib2xml/src/core/xmlApi.hpp diff --git a/alib2xml/src/exception/xml/CommonException.cpp b/alib2xml/src/exception/xml/CommonException.cpp new file mode 100644 index 0000000000..0e9637858f --- /dev/null +++ b/alib2xml/src/exception/xml/CommonException.cpp @@ -0,0 +1,74 @@ +/* + * CommonException.cpp + * + * Created on: Apr 1, 2013 + * Author: Martin Zak + */ + +#include "CommonException.h" + +#include <object/Object.h> +#include <registration/XmlRegistration.hpp> + +namespace alib { + +exception::CommonException xmlApi < exception::CommonException >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, xmlTagName()); + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, "cause"); + std::string cause = ""; + if (input->getType() == sax::Token::TokenType::CHARACTER) { + cause = std::move(*input).moveData(); + ++input; + } + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, "cause"); + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, "backtrace"); + std::string backtrace = ""; + if (input->getType() == sax::Token::TokenType::CHARACTER) { + backtrace = std::move(*input).moveData(); + ++input; + } + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, "backtrace"); + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::START_ELEMENT, "command"); + std::string command = ""; + if (input->getType() == sax::Token::TokenType::CHARACTER) { + command = std::move(*input).moveData(); + ++input; + } + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, "command"); + sax::FromXMLParserHelper::popToken(input, sax::Token::TokenType::END_ELEMENT, xmlTagName()); + return exception::CommonException(std::move(cause), std::move(backtrace), std::move(command)); +} + +bool xmlApi < exception::CommonException >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < exception::CommonException >::xmlTagName ( ) { + static std::string xmlTagName = "CommonException"; + + return xmlTagName; +} + +void xmlApi < exception::CommonException >::compose ( ext::deque < sax::Token > & output, const exception::CommonException & data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( "cause", sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( data.getCause ( ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( "cause", sax::Token::TokenType::END_ELEMENT ); + output.emplace_back ( "backtrace", sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( data.getBacktrace ( ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( "backtrace", sax::Token::TokenType::END_ELEMENT ); + output.emplace_back ( "command", sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( data.getCommand ( ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( "command", sax::Token::TokenType::END_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, exception::CommonException > ( ); + +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, exception::CommonException > ( ); + +} /* namespace */ diff --git a/alib2xml/src/exception/xml/CommonException.h b/alib2xml/src/exception/xml/CommonException.h new file mode 100644 index 0000000000..33665963b2 --- /dev/null +++ b/alib2xml/src/exception/xml/CommonException.h @@ -0,0 +1,27 @@ +/* + * CommonException.h + * + * Created on: Apr 1, 2013 + * Author: Martin Zak + */ + +#ifndef _XML_COMMON_EXCEPTION_H_ +#define _XML_COMMON_EXCEPTION_H_ + +#include <exception/CommonException.h> +#include <string> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < exception::CommonException > { + static exception::CommonException parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const exception::CommonException & data ); +}; + +} /* namespace alib */ + +#endif /* XML_COMMON_EXCEPTION_H_ */ diff --git a/alib2common/src/factory/XmlDataFactory.hpp b/alib2xml/src/factory/XmlDataFactory.hpp similarity index 81% rename from alib2common/src/factory/XmlDataFactory.hpp rename to alib2xml/src/factory/XmlDataFactory.hpp index e4dd8fb2c7..36c8a387de 100644 --- a/alib2common/src/factory/XmlDataFactory.hpp +++ b/alib2xml/src/factory/XmlDataFactory.hpp @@ -16,7 +16,8 @@ #include <sax/SaxParseInterface.h> #include <sax/SaxComposeInterface.h> #include <core/xmlApi.hpp> -#include <exception/CommonException.h> +#include <exception/xml/CommonException.h> +#include <measure/xml/MeasurementResults.hpp> namespace alib { @@ -215,17 +216,41 @@ inline bool XmlDataFactory::first < exception::CommonException > ( const ext::de template < > inline XmlDataFactory::fromTokens::operator exception::CommonException ( ) { - ext::deque < sax::Token >::iterator iter = tokens.begin ( ); + xmlApiInputContext context ( tokens.begin ( ) ); - if ( iter == tokens.end ( ) ) throw exception::CommonException ( "Empty tokens list" ); + if ( context == tokens.end ( ) ) throw exception::CommonException ( "Empty tokens list" ); - exception::CommonException res = alib::xmlApi < exception::CommonException >::parse ( iter ); + exception::CommonException res = alib::xmlApi < exception::CommonException >::parse ( context ); - if ( iter != tokens.end ( ) ) throw exception::CommonException ( "Unexpeted tokens at the end of the xml" ); + if ( context != tokens.end ( ) ) throw exception::CommonException ( "Unexpeted tokens at the end of the xml" ); return res; } +template < > +inline XmlDataFactory::fromTokens::operator measurements::MeasurementResults ( ) { + xmlApiInputContext context ( tokens.begin ( ) ); + + if ( context == tokens.end ( ) ) throw exception::CommonException ( "Empty tokens list" ); + + if ( alib::xmlApi < exception::CommonException >::first ( context ) ) throw alib::xmlApi < exception::CommonException >::parse ( context ); + + measurements::MeasurementResults res = alib::xmlApi < measurements::MeasurementResults >::parse ( context ); + + if ( context != tokens.end ( ) ) throw exception::CommonException ( "Unexpeted tokens at the end of the xml" ); + + return res; +} + +template < > +inline ext::deque < sax::Token > XmlDataFactory::toTokens ( const measurements::MeasurementResults & data ) { + xmlApiOutputContext context; + + alib::xmlApi < measurements::MeasurementResults >::compose ( context, data ); + + return context; +} + } /* namespace alib */ #endif /* XML_DATA_FACTORY_HPP_ */ diff --git a/alib2common/src/measurements/MeasurementResultsXml.cpp b/alib2xml/src/measure/xml/MeasurementResults.cpp similarity index 67% rename from alib2common/src/measurements/MeasurementResultsXml.cpp rename to alib2xml/src/measure/xml/MeasurementResults.cpp index 76d5dfa2a4..5deed60e98 100644 --- a/alib2common/src/measurements/MeasurementResultsXml.cpp +++ b/alib2xml/src/measure/xml/MeasurementResults.cpp @@ -2,29 +2,43 @@ * Author: Radovan Cerveny */ -#include "../sax/FromXMLParserHelper.h" -#include "MeasurementResultsXml.hpp" -#include "../exception/CommonException.h" +#include <sax/FromXMLParserHelper.h> +#include "MeasurementResults.hpp" +#include <exception/CommonException.h> -namespace measurements { +namespace alib { -ext::deque < sax::Token > MeasurementResultsXml::compose ( const MeasurementResults & mr ) { - ext::deque < sax::Token > tokens; - compose ( mr, tokens ); - return tokens; +measurements::MeasurementResults xmlApi < measurements::MeasurementResults >::parse ( ext::deque < sax::Token >::iterator & input ) { + measurements::MeasurementResults mr; + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, MEASUREMENT_RESULTS_TAG ); + + parseRootMeasurementFrame ( mr, input ); + + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, MEASUREMENT_RESULTS_TAG ); + + return mr; } -void MeasurementResultsXml::compose ( const MeasurementResults & mr, ext::deque < sax::Token > & tokens ) { - tokens.emplace_back ( MEASUREMENT_RESULTS_TAG, sax::Token::TokenType::START_ELEMENT ); +bool xmlApi < measurements::MeasurementResults >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} - MeasurementResultsXml::composeMeasurementFrames ( tokens, 0, mr.frames ); +const std::string & xmlApi < measurements::MeasurementResults >::xmlTagName ( ) { + return MEASUREMENT_RESULTS_TAG; +} - tokens.emplace_back ( MEASUREMENT_RESULTS_TAG, sax::Token::TokenType::END_ELEMENT ); +void xmlApi < measurements::MeasurementResults >::compose ( ext::deque < sax::Token > & output, const measurements::MeasurementResults & input ) { + output.emplace_back ( MEASUREMENT_RESULTS_TAG, sax::Token::TokenType::START_ELEMENT ); + + xmlApi < measurements::MeasurementResults >::composeMeasurementFrames ( output, 0, input.frames ); + + output.emplace_back ( MEASUREMENT_RESULTS_TAG, sax::Token::TokenType::END_ELEMENT ); } -void MeasurementResultsXml::composeMeasurementFrames ( ext::deque < sax::Token > & tokens, unsigned idx, const stealth_vector < MeasurementFrame > & frames ) { +void xmlApi < measurements::MeasurementResults >::composeMeasurementFrames ( ext::deque < sax::Token > & tokens, unsigned idx, const measurements::stealth_vector < measurements::MeasurementFrame > & frames ) { - const MeasurementFrame & frame = frames[idx]; + const measurements::MeasurementFrame & frame = frames[idx]; tokens.emplace_back ( MEASUREMENT_FRAME_TAG, sax::Token::TokenType::START_ELEMENT ); tokens.emplace_back ( MEASUREMENT_FRAME_NAME_TAG, sax::Token::TokenType::START_ELEMENT ); @@ -50,8 +64,8 @@ void MeasurementResultsXml::composeMeasurementFrames ( ext::deque < sax::Token > tokens.emplace_back ( MEASUREMENT_FRAME_TAG, sax::Token::TokenType::END_ELEMENT ); } -void MeasurementResultsXml::composeTimeDataFrame ( ext::deque < sax::Token > & tokens, unsigned idx, const stealth_vector < MeasurementFrame > & frames ) { - const TimeDataFrame & frame = frames[idx].time; +void xmlApi < measurements::MeasurementResults >::composeTimeDataFrame ( ext::deque < sax::Token > & tokens, unsigned idx, const measurements::stealth_vector < measurements::MeasurementFrame > & frames ) { + const measurements::TimeDataFrame & frame = frames[idx].time; tokens.emplace_back ( TIME_DATA_FRAME_TAG, sax::Token::TokenType::START_ELEMENT ); tokens.emplace_back ( TIME_DATA_FRAME_DURATION_TAG, sax::Token::TokenType::START_ELEMENT ); @@ -63,8 +77,8 @@ void MeasurementResultsXml::composeTimeDataFrame ( ext::deque < sax::Token > & t tokens.emplace_back ( TIME_DATA_FRAME_TAG, sax::Token::TokenType::END_ELEMENT ); } -void MeasurementResultsXml::composeMemoryDataFrame ( ext::deque < sax::Token > & tokens, unsigned idx, const stealth_vector < MeasurementFrame > & frames ) { - const MemoryDataFrame & frame = frames[idx].memory; +void xmlApi < measurements::MeasurementResults >::composeMemoryDataFrame ( ext::deque < sax::Token > & tokens, unsigned idx, const measurements::stealth_vector < measurements::MeasurementFrame > & frames ) { + const measurements::MemoryDataFrame & frame = frames[idx].memory; tokens.emplace_back ( MEMORY_DATA_FRAME_TAG, sax::Token::TokenType::START_ELEMENT ); tokens.emplace_back ( MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG, sax::Token::TokenType::START_ELEMENT ); @@ -82,8 +96,8 @@ void MeasurementResultsXml::composeMemoryDataFrame ( ext::deque < sax::Token > & tokens.emplace_back ( MEMORY_DATA_FRAME_TAG, sax::Token::TokenType::END_ELEMENT ); } -void MeasurementResultsXml::composeCounterDataFrame ( ext::deque < sax::Token > & tokens, unsigned idx, const stealth_vector < MeasurementFrame > & frames ) { - const CounterDataFrame & cdf = frames[idx].counter; +void xmlApi < measurements::MeasurementResults >::composeCounterDataFrame ( ext::deque < sax::Token > & tokens, unsigned idx, const measurements::stealth_vector < measurements::MeasurementFrame > & frames ) { + const measurements::CounterDataFrame & cdf = frames[idx].counter; tokens.emplace_back ( COUNTER_DATA_FRAME_TAG, sax::Token::TokenType::START_ELEMENT ); @@ -120,33 +134,7 @@ void MeasurementResultsXml::composeCounterDataFrame ( ext::deque < sax::Token > tokens.emplace_back ( COUNTER_DATA_FRAME_TAG, sax::Token::TokenType::END_ELEMENT ); } -MeasurementResults MeasurementResultsXml::parse ( ext::deque < sax::Token > & tokens ) { - MeasurementResults mr; - - ext::deque < sax::Token >::iterator iter = tokens.begin ( ); - - if ( iter == tokens.end ( ) ) throw::exception::CommonException ( "Empty tokens list" ); - - mr = parse ( iter ); - - if ( iter != tokens.end ( ) ) throw::exception::CommonException ( "Unexpected tokens at the end of the xml" ); - - return mr; -} - -MeasurementResults MeasurementResultsXml::parse ( ext::deque < sax::Token >::iterator & iter ) { - MeasurementResults mr; - - sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEASUREMENT_RESULTS_TAG ); - - parseRootMeasurementFrame ( mr, iter ); - - sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEASUREMENT_RESULTS_TAG ); - - return mr; -} - -void MeasurementResultsXml::parseRootMeasurementFrame ( MeasurementResults & mr, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseRootMeasurementFrame ( measurements::MeasurementResults & mr, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEASUREMENT_FRAME_TAG ); mr.frames.emplace_back ( "Root", measurements::Type::ROOT, 0 ); @@ -175,7 +163,7 @@ void MeasurementResultsXml::parseRootMeasurementFrame ( MeasurementResults & mr, sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEASUREMENT_FRAME_TAG ); } -void MeasurementResultsXml::parseSubframes ( unsigned parentIdx, MeasurementResults & mr, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseSubframes ( unsigned parentIdx, measurements::MeasurementResults & mr, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEASUREMENT_SUBFRAMES_TAG ); for ( ; ; ) { @@ -192,13 +180,13 @@ void MeasurementResultsXml::parseSubframes ( unsigned parentIdx, MeasurementResu sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEASUREMENT_SUBFRAMES_TAG ); } -void MeasurementResultsXml::parseMeasurementFrame ( unsigned parentIdx, MeasurementResults & mr, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseMeasurementFrame ( unsigned parentIdx, measurements::MeasurementResults & mr, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEASUREMENT_FRAME_TAG ); unsigned mfIdx = mr.frames.size ( ); mr.frames.emplace_back ( "Root", measurements::Type::ROOT, parentIdx ); - MeasurementFrame & mf = mr.frames.back ( ); + measurements::MeasurementFrame & mf = mr.frames.back ( ); mr.frames[parentIdx].subIdxs.push_back ( mfIdx ); @@ -231,7 +219,7 @@ void MeasurementResultsXml::parseMeasurementFrame ( unsigned parentIdx, Measurem sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEASUREMENT_FRAME_TAG ); } -void MeasurementResultsXml::parseTimeDataFrame ( MeasurementFrame & mf, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseTimeDataFrame ( measurements::MeasurementFrame & mf, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, TIME_DATA_FRAME_TAG ); for ( ; ; ) { @@ -241,11 +229,11 @@ void MeasurementResultsXml::parseTimeDataFrame ( MeasurementFrame & mf, ext::deq if ( data == TIME_DATA_FRAME_DURATION_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, TIME_DATA_FRAME_DURATION_TAG ); - mf.time.duration = TimeDataFrame::value_type ( valueTypeFromString < TimeDataFrame::value_type::rep > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ) ); + mf.time.duration = measurements::TimeDataFrame::value_type ( valueTypeFromString < measurements::TimeDataFrame::value_type::rep > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, TIME_DATA_FRAME_DURATION_TAG ); } else if ( data == TIME_DATA_FRAME_IN_FRAME_DURATION_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, TIME_DATA_FRAME_IN_FRAME_DURATION_TAG ); - mf.time.inFrameDuration = TimeDataFrame::value_type ( valueTypeFromString < TimeDataFrame::value_type::rep > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ) ); + mf.time.inFrameDuration = measurements::TimeDataFrame::value_type ( valueTypeFromString < measurements::TimeDataFrame::value_type::rep > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, TIME_DATA_FRAME_IN_FRAME_DURATION_TAG ); } else { break; @@ -255,7 +243,7 @@ void MeasurementResultsXml::parseTimeDataFrame ( MeasurementFrame & mf, ext::deq sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, TIME_DATA_FRAME_TAG ); } -void MeasurementResultsXml::parseMemoryDataFrame ( MeasurementFrame & mf, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseMemoryDataFrame ( measurements::MeasurementFrame & mf, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEMORY_DATA_FRAME_TAG ); for ( ; ; ) { @@ -265,19 +253,19 @@ void MeasurementResultsXml::parseMemoryDataFrame ( MeasurementFrame & mf, ext::d if ( data == MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG ); - mf.memory.startHeapUsage = valueTypeFromString < MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); + mf.memory.startHeapUsage = valueTypeFromString < measurements::MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG ); } else if ( data == MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG ); - mf.memory.endHeapUsage = valueTypeFromString < MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); + mf.memory.endHeapUsage = valueTypeFromString < measurements::MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG ); } else if ( data == MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG ); - mf.memory.highWatermark = valueTypeFromString < MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); + mf.memory.highWatermark = valueTypeFromString < measurements::MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG ); } else if ( data == MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG ); - mf.memory.inFrameHighWatermark = valueTypeFromString < MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); + mf.memory.inFrameHighWatermark = valueTypeFromString < measurements::MemoryDataFrame::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG ); } else { break; @@ -287,7 +275,7 @@ void MeasurementResultsXml::parseMemoryDataFrame ( MeasurementFrame & mf, ext::d sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, MEMORY_DATA_FRAME_TAG ); } -void MeasurementResultsXml::parseCounterDataFrame ( MeasurementFrame & mf, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseCounterDataFrame ( measurements::MeasurementFrame & mf, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, COUNTER_DATA_FRAME_TAG ); for ( ; ; ) { @@ -306,7 +294,7 @@ void MeasurementResultsXml::parseCounterDataFrame ( MeasurementFrame & mf, ext:: sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, COUNTER_DATA_FRAME_TAG ); } -void MeasurementResultsXml::parseCounterDataFrameCounters ( const std::string & tag, stealth_map < stealth_string, CounterHint::value_type > & counters, ext::deque < sax::Token >::iterator & iter ) { +void xmlApi < measurements::MeasurementResults >::parseCounterDataFrameCounters ( const std::string & tag, measurements::stealth_map < measurements::stealth_string, measurements::CounterHint::value_type > & counters, ext::deque < sax::Token >::iterator & iter ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, tag ); for ( ; ; ) { @@ -317,8 +305,8 @@ void MeasurementResultsXml::parseCounterDataFrameCounters ( const std::string & if ( data == COUNTER_DATA_FRAME_COUNTER_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, COUNTER_DATA_FRAME_COUNTER_TAG ); - stealth_string counterName; - CounterHint::value_type counterValue = { }; + measurements::stealth_string counterName; + measurements::CounterHint::value_type counterValue = { }; for ( ; ; ) { if ( !sax::FromXMLParserHelper::isTokenType ( iter, sax::Token::TokenType::START_ELEMENT ) ) break; @@ -327,11 +315,11 @@ void MeasurementResultsXml::parseCounterDataFrameCounters ( const std::string & if ( counterData == COUNTER_DATA_FRAME_COUNTER_NAME_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, COUNTER_DATA_FRAME_COUNTER_NAME_TAG ); - counterName = stealthStringFromString ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); + counterName = measurements::stealthStringFromString ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, COUNTER_DATA_FRAME_COUNTER_NAME_TAG ); } else if ( counterData == COUNTER_DATA_FRAME_COUNTER_VALUE_TAG ) { sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::START_ELEMENT, COUNTER_DATA_FRAME_COUNTER_VALUE_TAG ); - counterValue = valueTypeFromString < CounterHint::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); + counterValue = valueTypeFromString < measurements::CounterHint::value_type > ( sax::FromXMLParserHelper::popTokenData ( iter, sax::Token::TokenType::CHARACTER ) ); sax::FromXMLParserHelper::popToken ( iter, sax::Token::TokenType::END_ELEMENT, COUNTER_DATA_FRAME_COUNTER_VALUE_TAG ); } else { break; @@ -351,7 +339,7 @@ void MeasurementResultsXml::parseCounterDataFrameCounters ( const std::string & } template < typename T > -T MeasurementResultsXml::valueTypeFromString ( const std::string & str ) { +T xmlApi < measurements::MeasurementResults >::valueTypeFromString ( const std::string & str ) { std::istringstream iss ( str ); T val; @@ -359,28 +347,29 @@ T MeasurementResultsXml::valueTypeFromString ( const std::string & str ) { return val; } -std::string MeasurementResultsXml::MEASUREMENT_RESULTS_TAG = "MeasurementResults"; +std::string xmlApi < measurements::MeasurementResults >::MEASUREMENT_RESULTS_TAG = "MeasurementResults"; + +std::string xmlApi < measurements::MeasurementResults >::MEASUREMENT_FRAME_TAG = "MeasurementFrame"; +std::string xmlApi < measurements::MeasurementResults >::MEASUREMENT_FRAME_NAME_TAG = "Name"; +std::string xmlApi < measurements::MeasurementResults >::MEASUREMENT_FRAME_TYPE_TAG = "Type"; -std::string MeasurementResultsXml::MEASUREMENT_FRAME_TAG = "MeasurementFrame"; -std::string MeasurementResultsXml::MEASUREMENT_FRAME_NAME_TAG = "Name"; -std::string MeasurementResultsXml::MEASUREMENT_FRAME_TYPE_TAG = "Type"; +std::string xmlApi < measurements::MeasurementResults >::MEASUREMENT_SUBFRAMES_TAG = "SubFrames"; -std::string MeasurementResultsXml::MEASUREMENT_SUBFRAMES_TAG = "SubFrames"; +std::string xmlApi < measurements::MeasurementResults >::TIME_DATA_FRAME_TAG = "TimeData"; +std::string xmlApi < measurements::MeasurementResults >::TIME_DATA_FRAME_DURATION_TAG = "Duration"; +std::string xmlApi < measurements::MeasurementResults >::TIME_DATA_FRAME_IN_FRAME_DURATION_TAG = "InFrameDuration"; -std::string MeasurementResultsXml::TIME_DATA_FRAME_TAG = "TimeData"; -std::string MeasurementResultsXml::TIME_DATA_FRAME_DURATION_TAG = "Duration"; -std::string MeasurementResultsXml::TIME_DATA_FRAME_IN_FRAME_DURATION_TAG = "InFrameDuration"; +std::string xmlApi < measurements::MeasurementResults >::MEMORY_DATA_FRAME_TAG = "MemoryData"; +std::string xmlApi < measurements::MeasurementResults >::MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG = "StartHeapUsage"; +std::string xmlApi < measurements::MeasurementResults >::MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG = "EndHeapUsage"; +std::string xmlApi < measurements::MeasurementResults >::MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG = "HighWatermark"; +std::string xmlApi < measurements::MeasurementResults >::MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG = "InFrameHighWatermark"; -std::string MeasurementResultsXml::MEMORY_DATA_FRAME_TAG = "MemoryData"; -std::string MeasurementResultsXml::MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG = "StartHeapUsage"; -std::string MeasurementResultsXml::MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG = "EndHeapUsage"; -std::string MeasurementResultsXml::MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG = "HighWatermark"; -std::string MeasurementResultsXml::MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG = "InFrameHighWatermark"; +std::string xmlApi < measurements::MeasurementResults >::COUNTER_DATA_FRAME_TAG = "CounterData"; +std::string xmlApi < measurements::MeasurementResults >::COUNTER_DATA_FRAME_COUNTERS_TAG = "Counters"; +std::string xmlApi < measurements::MeasurementResults >::COUNTER_DATA_FRAME_IN_FRAME_COUNTERS_TAG = "InFrameCounters"; +std::string xmlApi < measurements::MeasurementResults >::COUNTER_DATA_FRAME_COUNTER_TAG = "Counter"; +std::string xmlApi < measurements::MeasurementResults >::COUNTER_DATA_FRAME_COUNTER_NAME_TAG = "Name"; +std::string xmlApi < measurements::MeasurementResults >::COUNTER_DATA_FRAME_COUNTER_VALUE_TAG = "Value"; -std::string MeasurementResultsXml::COUNTER_DATA_FRAME_TAG = "CounterData"; -std::string MeasurementResultsXml::COUNTER_DATA_FRAME_COUNTERS_TAG = "Counters"; -std::string MeasurementResultsXml::COUNTER_DATA_FRAME_IN_FRAME_COUNTERS_TAG = "InFrameCounters"; -std::string MeasurementResultsXml::COUNTER_DATA_FRAME_COUNTER_TAG = "Counter"; -std::string MeasurementResultsXml::COUNTER_DATA_FRAME_COUNTER_NAME_TAG = "Name"; -std::string MeasurementResultsXml::COUNTER_DATA_FRAME_COUNTER_VALUE_TAG = "Value"; } diff --git a/alib2xml/src/measure/xml/MeasurementResults.hpp b/alib2xml/src/measure/xml/MeasurementResults.hpp new file mode 100644 index 0000000000..670886a849 --- /dev/null +++ b/alib2xml/src/measure/xml/MeasurementResults.hpp @@ -0,0 +1,69 @@ +/* + * Author: Radovan Cerveny + */ + +#ifndef _XML_MEASUREMENT_RESULTS_HPP_ +#define _XML_MEASUREMENT_RESULTS_HPP_ + +#include <measurements/MeasurementResults.hpp> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < measurements::MeasurementResults > { + static measurements::MeasurementResults parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const measurements::MeasurementResults & data ); + +private: + static std::string MEASUREMENT_RESULTS_TAG; + + static std::string MEASUREMENT_FRAME_TAG; + static std::string MEASUREMENT_FRAME_NAME_TAG; + static std::string MEASUREMENT_FRAME_TYPE_TAG; + + static std::string MEASUREMENT_SUBFRAMES_TAG; + + // TimeDataFrame + static std::string TIME_DATA_FRAME_TAG; + static std::string TIME_DATA_FRAME_DURATION_TAG; + static std::string TIME_DATA_FRAME_IN_FRAME_DURATION_TAG; + + // MemoryDataFrame + static std::string MEMORY_DATA_FRAME_TAG; + static std::string MEMORY_DATA_FRAME_START_HEAP_USAGE_TAG; + static std::string MEMORY_DATA_FRAME_END_HEAP_USAGE_TAG; + static std::string MEMORY_DATA_FRAME_HIGH_WATERMARK_TAG; + static std::string MEMORY_DATA_FRAME_IN_FRAME_HIGH_WATERMARK_TAG; + + // CounterDataFrame + static std::string COUNTER_DATA_FRAME_TAG; + static std::string COUNTER_DATA_FRAME_COUNTERS_TAG; + static std::string COUNTER_DATA_FRAME_IN_FRAME_COUNTERS_TAG; + static std::string COUNTER_DATA_FRAME_COUNTER_TAG; + static std::string COUNTER_DATA_FRAME_COUNTER_NAME_TAG; + static std::string COUNTER_DATA_FRAME_COUNTER_VALUE_TAG; + + static void composeMeasurementFrames ( ext::deque < sax::Token > &, unsigned, const measurements::stealth_vector < measurements::MeasurementFrame > & ); + static void composeTimeDataFrame ( ext::deque < sax::Token > &, unsigned, const measurements::stealth_vector < measurements::MeasurementFrame > & ); + static void composeMemoryDataFrame ( ext::deque < sax::Token > &, unsigned, const measurements::stealth_vector < measurements::MeasurementFrame > & ); + static void composeCounterDataFrame ( ext::deque < sax::Token > &, unsigned, const measurements::stealth_vector < measurements::MeasurementFrame > & ); + + static void parseRootMeasurementFrame ( measurements::MeasurementResults &, ext::deque < sax::Token >::iterator & ); + static void parseSubframes ( unsigned, measurements::MeasurementResults &, ext::deque < sax::Token >::iterator & ); + static void parseMeasurementFrame ( unsigned, measurements::MeasurementResults &, ext::deque < sax::Token >::iterator & ); + static void parseTimeDataFrame ( measurements::MeasurementFrame &, ext::deque < sax::Token >::iterator & ); + static void parseMemoryDataFrame ( measurements::MeasurementFrame &, ext::deque < sax::Token >::iterator & ); + static void parseCounterDataFrame ( measurements::MeasurementFrame &, ext::deque < sax::Token >::iterator & ); + static void parseCounterDataFrameCounters ( const std::string &, measurements::stealth_map < measurements::stealth_string, measurements::CounterHint::value_type > &, ext::deque < sax::Token >::iterator & ); + + template < typename T > + static T valueTypeFromString ( const std::string & ); + +}; + +} /* namespace alib */ + +#endif /* _XML_MEASUREMENT_RESULTS_HPP_ */ diff --git a/alib2common/src/object/AnyObject.cpp b/alib2xml/src/object/xml/AnyObject.cpp similarity index 52% rename from alib2common/src/object/AnyObject.cpp rename to alib2xml/src/object/xml/AnyObject.cpp index 6f7a426b58..f5643207c8 100644 --- a/alib2common/src/object/AnyObject.cpp +++ b/alib2xml/src/object/xml/AnyObject.cpp @@ -5,17 +5,14 @@ * Author: Jan Travnicek */ -#include <object/AnyObject.h> -#include <container/ObjectsSet.h> -#include <primitive/Character.h> +#include "AnyObject.h" +#include <container/xml/ObjectsSet.h> +#include <primitive/xml/Character.h> -#include <registration/ValuePrinterRegistration.hpp> #include <registration/XmlRegistration.hpp> namespace { -static auto anyObjectSetXmlValuePrinter = registration::ValuePrinterRegister < alib::AnyObject < ext::set < char > > > ( ); - static auto anyObjectSetXmlWriterRegister = registration::XmlWriterRegister < alib::Object, alib::AnyObject < ext::set < char > > > ( ); } /* namespace */ diff --git a/alib2xml/src/object/xml/AnyObject.h b/alib2xml/src/object/xml/AnyObject.h new file mode 100644 index 0000000000..b8c5d0df5e --- /dev/null +++ b/alib2xml/src/object/xml/AnyObject.h @@ -0,0 +1,46 @@ +/* + * AnyObject.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_ANY_OBJECT_H_ +#define _XML_ANY_OBJECT_H_ + +#include <object/AnyObject.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < typename T > +struct xmlApi < alib::AnyObject < T > > { + static alib::AnyObject < T > parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alib::AnyObject < T > & data ); +}; + +template < typename T > +alib::AnyObject < T > xmlApi < alib::AnyObject < T > >::parse ( ext::deque < sax::Token >::iterator & input ) { + return alib::AnyObject < T > ( alib::xmlApi < T >::parse ( input ) ); +} + +template < typename T > +bool xmlApi < alib::AnyObject < T > >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return alib::xmlApi < T >::first ( input ); +} + +template < typename T > +const std::string & xmlApi < alib::AnyObject < T > >::xmlTagName ( ) { + return alib::xmlApi < T >::xmlTagName ( ); +} + +template < typename T > +void xmlApi < alib::AnyObject < T > >::compose ( ext::deque < sax::Token > & output, const alib::AnyObject < T > & input ) { + alib::xmlApi < T >::compose ( output, input.getData ( ) ); +} + +} /* namespace alib */ + +#endif /* _XML_ANY_OBJECT_H_ */ diff --git a/alib2xml/src/object/xml/UniqueObject.cpp b/alib2xml/src/object/xml/UniqueObject.cpp new file mode 100644 index 0000000000..1ac1dee210 --- /dev/null +++ b/alib2xml/src/object/xml/UniqueObject.cpp @@ -0,0 +1,51 @@ +/* + * UniqueObject.cpp + * + * Created on: Nov 11, 2016 + * Author: Jan Travicek + */ + +#include "UniqueObject.h" +#include <primitive/xml/Integer.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +alib::UniqueObject xmlApi < alib::UniqueObject >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + Object firstSymbol = alib::xmlApi < Object >::parse ( input ); + primitive::Integer secondSymbol = alib::xmlApi < primitive::Integer >::parse ( input ); + + UniqueObject data ( std::move ( firstSymbol ), std::move ( secondSymbol ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < alib::UniqueObject >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alib::UniqueObject >::xmlTagName ( ) { + static std::string xmlTagName = "UniqueObject"; + + return xmlTagName; +} + +void xmlApi < alib::UniqueObject >::compose ( ext::deque < sax::Token > & output, const alib::UniqueObject & object ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + alib::xmlApi < alib::Object >::compose ( output, object.getSymbol ( ) ); + alib::xmlApi < primitive::Integer >::compose ( output, object.getId ( ) ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, alib::UniqueObject > ( ); + +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, alib::UniqueObject > ( ); + +} /* namespace */ diff --git a/alib2xml/src/object/xml/UniqueObject.h b/alib2xml/src/object/xml/UniqueObject.h new file mode 100644 index 0000000000..dc853fd646 --- /dev/null +++ b/alib2xml/src/object/xml/UniqueObject.h @@ -0,0 +1,26 @@ +/* + * UniqueObject.h + * + * Created on: Nov 11, 2016 + * Author: Jan Travnicek + */ + +#ifndef _XML_UNIQUE_OBJECT_H_ +#define _XML_UNIQUE_OBJECT_H_ + +#include <object/UniqueObject.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < alib::UniqueObject > { + static alib::UniqueObject parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alib::UniqueObject & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_UNIQUE_OBJECT_H_ */ diff --git a/alib2xml/src/object/xml/Void.cpp b/alib2xml/src/object/xml/Void.cpp new file mode 100644 index 0000000000..ceaa338d80 --- /dev/null +++ b/alib2xml/src/object/xml/Void.cpp @@ -0,0 +1,60 @@ +/* + * Void.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "Void.h" +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +void xmlApi < void >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); +} + +bool xmlApi < void >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < void >::xmlTagName ( ) { + static std::string xmlTagName = "Void"; + + return xmlTagName; +} + +void xmlApi < void >::compose ( ext::deque < sax::Token > & output ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +alib::Void xmlApi < alib::Void >::parse ( ext::deque < sax::Token >::iterator & input ) { + xmlApi < void >::parse ( input ); + return alib::Void ( ); +} + +bool xmlApi < alib::Void >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < alib::Void >::xmlTagName ( ) { + return xmlApi < void >::xmlTagName ( ); +} + +void xmlApi < alib::Void >::compose ( ext::deque < sax::Token > & output, const alib::Void & ) { + xmlApi < void >::compose ( output ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, alib::Void > ( ); + +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, alib::Void > ( ); + +} /* namespace */ diff --git a/alib2xml/src/object/xml/Void.h b/alib2xml/src/object/xml/Void.h new file mode 100644 index 0000000000..e37353a80a --- /dev/null +++ b/alib2xml/src/object/xml/Void.h @@ -0,0 +1,34 @@ +/* + * Void.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_VOID_H_ +#define _XML_VOID_H_ + +#include <object/Void.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < void > { + static void parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output ); +}; + +template < > +struct xmlApi < alib::Void > { + static alib::Void parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const alib::Void & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_VOID_H_ */ diff --git a/alib2xml/src/primitive/xml/Bool.cpp b/alib2xml/src/primitive/xml/Bool.cpp new file mode 100644 index 0000000000..3769954481 --- /dev/null +++ b/alib2xml/src/primitive/xml/Bool.cpp @@ -0,0 +1,77 @@ +/* + * Bool.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "Bool.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +bool xmlApi < bool >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + + std::string tmp = sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ); + bool data; + if ( tmp == "true" ) + data = true; + else if ( tmp == "false" ) + data = false; + else + throw exception::CommonException ( "Invalid boolean value" ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + + return data; +} + +bool xmlApi < bool >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < bool >::xmlTagName ( ) { + static std::string xmlTagName = "Bool"; + + return xmlTagName; +} + +void xmlApi < bool >::compose ( ext::deque < sax::Token > & output, bool data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT); + if ( data ) + output.emplace_back ( "true", sax::Token::TokenType::CHARACTER ); + else + output.emplace_back ( "false", sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::Bool xmlApi < primitive::Bool >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::Bool ( xmlApi < bool >::parse ( input ) ); +} + +bool xmlApi < primitive::Bool >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::Bool >::xmlTagName ( ) { + return xmlApi < bool >::xmlTagName ( ); +} + +void xmlApi < primitive::Bool >::compose ( ext::deque < sax::Token > & output, const primitive::Bool & data ) { + xmlApi < bool >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Bool > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Bool > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Bool > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Bool > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/Bool.h b/alib2xml/src/primitive/xml/Bool.h new file mode 100644 index 0000000000..c634fa5a19 --- /dev/null +++ b/alib2xml/src/primitive/xml/Bool.h @@ -0,0 +1,34 @@ +/* + * Bool.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_BOOL_H_ +#define _XML_PRIMITIVE_BOOL_H_ + +#include <primitive/Bool.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < bool > { + static bool parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, bool data ); +}; + +template < > +struct xmlApi < primitive::Bool > { + static primitive::Bool parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::Bool & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_BOOL_H_ */ diff --git a/alib2xml/src/primitive/xml/Character.cpp b/alib2xml/src/primitive/xml/Character.cpp new file mode 100644 index 0000000000..603ac0e781 --- /dev/null +++ b/alib2xml/src/primitive/xml/Character.cpp @@ -0,0 +1,65 @@ +/* + * Character.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travicek + */ + +#include "Character.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +char xmlApi < char >::parse ( ext::deque < sax::Token >::iterator & input) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + char data = sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) [ 0 ]; + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < char >::first ( const ext::deque < sax::Token >::const_iterator & input) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < char >::xmlTagName ( ) { + static std::string xmlTagName = "Character"; + + return xmlTagName; +} + +void xmlApi < char >::compose ( ext::deque < sax::Token > & output, char data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( std::string ( 1, data ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::Character xmlApi < primitive::Character >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::Character ( xmlApi < char >::parse ( input ) ); +} + +bool xmlApi < primitive::Character >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::Character >::xmlTagName ( ) { + return xmlApi < char >::xmlTagName ( ); +} + +void xmlApi < primitive::Character >::compose ( ext::deque < sax::Token > & output, const primitive::Character & data ) { + xmlApi < char >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Character > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Character > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Character > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Character > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/Character.h b/alib2xml/src/primitive/xml/Character.h new file mode 100644 index 0000000000..bbe70d1831 --- /dev/null +++ b/alib2xml/src/primitive/xml/Character.h @@ -0,0 +1,34 @@ +/* + * Character.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_CHARACTER_H_ +#define _XML_PRIMITIVE_CHARACTER_H_ + +#include <primitive/Character.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < char > { + static char parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, char data ); +}; + +template < > +struct xmlApi < primitive::Character > { + static primitive::Character parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::Character & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_CHARACTER_H_ */ diff --git a/alib2xml/src/primitive/xml/Double.cpp b/alib2xml/src/primitive/xml/Double.cpp new file mode 100644 index 0000000000..ecbc997dde --- /dev/null +++ b/alib2xml/src/primitive/xml/Double.cpp @@ -0,0 +1,65 @@ +/* + * Double.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "Double.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +int xmlApi < double >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + double data = ext::from_string < double > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < double >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < double >::xmlTagName ( ) { + static std::string xmlTagName = "Double"; + + return xmlTagName; +} + +void xmlApi < double >::compose ( ext::deque < sax::Token > & output, double data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::Double xmlApi < primitive::Double >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::Double ( xmlApi < double >::parse ( input ) ); +} + +bool xmlApi < primitive::Double >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::Double >::xmlTagName ( ) { + return xmlApi < double >::xmlTagName ( ); +} + +void xmlApi < primitive::Double >::compose ( ext::deque < sax::Token > & output, const primitive::Double & data ) { + xmlApi < double >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Double > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Double > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Double > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Double > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/Double.h b/alib2xml/src/primitive/xml/Double.h new file mode 100644 index 0000000000..cb40156abf --- /dev/null +++ b/alib2xml/src/primitive/xml/Double.h @@ -0,0 +1,34 @@ +/* + * Double.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_DOUBLE_H_ +#define _XML_PRIMITIVE_DOUBLE_H_ + +#include <primitive/Double.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < double > { + static int parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, double data ); +}; + +template < > +struct xmlApi < primitive::Double > { + static primitive::Double parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::Double & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_DOUBLE_H_ */ diff --git a/alib2xml/src/primitive/xml/Integer.cpp b/alib2xml/src/primitive/xml/Integer.cpp new file mode 100644 index 0000000000..e47ff0c546 --- /dev/null +++ b/alib2xml/src/primitive/xml/Integer.cpp @@ -0,0 +1,65 @@ +/* + * Integer.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "Integer.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +int xmlApi < int >::parse ( ext::deque < sax::Token >::iterator & input) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + int data = ext::from_string < int > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < int >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < int >::xmlTagName ( ) { + static std::string xmlTagName = "Integer"; + + return xmlTagName; +} + +void xmlApi < int >::compose ( ext::deque < sax::Token > & output, int data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::Integer xmlApi < primitive::Integer >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::Integer ( xmlApi < int >::parse ( input ) ); +} + +bool xmlApi < primitive::Integer >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::Integer >::xmlTagName ( ) { + return xmlApi < int >::xmlTagName ( ); +} + +void xmlApi < primitive::Integer >::compose ( ext::deque < sax::Token > & output, const primitive::Integer & data ) { + xmlApi < int >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Integer > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Integer > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Integer > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Integer > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/Integer.h b/alib2xml/src/primitive/xml/Integer.h new file mode 100644 index 0000000000..4503147e49 --- /dev/null +++ b/alib2xml/src/primitive/xml/Integer.h @@ -0,0 +1,34 @@ +/* + * Integer.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_INTEGER_H_ +#define _XML_PRIMITIVE_INTEGER_H_ + +#include <primitive/Integer.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < int > { + static int parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, int data ); +}; + +template < > +struct xmlApi < primitive::Integer > { + static primitive::Integer parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::Integer & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_INTEGER_H_ */ diff --git a/alib2xml/src/primitive/xml/String.cpp b/alib2xml/src/primitive/xml/String.cpp new file mode 100644 index 0000000000..0e3e69e1e0 --- /dev/null +++ b/alib2xml/src/primitive/xml/String.cpp @@ -0,0 +1,67 @@ +/* + * String.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travicek + */ + +#include "String.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +std::string xmlApi < std::string >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + std::string data = ""; + if ( sax::FromXMLParserHelper::isTokenType ( input, sax::Token::TokenType::CHARACTER ) ) + data = sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < std::string >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < std::string >::xmlTagName ( ) { + static std::string xmlTagName = "String"; + + return xmlTagName; +} + +void xmlApi < std::string >::compose ( ext::deque < sax::Token > & output, const std::string & data) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( data, sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::String xmlApi < primitive::String >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::String ( xmlApi < std::string >::parse ( input ) ); +} + +bool xmlApi < primitive::String >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::String >::xmlTagName ( ) { + return xmlApi < std::string >::xmlTagName ( ); +} + +void xmlApi < primitive::String >::compose ( ext::deque < sax::Token > & output, const primitive::String & data ) { + xmlApi < std::string >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::String > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::String > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::String > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::String > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/String.h b/alib2xml/src/primitive/xml/String.h new file mode 100644 index 0000000000..d2914d0861 --- /dev/null +++ b/alib2xml/src/primitive/xml/String.h @@ -0,0 +1,34 @@ +/* + * StringLabel.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_STRING_H_ +#define _XML_PRIMITIVE_STRING_H_ + +#include <primitive/String.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < std::string > { + static std::string parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const std::string & data ); +}; + +template < > +struct xmlApi < primitive::String > { + static primitive::String parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::String & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_STRING_H_ */ diff --git a/alib2xml/src/primitive/xml/Unsigned.cpp b/alib2xml/src/primitive/xml/Unsigned.cpp new file mode 100644 index 0000000000..2e6d42550a --- /dev/null +++ b/alib2xml/src/primitive/xml/Unsigned.cpp @@ -0,0 +1,65 @@ +/* + * Unsigned.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "Unsigned.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +unsigned xmlApi < unsigned >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + unsigned data = ext::from_string < unsigned > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < unsigned >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < unsigned >::xmlTagName ( ) { + static std::string xmlTagName = "Unsigned"; + + return xmlTagName; +} + +void xmlApi < unsigned >::compose ( ext::deque < sax::Token > & output, unsigned data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::Unsigned xmlApi < primitive::Unsigned >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::Unsigned ( xmlApi < unsigned >::parse ( input ) ); +} + +bool xmlApi < primitive::Unsigned >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::Unsigned >::xmlTagName ( ) { + return xmlApi < unsigned >::xmlTagName ( ); +} + +void xmlApi < primitive::Unsigned >::compose ( ext::deque < sax::Token > & output, const primitive::Unsigned & data ) { + xmlApi < unsigned >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::Unsigned > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::Unsigned > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::Unsigned > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::Unsigned > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/Unsigned.h b/alib2xml/src/primitive/xml/Unsigned.h new file mode 100644 index 0000000000..8ff4957b6c --- /dev/null +++ b/alib2xml/src/primitive/xml/Unsigned.h @@ -0,0 +1,34 @@ +/* + * Unsigned.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_UNSIGNED_H_ +#define _XML_PRIMITIVE_UNSIGNED_H_ + +#include <primitive/Unsigned.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < unsigned > { + static unsigned parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, unsigned data ); +}; + +template < > +struct xmlApi < primitive::Unsigned > { + static primitive::Unsigned parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::Unsigned & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_UNSIGNED_H_ */ diff --git a/alib2xml/src/primitive/xml/UnsignedLong.cpp b/alib2xml/src/primitive/xml/UnsignedLong.cpp new file mode 100644 index 0000000000..047626a62e --- /dev/null +++ b/alib2xml/src/primitive/xml/UnsignedLong.cpp @@ -0,0 +1,65 @@ +/* + * UnsignedLong.cpp + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#include "UnsignedLong.h" +#include <primitive/Primitive.h> +#include <object/Object.h> + +#include <registration/XmlRegistration.hpp> + +namespace alib { + +unsigned long xmlApi < unsigned long >::parse ( ext::deque < sax::Token >::iterator & input ) { + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); + unsigned long data = ext::from_string < unsigned long > ( sax::FromXMLParserHelper::popTokenData ( input, sax::Token::TokenType::CHARACTER ) ); + sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::END_ELEMENT, xmlTagName ( ) ); + return data; +} + +bool xmlApi < unsigned long >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < unsigned long >::xmlTagName ( ) { + static std::string xmlTagName = "UnsignedLong"; + + return xmlTagName; +} + +void xmlApi < unsigned long >::compose ( ext::deque < sax::Token > & output, unsigned long data ) { + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT ); + output.emplace_back ( ext::to_string ( data ), sax::Token::TokenType::CHARACTER ); + output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); +} + +primitive::UnsignedLong xmlApi < primitive::UnsignedLong >::parse ( ext::deque < sax::Token >::iterator & input ) { + return primitive::UnsignedLong ( xmlApi < unsigned long >::parse ( input ) ); +} + +bool xmlApi < primitive::UnsignedLong >::first ( const ext::deque < sax::Token >::const_iterator & input ) { + return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) ); +} + +const std::string & xmlApi < primitive::UnsignedLong >::xmlTagName ( ) { + return xmlApi < unsigned long >::xmlTagName ( ); +} + +void xmlApi < primitive::UnsignedLong >::compose ( ext::deque < sax::Token > & output, const primitive::UnsignedLong & data ) { + xmlApi < unsigned long >::compose ( output, data.getData ( ) ); +} + +} /* namespace alib */ + +namespace { + +static auto xmlWrite = registration::XmlWriterRegister < primitive::Primitive, primitive::UnsignedLong > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, primitive::UnsignedLong > ( ); + +static auto xmlReader = registration::XmlReaderRegister < primitive::Primitive, primitive::UnsignedLong > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, primitive::UnsignedLong > ( ); + +} /* namespace */ diff --git a/alib2xml/src/primitive/xml/UnsignedLong.h b/alib2xml/src/primitive/xml/UnsignedLong.h new file mode 100644 index 0000000000..0de52ae22b --- /dev/null +++ b/alib2xml/src/primitive/xml/UnsignedLong.h @@ -0,0 +1,34 @@ +/* + * UnsignedLong.h + * + * Created on: Mar 26, 2013 + * Author: Jan Travnicek + */ + +#ifndef _XML_PRIMITIVE_UNSIGNED_LONG_H_ +#define _XML_PRIMITIVE_UNSIGNED_LONG_H_ + +#include <primitive/UnsignedLong.h> +#include <core/xmlApi.hpp> + +namespace alib { + +template < > +struct xmlApi < unsigned long > { + static unsigned long parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, unsigned long data ); +}; + +template < > +struct xmlApi < primitive::UnsignedLong > { + static primitive::UnsignedLong parse ( ext::deque < sax::Token >::iterator & input ); + static bool first ( const ext::deque < sax::Token >::const_iterator & input ); + static const std::string & xmlTagName ( ); + static void compose ( ext::deque < sax::Token > & output, const primitive::UnsignedLong & data ); +}; + +} /* namespace alib */ + +#endif /* _XML_PRIMITIVE_UNSIGNED_LONG_H_ */ diff --git a/alib2common/src/registration/XmlRegistration.hpp b/alib2xml/src/registration/XmlRegistration.hpp similarity index 100% rename from alib2common/src/registration/XmlRegistration.hpp rename to alib2xml/src/registration/XmlRegistration.hpp diff --git a/alib2common/src/sax/ComposerException.cpp b/alib2xml/src/sax/ComposerException.cpp similarity index 100% rename from alib2common/src/sax/ComposerException.cpp rename to alib2xml/src/sax/ComposerException.cpp diff --git a/alib2common/src/sax/ComposerException.h b/alib2xml/src/sax/ComposerException.h similarity index 92% rename from alib2common/src/sax/ComposerException.h rename to alib2xml/src/sax/ComposerException.h index 7d0577b787..294dbffb84 100644 --- a/alib2common/src/sax/ComposerException.h +++ b/alib2xml/src/sax/ComposerException.h @@ -8,7 +8,7 @@ #ifndef COMPOSER_EXCEPTION_H_ #define COMPOSER_EXCEPTION_H_ -#include "../exception/CommonException.h" +#include <exception/CommonException.h> #include "Token.h" namespace sax { diff --git a/alib2common/src/sax/FromXMLParserHelper.cpp b/alib2xml/src/sax/FromXMLParserHelper.cpp similarity index 98% rename from alib2common/src/sax/FromXMLParserHelper.cpp rename to alib2xml/src/sax/FromXMLParserHelper.cpp index 2e2e87c011..01626f3f1b 100644 --- a/alib2common/src/sax/FromXMLParserHelper.cpp +++ b/alib2xml/src/sax/FromXMLParserHelper.cpp @@ -7,7 +7,7 @@ #include "FromXMLParserHelper.h" #include "ParserException.h" -#include "../exception/CommonException.h" +#include <exception/CommonException.h> #include "SaxParseInterface.h" namespace sax { diff --git a/alib2common/src/sax/FromXMLParserHelper.h b/alib2xml/src/sax/FromXMLParserHelper.h similarity index 100% rename from alib2common/src/sax/FromXMLParserHelper.h rename to alib2xml/src/sax/FromXMLParserHelper.h diff --git a/alib2common/src/sax/ParserException.cpp b/alib2xml/src/sax/ParserException.cpp similarity index 100% rename from alib2common/src/sax/ParserException.cpp rename to alib2xml/src/sax/ParserException.cpp diff --git a/alib2common/src/sax/ParserException.h b/alib2xml/src/sax/ParserException.h similarity index 92% rename from alib2common/src/sax/ParserException.h rename to alib2xml/src/sax/ParserException.h index ed228b776f..1ca5a5706e 100644 --- a/alib2common/src/sax/ParserException.h +++ b/alib2xml/src/sax/ParserException.h @@ -8,7 +8,7 @@ #ifndef PARSER_EXCEPTION_H_ #define PARSER_EXCEPTION_H_ -#include "../exception/CommonException.h" +#include <exception/CommonException.h> #include "Token.h" namespace sax { diff --git a/alib2common/src/sax/SaxComposeInterface.cpp b/alib2xml/src/sax/SaxComposeInterface.cpp similarity index 99% rename from alib2common/src/sax/SaxComposeInterface.cpp rename to alib2xml/src/sax/SaxComposeInterface.cpp index 9f281a2258..28f38712dc 100644 --- a/alib2common/src/sax/SaxComposeInterface.cpp +++ b/alib2xml/src/sax/SaxComposeInterface.cpp @@ -13,7 +13,7 @@ #include <sstream> #include <deque> #include "ComposerException.h" -#include "../measure" +#include <measure> namespace sax { diff --git a/alib2common/src/sax/SaxComposeInterface.h b/alib2xml/src/sax/SaxComposeInterface.h similarity index 100% rename from alib2common/src/sax/SaxComposeInterface.h rename to alib2xml/src/sax/SaxComposeInterface.h diff --git a/alib2common/src/sax/SaxParseInterface.cpp b/alib2xml/src/sax/SaxParseInterface.cpp similarity index 97% rename from alib2common/src/sax/SaxParseInterface.cpp rename to alib2xml/src/sax/SaxParseInterface.cpp index 0eca3287b9..bf88dbf791 100644 --- a/alib2common/src/sax/SaxParseInterface.cpp +++ b/alib2xml/src/sax/SaxParseInterface.cpp @@ -12,8 +12,8 @@ #include <cstdlib> #include <iostream> #include <algorithm> -#include "../exception/CommonException.h" -#include "../measure" +#include <exception/CommonException.h> +#include <measure> namespace sax { diff --git a/alib2common/src/sax/SaxParseInterface.h b/alib2xml/src/sax/SaxParseInterface.h similarity index 100% rename from alib2common/src/sax/SaxParseInterface.h rename to alib2xml/src/sax/SaxParseInterface.h diff --git a/alib2common/src/sax/Token.cpp b/alib2xml/src/sax/Token.cpp similarity index 100% rename from alib2common/src/sax/Token.cpp rename to alib2xml/src/sax/Token.cpp diff --git a/alib2common/src/sax/Token.h b/alib2xml/src/sax/Token.h similarity index 100% rename from alib2common/src/sax/Token.h rename to alib2xml/src/sax/Token.h diff --git a/alib2xml/test-src/container/ContainerTest.cpp b/alib2xml/test-src/container/ContainerTest.cpp new file mode 100644 index 0000000000..19b71bcef6 --- /dev/null +++ b/alib2xml/test-src/container/ContainerTest.cpp @@ -0,0 +1,132 @@ +#include "ContainerTest.h" + +#include <object/Object.h> +#include <container/xml/ObjectsSet.h> +#include <container/xml/ObjectsVariant.h> +#include <container/xml/ObjectsTree.h> +#include <container/xml/ObjectsTrie.h> +#include <primitive/xml/Integer.h> +#include <primitive/xml/Character.h> +#include <primitive/xml/String.h> + +#include "factory/XmlDataFactory.hpp" + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION ( ContainerTest, "container" ); +CPPUNIT_TEST_SUITE_REGISTRATION ( ContainerTest ); + +void ContainerTest::setUp ( ) { +} + +void ContainerTest::tearDown ( ) { +} + +void ContainerTest::testXMLParser ( ) { + + alib::Object tmp ( primitive::String ( "1" ) ); + + container::ObjectsSet < > set; + + set.insert ( tmp ); + + alib::Object object ( set ); + + { + std::string tmp2 = alib::XmlDataFactory::toString ( object ); + + std::cout << tmp2 << std::endl; + + alib::Object object2 = alib::XmlDataFactory::fromString ( tmp2 ); + + CPPUNIT_ASSERT ( object == object2 ); + + ext::set < primitive::String > concrete = alib::XmlDataFactory::fromString ( tmp2 ); + std::string tmp3 = alib::XmlDataFactory::toString ( concrete ); + + std::cout << tmp3 << std::endl; + + alib::Object object3 = alib::XmlDataFactory::fromString ( tmp3 ); + + CPPUNIT_ASSERT ( object == object3 ); + } +} + +void ContainerTest::testVariantParsing ( ) { + { + std::string string = "<String>aaa</String>"; + ext::variant < int, std::string > object = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( "aaa" == object.get < std::string > ( ) ); + + std::string string2 = alib::XmlDataFactory::toString ( object ); + + ext::variant < int, std::string > object2 = alib::XmlDataFactory::fromString ( string2 ); + + CPPUNIT_ASSERT ( object == object2 ); + } +} + +void ContainerTest::testTreeParsing ( ) { + { + ext::tree < int > t ( 1 ); + + std::string string = alib::XmlDataFactory::toString ( t ); + std::cout << string << std::endl; + + ext::tree < int > t2 = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( t == t2 ); + } + { + ext::tree < int > t ( 1, ext::tree < int > ( 2 ), ext::tree < int > ( 4 ) ); + + std::string string = alib::XmlDataFactory::toString ( t ); + std::cout << string << std::endl; + + ext::tree < int > t2 = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( t == t2 ); + } + { + ext::tree < int > t ( 1, ext::tree < int > ( 2, ext::tree < int > ( 3 ) ), ext::tree < int > ( 4 ) ); + + std::string string = alib::XmlDataFactory::toString ( t ); + std::cout << string << std::endl; + + ext::tree < int > t2 = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( t == t2 ); + } +} + +void ContainerTest::testTrieParsing ( ) { + { + ext::trie < char, int > t ( 1 ); + + std::string string = alib::XmlDataFactory::toString ( t ); + std::cout << string << std::endl; + + ext::trie < char, int > t2 = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( t == t2 ); + } + { + ext::trie < char, int > t ( 0, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 1 ) ), std::make_pair ( 'b', ext::trie < char, int > ( 2 ) ) } ); + + std::string string = alib::XmlDataFactory::toString ( t ); + std::cout << string << std::endl; + + ext::trie < char, int > t2 = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( t == t2 ); + } + { + ext::trie < char, int > t ( 0, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 1, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 3 ) ), std::make_pair ( 'b', ext::trie < char, int > ( 4 ) ) } ) ), std::make_pair ( 'b', ext::trie < char, int > ( 2, ext::map < char, ext::trie < char, int > > { std::make_pair ( 'a', ext::trie < char, int > ( 5 ) ), std::make_pair ( 'b', ext::trie < char, int > ( 6 ) ) } ) ) } ); + + std::string string = alib::XmlDataFactory::toString ( t ); + std::cout << string << std::endl; + + ext::trie < char, int > t2 = alib::XmlDataFactory::fromString ( string ); + + CPPUNIT_ASSERT ( t == t2 ); + } +} diff --git a/alib2xml/test-src/container/ContainerTest.h b/alib2xml/test-src/container/ContainerTest.h new file mode 100644 index 0000000000..454c57164f --- /dev/null +++ b/alib2xml/test-src/container/ContainerTest.h @@ -0,0 +1,24 @@ +#ifndef CONTAINER_TEST_H_ +#define CONTAINER_TEST_H_ + +#include <cppunit/extensions/HelperMacros.h> + +class ContainerTest : public CppUnit::TestFixture { + CPPUNIT_TEST_SUITE ( ContainerTest ); + CPPUNIT_TEST ( testXMLParser ); + CPPUNIT_TEST ( testVariantParsing ); + CPPUNIT_TEST ( testTreeParsing ); + CPPUNIT_TEST ( testTrieParsing ); + CPPUNIT_TEST_SUITE_END ( ); + +public: + void setUp ( ); + void tearDown ( ); + + void testXMLParser ( ); + void testVariantParsing ( ); + void testTreeParsing ( ); + void testTrieParsing ( ); +}; + +#endif // CONTAINER_TEST_H_ diff --git a/alib2xml/test-src/main.cpp b/alib2xml/test-src/main.cpp new file mode 100644 index 0000000000..fd442ebd12 --- /dev/null +++ b/alib2xml/test-src/main.cpp @@ -0,0 +1,164 @@ +#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> + +#include <exception/CommonException.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::CommonException& 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/alib2xml/test-src/measurements/MeasurementsTest.cpp b/alib2xml/test-src/measurements/MeasurementsTest.cpp new file mode 100644 index 0000000000..cb02d8f1da --- /dev/null +++ b/alib2xml/test-src/measurements/MeasurementsTest.cpp @@ -0,0 +1,96 @@ +#include "MeasurementsTest.h" +#include <thread> +#include <measure> + +#include <factory/XmlDataFactory.hpp> +#include <measure/xml/MeasurementResults.hpp> + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION ( MeasurementsTest, "measurements" ); +CPPUNIT_TEST_SUITE_REGISTRATION ( MeasurementsTest ); + +void MeasurementsTest::setUp ( ) { + measurements::reset ( ); +} + +void MeasurementsTest::tearDown ( ) { +} + +void MeasurementsTest::testMeasurementResultsXml ( ) { + measurements::start ( "global", measurements::Type::OVERALL ); + measurements::start ( "init", measurements::Type::INIT ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 100 ) ); + measurements::end ( ); + measurements::hint ( measurements::CounterHint { "counter2", measurements::CounterHint::Type::SUB, 5 } ); + + measurements::start ( "main", measurements::Type::MAIN ); + int * foo = new int[1000]; + + std::this_thread::sleep_for ( std::chrono::milliseconds ( 20 ) ); + measurements::start ( "aux", measurements::Type::AUXILIARY ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); + measurements::hint ( measurements::CounterHint { "counter2", measurements::CounterHint::Type::SUB, 5 } ); + + measurements::end ( ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); + measurements::start ( "aux", measurements::Type::AUXILIARY ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); + measurements::end ( ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); + measurements::end ( ); + measurements::hint ( measurements::CounterHint { "counter2", measurements::CounterHint::Type::SUB, 5 } ); + + measurements::start ( "fin", measurements::Type::FINALIZE ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 30 ) ); + measurements::start ( "aux", measurements::Type::AUXILIARY ); + int * bar = new int[2000]; + + std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); + measurements::end ( ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); + measurements::end ( ); + measurements::hint ( measurements::CounterHint { "counter1", measurements::CounterHint::Type::ADD, 1 } ); + + measurements::end ( ); + measurements::start ( "global2", measurements::Type::OVERALL ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 100 ) ); + measurements::end ( ); + + delete[] foo; + measurements::start ( "global3", measurements::Type::OVERALL ); + measurements::start ( "init", measurements::Type::INIT ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 100 ) ); + measurements::end ( ); + measurements::start ( "main", measurements::Type::MAIN ); + delete[] bar; + std::this_thread::sleep_for ( std::chrono::milliseconds ( 20 ) ); + measurements::start ( "aux", measurements::Type::AUXILIARY ); + measurements::hint ( measurements::CounterHint { "counter1", measurements::CounterHint::Type::ADD, 1 } ); + + std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); + measurements::end ( ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); + measurements::start ( "aux", measurements::Type::AUXILIARY ); + measurements::hint ( measurements::CounterHint { "counter1", measurements::CounterHint::Type::ADD, 1 } ); + + std::this_thread::sleep_for ( std::chrono::milliseconds ( 40 ) ); + measurements::end ( ); + std::this_thread::sleep_for ( std::chrono::milliseconds ( 80 ) ); + measurements::end ( ); + measurements::end ( ); + + ext::deque<sax::Token> tokens = alib::XmlDataFactory::toTokens ( measurements::results ( ) ); + + measurements::MeasurementResults convertedResults = alib::XmlDataFactory::fromTokens ( std::move ( tokens ) ); + + std::ostringstream ossoriginal; + + ossoriginal << measurements::MeasurementFormat::LIST << measurements::results ( ) << std::endl; + + std::ostringstream ossconverted; + + ossconverted << measurements::MeasurementFormat::LIST << convertedResults << std::endl; + + std::cout << ossoriginal.str ( ) << std::endl << ossconverted.str ( ) << std::endl; + + CPPUNIT_ASSERT ( ossoriginal.str ( ) == ossconverted.str ( ) ); +} diff --git a/alib2xml/test-src/measurements/MeasurementsTest.h b/alib2xml/test-src/measurements/MeasurementsTest.h new file mode 100644 index 0000000000..05dac21a35 --- /dev/null +++ b/alib2xml/test-src/measurements/MeasurementsTest.h @@ -0,0 +1,18 @@ +#ifndef MEASUREMENTS_TEST_H_ +#define MEASUREMENTS_TEST_H_ + +#include <cppunit/extensions/HelperMacros.h> + +class MeasurementsTest : public CppUnit::TestFixture { + CPPUNIT_TEST_SUITE ( MeasurementsTest ); + CPPUNIT_TEST ( testMeasurementResultsXml ); + CPPUNIT_TEST_SUITE_END ( ); + +public: + void setUp ( ); + void tearDown ( ); + + void testMeasurementResultsXml( ); +}; + +#endif // MEASUREMENTS_TEST_H_ diff --git a/alib2common/test-src/object/AnyObjectTest.cpp b/alib2xml/test-src/object/AnyObjectTest.cpp similarity index 75% rename from alib2common/test-src/object/AnyObjectTest.cpp rename to alib2xml/test-src/object/AnyObjectTest.cpp index 8a7602cd46..1e2cf66a19 100644 --- a/alib2common/test-src/object/AnyObjectTest.cpp +++ b/alib2xml/test-src/object/AnyObjectTest.cpp @@ -1,14 +1,11 @@ -#include <list> #include "AnyObjectTest.h" -#include "sax/SaxParseInterface.h" -#include "sax/SaxComposeInterface.h" +#include <object/xml/AnyObject.h> +#include <container/xml/ObjectsPair.h> +#include <primitive/xml/Character.h> +#include <primitive/xml/Integer.h> -#include "object/AnyObject.h" -#include "container/ObjectsPair.h" -#include <primitive/Character.h> - -#include "factory/XmlDataFactory.hpp" +#include <factory/XmlDataFactory.hpp> CPPUNIT_TEST_SUITE_NAMED_REGISTRATION ( AnyObjectTest, "object" ); CPPUNIT_TEST_SUITE_REGISTRATION ( AnyObjectTest ); diff --git a/alib2common/test-src/object/AnyObjectTest.h b/alib2xml/test-src/object/AnyObjectTest.h similarity index 100% rename from alib2common/test-src/object/AnyObjectTest.h rename to alib2xml/test-src/object/AnyObjectTest.h diff --git a/alib2common/test-src/primitive/PrimitiveTest.cpp b/alib2xml/test-src/primitive/PrimitiveTest.cpp similarity index 85% rename from alib2common/test-src/primitive/PrimitiveTest.cpp rename to alib2xml/test-src/primitive/PrimitiveTest.cpp index e54781d191..e84505ab9d 100644 --- a/alib2common/test-src/primitive/PrimitiveTest.cpp +++ b/alib2xml/test-src/primitive/PrimitiveTest.cpp @@ -1,13 +1,11 @@ #include <list> #include "PrimitiveTest.h" -#include "sax/SaxParseInterface.h" -#include "sax/SaxComposeInterface.h" +#include <primitive/Primitive.h> -#include "primitive/Primitive.h" - -#include "factory/XmlDataFactory.hpp" -#include <algorithm> +#include <sax/SaxParseInterface.h> +#include <sax/SaxComposeInterface.h> +#include <factory/XmlDataFactory.hpp> CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( PrimitiveTest, "primitive" ); CPPUNIT_TEST_SUITE_REGISTRATION( PrimitiveTest ); diff --git a/alib2common/test-src/primitive/PrimitiveTest.h b/alib2xml/test-src/primitive/PrimitiveTest.h similarity index 100% rename from alib2common/test-src/primitive/PrimitiveTest.h rename to alib2xml/test-src/primitive/PrimitiveTest.h diff --git a/alib2common/test-src/sax/SaxTest.cpp b/alib2xml/test-src/sax/SaxTest.cpp similarity index 100% rename from alib2common/test-src/sax/SaxTest.cpp rename to alib2xml/test-src/sax/SaxTest.cpp diff --git a/alib2common/test-src/sax/SaxTest.h b/alib2xml/test-src/sax/SaxTest.h similarity index 100% rename from alib2common/test-src/sax/SaxTest.h rename to alib2xml/test-src/sax/SaxTest.h diff --git a/aminimize2/makefile.conf b/aminimize2/makefile.conf index f22c79fd37..6413afd3b1 100644 --- a/aminimize2/makefile.conf +++ b/aminimize2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aminimize2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/anormalize2/makefile.conf b/anormalize2/makefile.conf index 037040337f..432066d6a1 100644 --- a/anormalize2/makefile.conf +++ b/anormalize2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=anormalize2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aql2/makefile.conf b/aql2/makefile.conf index 3b09481fde..4767cded9d 100644 --- a/aql2/makefile.conf +++ b/aql2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aql2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2aux/ ../alib2raw/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2aux alib2raw alib2str alib2data alib2common alib2std xml2 readline -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2aux/ ../alib2raw/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2aux alib2raw alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 readline +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/aquery2/makefile.conf b/aquery2/makefile.conf index a422f5ec0d..089208ea14 100644 --- a/aquery2/makefile.conf +++ b/aquery2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=aquery2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/arand2/makefile.conf b/arand2/makefile.conf index 028803f954..074d1b60f5 100644 --- a/arand2/makefile.conf +++ b/arand2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=arand2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/araw2/makefile.conf b/araw2/makefile.conf index 5563abe8bb..4015c357ed 100644 --- a/araw2/makefile.conf +++ b/araw2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=araw2 -LINK_PATHS=../alib2raw/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2raw alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2raw/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2raw/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2raw alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2raw/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/arename2/makefile.conf b/arename2/makefile.conf index 52d0722bd1..12e8c0c4ec 100644 --- a/arename2/makefile.conf +++ b/arename2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=arename2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/areverse2/makefile.conf b/areverse2/makefile.conf index d419b2776f..ce95e61f57 100644 --- a/areverse2/makefile.conf +++ b/areverse2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=areverse2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/arun2/makefile.conf b/arun2/makefile.conf index 9eada94443..894b0a5dd0 100644 --- a/arun2/makefile.conf +++ b/arun2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=arun2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/astat2/makefile.conf b/astat2/makefile.conf index 7c39c67922..d811d00b11 100644 --- a/astat2/makefile.conf +++ b/astat2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=astat2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/astringology2/makefile.conf b/astringology2/makefile.conf index dcceb9e6ee..0d6f1fae35 100644 --- a/astringology2/makefile.conf +++ b/astringology2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=astringology2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/atrim2/makefile.conf b/atrim2/makefile.conf index c732a116c6..09325f74df 100644 --- a/atrim2/makefile.conf +++ b/atrim2/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=atrim2 -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2cli/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ diff --git a/makefile b/makefile index e53b007e3c..8bc92c0a69 100644 --- a/makefile +++ b/makefile @@ -21,6 +21,8 @@ endif SUBDIRS_LIBS = alib2std \ alib2common \ + alib2measure \ + alib2xml \ alib2data \ alib2data_experimental \ alib2str \ diff --git a/tniceprint/makefile.conf b/tniceprint/makefile.conf index e58b353a8d..1c70a9009f 100644 --- a/tniceprint/makefile.conf +++ b/tniceprint/makefile.conf @@ -1,4 +1,4 @@ EXECUTABLE:=atniceprint -LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2common/ ../alib2std/ -LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2common alib2std xml2 -INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ +LINK_PATHS=../alib2cli/ ../alib2elgo/ ../alib2algo/ ../alib2str/ ../alib2data/ ../alib2xml/ ../alib2measure/ ../alib2common/ ../alib2std/ +LINK_LIBRARIES=alib2cli alib2elgo alib2algo alib2str alib2data alib2xml alib2measure alib2common alib2std xml2 +INCLUDE_PATHS=\$$(SOURCES_BASE_DIR)/../../alib2elgo/src/ \$$(SOURCES_BASE_DIR)/../../alib2algo/src/ \$$(SOURCES_BASE_DIR)/../../alib2data/src/ \$$(SOURCES_BASE_DIR)/../../alib2xml/src/ \$$(SOURCES_BASE_DIR)/../../alib2measure/src/ \$$(SOURCES_BASE_DIR)/../../alib2common/src/ \$$(SOURCES_BASE_DIR)/../../alib2std/src/ /usr/include/libxml2/ -- GitLab