Archived

This forum has been archived. Please start a new discussion on GitHub.

enumerate derived class names of a given slice class

Wondering if there is already an API to retrieve the list of type IDs of all derived SLICE classes for a given SLICE class?

For example, suppose one have a slice:
class Food {};
class BakedFood extends Food {};
class Bread extends BakedFood{};

The list of "Food" "BakedFood" "Bread" can be returned by calling the API with type ID "food".

Comments

  • Do you mean a reflection API? No, Ice does not have this. However, at runtime, you can get a list of all IDs from a given Ice::Object instance with ice_ids().