summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-16 20:13:11 +0000
committerSteven Barth <steven@midlink.org>2008-03-16 20:13:11 +0000
commit38d279e4eaf840ef014e0a76e4f1857d284d36b2 (patch)
treefe96e10663c14be508136b8215f6f1ae5865a0f6
parent03ad2398aae1f745266118a9e94ed4636a3872eb (diff)
* CBI update
-rw-r--r--src/ffluci/cbi.lua22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/ffluci/cbi.lua b/src/ffluci/cbi.lua
index b0e6df8cc..de02699de 100644
--- a/src/ffluci/cbi.lua
+++ b/src/ffluci/cbi.lua
@@ -26,14 +26,30 @@ limitations under the License.
]]--
module("ffluci.cbi", package.seeall)
require("ffluci.util")
+local class = ffluci.util.class
-- Node pseudo abstract class
-Node = ffluci.util.class()
-function Node.render(self)
+Node = class()
+
+function Node.__init__(self, title, description)
+ self.children = {}
+ self.title = title
+ self.description = description
end
+
function Node.append(self, obj)
+ table.insert(self.children, obj)
end
-Map = ffluci.util.class(Node)
+-- CBI Map
+Map = class(Node)
+
+function Map.__init__(self, ...)
+ Node.__init__(self, ...)
+end
+
+function Map.render(self, template)
+ -- ToDo
+end