Run-time Virtual Methods
List of: Discussion Topic
Subjects: C++ Interface, Extending ACIS
Contents: Application Development Manual

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.

The run-time virtual method mechanism solves these problems by allowing components to define new virtual methods with run-time binding, similar to the way attributes allow data to be added to entities.
PDF/APPDEV/08EXT.PDF
HTM/DATA/ACIS/APPDEV/08EXT/0044.HTM