From a5038486b617ac07db5fb8b7829062e37882c4da Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 21 Sep 2017 13:07:43 +0200 Subject: [PATCH] split type registrations to xml and abstraction --- alib2common/src/container/ObjectsDeque.cpp | 16 ++++--- alib2common/src/container/ObjectsList.cpp | 16 ++++--- alib2common/src/container/ObjectsMap.cpp | 16 ++++--- alib2common/src/container/ObjectsPair.cpp | 16 ++++--- alib2common/src/container/ObjectsSet.cpp | 16 ++++--- alib2common/src/container/ObjectsTree.cpp | 16 ++++--- alib2common/src/container/ObjectsTrie.cpp | 16 ++++--- alib2common/src/container/ObjectsVector.cpp | 16 ++++--- alib2common/src/exception/CommonException.cpp | 15 +++++-- alib2common/src/object/AnyObject.cpp | 12 ++++-- alib2common/src/object/UniqueObject.cpp | 15 +++++-- alib2common/src/object/Void.cpp | 14 +++++-- alib2common/src/primitive/Bool.cpp | 18 ++++++-- alib2common/src/primitive/Character.cpp | 17 ++++++-- alib2common/src/primitive/Double.cpp | 17 ++++++-- alib2common/src/primitive/Integer.cpp | 17 ++++++-- alib2common/src/primitive/String.cpp | 17 ++++++-- alib2common/src/primitive/Unsigned.cpp | 17 ++++++-- alib2common/src/primitive/UnsignedLong.cpp | 17 ++++++-- .../src/registration/DowncastRegistration.hpp | 18 ++++++++ .../registration/ValuePrinterRegistration.hpp | 18 ++++++++ ...peRegistration.hpp => XmlRegistration.hpp} | 23 +++------- alib2data/src/alphabet/BarSymbol.cpp | 17 +++++--- alib2data/src/alphabet/BlankSymbol.cpp | 17 +++++--- .../src/alphabet/BottomOfTheStackSymbol.cpp | 17 +++++--- alib2data/src/alphabet/EndSymbol.cpp | 17 +++++--- alib2data/src/alphabet/InitialSymbol.cpp | 17 +++++--- alib2data/src/alphabet/LabeledSymbol.cpp | 17 +++++--- .../src/alphabet/NonlinearVariableSymbol.cpp | 17 +++++--- alib2data/src/alphabet/RankedSymbol.cpp | 17 +++++--- alib2data/src/alphabet/StartSymbol.cpp | 17 +++++--- .../src/alphabet/SubtreeWildcardSymbol.cpp | 17 +++++--- alib2data/src/alphabet/UniqueSymbol.cpp | 17 +++++--- alib2data/src/alphabet/VariablesBarSymbol.cpp | 17 +++++--- alib2data/src/automaton/FSM/CompactNFA.cpp | 27 +++++++----- alib2data/src/automaton/FSM/DFA.cpp | 17 +++++--- alib2data/src/automaton/FSM/EpsilonNFA.cpp | 25 +++++++---- alib2data/src/automaton/FSM/ExtendedNFA.cpp | 29 ++++++++----- .../automaton/FSM/MultiInitialStateNFA.cpp | 23 ++++++---- alib2data/src/automaton/FSM/NFA.cpp | 21 ++++++---- alib2data/src/automaton/PDA/DPDA.cpp | 19 ++++++--- .../src/automaton/PDA/InputDrivenDPDA.cpp | 19 ++++++--- .../src/automaton/PDA/InputDrivenNPDA.cpp | 19 ++++++--- alib2data/src/automaton/PDA/NPDA.cpp | 19 ++++++--- alib2data/src/automaton/PDA/NPDTA.cpp | 19 ++++++--- .../PDA/RealTimeHeightDeterministicDPDA.cpp | 19 ++++++--- .../PDA/RealTimeHeightDeterministicNPDA.cpp | 19 ++++++--- alib2data/src/automaton/PDA/SinglePopDPDA.cpp | 19 ++++++--- alib2data/src/automaton/PDA/SinglePopNPDA.cpp | 19 ++++++--- .../src/automaton/PDA/VisiblyPushdownDPDA.cpp | 19 ++++++--- .../src/automaton/PDA/VisiblyPushdownNPDA.cpp | 19 ++++++--- alib2data/src/automaton/TA/DFTA.cpp | 19 ++++++--- alib2data/src/automaton/TA/NFTA.cpp | 19 ++++++--- alib2data/src/automaton/TM/OneTapeDTM.cpp | 19 ++++++--- alib2data/src/grammar/ContextFree/CFG.cpp | 21 +++++++--- alib2data/src/grammar/ContextFree/CNF.cpp | 19 ++++++--- .../grammar/ContextFree/EpsilonFreeCFG.cpp | 19 ++++++--- alib2data/src/grammar/ContextFree/GNF.cpp | 19 ++++++--- alib2data/src/grammar/ContextFree/LG.cpp | 19 ++++++--- .../src/grammar/ContextSensitive/CSG.cpp | 19 ++++++--- .../NonContractingGrammar.cpp | 19 ++++++--- alib2data/src/grammar/Regular/LeftLG.cpp | 19 ++++++--- alib2data/src/grammar/Regular/LeftRG.cpp | 19 ++++++--- alib2data/src/grammar/Regular/RightLG.cpp | 19 ++++++--- alib2data/src/grammar/Regular/RightRG.cpp | 19 ++++++--- .../ContextPreservingUnrestrictedGrammar.cpp | 19 ++++++--- .../Unrestricted/UnrestrictedGrammar.cpp | 19 ++++++--- .../CompressedBitParallelTreeIndex.cpp | 13 ++++-- .../indexes/arbology/FullAndLinearIndex.cpp | 13 ++++-- ...onlinearCompressedBitParallelTreeIndex.cpp | 13 ++++-- .../arbology/NonlinearFullAndLinearIndex.cpp | 13 ++++-- .../src/indexes/stringology/BNDMMatcher.cpp | 13 ++++-- .../indexes/stringology/BitParallelIndex.cpp | 13 ++++-- .../CompressedBitParallelIndex.cpp | 13 ++++-- .../src/indexes/stringology/PositionHeap.cpp | 13 ++++-- .../src/indexes/stringology/SuffixArray.cpp | 13 ++++-- .../src/indexes/stringology/SuffixTrie.cpp | 13 ++++-- alib2data/src/label/FailStateLabel.cpp | 17 +++++--- alib2data/src/label/FinalStateLabel.cpp | 17 +++++--- alib2data/src/label/HexavigesimalLabel.cpp | 17 +++++--- alib2data/src/label/InitialStateLabel.cpp | 17 +++++--- alib2data/src/label/ObjectLabel.cpp | 17 +++++--- alib2data/src/label/PrimitiveLabel.cpp | 17 +++++--- alib2data/src/label/UniqueLabel.cpp | 17 +++++--- alib2data/src/regexp/formal/FormalRegExp.cpp | 21 ++++++---- .../src/regexp/unbounded/UnboundedRegExp.cpp | 21 ++++++---- alib2data/src/rte/formal/FormalRTE.cpp | 17 +++++--- alib2data/src/string/CyclicString.cpp | 21 +++++++--- alib2data/src/string/Epsilon.cpp | 19 ++++++--- alib2data/src/string/LinearString.cpp | 42 +++++++++++-------- .../src/tree/ranked/PostfixRankedTree.cpp | 24 +++++++---- .../PrefixRankedBarNonlinearPattern.cpp | 32 ++++++++------ .../tree/ranked/PrefixRankedBarPattern.cpp | 26 ++++++++---- .../src/tree/ranked/PrefixRankedBarTree.cpp | 24 +++++++---- .../ranked/PrefixRankedNonlinearPattern.cpp | 32 ++++++++------ .../src/tree/ranked/PrefixRankedPattern.cpp | 26 ++++++++---- .../src/tree/ranked/PrefixRankedTree.cpp | 24 +++++++---- .../tree/ranked/RankedNonlinearPattern.cpp | 24 ++++++++--- alib2data/src/tree/ranked/RankedPattern.cpp | 24 +++++++---- alib2data/src/tree/ranked/RankedTree.cpp | 26 ++++++++---- alib2data/src/tree/unranked/PrefixBarTree.cpp | 24 +++++++---- .../unranked/UnrankedNonlinearPattern.cpp | 24 ++++++++--- .../src/tree/unranked/UnrankedPattern.cpp | 24 +++++++---- alib2data/src/tree/unranked/UnrankedTree.cpp | 24 +++++++---- .../directed/AdjacencyListDirectedGraph.cpp | 16 ++++--- .../directed/AdjacencyMatrixDirectedGraph.cpp | 16 ++++--- .../AdjacencyListUndirectedGraph.cpp | 15 ++++--- .../AdjacencyMatrixUndirectedGraph.cpp | 16 ++++--- .../SuffixTrieTerminatingSymbol.cpp | 15 +++++-- .../src/label/LR0ItemsLabel.cpp | 17 +++++--- .../string/LinearStringTerminatingSymbol.cpp | 17 +++++--- 111 files changed, 1465 insertions(+), 619 deletions(-) create mode 100644 alib2common/src/registration/DowncastRegistration.hpp create mode 100644 alib2common/src/registration/ValuePrinterRegistration.hpp rename alib2common/src/registration/{TypeRegistration.hpp => XmlRegistration.hpp} (62%) diff --git a/alib2common/src/container/ObjectsDeque.cpp b/alib2common/src/container/ObjectsDeque.cpp index 7d1699eeef..136de63da1 100644 --- a/alib2common/src/container/ObjectsDeque.cpp +++ b/alib2common/src/container/ObjectsDeque.cpp @@ -8,11 +8,17 @@ #include "ObjectsDeque.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsDequeType = registration::TypeRegister < container::Container, container::ObjectsDeque < > > (); -auto objectsDequeType2 = registration::TypeRegister < alib::Object, container::ObjectsDeque < > > (); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsDeque < > > ( ); -} /* namespace alib */ +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/ObjectsList.cpp b/alib2common/src/container/ObjectsList.cpp index 9a63bc195e..9b3e430354 100644 --- a/alib2common/src/container/ObjectsList.cpp +++ b/alib2common/src/container/ObjectsList.cpp @@ -8,11 +8,17 @@ #include "ObjectsList.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsListType = registration::TypeRegister < container::Container, container::ObjectsList < > > (); -auto objectsListType2 = registration::TypeRegister < alib::Object, container::ObjectsList < > > (); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsList < > > ( ); -} /* namespace alib */ +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/ObjectsMap.cpp b/alib2common/src/container/ObjectsMap.cpp index 5619bc67a9..70b1abe6fa 100644 --- a/alib2common/src/container/ObjectsMap.cpp +++ b/alib2common/src/container/ObjectsMap.cpp @@ -8,11 +8,17 @@ #include "ObjectsMap.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsMapType = registration::TypeRegister < container::Container, container::ObjectsMap < > > ( ); -auto objectsMapType2 = registration::TypeRegister < alib::Object, container::ObjectsMap < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsMap < > > ( ); -} /* namespace alib */ +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/ObjectsPair.cpp b/alib2common/src/container/ObjectsPair.cpp index c26f9c1b0c..b604eadfa8 100644 --- a/alib2common/src/container/ObjectsPair.cpp +++ b/alib2common/src/container/ObjectsPair.cpp @@ -8,11 +8,17 @@ #include "ObjectsPair.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsPairType = registration::TypeRegister < container::Container, container::ObjectsPair < > > ( ); -auto objectsPairType2 = registration::TypeRegister < alib::Object, container::ObjectsPair < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsPair < > > ( ); -} /* namespace alib */ +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/ObjectsSet.cpp b/alib2common/src/container/ObjectsSet.cpp index 2fc45818e3..5b46bdf26c 100644 --- a/alib2common/src/container/ObjectsSet.cpp +++ b/alib2common/src/container/ObjectsSet.cpp @@ -8,11 +8,17 @@ #include "ObjectsSet.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsSetType = registration::TypeRegister < container::Container, container::ObjectsSet < > > ( ); -auto objectsSetType2 = registration::TypeRegister < alib::Object, container::ObjectsSet < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsSet < > > ( ); -} /* namespace alib */ +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/ObjectsTree.cpp b/alib2common/src/container/ObjectsTree.cpp index e132a97821..d3b81dffbc 100644 --- a/alib2common/src/container/ObjectsTree.cpp +++ b/alib2common/src/container/ObjectsTree.cpp @@ -8,11 +8,17 @@ #include "ObjectsTree.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsTreeType = registration::TypeRegister < container::Container, container::ObjectsTree < > > ( ); -auto objectsTreeType2 = registration::TypeRegister < alib::Object, container::ObjectsTree < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsTree < > > ( ); -} /* namespace alib */ +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/ObjectsTrie.cpp b/alib2common/src/container/ObjectsTrie.cpp index 9f3f3fbc63..967cebb72f 100644 --- a/alib2common/src/container/ObjectsTrie.cpp +++ b/alib2common/src/container/ObjectsTrie.cpp @@ -8,11 +8,17 @@ #include "ObjectsTrie.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsTrieType = registration::TypeRegister < container::Container, container::ObjectsTrie < > > ( ); -auto objectsTrieType2 = registration::TypeRegister < alib::Object, container::ObjectsTrie < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsTrie < > > ( ); -} /* namespace alib */ +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/ObjectsVector.cpp b/alib2common/src/container/ObjectsVector.cpp index dfe18abccd..dc3b27daeb 100644 --- a/alib2common/src/container/ObjectsVector.cpp +++ b/alib2common/src/container/ObjectsVector.cpp @@ -8,11 +8,17 @@ #include "ObjectsVector.h" #include "Container.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -namespace alib { +namespace { -auto objectsVectorType = registration::TypeRegister < container::Container, container::ObjectsVector < > > ( ); -auto objectsVectorType2 = registration::TypeRegister < alib::Object, container::ObjectsVector < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < container::ObjectsVector < > > ( ); -} /* namespace alib */ +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/exception/CommonException.cpp b/alib2common/src/exception/CommonException.cpp index 44f9129745..27ff39445c 100644 --- a/alib2common/src/exception/CommonException.cpp +++ b/alib2common/src/exception/CommonException.cpp @@ -13,7 +13,8 @@ #include "../object/UniqueObject.h" #include "../global/GlobalData.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #ifdef DEBUG #include "../debug/simpleStacktrace.h" @@ -136,6 +137,14 @@ void xmlApi < exception::CommonException >::compose ( ext::deque < sax::Token > output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); } -auto alibExceptionType = registration::TypeRegister<alib::Object, exception::CommonException>(); - } /* 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/object/AnyObject.cpp b/alib2common/src/object/AnyObject.cpp index 4c21b865db..6f7a426b58 100644 --- a/alib2common/src/object/AnyObject.cpp +++ b/alib2common/src/object/AnyObject.cpp @@ -8,10 +8,14 @@ #include <object/AnyObject.h> #include <container/ObjectsSet.h> #include <primitive/Character.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto anyObjectSetXmlWriterRegister = registration::XmlWriterRegister < alib::Object, alib::AnyObject < ext::set < char > > > ( ); +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/alib2common/src/object/UniqueObject.cpp b/alib2common/src/object/UniqueObject.cpp index c83b6d0a3a..ce04d0a559 100644 --- a/alib2common/src/object/UniqueObject.cpp +++ b/alib2common/src/object/UniqueObject.cpp @@ -9,7 +9,8 @@ #include <sstream> #include <sax/FromXMLParserHelper.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace alib { @@ -94,6 +95,14 @@ void xmlApi < alib::UniqueObject >::compose ( ext::deque < sax::Token > & output output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); } -auto uniqueSymbolType2 = registration::TypeRegister < alib::Object, alib::UniqueObject > (); - } /* 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/Void.cpp b/alib2common/src/object/Void.cpp index a3a1e3d709..78234a8783 100644 --- a/alib2common/src/object/Void.cpp +++ b/alib2common/src/object/Void.cpp @@ -10,7 +10,8 @@ #include "Object.h" #include "UniqueObject.h" -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace alib { @@ -85,7 +86,14 @@ void xmlApi < alib::Void >::compose ( ext::deque < sax::Token > & output, const xmlApi < void >::compose ( output ); } -auto voidType = registration::TypeRegister < alib::Object, alib::Void > (); - } /* 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/primitive/Bool.cpp b/alib2common/src/primitive/Bool.cpp index 6d9a278be9..cf084a6a0f 100644 --- a/alib2common/src/primitive/Bool.cpp +++ b/alib2common/src/primitive/Bool.cpp @@ -11,7 +11,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -111,7 +112,16 @@ void xmlApi < primitive::Bool >::compose ( ext::deque < sax::Token > & output, c xmlApi < bool >::compose ( output, data.getData ( ) ); } -auto boolType = registration::TypeRegister < primitive::Primitive, primitive::Bool > (); -auto boolType2 = registration::TypeRegister < alib::Object, primitive::Bool > (); - } /* 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/Character.cpp b/alib2common/src/primitive/Character.cpp index 92f1eca16e..fc419e30ab 100644 --- a/alib2common/src/primitive/Character.cpp +++ b/alib2common/src/primitive/Character.cpp @@ -10,7 +10,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -98,8 +99,16 @@ void xmlApi < primitive::Character >::compose ( ext::deque < sax::Token > & outp xmlApi < char >::compose ( output, data.getData ( ) ); } -auto characterType = registration::TypeRegister < primitive::Primitive, primitive::Character > (); -auto characterType2 = registration::TypeRegister < alib::Object, primitive::Character > (); - } /* 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/Double.cpp b/alib2common/src/primitive/Double.cpp index 914d110862..1a23c408e5 100644 --- a/alib2common/src/primitive/Double.cpp +++ b/alib2common/src/primitive/Double.cpp @@ -10,7 +10,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -103,8 +104,16 @@ void xmlApi < primitive::Double >::compose ( ext::deque < sax::Token > & output, xmlApi < double >::compose ( output, data.getData ( ) ); } -auto doubleType = registration::TypeRegister < primitive::Primitive, primitive::Double > (); -auto doubleType2 = registration::TypeRegister < alib::Object, primitive::Double > (); - } /* 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/Integer.cpp b/alib2common/src/primitive/Integer.cpp index 9bcba39ad9..39066c3f57 100644 --- a/alib2common/src/primitive/Integer.cpp +++ b/alib2common/src/primitive/Integer.cpp @@ -10,7 +10,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -98,8 +99,16 @@ void xmlApi < primitive::Integer >::compose ( ext::deque < sax::Token > & output xmlApi < int >::compose ( output, data.getData ( ) ); } -auto integerType = registration::TypeRegister < primitive::Primitive, primitive::Integer > (); -auto integerType2 = registration::TypeRegister < alib::Object, primitive::Integer > (); - } /* 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/String.cpp b/alib2common/src/primitive/String.cpp index 5a8134853e..b4359a6c9b 100644 --- a/alib2common/src/primitive/String.cpp +++ b/alib2common/src/primitive/String.cpp @@ -10,7 +10,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -100,8 +101,16 @@ void xmlApi < primitive::String >::compose ( ext::deque < sax::Token > & output, xmlApi < std::string >::compose ( output, data.getData ( ) ); } -auto stringType = registration::TypeRegister < primitive::Primitive, primitive::String > (); -auto stringType2 = registration::TypeRegister < alib::Object, primitive::String > (); - } /* 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/Unsigned.cpp b/alib2common/src/primitive/Unsigned.cpp index 0ee19cdad3..eb5da4270f 100644 --- a/alib2common/src/primitive/Unsigned.cpp +++ b/alib2common/src/primitive/Unsigned.cpp @@ -10,7 +10,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -102,8 +103,16 @@ void xmlApi < primitive::Unsigned >::compose ( ext::deque < sax::Token > & outpu xmlApi < unsigned >::compose ( output, data.getData ( ) ); } -auto unsignedType = registration::TypeRegister < primitive::Primitive, primitive::Unsigned > (); -auto unsignedType2 = registration::TypeRegister < alib::Object, primitive::Unsigned > (); - } /* 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/UnsignedLong.cpp b/alib2common/src/primitive/UnsignedLong.cpp index 893f7b8d9c..e7c76bdf18 100644 --- a/alib2common/src/primitive/UnsignedLong.cpp +++ b/alib2common/src/primitive/UnsignedLong.cpp @@ -10,7 +10,8 @@ #include "Primitive.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace primitive { @@ -98,8 +99,16 @@ void xmlApi < primitive::UnsignedLong >::compose ( ext::deque < sax::Token > & o xmlApi < unsigned long >::compose ( output, data.getData ( ) ); } -auto unsignedLongType = registration::TypeRegister < primitive::Primitive, primitive::UnsignedLong > (); -auto unsignedLongType2 = registration::TypeRegister < alib::Object, primitive::UnsignedLong > (); - } /* 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/registration/DowncastRegistration.hpp b/alib2common/src/registration/DowncastRegistration.hpp new file mode 100644 index 0000000000..ee8895d201 --- /dev/null +++ b/alib2common/src/registration/DowncastRegistration.hpp @@ -0,0 +1,18 @@ +#ifndef _DOWNCAST_REGISTRATION_HPP_ +#define _DOWNCAST_REGISTRATION_HPP_ + +#include <abstraction/DowncastRegistry.hpp> + +namespace registration { + +template < class Group, class Type > +class DowncastRegister { +public: + DowncastRegister ( ) { + abstraction::DowncastRegistry::registerDowncast < Type, typename std::decay < decltype ( std::declval < Group > ( ).getData ( ) ) >::type > ( ); + } +}; + +} /* namespace registration */ + +#endif // _DOWNCAST_REGISTRATION_HPP_ diff --git a/alib2common/src/registration/ValuePrinterRegistration.hpp b/alib2common/src/registration/ValuePrinterRegistration.hpp new file mode 100644 index 0000000000..01c6047fe5 --- /dev/null +++ b/alib2common/src/registration/ValuePrinterRegistration.hpp @@ -0,0 +1,18 @@ +#ifndef _VALUE_PRINTER_REGISTRATION_HPP_ +#define _VALUE_PRINTER_REGISTRATION_HPP_ + +#include <abstraction/ValuePrinterRegistry.hpp> + +namespace registration { + +template < class Type > +class ValuePrinterRegister { +public: + ValuePrinterRegister ( ) { + abstraction::ValuePrinterRegistry::registerValuePrinter < Type > ( ); + } +}; + +} /* namespace registration */ + +#endif // _VALUE_PRINTER_REGISTRATION_HPP_ diff --git a/alib2common/src/registration/TypeRegistration.hpp b/alib2common/src/registration/XmlRegistration.hpp similarity index 62% rename from alib2common/src/registration/TypeRegistration.hpp rename to alib2common/src/registration/XmlRegistration.hpp index 76d09237fc..36ee336ec5 100644 --- a/alib2common/src/registration/TypeRegistration.hpp +++ b/alib2common/src/registration/XmlRegistration.hpp @@ -6,32 +6,16 @@ #include <abstraction/XmlFileWriterRegistry.hpp> #include <abstraction/XmlComposerRegistry.hpp> #include <abstraction/XmlParserRegistry.hpp> -#include <abstraction/ValuePrinterRegistry.hpp> -#include <abstraction/DowncastRegistry.hpp> namespace registration { -template < class Group, class Type > -class TypeRegister { -public: - TypeRegister ( ) { - alib::xmlApi < Group >::template registerXmlReader < Type > ( ); - alib::xmlApi < Group >::template registerXmlWriter < Type > ( ); - - abstraction::XmlFileWriterRegistry::registerXmlFileWriter < Type > ( ); - abstraction::XmlComposerRegistry::registerXmlComposer < Type > ( ); - abstraction::XmlParserRegistry::registerXmlParser < Type > ( ); - abstraction::ValuePrinterRegistry::registerValuePrinter < Type > ( ); - - abstraction::DowncastRegistry::registerDowncast < Type, typename std::decay < decltype ( std::declval < Group > ( ).getData ( ) ) >::type > ( ); - } -}; - template < class Group, class Type > class XmlReaderRegister { public: XmlReaderRegister ( ) { alib::xmlApi < Group >::template registerXmlReader < Type > ( ); + + abstraction::XmlParserRegistry::registerXmlParser < Type > ( ); } }; @@ -40,6 +24,9 @@ class XmlWriterRegister { public: XmlWriterRegister ( ) { alib::xmlApi < Group >::template registerXmlWriter < Type > ( ); + + abstraction::XmlFileWriterRegistry::registerXmlFileWriter < Type > ( ); + abstraction::XmlComposerRegistry::registerXmlComposer < Type > ( ); } }; diff --git a/alib2data/src/alphabet/BarSymbol.cpp b/alib2data/src/alphabet/BarSymbol.cpp index 4ad5209474..6907b7e1e0 100644 --- a/alib2data/src/alphabet/BarSymbol.cpp +++ b/alib2data/src/alphabet/BarSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { BarSymbol::BarSymbol() { @@ -55,9 +57,14 @@ SymbolBase* BarSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto barSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::BarSymbol > (); -auto barSymbolType2 = registration::TypeRegister < alib::Object, alphabet::BarSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BarSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BarSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/BlankSymbol.cpp b/alib2data/src/alphabet/BlankSymbol.cpp index a7f984586e..377c15dc97 100644 --- a/alib2data/src/alphabet/BlankSymbol.cpp +++ b/alib2data/src/alphabet/BlankSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { BlankSymbol::BlankSymbol() { @@ -55,9 +57,14 @@ SymbolBase* BlankSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto blankSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::BlankSymbol > (); -auto blankSymbolType2 = registration::TypeRegister < alib::Object, alphabet::BlankSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BlankSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BlankSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp b/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp index ee1777d36b..b20cdb2b31 100644 --- a/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp +++ b/alib2data/src/alphabet/BottomOfTheStackSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { BottomOfTheStackSymbol::BottomOfTheStackSymbol() { @@ -56,9 +58,14 @@ SymbolBase* BottomOfTheStackSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto bottomOfTheStackSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::BottomOfTheStackSymbol > (); -auto bottomOfTheStackSymbolType2 = registration::TypeRegister < alib::Object, alphabet::BottomOfTheStackSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::BottomOfTheStackSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::BottomOfTheStackSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/EndSymbol.cpp b/alib2data/src/alphabet/EndSymbol.cpp index 2ea59a8e89..f4e355e3af 100644 --- a/alib2data/src/alphabet/EndSymbol.cpp +++ b/alib2data/src/alphabet/EndSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { EndSymbol::EndSymbol() { @@ -55,9 +57,14 @@ SymbolBase* EndSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto endSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::EndSymbol > (); -auto endSymbolType2 = registration::TypeRegister < alib::Object, alphabet::EndSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::EndSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::EndSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/InitialSymbol.cpp b/alib2data/src/alphabet/InitialSymbol.cpp index aeec7f4371..40d456705b 100644 --- a/alib2data/src/alphabet/InitialSymbol.cpp +++ b/alib2data/src/alphabet/InitialSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { InitialSymbol::InitialSymbol() { @@ -55,9 +57,14 @@ SymbolBase* InitialSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto initialStateType = registration::TypeRegister < alphabet::Symbol, alphabet::InitialSymbol > (); -auto initialStateType2 = registration::TypeRegister < alib::Object, alphabet::InitialSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::InitialSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::InitialSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/LabeledSymbol.cpp b/alib2data/src/alphabet/LabeledSymbol.cpp index 0fe3704a19..e6e98217bc 100644 --- a/alib2data/src/alphabet/LabeledSymbol.cpp +++ b/alib2data/src/alphabet/LabeledSymbol.cpp @@ -9,7 +9,9 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -77,9 +79,14 @@ SymbolBase* LabeledSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto labeledSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::LabeledSymbol > (); -auto labeledSymbolType2 = registration::TypeRegister < alib::Object, alphabet::LabeledSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::LabeledSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::LabeledSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/NonlinearVariableSymbol.cpp b/alib2data/src/alphabet/NonlinearVariableSymbol.cpp index a6864b65b6..efced9e9a4 100644 --- a/alib2data/src/alphabet/NonlinearVariableSymbol.cpp +++ b/alib2data/src/alphabet/NonlinearVariableSymbol.cpp @@ -8,11 +8,18 @@ #include "NonlinearVariableSymbol.h" #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto nonlinearVariableSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::NonlinearVariableSymbol < > > ( ); -auto nonlinearVariableSymbolType2 = registration::TypeRegister < alib::Object, alphabet::NonlinearVariableSymbol < > > ( ); +namespace { -} /* namespace alib */ +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/RankedSymbol.cpp b/alib2data/src/alphabet/RankedSymbol.cpp index 002b577858..05051b0a5e 100644 --- a/alib2data/src/alphabet/RankedSymbol.cpp +++ b/alib2data/src/alphabet/RankedSymbol.cpp @@ -7,11 +7,18 @@ #include "RankedSymbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto rankedSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::RankedSymbol < > > (); -auto rankedSymbolType2 = registration::TypeRegister < alib::Object, alphabet::RankedSymbol < > > (); +namespace { -} /* namespace alib */ +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/StartSymbol.cpp b/alib2data/src/alphabet/StartSymbol.cpp index 7dc70365eb..7fd991abae 100644 --- a/alib2data/src/alphabet/StartSymbol.cpp +++ b/alib2data/src/alphabet/StartSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { StartSymbol::StartSymbol() { @@ -55,9 +57,14 @@ SymbolBase* StartSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto startSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::StartSymbol > (); -auto startSymbolType2 = registration::TypeRegister < alib::Object, alphabet::StartSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::StartSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::StartSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp b/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp index c371f4e2a8..d5d1b39964 100644 --- a/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp +++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { SubtreeWildcardSymbol::SubtreeWildcardSymbol() { @@ -55,9 +57,14 @@ SymbolBase* SubtreeWildcardSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto subtreeWildcardSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::SubtreeWildcardSymbol > (); -auto subtreeWildcardSymbolType2 = registration::TypeRegister < alib::Object, alphabet::SubtreeWildcardSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::SubtreeWildcardSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::SubtreeWildcardSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/UniqueSymbol.cpp b/alib2data/src/alphabet/UniqueSymbol.cpp index f466c4a690..ec1e73303c 100644 --- a/alib2data/src/alphabet/UniqueSymbol.cpp +++ b/alib2data/src/alphabet/UniqueSymbol.cpp @@ -10,7 +10,9 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace alphabet { @@ -87,9 +89,14 @@ SymbolBase* UniqueSymbol::inc() && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto uniqueSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::UniqueSymbol > (); -auto uniqueSymbolType2 = registration::TypeRegister < alib::Object, alphabet::UniqueSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::UniqueSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::UniqueSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/alphabet/VariablesBarSymbol.cpp b/alib2data/src/alphabet/VariablesBarSymbol.cpp index 5a6ac2ac8a..a654a2fff2 100644 --- a/alib2data/src/alphabet/VariablesBarSymbol.cpp +++ b/alib2data/src/alphabet/VariablesBarSymbol.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Symbol.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueSymbol.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace alphabet { VariablesBarSymbol::VariablesBarSymbol ( ) { @@ -55,9 +57,14 @@ SymbolBase * VariablesBarSymbol::inc ( ) && { } /* namespace alphabet */ -namespace alib { +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 > ( ); -auto variablesBarSymbolType = registration::TypeRegister < alphabet::Symbol, alphabet::VariablesBarSymbol > (); -auto variablesBarSymbolType2 = registration::TypeRegister < alib::Object, alphabet::VariablesBarSymbol > (); +static auto xmlReader = registration::XmlReaderRegister < alphabet::Symbol, alphabet::VariablesBarSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, alphabet::VariablesBarSymbol > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/automaton/FSM/CompactNFA.cpp b/alib2data/src/automaton/FSM/CompactNFA.cpp index ea24737519..ba8f28c104 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.cpp +++ b/alib2data/src/automaton/FSM/CompactNFA.cpp @@ -8,20 +8,27 @@ #include "CompactNFA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < automaton::CompactNFA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::CompactNFA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::CompactNFA < > > ( ); -auto compactNFAType = registration::TypeRegister < automaton::Automaton, automaton::CompactNFA < > > ( ); -auto compactNFAType2 = registration::TypeRegister < alib::Object, automaton::CompactNFA < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::CompactNFA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::CompactNFA < > > ( ); -auto CompactNFAFromDFA = registration::CastRegister < automaton::CompactNFA < >, automaton::DFA < > > ( ); -auto CompactNFAFromNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::NFA < > > ( ); -auto CompactNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::MultiInitialStateNFA < > > ( ); -auto CompactNFAEpsilonNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::EpsilonNFA < > > ( ); +static auto compactNFAFromDFA = registration::CastRegister < automaton::CompactNFA < >, automaton::DFA < > > ( ); +static auto compactNFAFromNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::NFA < > > ( ); +static auto compactNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::MultiInitialStateNFA < > > ( ); +static auto compactNFAEpsilonNFA = registration::CastRegister < automaton::CompactNFA < >, automaton::EpsilonNFA < > > ( ); -auto CompactNFAName = registration::NameRegister < automaton::CompactNFA < > > ( automaton::CompactNFA < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < automaton::CompactNFA < > > ( automaton::CompactNFA < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/automaton/FSM/DFA.cpp b/alib2data/src/automaton/FSM/DFA.cpp index bf0baab933..35831b67cb 100644 --- a/alib2data/src/automaton/FSM/DFA.cpp +++ b/alib2data/src/automaton/FSM/DFA.cpp @@ -8,11 +8,18 @@ #include "DFA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto DFAType = registration::TypeRegister < automaton::Automaton, automaton::DFA < > > ( ); -auto DFAType2 = registration::TypeRegister < alib::Object, automaton::DFA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::DFA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::DFA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::DFA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::DFA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::DFA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.cpp b/alib2data/src/automaton/FSM/EpsilonNFA.cpp index dd5cc40d8a..5fa2b72e95 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.cpp +++ b/alib2data/src/automaton/FSM/EpsilonNFA.cpp @@ -8,19 +8,26 @@ #include "EpsilonNFA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < automaton::EpsilonNFA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::EpsilonNFA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::EpsilonNFA < > > ( ); -auto epsilonNFAType = registration::TypeRegister < automaton::Automaton, automaton::EpsilonNFA < > > ( ); -auto epsilonNFAType2 = registration::TypeRegister < alib::Object, automaton::EpsilonNFA < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::EpsilonNFA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::EpsilonNFA < > > ( ); -auto EpsilonNFAFromDFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::DFA < > > ( ); -auto EpsilonNFAFromNFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::NFA < > > ( ); -auto EpsilonNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::MultiInitialStateNFA < > > ( ); +static auto epsilonNFAFromDFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::DFA < > > ( ); +static auto epsilonNFAFromNFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::NFA < > > ( ); +static auto epsilonNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::EpsilonNFA < >, automaton::MultiInitialStateNFA < > > ( ); -auto EpsilonNFAName = registration::NameRegister < automaton::EpsilonNFA < > > ( automaton::EpsilonNFA < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < automaton::EpsilonNFA < > > ( automaton::EpsilonNFA < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.cpp b/alib2data/src/automaton/FSM/ExtendedNFA.cpp index 6f11c0feec..989eee085e 100644 --- a/alib2data/src/automaton/FSM/ExtendedNFA.cpp +++ b/alib2data/src/automaton/FSM/ExtendedNFA.cpp @@ -8,21 +8,28 @@ #include "ExtendedNFA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < automaton::ExtendedNFA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::ExtendedNFA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::ExtendedNFA < > > ( ); -auto extendedNFAType = registration::TypeRegister < automaton::Automaton, automaton::ExtendedNFA < > > ( ); -auto extendedNFAType2 = registration::TypeRegister < alib::Object, automaton::ExtendedNFA < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::ExtendedNFA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::ExtendedNFA < > > ( ); -auto ExtendedNFAFromDFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::DFA < > > ( ); -auto ExtendedNFAFromNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::NFA < > > ( ); -auto ExtendedNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::MultiInitialStateNFA < > > ( ); -auto ExtendedNFAEpsilonNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::EpsilonNFA < > > ( ); -auto ExtendedNFACompactNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::CompactNFA < > > ( ); +static auto extendedNFAFromDFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::DFA < > > ( ); +static auto extendedNFAFromNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::NFA < > > ( ); +static auto extendedNFAFromMultiInitialStateNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::MultiInitialStateNFA < > > ( ); +static auto extendedNFAEpsilonNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::EpsilonNFA < > > ( ); +static auto extendedNFACompactNFA = registration::CastRegister < automaton::ExtendedNFA < >, automaton::CompactNFA < > > ( ); -auto ExtendedNFAName = registration::NameRegister < automaton::ExtendedNFA < > > ( automaton::ExtendedNFA < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < automaton::ExtendedNFA < > > ( automaton::ExtendedNFA < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp b/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp index 98922e2a19..6923ee42d6 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp +++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.cpp @@ -8,18 +8,25 @@ #include "MultiInitialStateNFA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < automaton::MultiInitialStateNFA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::MultiInitialStateNFA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::MultiInitialStateNFA < > > ( ); -auto multiInitialStateNFAType = registration::TypeRegister < automaton::Automaton, automaton::MultiInitialStateNFA < > > ( ); -auto multiInitialStateNFAType2 = registration::TypeRegister < alib::Object, automaton::MultiInitialStateNFA < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::MultiInitialStateNFA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::MultiInitialStateNFA < > > ( ); -auto MultiInitialStateNFAFromDFA = registration::CastRegister < automaton::MultiInitialStateNFA < >, automaton::DFA < > > ( ); -auto MultiInitialStateNFAFromNFA = registration::CastRegister < automaton::MultiInitialStateNFA < >, automaton::NFA < > > ( ); +static auto multiInitialStateNFAFromDFA = registration::CastRegister < automaton::MultiInitialStateNFA < >, automaton::DFA < > > ( ); +static auto multiInitialStateNFAFromNFA = registration::CastRegister < automaton::MultiInitialStateNFA < >, automaton::NFA < > > ( ); -auto MultiInitialStateNFAName = registration::NameRegister < automaton::MultiInitialStateNFA < > > ( automaton::MultiInitialStateNFA < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < automaton::MultiInitialStateNFA < > > ( automaton::MultiInitialStateNFA < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/automaton/FSM/NFA.cpp b/alib2data/src/automaton/FSM/NFA.cpp index 72e8738c48..7ad981d711 100644 --- a/alib2data/src/automaton/FSM/NFA.cpp +++ b/alib2data/src/automaton/FSM/NFA.cpp @@ -8,17 +8,24 @@ #include "NFA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < automaton::NFA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::NFA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::NFA < > > ( ); -auto NFAType = registration::TypeRegister < automaton::Automaton, automaton::NFA < > > ( ); -auto NFAType2 = registration::TypeRegister < alib::Object, automaton::NFA < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::NFA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::NFA < > > ( ); -auto NFAFromDFA = registration::CastRegister < automaton::NFA < >, automaton::DFA < > > ( ); +static auto NFAFromDFA = registration::CastRegister < automaton::NFA < >, automaton::DFA < > > ( ); -auto NFAName = registration::NameRegister < automaton::NFA < > > ( automaton::NFA < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < automaton::NFA < > > ( automaton::NFA < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/DPDA.cpp b/alib2data/src/automaton/PDA/DPDA.cpp index 26f020caee..68adf35948 100644 --- a/alib2data/src/automaton/PDA/DPDA.cpp +++ b/alib2data/src/automaton/PDA/DPDA.cpp @@ -8,11 +8,20 @@ #include "DPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto DPDAType = registration::TypeRegister < automaton::Automaton, automaton::DPDA < > > ( ); -auto DPDAType2 = registration::TypeRegister < alib::Object, automaton::DPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::DPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::DPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::DPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::DPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::DPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp b/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp index 1cab6fb2b9..83b39556f5 100644 --- a/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp +++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.cpp @@ -8,11 +8,20 @@ #include "InputDrivenDPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto inputDivenDPDAType = registration::TypeRegister < automaton::Automaton, automaton::InputDrivenDPDA < > > ( ); -auto inputDivenDPDAType2 = registration::TypeRegister < alib::Object, automaton::InputDrivenDPDA< > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::InputDrivenDPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::InputDrivenDPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::InputDrivenDPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::InputDrivenDPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::InputDrivenDPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp b/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp index f2714b19c1..9a1861c2a9 100644 --- a/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp +++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.cpp @@ -8,11 +8,20 @@ #include "InputDrivenNPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto inputDrivenNPDAType = registration::TypeRegister < automaton::Automaton, automaton::InputDrivenNPDA < > > ( ); -auto inputDrivenNPDAType2 = registration::TypeRegister < alib::Object, automaton::InputDrivenNPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::InputDrivenNPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::InputDrivenNPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::InputDrivenNPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::InputDrivenNPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::InputDrivenNPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/NPDA.cpp b/alib2data/src/automaton/PDA/NPDA.cpp index f186774171..aab9fabe7b 100644 --- a/alib2data/src/automaton/PDA/NPDA.cpp +++ b/alib2data/src/automaton/PDA/NPDA.cpp @@ -8,11 +8,20 @@ #include "NPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto NPDAType = registration::TypeRegister < automaton::Automaton, automaton::NPDA < > > ( ); -auto NPDAType2 = registration::TypeRegister < alib::Object, automaton::NPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::NPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::NPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::NPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::NPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::NPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/NPDTA.cpp b/alib2data/src/automaton/PDA/NPDTA.cpp index f9cfe35ea5..dd070691d0 100644 --- a/alib2data/src/automaton/PDA/NPDTA.cpp +++ b/alib2data/src/automaton/PDA/NPDTA.cpp @@ -8,11 +8,20 @@ #include "NPDTA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto NPDTAType = registration::TypeRegister < automaton::Automaton, automaton::NPDTA < > > ( ); -auto NPDTAType2 = registration::TypeRegister < alib::Object, automaton::NPDTA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::NPDTA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::NPDTA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::NPDTA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::NPDTA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::NPDTA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp index c53dedb6b6..e937cc3e90 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.cpp @@ -8,11 +8,20 @@ #include "RealTimeHeightDeterministicDPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto realTimeHeightDeterministicDPDAType = registration::TypeRegister < automaton::Automaton, automaton::RealTimeHeightDeterministicDPDA < > > ( ); -auto realTimeHeightDeterministicDPDAType2 = registration::TypeRegister < alib::Object, automaton::RealTimeHeightDeterministicDPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::RealTimeHeightDeterministicDPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::RealTimeHeightDeterministicDPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::RealTimeHeightDeterministicDPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::RealTimeHeightDeterministicDPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::RealTimeHeightDeterministicDPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp index a8d59e4e32..9f9cfb4794 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.cpp @@ -8,11 +8,20 @@ #include "RealTimeHeightDeterministicNPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto realTimeHeightDeterministicNPDAType = registration::TypeRegister < automaton::Automaton, automaton::RealTimeHeightDeterministicNPDA < > > ( ); -auto realTimeHeightDeterministicNPDAType2 = registration::TypeRegister < alib::Object, automaton::RealTimeHeightDeterministicNPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::RealTimeHeightDeterministicNPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::RealTimeHeightDeterministicNPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::RealTimeHeightDeterministicNPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::RealTimeHeightDeterministicNPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::RealTimeHeightDeterministicNPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.cpp b/alib2data/src/automaton/PDA/SinglePopDPDA.cpp index e8440e9ded..171439bd3e 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.cpp +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.cpp @@ -8,11 +8,20 @@ #include "SinglePopDPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto singlePopDPDAType = registration::TypeRegister < automaton::Automaton, automaton::SinglePopDPDA < > > ( ); -auto singlePopDPDAType2 = registration::TypeRegister < alib::Object, automaton::SinglePopDPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::SinglePopDPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::SinglePopDPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::SinglePopDPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::SinglePopDPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::SinglePopDPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.cpp b/alib2data/src/automaton/PDA/SinglePopNPDA.cpp index b7df303ddd..5a60f0ce9e 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.cpp +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.cpp @@ -8,11 +8,20 @@ #include "SinglePopNPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto singlePopNPDAType = registration::TypeRegister < automaton::Automaton, automaton::SinglePopNPDA < > > ( ); -auto singlePopNPDAType2 = registration::TypeRegister < alib::Object, automaton::SinglePopNPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::SinglePopNPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::SinglePopNPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::SinglePopNPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::SinglePopNPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::SinglePopNPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp index 3703339b85..967810e813 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.cpp @@ -8,11 +8,20 @@ #include "VisiblyPushdownDPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto visiblyPushdownDPDAType = registration::TypeRegister < automaton::Automaton, automaton::VisiblyPushdownDPDA < > > ( ); -auto visiblyPushdownDPDAType2 = registration::TypeRegister < alib::Object, automaton::VisiblyPushdownDPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::VisiblyPushdownDPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::VisiblyPushdownDPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::VisiblyPushdownDPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::VisiblyPushdownDPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::VisiblyPushdownDPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp index d1f444e4ba..3e515de0ec 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.cpp @@ -8,11 +8,20 @@ #include "VisiblyPushdownNPDA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto visiblyPushdownNPDAType = registration::TypeRegister < automaton::Automaton, automaton::VisiblyPushdownNPDA < > > ( ); -auto visiblyPushdownNPDAType2 = registration::TypeRegister < alib::Object, automaton::VisiblyPushdownNPDA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::VisiblyPushdownNPDA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::VisiblyPushdownNPDA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::VisiblyPushdownNPDA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::VisiblyPushdownNPDA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::VisiblyPushdownNPDA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/TA/DFTA.cpp b/alib2data/src/automaton/TA/DFTA.cpp index 6c262c1532..e3f3ba99e1 100644 --- a/alib2data/src/automaton/TA/DFTA.cpp +++ b/alib2data/src/automaton/TA/DFTA.cpp @@ -8,11 +8,20 @@ #include "DFTA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto DFTAType = registration::TypeRegister < automaton::Automaton, automaton::DFTA < > > ( ); -auto DFTAType2 = registration::TypeRegister < alib::Object, automaton::DFTA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::DFTA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::DFTA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::DFTA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::DFTA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::DFTA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/TA/NFTA.cpp b/alib2data/src/automaton/TA/NFTA.cpp index 253c1c7331..9dec532c3f 100644 --- a/alib2data/src/automaton/TA/NFTA.cpp +++ b/alib2data/src/automaton/TA/NFTA.cpp @@ -8,11 +8,20 @@ #include "NFTA.h" #include "../Automaton.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto NFTAType = registration::TypeRegister < automaton::Automaton, automaton::NFTA < > > ( ); -auto NFTAType2 = registration::TypeRegister < alib::Object, automaton::NFTA < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::NFTA < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::NFTA < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::NFTA < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::NFTA < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::NFTA < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/automaton/TM/OneTapeDTM.cpp b/alib2data/src/automaton/TM/OneTapeDTM.cpp index 79c899276b..5236191bfa 100644 --- a/alib2data/src/automaton/TM/OneTapeDTM.cpp +++ b/alib2data/src/automaton/TM/OneTapeDTM.cpp @@ -9,11 +9,20 @@ #include <automaton/Automaton.h> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto oneTapeDTMType = registration::TypeRegister < automaton::Automaton, automaton::OneTapeDTM < > > ( ); -auto oneTapeDTMType2 = registration::TypeRegister < alib::Object, automaton::OneTapeDTM < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < automaton::OneTapeDTM < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < automaton::Automaton, automaton::OneTapeDTM < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, automaton::OneTapeDTM < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < automaton::Automaton, automaton::OneTapeDTM < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, automaton::OneTapeDTM < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/ContextFree/CFG.cpp b/alib2data/src/grammar/ContextFree/CFG.cpp index 8e73c7d0a9..706d44d21d 100644 --- a/alib2data/src/grammar/ContextFree/CFG.cpp +++ b/alib2data/src/grammar/ContextFree/CFG.cpp @@ -8,14 +8,23 @@ #include "CFG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/CastRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> + +namespace { + +static auto CFGEpsilonFreeCFG = registration::CastRegister < grammar::CFG < >, grammar::EpsilonFreeCFG < > > ( ); -namespace alib { +static auto valuePrinter = registration::ValuePrinterRegister < grammar::CFG < > > ( ); -auto CFGType = registration::TypeRegister < grammar::Grammar, grammar::CFG < > > ( ); -auto CFGType2 = registration::TypeRegister < alib::Object, grammar::CFG < > > ( ); +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::CFG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::CFG < > > ( ); -auto CFGEpsilonFreeCFG = registration::CastRegister < grammar::CFG < >, grammar::EpsilonFreeCFG < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::CFG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::CFG < > > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/grammar/ContextFree/CNF.cpp b/alib2data/src/grammar/ContextFree/CNF.cpp index ef42116d29..2f1730f97e 100644 --- a/alib2data/src/grammar/ContextFree/CNF.cpp +++ b/alib2data/src/grammar/ContextFree/CNF.cpp @@ -8,11 +8,20 @@ #include "CNF.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto CNFType = registration::TypeRegister < grammar::Grammar, grammar::CNF < > > ( ); -auto CNFType2 = registration::TypeRegister < alib::Object, grammar::CNF < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::CNF < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::CNF < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::CNF < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::CNF < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::CNF < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp index 3a55d65bcd..8dc447a084 100644 --- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp +++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.cpp @@ -8,11 +8,20 @@ #include "EpsilonFreeCFG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto EpsilonFreeCFGType = registration::TypeRegister < grammar::Grammar, grammar::EpsilonFreeCFG < > > ( ); -auto EpsilonFreeCFGType2 = registration::TypeRegister < alib::Object, grammar::EpsilonFreeCFG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::EpsilonFreeCFG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::EpsilonFreeCFG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::EpsilonFreeCFG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::EpsilonFreeCFG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::EpsilonFreeCFG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/ContextFree/GNF.cpp b/alib2data/src/grammar/ContextFree/GNF.cpp index 145c445ebf..69e2f1daf3 100644 --- a/alib2data/src/grammar/ContextFree/GNF.cpp +++ b/alib2data/src/grammar/ContextFree/GNF.cpp @@ -8,11 +8,20 @@ #include "GNF.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto GNFType = registration::TypeRegister < grammar::Grammar, grammar::GNF < > > ( ); -auto GNFType2 = registration::TypeRegister < alib::Object, grammar::GNF < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::GNF < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::GNF < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::GNF < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::GNF < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::GNF < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/ContextFree/LG.cpp b/alib2data/src/grammar/ContextFree/LG.cpp index 2dccbd20fb..457e3fdd38 100644 --- a/alib2data/src/grammar/ContextFree/LG.cpp +++ b/alib2data/src/grammar/ContextFree/LG.cpp @@ -8,11 +8,20 @@ #include "LG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto LGType = registration::TypeRegister < grammar::Grammar, grammar::LG < > > ( ); -auto LGType2 = registration::TypeRegister < alib::Object, grammar::LG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::LG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::LG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::LG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::LG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::LG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/ContextSensitive/CSG.cpp b/alib2data/src/grammar/ContextSensitive/CSG.cpp index 2d00cd7b37..96bc66d198 100644 --- a/alib2data/src/grammar/ContextSensitive/CSG.cpp +++ b/alib2data/src/grammar/ContextSensitive/CSG.cpp @@ -8,11 +8,20 @@ #include "CSG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto CSGType = registration::TypeRegister < grammar::Grammar, grammar::CSG < > > ( ); -auto CSGType2 = registration::TypeRegister < alib::Object, grammar::CSG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::CSG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::CSG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::CSG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::CSG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::CSG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp index 8635fed192..d7100d5cc6 100644 --- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp +++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.cpp @@ -8,11 +8,20 @@ #include "NonContractingGrammar.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto nonContractingGrammarType = registration::TypeRegister < grammar::Grammar, grammar::NonContractingGrammar < > > ( ); -auto nonContractingGrammarType2 = registration::TypeRegister < alib::Object, grammar::NonContractingGrammar < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::NonContractingGrammar < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::NonContractingGrammar < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::NonContractingGrammar < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::NonContractingGrammar < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::NonContractingGrammar < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/Regular/LeftLG.cpp b/alib2data/src/grammar/Regular/LeftLG.cpp index 3565fd0756..5f3f919040 100644 --- a/alib2data/src/grammar/Regular/LeftLG.cpp +++ b/alib2data/src/grammar/Regular/LeftLG.cpp @@ -8,11 +8,20 @@ #include "LeftLG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto LeftLGType = registration::TypeRegister < grammar::Grammar, grammar::LeftLG < > > ( ); -auto LeftLGType2 = registration::TypeRegister < alib::Object, grammar::LeftLG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::LeftLG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::LeftLG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::LeftLG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::LeftLG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::LeftLG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/Regular/LeftRG.cpp b/alib2data/src/grammar/Regular/LeftRG.cpp index 93674133c7..6737cf67d1 100644 --- a/alib2data/src/grammar/Regular/LeftRG.cpp +++ b/alib2data/src/grammar/Regular/LeftRG.cpp @@ -8,11 +8,20 @@ #include "LeftRG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto LeftRGType = registration::TypeRegister < grammar::Grammar, grammar::LeftRG < > > ( ); -auto LeftRGType2 = registration::TypeRegister < alib::Object, grammar::LeftRG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::LeftRG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::LeftRG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::LeftRG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::LeftRG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::LeftRG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/Regular/RightLG.cpp b/alib2data/src/grammar/Regular/RightLG.cpp index 703ac95adc..ebcf2e8dba 100644 --- a/alib2data/src/grammar/Regular/RightLG.cpp +++ b/alib2data/src/grammar/Regular/RightLG.cpp @@ -8,11 +8,20 @@ #include "RightLG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto RightLGType = registration::TypeRegister < grammar::Grammar, grammar::RightLG < > > ( ); -auto RightLGType2 = registration::TypeRegister < alib::Object, grammar::RightLG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::RightLG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::RightLG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::RightLG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::RightLG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::RightLG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/Regular/RightRG.cpp b/alib2data/src/grammar/Regular/RightRG.cpp index 1c4246e101..4aa8b1e836 100644 --- a/alib2data/src/grammar/Regular/RightRG.cpp +++ b/alib2data/src/grammar/Regular/RightRG.cpp @@ -8,11 +8,20 @@ #include "RightRG.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto RightRGType = registration::TypeRegister < grammar::Grammar, grammar::RightRG < > > ( ); -auto RightRGType2 = registration::TypeRegister < alib::Object, grammar::RightRG < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::RightRG < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::RightRG < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::RightRG < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::RightRG < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::RightRG < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp index 76481e532e..101de5ae82 100644 --- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp +++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.cpp @@ -8,11 +8,20 @@ #include "ContextPreservingUnrestrictedGrammar.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto ContextPreservingUnrestrictedGrammarType = registration::TypeRegister < grammar::Grammar, grammar::ContextPreservingUnrestrictedGrammar < > > ( ); -auto ContextPreservingUnrestrictedGrammarType2 = registration::TypeRegister < alib::Object, grammar::ContextPreservingUnrestrictedGrammar < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::ContextPreservingUnrestrictedGrammar < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::ContextPreservingUnrestrictedGrammar < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::ContextPreservingUnrestrictedGrammar < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::ContextPreservingUnrestrictedGrammar < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::ContextPreservingUnrestrictedGrammar < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp index a4f8deb173..025e9b5ad8 100644 --- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp +++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.cpp @@ -8,11 +8,20 @@ #include "UnrestrictedGrammar.h" #include "../Grammar.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto UnrestrictedGrammarType = registration::TypeRegister < grammar::Grammar, grammar::UnrestrictedGrammar < > > ( ); -auto UnrestrictedGrammarType2 = registration::TypeRegister < alib::Object, grammar::UnrestrictedGrammar < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < grammar::UnrestrictedGrammar < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < grammar::Grammar, grammar::UnrestrictedGrammar < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, grammar::UnrestrictedGrammar < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < grammar::Grammar, grammar::UnrestrictedGrammar < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, grammar::UnrestrictedGrammar < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.cpp b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.cpp index 72166173b6..57e83d0e55 100644 --- a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.cpp +++ b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.cpp @@ -6,10 +6,15 @@ */ #include "CompressedBitParallelTreeIndex.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto arbologyCompressedBitParallelIndexType = registration::TypeRegister < alib::Object, indexes::arbology::CompressedBitParallelTreeIndex < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::arbology::CompressedBitParallelTreeIndex < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::arbology::CompressedBitParallelTreeIndex < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::arbology::CompressedBitParallelTreeIndex < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/arbology/FullAndLinearIndex.cpp b/alib2data/src/indexes/arbology/FullAndLinearIndex.cpp index 2f57df5ae3..c56d7f9c8d 100644 --- a/alib2data/src/indexes/arbology/FullAndLinearIndex.cpp +++ b/alib2data/src/indexes/arbology/FullAndLinearIndex.cpp @@ -6,10 +6,15 @@ */ #include "FullAndLinearIndex.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto arbologyFullAndLinearIndexType = registration::TypeRegister < alib::Object, indexes::arbology::FullAndLinearIndex < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::arbology::FullAndLinearIndex < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::arbology::FullAndLinearIndex < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::arbology::FullAndLinearIndex < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.cpp b/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.cpp index 9ae75396ac..1c96d4b4bd 100644 --- a/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.cpp +++ b/alib2data/src/indexes/arbology/NonlinearCompressedBitParallelTreeIndex.cpp @@ -6,10 +6,15 @@ */ #include "NonlinearCompressedBitParallelTreeIndex.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto arbologyNonlinearCompressedBitParallelIndexType = registration::TypeRegister < alib::Object, indexes::arbology::NonlinearCompressedBitParallelTreeIndex < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::arbology::NonlinearCompressedBitParallelTreeIndex < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::arbology::NonlinearCompressedBitParallelTreeIndex < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::arbology::NonlinearCompressedBitParallelTreeIndex < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.cpp b/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.cpp index 3a7e8653bf..d1c3caf6c2 100644 --- a/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.cpp +++ b/alib2data/src/indexes/arbology/NonlinearFullAndLinearIndex.cpp @@ -6,10 +6,15 @@ */ #include "NonlinearFullAndLinearIndex.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto arbologyNonlinearFullAndLinearIndexType = registration::TypeRegister < alib::Object, indexes::arbology::NonlinearFullAndLinearIndex < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::arbology::NonlinearFullAndLinearIndex < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::arbology::NonlinearFullAndLinearIndex < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::arbology::NonlinearFullAndLinearIndex < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/stringology/BNDMMatcher.cpp b/alib2data/src/indexes/stringology/BNDMMatcher.cpp index f5085ca019..4478c237c5 100644 --- a/alib2data/src/indexes/stringology/BNDMMatcher.cpp +++ b/alib2data/src/indexes/stringology/BNDMMatcher.cpp @@ -6,10 +6,15 @@ */ #include "BNDMMatcher.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto bndmMatcherType = registration::TypeRegister < alib::Object, indexes::stringology::BNDMMatcher < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::stringology::BNDMMatcher < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::stringology::BNDMMatcher < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::stringology::BNDMMatcher < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/stringology/BitParallelIndex.cpp b/alib2data/src/indexes/stringology/BitParallelIndex.cpp index 3d251feca8..ac5e094923 100644 --- a/alib2data/src/indexes/stringology/BitParallelIndex.cpp +++ b/alib2data/src/indexes/stringology/BitParallelIndex.cpp @@ -6,10 +6,15 @@ */ #include "BitParallelIndex.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto bitParallelIndexType = registration::TypeRegister < alib::Object, indexes::stringology::BitParallelIndex < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::stringology::BitParallelIndex < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::stringology::BitParallelIndex < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::stringology::BitParallelIndex < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.cpp b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.cpp index 78a68de240..3bb155e207 100644 --- a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.cpp +++ b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.cpp @@ -6,10 +6,15 @@ */ #include "CompressedBitParallelIndex.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto compressedBitParallelIndexType = registration::TypeRegister < alib::Object, indexes::stringology::CompressedBitParallelIndex < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::stringology::CompressedBitParallelIndex < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::stringology::CompressedBitParallelIndex < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::stringology::CompressedBitParallelIndex < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/stringology/PositionHeap.cpp b/alib2data/src/indexes/stringology/PositionHeap.cpp index fd86a59a6b..27c7843dfc 100644 --- a/alib2data/src/indexes/stringology/PositionHeap.cpp +++ b/alib2data/src/indexes/stringology/PositionHeap.cpp @@ -6,10 +6,15 @@ */ #include "PositionHeap.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto positionHeapType = registration::TypeRegister < alib::Object, indexes::stringology::PositionHeap < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::stringology::PositionHeap < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::stringology::PositionHeap < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::stringology::PositionHeap < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/stringology/SuffixArray.cpp b/alib2data/src/indexes/stringology/SuffixArray.cpp index d2013865d1..51a57f6ecb 100644 --- a/alib2data/src/indexes/stringology/SuffixArray.cpp +++ b/alib2data/src/indexes/stringology/SuffixArray.cpp @@ -6,10 +6,15 @@ */ #include "SuffixArray.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto suffixArrayType = registration::TypeRegister < alib::Object, indexes::stringology::SuffixArray < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::stringology::SuffixArray < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::stringology::SuffixArray < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::stringology::SuffixArray < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/indexes/stringology/SuffixTrie.cpp b/alib2data/src/indexes/stringology/SuffixTrie.cpp index be93ae7a17..c6747b6d98 100644 --- a/alib2data/src/indexes/stringology/SuffixTrie.cpp +++ b/alib2data/src/indexes/stringology/SuffixTrie.cpp @@ -6,10 +6,15 @@ */ #include "SuffixTrie.h" -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto suffixTrieType = registration::TypeRegister < alib::Object, indexes::stringology::SuffixTrie < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < indexes::stringology::SuffixTrie < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::stringology::SuffixTrie < > > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::stringology::SuffixTrie < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/label/FailStateLabel.cpp b/alib2data/src/label/FailStateLabel.cpp index 62d157040a..9bd696f289 100644 --- a/alib2data/src/label/FailStateLabel.cpp +++ b/alib2data/src/label/FailStateLabel.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueLabel.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace label { FailStateLabel::FailStateLabel() { @@ -55,9 +57,14 @@ LabelBase* FailStateLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::FailStateLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::FailStateLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::FailStateLabel > ( ); -auto failStateLabelType = registration::TypeRegister < label::Label, label::FailStateLabel > ( ); -auto failStateLabelType2 = registration::TypeRegister < alib::Object, label::FailStateLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::FailStateLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::FailStateLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/label/FinalStateLabel.cpp b/alib2data/src/label/FinalStateLabel.cpp index a360d0d004..eb06a27e2b 100644 --- a/alib2data/src/label/FinalStateLabel.cpp +++ b/alib2data/src/label/FinalStateLabel.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueLabel.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace label { FinalStateLabel::FinalStateLabel() { @@ -54,9 +56,14 @@ LabelBase* FinalStateLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::FinalStateLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::FinalStateLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::FinalStateLabel > ( ); -auto finalStateLabelType = registration::TypeRegister < label::Label, label::FinalStateLabel > ( ); -auto finalStateLabelType2 = registration::TypeRegister < alib::Object, label::FinalStateLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::FinalStateLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::FinalStateLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/label/HexavigesimalLabel.cpp b/alib2data/src/label/HexavigesimalLabel.cpp index 018d1bf727..f2f84e2b92 100644 --- a/alib2data/src/label/HexavigesimalLabel.cpp +++ b/alib2data/src/label/HexavigesimalLabel.cpp @@ -9,7 +9,9 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace label { @@ -65,9 +67,14 @@ LabelBase* HexavigesimalLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::HexavigesimalLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::HexavigesimalLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::HexavigesimalLabel > ( ); -auto hexavigesimalLabelType = registration::TypeRegister < label::Label, label::HexavigesimalLabel > ( ); -auto hexavigesimalLabelType2 = registration::TypeRegister < alib::Object, label::HexavigesimalLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::HexavigesimalLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::HexavigesimalLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/label/InitialStateLabel.cpp b/alib2data/src/label/InitialStateLabel.cpp index 63874509d7..5f5ee429b7 100644 --- a/alib2data/src/label/InitialStateLabel.cpp +++ b/alib2data/src/label/InitialStateLabel.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueLabel.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace label { InitialStateLabel::InitialStateLabel() { @@ -55,9 +57,14 @@ LabelBase* InitialStateLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::InitialStateLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::InitialStateLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::InitialStateLabel > ( ); -auto initialStateLabelType = registration::TypeRegister < label::Label, label::InitialStateLabel > ( ); -auto initialStateLabelType2 = registration::TypeRegister < alib::Object, label::InitialStateLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::InitialStateLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::InitialStateLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/label/ObjectLabel.cpp b/alib2data/src/label/ObjectLabel.cpp index b623c06f35..d248712cca 100644 --- a/alib2data/src/label/ObjectLabel.cpp +++ b/alib2data/src/label/ObjectLabel.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueLabel.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace label { ObjectLabel::ObjectLabel(alib::Object label) : m_label(std::move(label)) { @@ -61,9 +63,14 @@ LabelBase* ObjectLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::ObjectLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::ObjectLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::ObjectLabel > ( ); -auto objectLabelType = registration::TypeRegister < label::Label, label::ObjectLabel > ( ); -auto objectLabelType2 = registration::TypeRegister < alib::Object, label::ObjectLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::ObjectLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::ObjectLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/label/PrimitiveLabel.cpp b/alib2data/src/label/PrimitiveLabel.cpp index b21639d428..f1f1e2df19 100644 --- a/alib2data/src/label/PrimitiveLabel.cpp +++ b/alib2data/src/label/PrimitiveLabel.cpp @@ -9,9 +9,11 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include "UniqueLabel.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace label { PrimitiveLabel::PrimitiveLabel(primitive::Primitive primitive) : m_primitive(std::move(primitive)) { @@ -66,9 +68,14 @@ LabelBase* PrimitiveLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::PrimitiveLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::PrimitiveLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::PrimitiveLabel > ( ); -auto primitiveLabelType = registration::TypeRegister < label::Label, label::PrimitiveLabel > ( ); -auto primitiveLabelType2 = registration::TypeRegister < alib::Object, label::PrimitiveLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::PrimitiveLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::PrimitiveLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/label/UniqueLabel.cpp b/alib2data/src/label/UniqueLabel.cpp index b81543cf77..6ffb8f825d 100644 --- a/alib2data/src/label/UniqueLabel.cpp +++ b/alib2data/src/label/UniqueLabel.cpp @@ -10,7 +10,9 @@ #include <sax/FromXMLParserHelper.h> #include "Label.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace label { @@ -83,9 +85,14 @@ LabelBase* UniqueLabel::inc() && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::UniqueLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::UniqueLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::UniqueLabel > ( ); -auto uniqueLabelType = registration::TypeRegister < label::Label, label::UniqueLabel > ( ); -auto uniqueLabelType2 = registration::TypeRegister < alib::Object, label::UniqueLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::UniqueLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::UniqueLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/regexp/formal/FormalRegExp.cpp b/alib2data/src/regexp/formal/FormalRegExp.cpp index 13f5791a6d..7b5cde8cb5 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.cpp +++ b/alib2data/src/regexp/formal/FormalRegExp.cpp @@ -8,17 +8,24 @@ #include "FormalRegExp.h" #include "../RegExp.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto formalRegExpFromUnboundedRegExp = registration::CastRegister < regexp::FormalRegExp < >, regexp::UnboundedRegExp < > > ( ); -namespace alib { +static auto name = registration::NameRegister < regexp::FormalRegExp < > > ( regexp::FormalRegExp < >::getXmlTagName ( ) ); -auto formalRegExpType = registration::TypeRegister < regexp::RegExp, regexp::FormalRegExp < > > ( ); -auto formalRegExpType2 = registration::TypeRegister < alib::Object, regexp::FormalRegExp < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < regexp::FormalRegExp < > > ( ); -auto FormalRegExpFromUnboundedRegExp = registration::CastRegister < regexp::FormalRegExp < >, regexp::UnboundedRegExp < > > ( ); +static auto xmlWrite = registration::XmlWriterRegister < regexp::RegExp, regexp::FormalRegExp < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, regexp::FormalRegExp < > > ( ); -auto FormalRegExpName = registration::NameRegister < regexp::FormalRegExp < > > ( regexp::FormalRegExp < >::getXmlTagName ( ) ); +static auto xmlReader = registration::XmlReaderRegister < regexp::RegExp, regexp::FormalRegExp < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, regexp::FormalRegExp < > > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp index c9eee6c9b6..e1392a2e88 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.cpp @@ -8,17 +8,24 @@ #include "UnboundedRegExp.h" #include "../RegExp.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + +namespace { + +static auto unboundedRegExpFromFormalRegExp = registration::CastRegister < regexp::UnboundedRegExp < >, regexp::FormalRegExp < > > ( ); -namespace alib { +static auto name = registration::NameRegister < regexp::UnboundedRegExp < > > ( regexp::UnboundedRegExp < >::getXmlTagName ( ) ); -auto unboundedRegExpType = registration::TypeRegister < regexp::RegExp, regexp::UnboundedRegExp < > > ( ); -auto unboundedRegExpType2 = registration::TypeRegister < alib::Object, regexp::UnboundedRegExp < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < regexp::UnboundedRegExp < > > ( ); -auto UnboundedRegExpFromFormalRegExp = registration::CastRegister < regexp::UnboundedRegExp < >, regexp::FormalRegExp < > > ( ); +static auto xmlWrite = registration::XmlWriterRegister < regexp::RegExp, regexp::UnboundedRegExp < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, regexp::UnboundedRegExp < > > ( ); -auto UnboundedRegExpName = registration::NameRegister < regexp::UnboundedRegExp < > > ( regexp::UnboundedRegExp < >::getXmlTagName ( ) ); +static auto xmlReader = registration::XmlReaderRegister < regexp::RegExp, regexp::UnboundedRegExp < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, regexp::UnboundedRegExp < > > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/rte/formal/FormalRTE.cpp b/alib2data/src/rte/formal/FormalRTE.cpp index 1890ed238d..7baa98b857 100644 --- a/alib2data/src/rte/formal/FormalRTE.cpp +++ b/alib2data/src/rte/formal/FormalRTE.cpp @@ -7,12 +7,19 @@ #include "FormalRTE.h" #include "../RTE.h" -#include <registration/TypeRegistration.hpp> #include <object/Object.h> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> -auto formalRTEType = registration::TypeRegister < rte::RTE, rte::FormalRTE < > > ( ); -auto formalRTEType2 = registration::TypeRegister < alib::Object, rte::FormalRTE < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < rte::FormalRTE < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < rte::RTE, rte::FormalRTE < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, rte::FormalRTE < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < rte::RTE, rte::FormalRTE < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, rte::FormalRTE < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/string/CyclicString.cpp b/alib2data/src/string/CyclicString.cpp index dd8520dd62..13841c1988 100644 --- a/alib2data/src/string/CyclicString.cpp +++ b/alib2data/src/string/CyclicString.cpp @@ -8,14 +8,23 @@ #include "CyclicString.h" #include "String.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/CastRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> + +namespace { + +static auto CyclicStringFromEpsilon = registration::CastRegister < string::CyclicString < >, string::Epsilon < > > ( ); -namespace alib { +static auto valuePrinter = registration::ValuePrinterRegister < string::CyclicString < > > ( ); -auto cyclicStringType = registration::TypeRegister < string::String, string::CyclicString < > > (); -auto cyclicStringType2 = registration::TypeRegister < alib::Object, string::CyclicString < > > (); +static auto xmlWrite = registration::XmlWriterRegister < string::String, string::CyclicString < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, string::CyclicString < > > ( ); -auto CyclicStringFromEpsilon = registration::CastRegister < string::CyclicString < >, string::Epsilon < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < string::String, string::CyclicString < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, string::CyclicString < > > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/string/Epsilon.cpp b/alib2data/src/string/Epsilon.cpp index 3defbc43d1..22d24248bc 100644 --- a/alib2data/src/string/Epsilon.cpp +++ b/alib2data/src/string/Epsilon.cpp @@ -9,11 +9,20 @@ #include "String.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto epsilonType = registration::TypeRegister < string::String, string::Epsilon < > > (); -auto epsilonType2 = registration::TypeRegister < alib::Object, string::Epsilon < > > (); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < string::Epsilon < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < string::String, string::Epsilon < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, string::Epsilon < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < string::String, string::Epsilon < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, string::Epsilon < > > ( ); + +} /* namespace */ diff --git a/alib2data/src/string/LinearString.cpp b/alib2data/src/string/LinearString.cpp index f83349a981..90c065e9ee 100644 --- a/alib2data/src/string/LinearString.cpp +++ b/alib2data/src/string/LinearString.cpp @@ -9,34 +9,42 @@ #include "String.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/CastRegistration.hpp> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> #include <registration/SetRegistration.hpp> #include <container/ObjectsSet.h> -namespace alib { +namespace { + +static auto LinearStringFromEpsilon = registration::CastRegister < string::LinearString < >, string::Epsilon < > > ( ); + +static auto LinearStringFromPostfixRankedTree = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PostfixRankedTree < > > ( ); -auto linearStringType = registration::TypeRegister < string::String, string::LinearString < > > ( ); -auto linearStringType2 = registration::TypeRegister < alib::Object, string::LinearString < > > ( ); +static auto LinearStringFromPrefixBarTree = registration::CastRegister < string::LinearString < >, tree::PrefixBarTree < > > ( ); -auto LinearStringFromEpsilon = registration::CastRegister < string::LinearString < >, string::Epsilon < > > ( ); +static auto LinearStringFromPrefixRankedTree = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedTree < > > ( ); +static auto LinearStringFromPrefixRankedPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedPattern < > > ( ); +static auto LinearStringFromPrefixRankedNonlinearPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedNonlinearPattern < > > ( ); +static auto LinearStringFromPrefixRankedBarTree = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarTree < > > ( ); +static auto LinearStringFromPrefixRankedBarPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarPattern < > > ( ); +static auto LinearStringFromPrefixRankedBarNonlinearPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarNonlinearPattern < > > ( ); -auto LinearStringFromPostfixRankedTree = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PostfixRankedTree < > > ( ); +static auto LinearStringName = registration::NameRegister < string::LinearString < > > ( string::LinearString < >::getXmlTagName ( ) ); +static auto LinearStringName2 = registration::NameRegister < string::LinearString < common::ranked_symbol < > > > ( string::LinearString < >::getXmlTagName ( ) ); -auto LinearStringFromPrefixBarTree = registration::CastRegister < string::LinearString < >, tree::PrefixBarTree < > > ( ); +static auto LinearStringSet = registration::SetRegister < string::LinearString < > > ( ); -auto LinearStringFromPrefixRankedTree = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedTree < > > ( ); -auto LinearStringFromPrefixRankedPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedPattern < > > ( ); -auto LinearStringFromPrefixRankedNonlinearPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedNonlinearPattern < > > ( ); -auto LinearStringFromPrefixRankedBarTree = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarTree < > > ( ); -auto LinearStringFromPrefixRankedBarPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarPattern < > > ( ); -auto LinearStringFromPrefixRankedBarNonlinearPattern = registration::CastRegister < string::LinearString < common::ranked_symbol < > >, tree::PrefixRankedBarNonlinearPattern < > > ( ); +static auto valuePrinter = registration::ValuePrinterRegister < string::LinearString < > > ( ); -auto LinearStringName = registration::NameRegister < string::LinearString < > > ( string::LinearString < >::getXmlTagName ( ) ); -auto LinearStringName2 = registration::NameRegister < string::LinearString < common::ranked_symbol < > > > ( string::LinearString < >::getXmlTagName ( ) ); +static auto xmlWrite = registration::XmlWriterRegister < string::String, string::LinearString < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, string::LinearString < > > ( ); -auto LinearStringSet = registration::SetRegister < string::LinearString < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < string::String, string::LinearString < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, string::LinearString < > > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PostfixRankedTree.cpp b/alib2data/src/tree/ranked/PostfixRankedTree.cpp index 8d6132a09e..0597e02708 100644 --- a/alib2data/src/tree/ranked/PostfixRankedTree.cpp +++ b/alib2data/src/tree/ranked/PostfixRankedTree.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::PostfixRankedTree < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PostfixRankedTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PostfixRankedTree < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PostfixRankedTree < > > ( ); -auto postfixRankedTreeType = registration::TypeRegister < tree::Tree, tree::PostfixRankedTree < > > ( ); -auto postfixRankedTreeType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PostfixRankedTree < > > ( ); -auto postfixRankedTreeType3 = registration::TypeRegister < alib::Object, tree::PostfixRankedTree < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PostfixRankedTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PostfixRankedTree < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PostfixRankedTree < > > ( ); -auto PostfixRankedTreeFromRankedTree = registration::CastRegister < tree::PostfixRankedTree < >, tree::RankedTree < > > ( ); +static auto PostfixRankedTreeFromRankedTree = registration::CastRegister < tree::PostfixRankedTree < >, tree::RankedTree < > > ( ); -auto PostfixRankedTreeName = registration::NameRegister < tree::PostfixRankedTree < > > ( tree::PostfixRankedTree < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PostfixRankedTree < > > ( tree::PostfixRankedTree < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp index 88ad390e20..dab4b564e1 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.cpp @@ -9,22 +9,30 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::PrefixRankedBarNonlinearPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixRankedBarNonlinearPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarNonlinearPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixRankedBarNonlinearPattern < > > ( ); -auto prefixRankedBarNonlinearPatternType = registration::TypeRegister < tree::Tree, tree::PrefixRankedBarNonlinearPattern < > > ( ); -auto prefixRankedBarNonlinearPatternType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarNonlinearPattern < > > ( ); -auto prefixRankedBarNonlinearPatternType3 = registration::TypeRegister < alib::Object, tree::PrefixRankedBarNonlinearPattern < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixRankedBarNonlinearPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarNonlinearPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixRankedBarNonlinearPattern < > > ( ); -auto PrefixRankedBarNonlinearPatternFromRankedTree = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::RankedTree < > > ( ); -auto PrefixRankedBarNonlinearPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::RankedPattern < > > ( ); -auto PrefixRankedBarNonlinearPatternFromRankedNonlinearPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::RankedNonlinearPattern < > > ( ); -auto PrefixRankedBarNonlinearPatternFromPrefixRankedBarTree = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::PrefixRankedBarTree < > > ( ); -auto PrefixRankedBarNonlinearPatternFromPrefixRankedBarPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::PrefixRankedBarPattern < > > ( ); +static auto PrefixRankedBarNonlinearPatternFromRankedTree = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::RankedTree < > > ( ); +static auto PrefixRankedBarNonlinearPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::RankedPattern < > > ( ); +static auto PrefixRankedBarNonlinearPatternFromRankedNonlinearPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::RankedNonlinearPattern < > > ( ); +static auto PrefixRankedBarNonlinearPatternFromPrefixRankedBarTree = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::PrefixRankedBarTree < > > ( ); +static auto PrefixRankedBarNonlinearPatternFromPrefixRankedBarPattern = registration::CastRegister < tree::PrefixRankedBarNonlinearPattern < >, tree::PrefixRankedBarPattern < > > ( ); -auto PrefixRankedBarNonlinearPatternName = registration::NameRegister < tree::PrefixRankedBarNonlinearPattern < > > ( tree::PrefixRankedBarNonlinearPattern < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixRankedBarNonlinearPattern < > > ( tree::PrefixRankedBarNonlinearPattern < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp index ea4b7b58d9..e23080047d 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.cpp @@ -9,19 +9,27 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::PrefixRankedBarPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixRankedBarPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixRankedBarPattern < > > ( ); -auto prefixRankedBarPatternType = registration::TypeRegister < tree::Tree, tree::PrefixRankedBarPattern < > > ( ); -auto prefixRankedBarPatternType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarPattern < > > ( ); -auto prefixRankedBarPatternType3 = registration::TypeRegister < alib::Object, tree::PrefixRankedBarPattern < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixRankedBarPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixRankedBarPattern < > > ( ); -auto PrefixRankedBarPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedBarPattern < >, tree::RankedPattern < > > ( ); -auto PrefixRankedBarPatternFromPrefixRankedBarTree = registration::CastRegister < tree::PrefixRankedBarPattern < >, tree::PrefixRankedBarTree < > > ( ); +static auto PrefixRankedBarPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedBarPattern < >, tree::RankedPattern < > > ( ); +static auto PrefixRankedBarPatternFromPrefixRankedBarTree = registration::CastRegister < tree::PrefixRankedBarPattern < >, tree::PrefixRankedBarTree < > > ( ); -auto PrefixRankedBarPatternName = registration::NameRegister < tree::PrefixRankedBarPattern < > > ( tree::PrefixRankedBarPattern < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixRankedBarPattern < > > ( tree::PrefixRankedBarPattern < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp b/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp index 48d0f9eb26..275354d0d7 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::RankedTree < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixRankedBarTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarTree < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixRankedBarTree < > > ( ); -auto prefixRankedBarTreeType = registration::TypeRegister < tree::Tree, tree::PrefixRankedBarTree < > > ( ); -auto prefixRankedBarTreeType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarTree < > > ( ); -auto prefixRankedBarTreeType3 = registration::TypeRegister < alib::Object, tree::PrefixRankedBarTree < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixRankedBarTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PrefixRankedBarTree < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixRankedBarTree < > > ( ); -auto PrefixRankedBarTreeFromRankedTree = registration::CastRegister < tree::PrefixRankedBarTree < >, tree::RankedTree < > > ( ); +static auto PrefixRankedBarTreeFromRankedTree = registration::CastRegister < tree::PrefixRankedBarTree < >, tree::RankedTree < > > ( ); -auto PrefixRankedBarTreeName = registration::NameRegister < tree::PrefixRankedBarTree < > > ( tree::PrefixRankedBarTree < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixRankedBarTree < > > ( tree::PrefixRankedBarTree < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp index b5eae43d53..7e4b20dfa6 100644 --- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp @@ -9,22 +9,30 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::PrefixRankedNonlinearPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixRankedNonlinearPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PrefixRankedNonlinearPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixRankedNonlinearPattern < > > ( ); -auto prefixRankedNonlinearPatternType = registration::TypeRegister < tree::Tree, tree::PrefixRankedNonlinearPattern < > > ( ); -auto prefixRankedNonlinearPatternType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PrefixRankedNonlinearPattern < > > ( ); -auto prefixRankedNonlinearPatternType3 = registration::TypeRegister < alib::Object, tree::PrefixRankedNonlinearPattern < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixRankedNonlinearPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PrefixRankedNonlinearPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixRankedNonlinearPattern < > > ( ); -auto PrefixRankedNonlinearPatternFromRankedTree = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::RankedTree < > > ( ); -auto PrefixRankedNonlinearPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::RankedPattern < > > ( ); -auto PrefixRankedNonlinearPatternFromRankedNonlinearPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::RankedNonlinearPattern < > > ( ); -auto PrefixRankedNonlinearPatternFromPrefixRankedTree = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::PrefixRankedTree < > > ( ); -auto PrefixRankedNonlinearPatternFromPrefixRankedPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::PrefixRankedPattern < > > ( ); +static auto PrefixRankedNonlinearPatternFromRankedTree = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::RankedTree < > > ( ); +static auto PrefixRankedNonlinearPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::RankedPattern < > > ( ); +static auto PrefixRankedNonlinearPatternFromRankedNonlinearPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::RankedNonlinearPattern < > > ( ); +static auto PrefixRankedNonlinearPatternFromPrefixRankedTree = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::PrefixRankedTree < > > ( ); +static auto PrefixRankedNonlinearPatternFromPrefixRankedPattern = registration::CastRegister < tree::PrefixRankedNonlinearPattern < >, tree::PrefixRankedPattern < > > ( ); -auto PrefixRankedNonlinearPatternName = registration::NameRegister < tree::PrefixRankedNonlinearPattern < > > ( tree::PrefixRankedNonlinearPattern < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixRankedNonlinearPattern < > > ( tree::PrefixRankedNonlinearPattern < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedPattern.cpp index 33861b21f5..137a58edd3 100644 --- a/alib2data/src/tree/ranked/PrefixRankedPattern.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedPattern.cpp @@ -9,19 +9,27 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::PrefixRankedPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixRankedPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PrefixRankedPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixRankedPattern < > > ( ); -auto prefixRankedPatternType = registration::TypeRegister < tree::Tree, tree::PrefixRankedPattern < > > ( ); -auto prefixRankedPatternType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PrefixRankedPattern < > > ( ); -auto prefixRankedPatternType3 = registration::TypeRegister < alib::Object, tree::PrefixRankedPattern < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixRankedPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PrefixRankedPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixRankedPattern < > > ( ); -auto PrefixRankedPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedPattern < >, tree::RankedPattern < > > ( ); -auto PrefixRankedPatternFromPrefixRankedTree = registration::CastRegister < tree::PrefixRankedPattern < >, tree::PrefixRankedTree < > > ( ); +static auto PrefixRankedPatternFromRankedPattern = registration::CastRegister < tree::PrefixRankedPattern < >, tree::RankedPattern < > > ( ); +static auto PrefixRankedPatternFromPrefixRankedTree = registration::CastRegister < tree::PrefixRankedPattern < >, tree::PrefixRankedTree < > > ( ); -auto PrefixRankedPatternName = registration::NameRegister < tree::PrefixRankedPattern < > > ( tree::PrefixRankedPattern < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixRankedPattern < > > ( tree::PrefixRankedPattern < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.cpp b/alib2data/src/tree/ranked/PrefixRankedTree.cpp index 44ff8c7b50..5913b48174 100644 --- a/alib2data/src/tree/ranked/PrefixRankedTree.cpp +++ b/alib2data/src/tree/ranked/PrefixRankedTree.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::RankedTree < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixRankedTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::PrefixRankedTree < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixRankedTree < > > ( ); -auto prefixRankedTreeType = registration::TypeRegister < tree::Tree, tree::PrefixRankedTree < > > ( ); -auto prefixRankedTreeType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::PrefixRankedTree < > > ( ); -auto prefixRankedTreeType3 = registration::TypeRegister < alib::Object, tree::PrefixRankedTree < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixRankedTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::PrefixRankedTree < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixRankedTree < > > ( ); -auto PrefixRankedTreeFromRankedTree = registration::CastRegister < tree::PrefixRankedTree < > , tree::RankedTree < > > ( ); +static auto PrefixRankedTreeFromRankedTree = registration::CastRegister < tree::PrefixRankedTree < >, tree::RankedTree < > > ( ); -auto PrefixRankedTreeName = registration::NameRegister < tree::PrefixRankedTree < > > ( tree::PrefixRankedTree < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixRankedTree < > > ( tree::PrefixRankedTree < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp b/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp index 0bf4dfd016..5a77c7c8f6 100644 --- a/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp +++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.cpp @@ -9,12 +9,24 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto RankedNonlinearPatternType = registration::TypeRegister < tree::Tree, tree::RankedNonlinearPattern < > > ( ); -auto RankedNonlinearPatternType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::RankedNonlinearPattern < > > ( ); -auto RankedNonlinearPatternType3 = registration::TypeRegister < alib::Object, tree::RankedNonlinearPattern < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < tree::RankedNonlinearPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::RankedNonlinearPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::RankedNonlinearPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::RankedNonlinearPattern < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::RankedNonlinearPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::RankedNonlinearPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::RankedNonlinearPattern < > > ( ); + +static auto name = registration::NameRegister < tree::RankedNonlinearPattern < > > ( tree::RankedNonlinearPattern < >::getXmlTagName ( ) ); + +} /* namespace */ diff --git a/alib2data/src/tree/ranked/RankedPattern.cpp b/alib2data/src/tree/ranked/RankedPattern.cpp index 6d0ed5d28e..d267d91e2c 100644 --- a/alib2data/src/tree/ranked/RankedPattern.cpp +++ b/alib2data/src/tree/ranked/RankedPattern.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::RankedPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::RankedPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::RankedPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::RankedPattern < > > ( ); -auto rankedPatternType = registration::TypeRegister < tree::Tree, tree::RankedPattern < > > ( ); -auto rankedPatternType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::RankedPattern < > > ( ); -auto rankedPatternType3 = registration::TypeRegister < alib::Object, tree::RankedPattern < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::RankedPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::RankedPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::RankedPattern < > > ( ); -auto RankedPatternFromUnrankedPattern = registration::CastRegister < tree::RankedPattern < >, tree::UnrankedPattern < > > ( ); +static auto RankedPatternFromUnrankedPattern = registration::CastRegister < tree::RankedPattern < >, tree::UnrankedPattern < > > ( ); -auto RankedPatternName = registration::NameRegister < tree::RankedPattern < > > ( tree::RankedPattern < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::RankedPattern < > > ( tree::RankedPattern < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/ranked/RankedTree.cpp b/alib2data/src/tree/ranked/RankedTree.cpp index ce0e6046f0..edea6f06be 100644 --- a/alib2data/src/tree/ranked/RankedTree.cpp +++ b/alib2data/src/tree/ranked/RankedTree.cpp @@ -9,19 +9,27 @@ #include "../Tree.h" #include "../RankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::RankedTree < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::RankedTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::RankedTreeWrapper, tree::RankedTree < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::RankedTree < > > ( ); -auto rankedTreeType = registration::TypeRegister < tree::Tree, tree::RankedTree < > > ( ); -auto rankedTreeType2 = registration::TypeRegister < tree::RankedTreeWrapper, tree::RankedTree < > > ( ); -auto rankedTreeType3 = registration::TypeRegister < alib::Object, tree::RankedTree < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::RankedTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::RankedTreeWrapper, tree::RankedTree < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::RankedTree < > > ( ); -auto RankedTreeFromUnrankedTree = registration::CastRegister < tree::RankedTree < >, tree::UnrankedTree < > > ( ); -auto RankedTreeFromPostfixRankedTree = registration::CastRegister < tree::RankedTree < >, tree::PostfixRankedTree < > > ( ); +static auto RankedTreeFromUnrankedTree = registration::CastRegister < tree::RankedTree < >, tree::UnrankedTree < > > ( ); +static auto RankedTreeFromPostfixRankedTree = registration::CastRegister < tree::RankedTree < >, tree::PostfixRankedTree < > > ( ); -auto RankedTreeName = registration::NameRegister < tree::RankedTree < > > ( tree::RankedTree < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::RankedTree < > > ( tree::RankedTree < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/unranked/PrefixBarTree.cpp b/alib2data/src/tree/unranked/PrefixBarTree.cpp index 9a9a7c0970..6b01ede84a 100644 --- a/alib2data/src/tree/unranked/PrefixBarTree.cpp +++ b/alib2data/src/tree/unranked/PrefixBarTree.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../UnrankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::PrefixBarTree < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::PrefixBarTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::UnrankedTreeWrapper, tree::PrefixBarTree < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::PrefixBarTree < > > ( ); -auto prefixBarTreeType = registration::TypeRegister < tree::Tree, tree::PrefixBarTree < > > ( ); -auto prefixBarTreeType2 = registration::TypeRegister < tree::UnrankedTreeWrapper, tree::PrefixBarTree < > > ( ); -auto prefixBarTreeType3 = registration::TypeRegister < alib::Object, tree::PrefixBarTree < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::PrefixBarTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::UnrankedTreeWrapper, tree::PrefixBarTree < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::PrefixBarTree < > > ( ); -auto PrefixBarTreeFromUnrankedTree = registration::CastRegister < tree::PrefixBarTree < >, tree::UnrankedTree < > > ( ); +static auto PrefixBarTreeFromUnrankedTree = registration::CastRegister < tree::PrefixBarTree < >, tree::UnrankedTree < > > ( ); -auto PrefixBarTreeName = registration::NameRegister < tree::PrefixBarTree < > > ( tree::PrefixBarTree < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::PrefixBarTree < > > ( tree::PrefixBarTree < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp index 319e85bf4b..e2695db6b2 100644 --- a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp +++ b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.cpp @@ -9,12 +9,24 @@ #include "../Tree.h" #include "../UnrankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> -namespace alib { +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> +#include <registration/CastRegistration.hpp> +#include <registration/NameRegistration.hpp> -auto UnrankedNonlinearPatternType = registration::TypeRegister < tree::Tree, tree::UnrankedNonlinearPattern < > > ( ); -auto UnrankedNonlinearPatternType2 = registration::TypeRegister < tree::UnrankedTreeWrapper, tree::UnrankedNonlinearPattern < > > ( ); -auto UnrankedNonlinearPatternType3 = registration::TypeRegister < alib::Object, tree::UnrankedNonlinearPattern < > > ( ); +namespace { -} /* namespace alib */ +static auto valuePrinter = registration::ValuePrinterRegister < tree::UnrankedNonlinearPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::UnrankedNonlinearPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::UnrankedTreeWrapper, tree::UnrankedNonlinearPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::UnrankedNonlinearPattern < > > ( ); + +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::UnrankedNonlinearPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::UnrankedTreeWrapper, tree::UnrankedNonlinearPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::UnrankedNonlinearPattern < > > ( ); + +static auto name = registration::NameRegister < tree::UnrankedNonlinearPattern < > > ( tree::UnrankedNonlinearPattern < >::getXmlTagName ( ) ); + +} /* namespace */ diff --git a/alib2data/src/tree/unranked/UnrankedPattern.cpp b/alib2data/src/tree/unranked/UnrankedPattern.cpp index cb7ca7247b..4e39ff3d4a 100644 --- a/alib2data/src/tree/unranked/UnrankedPattern.cpp +++ b/alib2data/src/tree/unranked/UnrankedPattern.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../UnrankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::UnrankedPattern < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::UnrankedPattern < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::UnrankedTreeWrapper, tree::UnrankedPattern < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::UnrankedPattern < > > ( ); -auto unrankedPatternType = registration::TypeRegister < tree::Tree, tree::UnrankedPattern < > > ( ); -auto unrankedPatternType2 = registration::TypeRegister < tree::UnrankedTreeWrapper, tree::UnrankedPattern < > > ( ); -auto unrankedPatternType3 = registration::TypeRegister < alib::Object, tree::UnrankedPattern < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::UnrankedPattern < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::UnrankedTreeWrapper, tree::UnrankedPattern < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::UnrankedPattern < > > ( ); -auto UnrankedPatternFromRankedPattern = registration::CastRegister < tree::UnrankedPattern < >, tree::RankedPattern < > > ( ); +static auto UnrankedPatternFromRankedPattern = registration::CastRegister < tree::UnrankedPattern < >, tree::RankedPattern < > > ( ); -auto UnrankedPatternName = registration::NameRegister < tree::UnrankedPattern < > > ( tree::UnrankedPattern < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::UnrankedPattern < > > ( tree::UnrankedPattern < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data/src/tree/unranked/UnrankedTree.cpp b/alib2data/src/tree/unranked/UnrankedTree.cpp index 0154482d81..967d4bf327 100644 --- a/alib2data/src/tree/unranked/UnrankedTree.cpp +++ b/alib2data/src/tree/unranked/UnrankedTree.cpp @@ -9,18 +9,26 @@ #include "../Tree.h" #include "../UnrankedTreeWrapper.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> + +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> #include <registration/CastRegistration.hpp> #include <registration/NameRegistration.hpp> -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < tree::UnrankedTree < > > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < tree::Tree, tree::UnrankedTree < > > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < tree::UnrankedTreeWrapper, tree::UnrankedTree < > > ( ); +static auto xmlWrite3 = registration::XmlWriterRegister < alib::Object, tree::UnrankedTree < > > ( ); -auto unrankedTreeType = registration::TypeRegister < tree::Tree, tree::UnrankedTree < > > ( ); -auto unrankedTreeType2 = registration::TypeRegister < tree::UnrankedTreeWrapper, tree::UnrankedTree < > > ( ); -auto unrankedTreeType3 = registration::TypeRegister < alib::Object, tree::UnrankedTree < > > ( ); +static auto xmlReader = registration::XmlReaderRegister < tree::Tree, tree::UnrankedTree < > > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < tree::UnrankedTreeWrapper, tree::UnrankedTree < > > ( ); +static auto xmlReaded3 = registration::XmlReaderRegister < alib::Object, tree::UnrankedTree < > > ( ); -auto UnrankedTreeFromRankedTree = registration::CastRegister < tree::UnrankedTree < >, tree::RankedTree < > > ( ); +static auto UnrankedTreeFromRankedTree = registration::CastRegister < tree::UnrankedTree < >, tree::RankedTree < > > ( ); -auto UnrankedTreeName = registration::NameRegister < tree::UnrankedTree < > > ( tree::UnrankedTree < >::getXmlTagName ( ) ); +static auto name = registration::NameRegister < tree::UnrankedTree < > > ( tree::UnrankedTree < >::getXmlTagName ( ) ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data_experimental/src/graph/directed/AdjacencyListDirectedGraph.cpp b/alib2data_experimental/src/graph/directed/AdjacencyListDirectedGraph.cpp index 6023d899ea..42d16571dc 100644 --- a/alib2data_experimental/src/graph/directed/AdjacencyListDirectedGraph.cpp +++ b/alib2data_experimental/src/graph/directed/AdjacencyListDirectedGraph.cpp @@ -11,7 +11,6 @@ #include <compare> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include "../common/GraphFromXMLParser.h" @@ -19,6 +18,8 @@ #include "../Graph.h" //#include "utils.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace graph { @@ -324,9 +325,14 @@ alib::ObjectBase* AdjacencyListDirectedGraph::inc() && { } // namespace graph -namespace alib { +namespace { -auto adjListDirGraphType = registration::TypeRegister < graph::Graph, graph::AdjacencyListDirectedGraph > (); -auto adjListDirGraphType2 = registration::TypeRegister < alib::Object, graph::AdjacencyListDirectedGraph > (); +static auto valuePrinter = registration::ValuePrinterRegister < graph::AdjacencyListDirectedGraph > ( ); -} /* namespace alib */ +static auto xmlWrite = registration::XmlWriterRegister < graph::Graph, graph::AdjacencyListDirectedGraph > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, graph::AdjacencyListDirectedGraph > ( ); + +static auto xmlReaded = registration::XmlReaderRegister < graph::Graph, graph::AdjacencyListDirectedGraph > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, graph::AdjacencyListDirectedGraph > ( ); + +} /* namespace */ diff --git a/alib2data_experimental/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp b/alib2data_experimental/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp index 467aa4e00b..8155ff2dff 100644 --- a/alib2data_experimental/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp +++ b/alib2data_experimental/src/graph/directed/AdjacencyMatrixDirectedGraph.cpp @@ -11,7 +11,6 @@ #include <compare> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include "../common/GraphFromXMLParser.h" @@ -19,6 +18,8 @@ #include "../Graph.h" //#include "utils.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace graph { @@ -325,9 +326,14 @@ alib::ObjectBase* AdjacencyMatrixDirectedGraph::inc() && { } // namespace graph -namespace alib { +namespace { -auto adjMatDirGraphType = registration::TypeRegister < graph::Graph, graph::AdjacencyMatrixDirectedGraph > (); -auto adjMatDirGraphType2 = registration::TypeRegister < alib::Object, graph::AdjacencyMatrixDirectedGraph > (); +static auto valuePrinter = registration::ValuePrinterRegister < graph::AdjacencyMatrixDirectedGraph > ( ); -} /* namespace alib */ +static auto xmlWrite = registration::XmlWriterRegister < graph::Graph, graph::AdjacencyMatrixDirectedGraph > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, graph::AdjacencyMatrixDirectedGraph > ( ); + +static auto xmlReaded = registration::XmlReaderRegister < graph::Graph, graph::AdjacencyMatrixDirectedGraph > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, graph::AdjacencyMatrixDirectedGraph > ( ); + +} /* namespace */ diff --git a/alib2data_experimental/src/graph/undirected/AdjacencyListUndirectedGraph.cpp b/alib2data_experimental/src/graph/undirected/AdjacencyListUndirectedGraph.cpp index 9863e31813..f3e5fdbb96 100644 --- a/alib2data_experimental/src/graph/undirected/AdjacencyListUndirectedGraph.cpp +++ b/alib2data_experimental/src/graph/undirected/AdjacencyListUndirectedGraph.cpp @@ -11,7 +11,6 @@ #include <compare> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include "../common/GraphFromXMLParser.h" @@ -19,6 +18,8 @@ #include "../Graph.h" #include "utils.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace graph { @@ -253,10 +254,14 @@ alib::ObjectBase* AdjacencyListUndirectedGraph::inc() && { } // namespace graph +namespace { -namespace alib { +static auto valuePrinter = registration::ValuePrinterRegister < graph::AdjacencyMatrixUndirectedGraph > ( ); -auto adjListUndirGraphType = registration::TypeRegister < graph::Graph, graph::AdjacencyListUndirectedGraph > (); -auto adjListUndirGraphType2 = registration::TypeRegister < alib::Object, graph::AdjacencyListUndirectedGraph > (); +static auto xmlWrite = registration::XmlWriterRegister < graph::Graph, graph::AdjacencyMatrixUndirectedGraph > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, graph::AdjacencyMatrixUndirectedGraph > ( ); -} /* namespace alib */ +static auto xmlReaded = registration::XmlReaderRegister < graph::Graph, graph::AdjacencyMatrixUndirectedGraph > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, graph::AdjacencyMatrixUndirectedGraph > ( ); + +} /* namespace */ diff --git a/alib2data_experimental/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp b/alib2data_experimental/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp index e63d16da38..8c759f73f9 100644 --- a/alib2data_experimental/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp +++ b/alib2data_experimental/src/graph/undirected/AdjacencyMatrixUndirectedGraph.cpp @@ -11,7 +11,6 @@ #include <compare> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <sax/FromXMLParserHelper.h> #include <object/UniqueObject.h> #include "../common/GraphFromXMLParser.h" @@ -19,6 +18,8 @@ #include "../Graph.h" #include "utils.h" +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> namespace graph { @@ -267,9 +268,14 @@ alib::ObjectBase* AdjacencyMatrixUndirectedGraph::inc() && { } // namespace graph -namespace alib { +namespace { -auto adjMatUndirGraphType = registration::TypeRegister < graph::Graph, graph::AdjacencyMatrixUndirectedGraph > (); -auto adjMatUndirGraphType2 = registration::TypeRegister < alib::Object, graph::AdjacencyMatrixUndirectedGraph > (); +static auto valuePrinter = registration::ValuePrinterRegister < graph::AdjacencyListUndirectedGraph > ( ); -} /* namespace alib */ +static auto xmlWrite = registration::XmlWriterRegister < graph::Graph, graph::AdjacencyListUndirectedGraph > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, graph::AdjacencyListUndirectedGraph > ( ); + +static auto xmlReaded = registration::XmlReaderRegister < graph::Graph, graph::AdjacencyListUndirectedGraph > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, graph::AdjacencyListUndirectedGraph > ( ); + +} /* namespace */ diff --git a/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.cpp b/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.cpp index 8a9b0fa7cb..7cdba83be8 100644 --- a/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.cpp +++ b/alib2data_experimental/src/indexes/suffixTrie/SuffixTrieTerminatingSymbol.cpp @@ -16,9 +16,11 @@ #include "../common/IndexFromXMLParser.h" #include "../common/IndexToXMLComposer.h" #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <object/UniqueObject.h> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace indexes { SuffixTrieTerminatingSymbol::SuffixTrieTerminatingSymbol ( ext::set < DefaultSymbolType > alphabet, DefaultSymbolType terminatingSymbol ) : SuffixTrieTerminatingSymbol ( std::move ( alphabet ), std::move ( terminatingSymbol ), SuffixTrieNodeTerminatingSymbol ( { } ) ) { @@ -149,6 +151,13 @@ void xmlApi < indexes::SuffixTrieTerminatingSymbol >::compose ( ext::deque < sax output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT ); } -auto suffixTreeTerminatingSymbolType = registration::TypeRegister < alib::Object, indexes::SuffixTrieTerminatingSymbol > ( ); - } /* namespace alib */ + +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < indexes::SuffixTrieTerminatingSymbol > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < alib::Object, indexes::SuffixTrieTerminatingSymbol > ( ); +static auto xmlReaded = registration::XmlReaderRegister < alib::Object, indexes::SuffixTrieTerminatingSymbol > ( ); + +} /* namespace */ diff --git a/alib2data_experimental/src/label/LR0ItemsLabel.cpp b/alib2data_experimental/src/label/LR0ItemsLabel.cpp index cdb71c375e..cc70791b4a 100644 --- a/alib2data_experimental/src/label/LR0ItemsLabel.cpp +++ b/alib2data_experimental/src/label/LR0ItemsLabel.cpp @@ -9,13 +9,15 @@ #include <sax/FromXMLParserHelper.h> #include <label/Label.h> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <label/UniqueLabel.h> #include <container/ObjectsMap.h> #include <container/ObjectsSet.h> #include <container/ObjectsVector.h> #include <primitive/Unsigned.h> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace label { LR0ItemsLabel::LR0ItemsLabel ( grammar::parsing::LR0Items items ) : m_items ( items ) { @@ -75,9 +77,14 @@ LabelBase* LR0ItemsLabel::inc ( ) && { } /* namespace label */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < label::LR0ItemsLabel > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < label::Label, label::LR0ItemsLabel > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, label::LR0ItemsLabel > ( ); -auto lr0ItemsLabelType = registration::TypeRegister < label::Label, label::LR0ItemsLabel > ( ); -auto lr0ItemsLabelType2 = registration::TypeRegister < alib::Object, label::LR0ItemsLabel > ( ); +static auto xmlReader = registration::XmlReaderRegister < label::Label, label::LR0ItemsLabel > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, label::LR0ItemsLabel > ( ); -} /* namespace alib */ +} /* namespace */ diff --git a/alib2data_experimental/src/string/LinearStringTerminatingSymbol.cpp b/alib2data_experimental/src/string/LinearStringTerminatingSymbol.cpp index 6bc41b2294..88c94c62bb 100644 --- a/alib2data_experimental/src/string/LinearStringTerminatingSymbol.cpp +++ b/alib2data_experimental/src/string/LinearStringTerminatingSymbol.cpp @@ -17,10 +17,12 @@ #include <string/common/StringToXMLComposer.h> #include <string/String.h> #include <object/Object.h> -#include <registration/TypeRegistration.hpp> #include <core/castApi.hpp> #include <object/UniqueObject.h> +#include <registration/ValuePrinterRegistration.hpp> +#include <registration/XmlRegistration.hpp> + namespace string { LinearStringTerminatingSymbol::LinearStringTerminatingSymbol ( ext::set < DefaultSymbolType > alphabet, DefaultSymbolType terminatingSymbol, ext::vector < DefaultSymbolType > data ) : alib::Components < LinearStringTerminatingSymbol, DefaultSymbolType, ext::tuple < GeneralAlphabet >, ext::tuple < TerminatingSymbol > > ( ext::make_tuple ( std::move ( alphabet ) ), ext::make_tuple ( std::move ( terminatingSymbol ) ) ) { @@ -123,9 +125,14 @@ alib::ObjectBase* LinearStringTerminatingSymbol::inc() && { } /* namespace string */ -namespace alib { +namespace { + +static auto valuePrinter = registration::ValuePrinterRegister < string::LinearStringTerminatingSymbol > ( ); + +static auto xmlWrite = registration::XmlWriterRegister < string::String, string::LinearStringTerminatingSymbol > ( ); +static auto xmlWrite2 = registration::XmlWriterRegister < alib::Object, string::LinearStringTerminatingSymbol > ( ); -auto linearStringTerminatingSymbolType = registration::TypeRegister < string::String, string::LinearStringTerminatingSymbol > ( ); -auto linearStringTerminatingSymbolType2 = registration::TypeRegister < alib::Object, string::LinearStringTerminatingSymbol > ( ); +static auto xmlReaded = registration::XmlReaderRegister < string::String, string::LinearStringTerminatingSymbol > ( ); +static auto xmlReaded2 = registration::XmlReaderRegister < alib::Object, string::LinearStringTerminatingSymbol > ( ); -} /* namespace alib */ +} /* namespace */ -- GitLab