Skip to content

Add RuntimeTypeContainer

David Thompson requested to merge dcthomp/smtk:runtime-arcs into master

RuntimeTypeContainer is a new subclass of TypeContainer. The base TypeContainer class can only hold a single object of a given type. When applications handle many objects that share a common base type (i.e., whose complete type is unknown since only a pointer to a base type is held), there was no way to insert these distinct objects into a TypeContainer even if their complete types were distinct.

To resolve this issue, the RuntimeTypeContainer class allows you to insert objects by their base type but use a "declared type-name" as the key. As long as these declared type-names are unique, multiple objects sharing the base type can be held by the container simultaneously.

Edited by David Thompson

Merge request reports