Skip to content
Snippets Groups Projects
PrimitiveRegistrator.cpp 4.18 KiB
Newer Older
/*
 * PrimitiveRegistrator.cpp
 *
 *  Created on: 11. 7. 2017
 *	  Author: Jan Travnicek
 */

#include <abstraction/CastRegistry.hpp>
#include <abstraction/NormalizeRegistry.hpp>
#include <abstraction/ValuePrinterRegistry.hpp>
#include <abstraction/ImmediateRegistry.hpp>
#include <abstraction/ContainerRegistry.hpp>

#include <abstraction/XmlComposerRegistry.hpp>
#include <abstraction/XmlParserRegistry.hpp>
#include <abstraction/XmlContainerParserRegistry.hpp>
#include <primitive/xml/Double.h>
#include <primitive/xml/Integer.h>
#include <primitive/xml/Unsigned.h>
#include <primitive/xml/Bool.h>
#include <primitive/xml/UnsignedLong.h>
#include <primitive/xml/String.h>
#include <container/xml/ObjectsVector.h>
#include <container/xml/ObjectsSet.h>
#include <container/xml/ObjectsMap.h>
#include <container/xml/ObjectsVariant.h>

#include <object/xml/AnyObject.h>
Jan Trávníček's avatar
Jan Trávníček committed
#include <common/DefaultStateType.h>
#include <common/DefaultSymbolType.h>
#include <common/DefaultRankType.h>

#include <common/ranked_symbol.hpp>
#include <alphabet/xml/RankedSymbol.h>
#include <alphabet/xml/BottomOfTheStackSymbol.h>
#include <string/LinearString.h>
#include <string/Epsilon.h>
class PrimitiveRegistrator {
	PrimitiveRegistrator ( ) {
		abstraction::XmlParserRegistry::registerXmlParser < ext::set < ext::pair < alib::Object, alib::Object > > > ( "pair_set" );

		abstraction::ContainerRegistry::registerSet < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" );
		abstraction::XmlContainerParserRegistry::registerSet < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" );
		abstraction::XmlParserRegistry::registerXmlParser < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( "ranked_symbol" );
		abstraction::XmlComposerRegistry::registerXmlComposer < ext::set < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > > ( );
		abstraction::XmlComposerRegistry::registerXmlComposer < common::ranked_symbol < DefaultSymbolType, DefaultRankType > > ( );
		abstraction::XmlComposerRegistry::registerXmlComposer < ext::map < DefaultSymbolType, size_t > > ( );
		abstraction::XmlComposerRegistry::registerXmlComposer < ext::map < common::ranked_symbol < DefaultSymbolType, DefaultRankType >, size_t > > ( );
		abstraction::XmlParserRegistry::registerXmlParser < alib::Object > ( "DefaultStateType" );

		abstraction::ContainerRegistry::registerSet < alib::Object > ( "Object" );
		abstraction::XmlContainerParserRegistry::registerSet < alib::Object > ( "Object" );
		abstraction::XmlParserRegistry::registerXmlParser < alib::Object > ( "Object" );
		abstraction::XmlComposerRegistry::registerXmlComposer < alib::Object > ( );
		abstraction::XmlComposerRegistry::registerXmlComposer < ext::set < alib::Object > > ( );
		abstraction::XmlComposerRegistry::registerXmlComposer < ext::set < string::LinearString < > > > ( );

		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < ext::variant < alphabet::BottomOfTheStackSymbol, ext::set < common::ranked_symbol < alib::Object, primitive::Unsigned > > > > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < ext::set < ext::pair < alib::Object, alib::Object > > > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < ext::pair < alib::Object, ext::variant < string::Epsilon < alib::Object >, alib::Object > > > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < ext::set < alib::Object > > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < unsigned int > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < container::ObjectsPair < alib::Object, int > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < common::ranked_symbol < alib::Object, primitive::Unsigned > > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < ext::pair < unsigned int, unsigned int > > > ( );
		alib::xmlApi < alib::Object >::template registerXmlWriter < alib::AnyObject < ext::pair < alib::Object, alib::Object > > > ( );
auto primitiveRegistrator = PrimitiveRegistrator ( );