I program software written by the Siemens company but I don't work for Siemens, I work for a university instead. Siemens keep some of their classes inaccessible to me. I can make child classes to those classes and inherit some of their functions though some of them require libraries that my child class can't find. There is a function in the parent class that is called by a lot of other functions in that parent class. I can't modify that parent class. I would like to be able to get the parent class functions to call a child class function that I write. Is that possible? Normally what I would do is simply create the equivalent functions in the child class that calls the function I want them to call but unfortunately I can't do that.
To put this in simple terms. Supposing I have a parent class called shape which has member functions drawyourself() and coloryourself(). Suppose drawyourself() calls coloryourself(). Suppose I make a child class called square which also has function coloryourself()( and I want the drawyourself() function in the parent class to call coloryourself() in the child square class. Is that possible. I am unable to create a drawyourself() function in the child square class because it uses libraries that I don't have access to and can't make the child square class have access to.