aboutsummaryrefslogtreecommitdiff
path: root/src/functionwrite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/functionwrite.cpp')
-rw-r--r--src/functionwrite.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/functionwrite.cpp b/src/functionwrite.cpp
index 14a396a..4aee4e0 100644
--- a/src/functionwrite.cpp
+++ b/src/functionwrite.cpp
@@ -3,7 +3,7 @@
3 3
4#include <bu/plugger.h> 4#include <bu/plugger.h>
5PluginInterface3( pluginFunctionWrite, write, FunctionWrite, Function, 5PluginInterface3( pluginFunctionWrite, write, FunctionWrite, Function,
6 "Mike Buland", 0, 1 ); 6 "Mike Buland", 0, 1 );
7 7
8FunctionWrite::FunctionWrite() 8FunctionWrite::FunctionWrite()
9{ 9{
@@ -15,20 +15,20 @@ FunctionWrite::~FunctionWrite()
15 15
16Bu::String FunctionWrite::getName() const 16Bu::String FunctionWrite::getName() const
17{ 17{
18 return "write"; 18 return "write";
19} 19}
20 20
21Variable FunctionWrite::call( Variable &input, VarList lParams ) 21Variable FunctionWrite::call( Variable &input, VarList lParams )
22{ 22{
23 if( lParams.getSize() != 1 ) 23 if( lParams.getSize() != 1 )
24 { 24 {
25 throw Bu::ExceptionBase( 25 throw Bu::ExceptionBase(
26 "write takes one parameter, the string to write." 26 "write takes one parameter, the string to write."
27 ); 27 );
28 } 28 }
29 FileMgr::getInstance().get( (ptrdiff_t)input.getOpaque() ).write( 29 FileMgr::getInstance().get( (ptrdiff_t)input.getOpaque() ).write(
30 lParams.first().toString() 30 lParams.first().toString()
31 ); 31 );
32 return Variable(); 32 return Variable();
33} 33}
34 34