aboutsummaryrefslogtreecommitdiff
path: root/src/functiontargets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/functiontargets.cpp')
-rw-r--r--src/functiontargets.cpp39
1 files changed, 39 insertions, 0 deletions
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 @@
1#include "functiontargets.h"
2#include "context.h"
3#include "target.h"
4
5FunctionTargets::FunctionTargets()
6{
7}
8
9FunctionTargets::~FunctionTargets()
10{
11}
12
13Bu::FString FunctionTargets::getName() const
14{
15 return "targets";
16}
17
18Variable FunctionTargets::call( Variable &/*input*/, VarList lParams )
19{
20 Variable vRet( Variable::typeList );
21 TargetList lTrg;
22 if( lParams.getSize() == 0 )
23 {
24 lTrg = pContext->getExplicitTargets();
25 }
26 else
27 {
28 lTrg = pContext->getTag( lParams.first().toString() );
29 }
30 for( TargetList::const_iterator i = lTrg.begin(); i; i++ )
31 {
32 for( StrList::const_iterator j = (*i)->getOutputList().begin(); j; j++ )
33 {
34 vRet.append( *j );
35 }
36 }
37 return vRet;
38}
39