How to use set_type_override_by_type to override multiple extended classes from same base class

In reply to ANASHKU:

I do not understand your question. Most of the time factory override calls happen in a different method or even a different class from where the create() happens. And you only create the base class object

b_c = base_class::type_id::create(...)

and let the overrides decide if an extended class needs to be constructed instead.

The set_type_override_by_type() method replaces any previous type overrides by default. The set_inst_override_by_type() method does the opposite, first inst override takes precedence.