moving computers

This commit is contained in:
Nathan Braswell
2015-08-03 14:38:17 -04:00
parent f431b0305a
commit 517f9b79fb
2 changed files with 26 additions and 4 deletions

View File

@@ -247,3 +247,25 @@ obj rule (Object) {
}
}
obj state (Object) {
var kernel: vector::vector<rule>
var rest: vector::vector<rule>
fun construct(): *state {
kernel.construct()
rest.construct()
}
fun copy_construct(other: *state) {
kernel.copy_construct(&other->kernel)
rest.copy_construct(&other->rest)
}
fun operator=(other: state) {
destruct()
copy_construct(&other)
}
fun destruct() {
kernel.destruct()
rest.destruct()
}
}