static int search_mark;
static public tom.MutableArray all_class_metas;
static public tom.MutableArray all_instance_metas;
instance (id)
withName tom.String name
file TomFile f;
Class and Instance meta
objects for the class with the name contained in the file.
void initialize boolean bare_environment;
Meta class. The unit tom has already been loaded.
Does nothing if bare_environment. Primary action is to set the meta
classes.
instance (id) named (tom.String, tom.String) (unit, meta) inFile TomFile f;
Meta referred to by the name unit.meta (where
unit is nil to indicate absence of the unit indication), as seen
from the file. This takes into account the units visible from that
file.
public mutable Class meta;
Extension main;
tom.MutableDictionary extensions;
tom.MutableArray all_extensions;
tom.MutableDictionary attributes;
public tom.MutableIndexed behaviour_supers;
public tom.MutableIndexed state_supers;
public tom.MutableIndexed behaviour_subs;
public tom.MutableIndexed state_subs;
public Meta posed;
public Meta poser;
int mark;
search_mark the last time this meta was visited.
id initWithName tom.String name;
Class itsClass;
class of the receiving instance. The default
implementation refuses to do anything. It should be usefully
implemented by the Instance class.
Unit unit;
void addBehaviourSuper Meta m;
m to the behaviour supers. This tells m to add the
receiving meta to its behaviours subs.
protected void addBehaviourSub Meta m;
m to be a behavioural subclass of the receiving
meta.
void addStateSuper Meta m;
meta to the state supers. This tells m to add the
receiving meta to its state subs.
protected void addStateSub Meta m;
m to be a subclass of the receiving meta.
id posedSelf;
protected void setPosed Meta p pre !posed;
p.
void setPoser Meta p pre [self isInstance] == [p isInstance];
p to pose the receiving meta.
void addExtension Extension x;
Extension x to the extensions of this meta. An error
is reported (and the extension is not added) if an extension with the
same name already exists.
Extension extensionNamed tom.String name;
Extension with the name. Return the main extension
if name is nil.
void
alias Alias a
in Extension e
pre
self == [e meta] && [a isAlias];
a to the extension e.
void
constant Constant c
in Extension e
pre
self == [e meta];
c to the extension e.
void
variable MetaVariable v
in Extension e
pre
self == [e meta] && ![v isAlias];
v to the extension e.
Attribute
attributeNamed tom.String name
including (boolean, boolean, boolean, boolean, boolean, boolean) (constants, originals, aliases, supers, do_self, do_class)
excluding: Attribute to_skip = nil;
name. Iff constants, const
thingies are acceptable. Iff originals, true meta variable
declarations are accepted. Iff aliases, redeclarations of meta
variables are sought. Iff supers, super classes may aid to their
best. Iff do_self, also the receiving meta may do its best. Iff
do_class, searching continues with the class of the receiving meta
to satisfy the query, if needed.
protected (boolean, Attribute)
attributeNamed tom.String name
including (boolean, boolean, boolean, boolean, boolean) (constants, originals, aliases, do_self, do_supers)
excluding Attribute to_skip
mark int k
pre
mark <= k;
boolean isClass;
boolean isInstance;
redefine boolean isMeta;
Instance etam;
void addStateSuper Meta m;
meta to the state supers, and also with our instance.
void addSingleStateSuper Meta m;
meta only to our state supers, not with our instance.
id
initWithName tom.String name
instance Instance i;
redefine boolean isClass;
TRUE.
redefine Instance instance;
redefine void addStateSuper Meta m;
meta to the state supers, and also with our class.
void addSingleStateSuper Meta m;
meta only to our state supers, not with our class.
redefine Instance (self) instance;
redefine boolean isInstance;
TRUE.
Class itsClass;
meta.
void setPoser Instance p;
super, followed by our meta.