Simple OO question about class data movement

Hi,
I have a situation similar to this kind of example:
I have AActor Bob spawning in the world. At a completely user determined time, DoctorClass needs to run through Bob’s various properties and run methods/tests on them.

What’s the most elegant way in OO terms of having Bob pass his info over? Interface doesn’t seem correct because it seems to involve inheritance, I’m a little wary of callbacks because it seems heavy handed for something that seems simple in c++/OO. I don’t need a specific code solution, just an idea of what avenue to pursue in this case and why.

Thanks!

I’m not sure I understand the question. If you have a reference to Bob then you can just access all of it’s public data via Bob->Variable. So normally you’d just call a function on DoctorClass with a reference to Bob.

Interfaces don’t involve inheritance. They just set the rules for interaction with Bob so Doctor couldn’t rip off Bob’s kidneys due to incompetence. And **methods **are exactly the commands that Doctor would be allowed to call on Bob.

You can have methods in Bob that return necessary information when called by Doctor. Bob can even do the tests himself inside those methods and return the results.

You are right about callbacks. They are suited for asynchronous things like web.

Thanks guys, definitely helped clarify the solution!