makeAttributeAnnotation(container,
instance,
attName,
attValue)
| source code
|
returns a typed annotation for attValue within container.
When attValue is a literal, this is largely trivial. If it's a
reference, this figures out what it points to and creates an annotation
of the appropriate type (e.g., ColumnAnnotation, ParamAnnotation,
etc).
container in current DaCHS should be a TableDef or something similar;
this function expects at least a getByName function and an rd
attribute.
instance is the root of the current annotation. Complex objects
should keep a (weak) reference to that. We don't have parent links in
our dm trees, and without a reference to the root there's no way we can
go "up".
This is usually used as a callback from within sil.getAnnotation and
expects Atom and Reference instances as used there.
|