mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 09:49:05 +00:00
36f39152e5
--HG-- branch : gsoc2012-achievements
42 lines
No EOL
740 B
PHP
42 lines
No EOL
740 B
PHP
<?php
|
|
abstract class RenderNodeIterator {
|
|
private $nodes = array();
|
|
|
|
function getSize() {
|
|
return sizeof($this->nodes);
|
|
}
|
|
|
|
function getChild($i) {
|
|
return $this->nodes[$i];
|
|
}
|
|
|
|
function isEmpty() {
|
|
return (sizeof($this->nodes) == 0);
|
|
}
|
|
|
|
function getChildren() {
|
|
return $this->nodes;
|
|
}
|
|
}
|
|
|
|
abstract class AchList extends RenderNodeIterator {
|
|
private $child_done = array();
|
|
private $child_open = array();
|
|
|
|
function getDone() {
|
|
return $this->child_done;
|
|
}
|
|
|
|
function getOpen() {
|
|
return $this->child_open;
|
|
}
|
|
|
|
function hasOpen() {
|
|
return (sizeof($this->child_open) != 0);
|
|
}
|
|
|
|
function hasDone() {
|
|
return (sizeof($this->child_done) != 0);
|
|
}
|
|
}
|
|
?>
|