summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/src/bin/lua/define.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tolua++/src/bin/lua/define.lua')
m---------lib/tolua++0
-rw-r--r--lib/tolua++/src/bin/lua/define.lua63
2 files changed, 0 insertions, 63 deletions
diff --git a/lib/tolua++ b/lib/tolua++
new file mode 160000
+Subproject 9181fc9ef73fa1c052f968d68dc60538f144a47
diff --git a/lib/tolua++/src/bin/lua/define.lua b/lib/tolua++/src/bin/lua/define.lua
deleted file mode 100644
index 96a28d878..000000000
--- a/lib/tolua++/src/bin/lua/define.lua
+++ /dev/null
@@ -1,63 +0,0 @@
--- tolua: define class
--- Written by Waldemar Celes
--- TeCGraf/PUC-Rio
--- Jul 1998
--- $Id: define.lua,v 1.2 1999/07/28 22:21:08 celes Exp $
-
--- This code is free software; you can redistribute it and/or modify it.
--- The software provided hereunder is on an "as is" basis, and
--- the author has no obligation to provide maintenance, support, updates,
--- enhancements, or modifications.
-
-
--- Define class
--- Represents a numeric const definition
--- The following filds are stored:
--- name = constant name
-classDefine = {
- name = '',
-}
-classDefine.__index = classDefine
-setmetatable(classDefine,classFeature)
-
--- register define
-function classDefine:register (pre)
- if not self:check_public_access() then
- return
- end
-
- pre = pre or ''
- output(pre..'tolua_constant(tolua_S,"'..self.lname..'",'..self.name..');')
-end
-
--- Print method
-function classDefine:print (ident,close)
- print(ident.."Define{")
- print(ident.." name = '"..self.name.."',")
- print(ident.." lname = '"..self.lname.."',")
- print(ident.."}"..close)
-end
-
-
--- Internal constructor
-function _Define (t)
- setmetatable(t,classDefine)
- t:buildnames()
-
- if t.name == '' then
- error("#invalid define")
- end
-
- append(t)
- return t
-end
-
--- Constructor
--- Expects a string representing the constant name
-function Define (n)
- return _Define{
- name = n
- }
-end
-
-