File mu/Meta


class mu.Meta

Inherits

State supers
TypeSingle

variables

static int search_mark;
The search mark for searching through the hierarchy.
static public tom.MutableArray all_class_metas;
All class metas.
static public tom.MutableArray all_instance_metas;
Similarly, all instance metas.

methods

instance (id)
  withName tom.String name
      file TomFile f;
Designated allocator. Create new Class and Instance meta objects for the class with the name contained in the file.

void
  initialize boolean bare_environment;
Initialize the 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;
Return the 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.

instance mu.Meta

variables

public mutable Class meta;
The class of this meta.
Extension main;
The main extension.
tom.MutableDictionary extensions;
Other extensions defined for this meta, keyed on their name.
tom.MutableArray all_extensions;
All extensions, starting with the main extension, in an easy traversable indexed collection.
tom.MutableDictionary attributes;
The variables and constants in any of the extensions of this meta, keyed on their name.
public tom.MutableIndexed behaviour_supers;
Behaviour supers.
public tom.MutableIndexed state_supers;
State supers.
public tom.MutableIndexed behaviour_subs;
Behaviour subs.
public tom.MutableIndexed state_subs;
State subs.
public Meta posed;
The meta as which we pose.
public Meta poser;
The meta by which we are posed.
int mark;
The value of search_mark the last time this meta was visited.

methods

id
  initWithName tom.String name;
Designated initializer.

Class
  itsClass;
Return the class of the receiving instance. The default implementation refuses to do anything. It should be usefully implemented by the Instance class.

Unit
  unit;
Return the unit containing (the main extension of) this class.

Inheritance

void
  addBehaviourSuper Meta m;
Add the meta m to the behaviour supers. This tells m to add the receiving meta to its behaviours subs.

protected void
  addBehaviourSub Meta m;
Note the meta m to be a behavioural subclass of the receiving meta.

void
  addStateSuper Meta m;
Add the meta to the state supers. This tells m to add the receiving meta to its state subs.

protected void
  addStateSub Meta m;
Note the meta m to be a subclass of the receiving meta.

id
  posedSelf;
Return the posing meta ultimately referenced when referencing the receiving meta.

protected void
  setPosed Meta p
pre
  !posed;
Note that the receiving meta is posing as p.

void
  setPoser Meta p
pre
  [self isInstance] == [p isInstance];
Note the meta p to pose the receiving meta.

Extensions

void
  addExtension Extension x;
Add the 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;
Return the Extension with the name. Return the main extension if name is nil.

Attributes

void
  alias Alias a
     in Extension e
pre
  self == [e meta] && [a isAlias];
Note the addition of the alias a to the extension e.

void
  constant Constant c
        in Extension e
pre
  self == [e meta];
Note the addition of the constant c to the extension e.

void
  variable MetaVariable v
        in Extension e
pre
  self == [e meta] && ![v isAlias];
Note the addition of the variable 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;
Look for a meta attribute with the 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;
Undocumented.

boolean
  isClass;

Miscellaneous

boolean
  isInstance;
Undocumented.

redefine boolean
  isMeta;
Undocumented.


class mu.Class

Inherits

State supers
Meta

instance mu.Class

variables

Instance etam;
The instance of this class, i.e. the meta in the other direction.

methods

void
  addStateSuper Meta m;
Add the meta to the state supers, and also with our instance.

void
  addSingleStateSuper Meta m;
Add the meta only to our state supers, not with our instance.

id
  initWithName tom.String name
      instance Instance i;
Designated initializer.

redefine boolean
  isClass;
Return TRUE.

redefine Instance
  instance;
Return the instance of this class.


class mu.Instance

Inherits

State supers
Meta

instance mu.Instance

methods

redefine void
  addStateSuper Meta m;
Add the meta to the state supers, and also with our class.

void
  addSingleStateSuper Meta m;
Add the meta only to our state supers, not with our class.

redefine Instance (self)
  instance;
Issue an error, since instances do not have instances (only classes do).

redefine boolean
  isInstance;
Return TRUE.

Class
  itsClass;
Return the meta.

void
  setPoser Instance p;
Pass to super, followed by our meta.


Generated by tm 1.01.