/*
 * XmlTokensComposerAbstraction.hpp
 *
 *  Created on: 7. 10. 2017
 *	  Author: Jan Travnicek
 */

#ifndef _XML_TOKENS_COMPOSER_ABSTRACTION_HPP_
#define _XML_TOKENS_COMPOSER_ABSTRACTION_HPP_

#include <abstraction/NaryOperationAbstraction.hpp>
#include <abstraction/ValueOperationAbstraction.hpp>

#include <sax/SaxComposeInterface.h>

namespace abstraction {

class XmlTokensComposerAbstraction : virtual public NaryOperationAbstraction < const ext::deque < sax::Token > &, const std::string & >, virtual public ValueOperationAbstraction < void > {
public:
	std::shared_ptr < abstraction::Value > run ( ) override {
		std::shared_ptr < abstraction::Value > & param2 = std::get < 0 > ( this->getParams ( ) );
		std::shared_ptr < abstraction::Value > & param1 = std::get < 1 > ( this->getParams ( ) );
		sax::SaxComposeInterface::composeFile ( abstraction::retrieveValue < const std::string & > ( param1 ), abstraction::retrieveValue < const ext::deque < sax::Token > & > ( param2 ) );
		return std::make_shared < abstraction::Void > ( );
	}

};

} /* namespace abstraction */

#endif /* _XML_TOKENS_COMPOSER_ABSTRACTION_HPP_ */
