enumerate derived class names of a given slice class

peterlspotpeterlspot Peter LauOrganization: SelfProject: StudyMember
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

  • marcmarc FloridaMarc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications EngineAdministrators, ZeroC Staff ZeroC Staff
    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().
Sign In or Register to comment.