aboutsummaryrefslogtreecommitdiff
path: root/src/functionunlink.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/functionunlink.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/functionunlink.cpp b/src/functionunlink.cpp
index 48985bb..590833c 100644
--- a/src/functionunlink.cpp
+++ b/src/functionunlink.cpp
@@ -7,7 +7,7 @@ using namespace Bu;
7 7
8#include <bu/plugger.h> 8#include <bu/plugger.h>
9PluginInterface3( pluginFunctionUnlink, unlink, FunctionUnlink, Function, 9PluginInterface3( pluginFunctionUnlink, unlink, FunctionUnlink, Function,
10 "Mike Buland", 0, 1 ); 10 "Mike Buland", 0, 1 );
11 11
12FunctionUnlink::FunctionUnlink() 12FunctionUnlink::FunctionUnlink()
13{ 13{
@@ -19,37 +19,37 @@ FunctionUnlink::~FunctionUnlink()
19 19
20Bu::String FunctionUnlink::getName() const 20Bu::String FunctionUnlink::getName() const
21{ 21{
22 return "unlink"; 22 return "unlink";
23} 23}
24 24
25Variable FunctionUnlink::call( Variable &/*input*/, VarList lParams ) 25Variable FunctionUnlink::call( Variable &/*input*/, VarList lParams )
26{ 26{
27 //sio << "Unlink called: " << lParams << sio.nl; 27 //sio << "Unlink called: " << lParams << sio.nl;
28 for( VarList::iterator p = lParams.begin(); p; p++ ) 28 for( VarList::iterator p = lParams.begin(); p; p++ )
29 { 29 {
30 switch( (*p).getType() ) 30 switch( (*p).getType() )
31 { 31 {
32 case Variable::typeString: 32 case Variable::typeString:
33 //sio << " xx> " << (*p).getString() << sio.nl; 33 //sio << " xx> " << (*p).getString() << sio.nl;
34 unlink( (*p).getString().getStr() ); 34 unlink( (*p).getString().getStr() );
35 break; 35 break;
36 36
37 case Variable::typeList: 37 case Variable::typeList:
38 //sio << " xx>"; 38 //sio << " xx>";
39 for( VarList::iterator i = (*p).begin(); i; i++ ) 39 for( VarList::iterator i = (*p).begin(); i; i++ )
40 { 40 {
41 //sio << " " << (*i).getString(); 41 //sio << " " << (*i).getString();
42 unlink( (*i).getString().getStr() ); 42 unlink( (*i).getString().getStr() );
43 } 43 }
44 //sio << sio.nl; 44 //sio << sio.nl;
45 break; 45 break;
46 46
47 default: 47 default:
48 throw Bu::ExceptionBase("Hey, wrong type passed."); 48 throw Bu::ExceptionBase("Hey, wrong type passed.");
49 break; 49 break;
50 } 50 }
51 } 51 }
52 52
53 return Variable(); 53 return Variable();
54} 54}
55 55