verb_cache.c--
./world-0.6/src/verb_cache.c-- · 688 B
From the archive Glacier-0.6.tar.gz
Download the archive « Back to the archive contents
The verb cache
This object acts as a delegate for $has_verbs. It keeps track
of the verb templates provided by all objects.
parent root
object verb_cache
var root name 'verb_cache
var verb_cache templates #[]
eval
.initialize();
.
method object_defined_verb
arg template;
if (caller() != $has_verbs)
throw(~perm, "Caller is not $has_verbs.");
templates = dict_add_elem(templates, template, sender());
.
method object_undefined_verb
arg template;
if (caller() != $has_verbs)
throw(~perm, "Caller is not $has_verbs.");
templates = dict_del_elem(templates, template, sender());
.
method templates
return dict_keys(templates);
.