|
Application developers often need to perform operations (such as display) that are not provided by
ACIS. When the operation depends on the type of entity being operated upon, the developer has two implementation options. If they have source for
ACIS, they can add a virtual method to
ENTITY and its derived classes. Otherwise, they can provide a function which uses an
if-else-if construct to determine the entity type and take appropriate action. Unfortunately, neither of these methods works well when two or more components may optionally be used together. For example, if component
A defines a method or function to display entities, there is no way, without having source, for component
B to tell component
A how to display any new entity types it derives.
|