lundi 26 octobre 2015

Template Object of type function

So I'm making a application framework, every class basically inherits YObject, my Application manager handles any object that gets added to the class, I want to make a function like

ObjectType* object = Application->object_of<ObjectType>();

I'm not really sure how exactly to do this, I've heard one of the C++ casts can be used to determine if ObjectType derives from YObject, but I'm not sure!

Aucun commentaire:

Enregistrer un commentaire