I'm writing some MFDs for version 100830, and am wondering about opcSaveState() and opcLoadState(). I realize these functions have already been discussed, and the question I'm about to ask has been brought up, but I haven't been able to find a definitive answer. (I did search and read; if the answer's there I simply missed it, sorry.)
As far as I can tell, they're undocumented; I've looked for them in several versions of the API Reference and don't find them mentioned anywhere. But I do find this on p. 186 of the current (100830) API reference:
"Note that most of the top-level plugin callback functions (opcXXX) are now obsolete and should no longer be used. Addon modules should instead create an instance of a class derived from the oapi::Module class during InitModule, and overload the appropriate class-level callback functions."
OK, I was already doing that anyway, to use clbkPreStep() and clbkPostStep() instead of opcPreStep() and opcPostStep. I didn't see anything in the Module class that looked like it might replace opcSaveState() and opcLoadState(). Just for kicks, I added clbkSaveState(FILEHANDLE scn) to my oapi::Module-derived instance, thinking that maybe that was the successor to opcSaveState() and it had just slipped through the cracks for the documentation, but nothing happened.
I also looked through the 100830 API Reference to see if I could find any listed functions that seem to resemble the two opcXXXes I'm asking about; I did find a clbkSaveState() function in the VESSEL2 class, but that doesn't seem right.
So -- what's the official status of these functions? Are they obsolete or aren't they? And if they are obsolete, what should we be using instead?
As far as I can tell, they're undocumented; I've looked for them in several versions of the API Reference and don't find them mentioned anywhere. But I do find this on p. 186 of the current (100830) API reference:
"Note that most of the top-level plugin callback functions (opcXXX) are now obsolete and should no longer be used. Addon modules should instead create an instance of a class derived from the oapi::Module class during InitModule, and overload the appropriate class-level callback functions."
OK, I was already doing that anyway, to use clbkPreStep() and clbkPostStep() instead of opcPreStep() and opcPostStep. I didn't see anything in the Module class that looked like it might replace opcSaveState() and opcLoadState(). Just for kicks, I added clbkSaveState(FILEHANDLE scn) to my oapi::Module-derived instance, thinking that maybe that was the successor to opcSaveState() and it had just slipped through the cracks for the documentation, but nothing happened.
I also looked through the 100830 API Reference to see if I could find any listed functions that seem to resemble the two opcXXXes I'm asking about; I did find a clbkSaveState() function in the VESSEL2 class, but that doesn't seem right.
So -- what's the official status of these functions? Are they obsolete or aren't they? And if they are obsolete, what should we be using instead?