/*
 * 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::pair < std::shared_ptr < abstraction::Value >, bool > & param2 = std::get < 0 > ( this->getParams ( ) );
		std::pair < std::shared_ptr < abstraction::Value >, bool > & param1 = std::get < 1 > ( this->getParams ( ) );
		sax::SaxComposeInterface::composeFile ( abstraction::retrieveValue < const std::string & > ( param1.first, param1.second ), abstraction::retrieveValue < const ext::deque < sax::Token > & > ( param2.first, param2.second ) );
		return std::make_shared < abstraction::Void > ( this->getProxyAbstraction ( ) );
	}

};

} /* namespace abstraction */

#endif /* _XML_TOKENS_COMPOSER_ABSTRACTION_HPP_ */
