From fb28f6800864176be2ffca29e8e664b641f33170 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Dec 2009 18:04:02 +0000 Subject: m3 is copied into trunk, we should be good to go, now. --- src/functiontargets.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 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..93fbb96 --- /dev/null +++ b/src/functiontargets.cpp @@ -0,0 +1,39 @@ +#include "functiontargets.h" +#include "context.h" +#include "target.h" + +FunctionTargets::FunctionTargets() +{ +} + +FunctionTargets::~FunctionTargets() +{ +} + +Bu::FString FunctionTargets::getName() const +{ + return "targets"; +} + +Variable FunctionTargets::call( Variable &/*input*/, VarList lParams ) +{ + Variable vRet( Variable::typeList ); + TargetList lTrg; + if( lParams.getSize() == 0 ) + { + lTrg = pContext->getExplicitTargets(); + } + else + { + lTrg = pContext->getTag( lParams.first().toString() ); + } + for( TargetList::const_iterator i = lTrg.begin(); i; i++ ) + { + for( StrList::const_iterator j = (*i)->getOutputList().begin(); j; j++ ) + { + vRet.append( *j ); + } + } + return vRet; +} + -- cgit v1.2.3