File mu/Unit


class mu.Unit

Inherits

State supers
Common

variables

static tom.MutableDictionary units;
All units ever read.
static public Unit builtin_unit;
The _builtin unit, i.e. the top unit.
static int search_mark;
The search mark used to mark units already visited during traversal.

methods

redefine void
  load tom.Array arguments;
Undocumented.

instance (id)
  named tom.String name
  load: boolean load_p = NO;
The designated way of getting a unit. If it has not yet been loaded, and the optional load_p is TRUE, it will be loaded, plus anything upon which it depends. Adjusts all_user_units and all_units.

tom.Mapped
  units;
Return the tom.Mapped tom.Collection of units.

instance mu.Unit

variables

public tom.String name;
The name of this unit, sans extension.
public tom.String directory;
The directory containing this unit.
tom.MutableArray used;
The other units this unit depends on.
tom.MutableDictionary files;
The files in this unit.
tom.MutableDictionary metas;
The metas defined in this unit, such that the instance U.M is in the metas of the unit U.
tom.MutableSet unit_types;
The types when a file of this unit is read.
int mark;
The mark used when searching in units.

methods

id
       init tom.String n
  directory tom.String d;
Designated initializer.

void
  addMeta Meta m;
Undocumented.

TomFile
  fileNamed tom.String name;
Return the file named name.

Meta
  metaNamed tom.String meta_name
   recurse: boolean rec_p = NO;
Designated way to obtain a meta. Iff !rec_p, only the receiving unit will be searched. Otherwise, all units transitively being depended upon are also searched. Upon multiple meta's with the same name being found, it is not an error if the receiving unit defines one, since that one will be returned.

private (boolean, Meta)
  metaNamed tom.String meta_name
      found Meta found
       mark int k;
Search for the meta named meta_name, using the mark k to prevent multiple visits. found is the meta already found.

tom.Mapped
  files;
Return the tom.Mapped collection of files.

tom.Mapped
  metas;
Return the tom.Mapped collection of metas.

tom.MutableSet
  types;
Return the unit_types, creating it if necessary.

void
  types tom.MutableSet set
   mark int k;
Add the names of the metas from the receiving unit, and any unit that it uses, to the set.

tom.Indexed
  used;
Return the used units. This is nil if this unit uses no other units.

tom.OutputStream
  writeFields tom.OutputStream s;
Emit the name.

TomFile
  fileWithName tom.String name;
Create and return a new file contained in this unit.

void
  uses tom.String name;
Called by the lexer to inform us of another unit we depend on.


Generated by tm 1.01.