superclass - How to initialize class and override its parent in MQL?

I've two classes: Chart which extends Market.I'd like to initialize the Chart class, but providing the pointer to already existing parent class to save some memory (to avoid initialization of new instances if it can point to the same thing).Here is the code:class Market { public: void Market(Market *_market) { this = GetPointer(_market); // Error: '=' object required }};class Chart : public Market { public: void Chart(Market *_market) : Market(_market) { }};however it fails with: '=' object requiredIs is possible to override...Read more

superclass - Ontologies - Do superclasses get instances of their subclasses?

My question is about superclass inheritance. My understanding says that if I have instances that belong to Class B, then Class A which is the mother class of Class B will also have these instances. For instance: suppose I have a superclass called Car, and two subclass classes Sedan and SUV. The instances of classes Sedan and SUV are also instances of the class Car, is that correct? If it is the case, then I cannot see any return of my sparql query when I say give me all instances of class Car. Am I missing anything here?I am using Topbraid edit...Read more