I have been looking everywhere for this. I use Borland C++ Builder, and part of the functionality of the TObject class is the InheritsFrom function. I'd like to implement this for a series of classes I'm writing that are just basic c++ classes (not part of the VCL).
Is there an easy way in standard c++ to determine if one class inherits from another? I'd like to write a function that will be inherited from my base class so I only have to write it once. Something like this:
In Aspect Oriented Programming, this is called a Cross Cut. You may want to use that as the basis for a web search.
Before you begin, I'll say categorically that C++ does not support AOP, it's primarily available on Smalltalk derived languages (like Java and C#), but someone may have tried to meld the two somewhere.