registry top-level property

Registry registry
final

The registry contains all registered Tapers. It makes these tasks possible:

  • Given a TaperOrSemiTaper, get its type code in O(1).
  • Given a type code, get a TaperOrSemiTaper in O(1).
  • Given an Object, get a Taper.
    • If the static type of the object equals its runtime type, in O(1).
    • If it doesn't, in somewhere between O(log n) and O(n), depending on the type hierarachy.

To do that efficiently, it contains several data structures.

Implementation

final registry = Registry();