ZipNode.cc 750 Bytes
/*
 * ZipNode.cc
 *
 *  Created on: 4 oct. 2013
 *      Author: CS
 */

#include "ZipNode.hh"

namespace postprocessing {

log4cxx::LoggerPtr ZipNode::_logger = log4cxx::Logger::getLogger(
		"AMDA-Kernel.ZipNode");

void ZipNode::proceed(xmlNodePtr pNode,
			const AMDA::Parameters::CfgContext& pContext) {
		LOG4CXX_DEBUG(_logger, "ZipNode::proceed");

		PostProcessingAble* output = pContext.get<PostProcessingAble*>();

		// Set value in output param
		std::stringstream outputNodeName;

		std::string* filePrefix = pContext.get<std::string*>();

		if (filePrefix == NULL)
			outputNodeName << pNode->parent->parent->name;
		else
			outputNodeName << (*filePrefix);

		output->addPostProcessing(new ZipPostProcessing(outputNodeName.str()));
	}
}