aboutsummaryrefslogtreecommitdiff
path: root/src/functiontostring.cpp
blob: 2fdcc1c729d5a24d7bbe1b2e2747565d3e30e9f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "functiontostring.h"
#include "bu/plugger.h"

PluginInterface2(toString, FunctionToString, Function, "Mike Buland", 0, 1 );

FunctionToString::FunctionToString()
{
}

FunctionToString::~FunctionToString()
{
}

void FunctionToString::execute( Build *bld, const StringList &lInput, StringList &lOutput )
{
	std::string sOut;

	for( StringList::const_iterator i = lInput.begin(); i != lInput.end(); i++ )
	{
		if( i != lInput.begin() ) sOut += " ";
		sOut += *i;
	}

	lOutput.push_back( sOut );
}

Function *FunctionToString::duplicate( Build &bld, const StringList *cont, VarMap *mExtra )
{
	Function *pRet = new FunctionToString();
	pRet->copyData( this, bld, cont, mExtra );
	return pRet;
}