OutputIntervalTrueNode.cc 1.66 KB
/*
 * OutputIntervalTrueNode.cc
 *
 *  Created on: Oct 31, 2012
 *      Author: f.casimir
 */

#include <string.h>

// Common module includes
#include "OutputFormatTime.hh"

// Parameters module includes
#include "ServicesServer.hh"
#include "Parameter.hh"
#include "FileConfigurator.hh"
#include "ParameterManager.hh"

using namespace AMDA::Parameters;

// XMLConfigurator module includes
#include "Constant.hh"

// Download module includes
#include "Config.hh"
#include "ParamOutputIntervalTrueFile.hh"
#include "OutputIntervalTrueNode.hh"

using namespace AMDA::XMLConfigurator;

namespace AMDA {
	namespace ParamOutputImpl {
		namespace Download {



			OutputIntervalTrueNode::OutputIntervalTrueNode() : NodeGrpCfg() {
			/*
			<intervalTrue>
			<param id='imf'/>
			</intervalTrue>
			*/
				getChildList()["param"]=NodeCfgSPtr(new SingleParamNode<ParamOutputIntervalTrueFile>());
			}
			void OutputIntervalTrueNode::proceed(xmlNodePtr pNode,
					const AMDA::Parameters::CfgContext& pContext) {

				LOG4CXX_DEBUG(gLogger,
						"OutputIntervalTrueNode::proceed: '" << pNode->name << "' node")

				ParameterManager* lParameterManager = pContext.get<ParameterManager*>();
				CfgContext lContext;

				ParamOutput* lParamOutputIntervalTrueFile = new ParamOutputIntervalTrueFile(
							*lParameterManager);
				ParamOutputSPtr  lParamOutput(lParamOutputIntervalTrueFile);
				lContext.push<ParamOutputIntervalTrueFile*>(dynamic_cast<ParamOutputIntervalTrueFile *>(lParamOutputIntervalTrueFile));
				NodeGrpCfg::proceed(pNode, lContext);
				lParameterManager->getParamOutputList().push_back(lParamOutput);

}

		} // namespace Download
	} // namespace ParamOutputImpl
} // namespace AMDA