I have a class "ChangerBlockStorageDevice" (header/implementation) that inherits from the Apple classes (child-->parent) IOBlockStorageDevice-->IOService-->IORegistryEntry-->OSObject-->OSMetaClassBase. There is a method virtual bool ChangerBlockStorageDevice::init(OSDictionary *) that I'd like to document. The implementation basically sets one protected variable and then passes the OSDictionary (untouched) on to the superclass init. Now, obviously, I could waive my hands and just say the method "Initializes the object" and call it a day, but there's no value in that. So here are the questions I'm trying to figure out:
- When is init(OSDictionary) called and under what circumstances (and by "who")?
- What the nature of the OSDictionary parameter? How is it generated and consumed? Per the documentation for IORegistry::Init(OSDictionary *), it's "a dictionary that will become the registry entry's property table" but what does it actually contain and how are those values initially populated?
- Why might the previous developer have overridden init at all when, per Apple's comments, "This function is usually not overridden by developers." (I'd ask him, but he's unavailable).
- How might I better go about answering such questions on my own in the future?