Uniqueness of tags?

Richard Durbin rd at sanger.ac.uk
Wed Aug 30 03:49:41 EST 2000


?BaseClass2 UNIQUE PointsTo ?BaseClass1
                   PointsTo ?Sub1BaseClass1
                   PointsTo ?Sub2BaseClass1

is not legal, but

?BaseClass2 Points_to UNIQUE Points_to_BaseClass1 ?BaseClass1
			     Points_to_Sub1BaseClass1 ?Sub1BaseClass1
                             ...

is, and probably does what you want.  You can get to the thing you are
pointing to by Points_to:2 (old query syntax) or Points_to[2] (AQL
syntax), while you can load data by Points_to_XXX.

But I don't really understand your approach, which certainly does not
look natural acedb style to me.

I suggest one of the following approaches:

- if the subclass only inherits from one base class, then incorporate
  all of its model additions into the base class model as a branch
  under some tag such as SubClass1.  Next make an acedb subclass of all
  objects for which that tag is set.  As soon as objects contain data
  on the branch they will become part of the subclass, whereas
  objects for which there is no data in that branch will not be in the
  subclass.

- if you want to inherit multiple interfaces, then make models for
  them not associated to any class, then incorporate this model either
  by copying or by #Model consrtruction into all the models which you
  want to have these properties.  See for example the usage of the
  model fragment

	Map ?Map #Map_info 

  in the model set distributed with the code, which allows objects to
  be placed on map displays.  This can (and is) used in the models of
  many classes.

Richard








More information about the Acedb mailing list