aboutsummaryrefslogtreecommitdiff
path: root/src/functionclose.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-06-03 07:18:23 +0000
committerMike Buland <eichlan@xagasoft.com>2011-06-03 07:18:23 +0000
commitf16f239688b632fc54684c3e0e1430fd89a67db5 (patch)
tree6a6d4f3b5d5f4974af4c3cc47c7892e46c5ef201 /src/functionclose.cpp
parent4f1e5849d4a48eb674d81164ba4baba4ad51a89f (diff)
downloadbuild-f16f239688b632fc54684c3e0e1430fd89a67db5.tar.gz
build-f16f239688b632fc54684c3e0e1430fd89a67db5.tar.bz2
build-f16f239688b632fc54684c3e0e1430fd89a67db5.tar.xz
build-f16f239688b632fc54684c3e0e1430fd89a67db5.zip
I added basic support for "opaque" type variables. I think there's one more
tweak to it that I would like to make, but it's fine for now. I also added open, close, read, and write functions. They work just fine, but I'll also add a readLine function, and maybe even a readToken function later.
Diffstat (limited to '')
-rw-r--r--src/functionclose.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/functionclose.cpp b/src/functionclose.cpp
new file mode 100644
index 0000000..ac9c6f6
--- /dev/null
+++ b/src/functionclose.cpp
@@ -0,0 +1,26 @@
1#include "functionclose.h"
2#include "filemgr.h"
3
4#include <bu/plugger.h>
5PluginInterface3( pluginFunctionClose, close, FunctionClose, Function,
6 "Mike Buland", 0, 1 );
7
8FunctionClose::FunctionClose()
9{
10}
11
12FunctionClose::~FunctionClose()
13{
14}
15
16Bu::String FunctionClose::getName() const
17{
18 return "close";
19}
20
21Variable FunctionClose::call( Variable &input, VarList )
22{
23 FileMgr::getInstance().close( (int)input.getOpaque() );
24 return Variable();
25}
26