aboutsummaryrefslogtreecommitdiff
path: root/src/functiontargets.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/functiontargets.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/functiontargets.cpp b/src/functiontargets.cpp
new file mode 100644
index 0000000..253b585
--- /dev/null
+++ b/src/functiontargets.cpp
@@ -0,0 +1,35 @@
1#include "functiontargets.h"
2#include "plugger.h"
3#include "build.h"
4
5PluginInterface2(targets, FunctionTargets, Function, "Mike Buland", 0, 1 );
6
7FunctionTargets::FunctionTargets()
8{
9}
10
11FunctionTargets::~FunctionTargets()
12{
13}
14
15void FunctionTargets::execute( Build *bld, const StringList &lInput, StringList &lOutput )
16{
17 if( bld == NULL )
18 {
19 throw BuildException("You cannot call targets() from anywhere, see the manual.");
20 }
21
22 for( TargetMap::iterator i = bld->getTargetMap().begin();
23 i != bld->getTargetMap().end(); i++ )
24 {
25 lOutput.push_back( (*i).first );
26 }
27}
28
29Function *FunctionTargets::duplicate( Build &bld, const std::string &cont, VarMap *mExtra )
30{
31 Function *pRet = new FunctionTargets();
32 pRet->copyData( this, bld, cont, mExtra );
33 return pRet;
34}
35