From afd6d53eb6b3f169fa50cea360b982b60e589e6f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 12 Sep 2006 00:56:51 +0000 Subject: Added more goo, it may be good goo. --- src/functiontargets.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/functiontargets.cpp (limited to 'src/functiontargets.cpp') 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 @@ +#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; +} + -- cgit v1.2.3