Check config design
From Emergent
Contents |
Check config
overridables:
- bool CheckConfig_impl(quiet); // rarely overridden
- void CheckThisConfig_impl(quiet, &rval)
- void CheckChildConfig_impl(quiet, &rval)
top guys:
- bool CheckConfig(quiet) //calls _Gui with "no confirm"
- bool CheckConfig_Gui(confirm_success, quiet)
- this guy does the Start/End nesting thing, and gives feedback
- taMisc::CheckConfigStart(confirm, quiet)
- taMisc::CheckConfigEnd(ok)
use in pairs -- first Start controls mode/params any nested calls of End(false) force error state for everyone last End guy does gui stuff
- taiMiscCore -- nogui feedback
- taiMisc -- gui feedback
in all Check routines:
- CheckError(test, quiet, rval, "msg") for taBase objects -- automatically adds the type and path name of the object, for much more informative and easy error msgs. Returns value of test so you can do:
if(CheckError(!ptr, quiet, rval, "pointer ptr is null")) {
return false; // fatal
}
- taMisc::CheckError for errors
