aboutsummaryrefslogtreecommitdiff
path: root/src/functiontargets.cpp
blob: 253b5858bf99948a1be4f584a1ef1a861819cca2 (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
34
35
#include "functiontargets.h"
#include "plugger.h"
#include "build.h"

PluginInterface2(targets, FunctionTargets, Function, "Mike Buland", 0, 1 );

FunctionTargets::FunctionTargets()
{
}

FunctionTargets::~FunctionTargets()
{
}

void FunctionTargets::execute( Build *bld, const StringList &lInput, StringList &lOutput )
{
	if( bld == NULL )
	{
		throw BuildException("You cannot call targets() from anywhere, see the manual.");
	}

	for( TargetMap::iterator i = bld->getTargetMap().begin();
		 i != bld->getTargetMap().end(); i++ )
	{
		lOutput.push_back( (*i).first );
	}
}

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