repo.or.cz
/
uboot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix/workaround: removed glitches with scaling and quads
[uboot.git]
/
inheritance.lua
blob
07a8016d2954f54c0f21376d1a6b711753fb93a8
1
--[[
2
this function is used to implement inheritance
3
]]
--
4
function
inherits
(
baseClass
)
5
6
local
new_class
= {}
7
local
class_mt
= {
__index
=
new_class
}
8
9
function
new_class
:
new
(
o
)
10
setmetatable
(
o
,
class_mt
)
11
return
o
12
end
13
14
setmetatable
(
new_class
,{
__index
=
baseClass
})
15
16
return
new_class
17
end
18
19