initialize - static table function to be called once (from main) to create the single instance and it made sure it was not called more than once or if the table entries had errorsThe table constructor had an argument for the pointer to the table entry array and only set the table entry member. Most of these routines were unnecessary and the single table instance creation was modified for these routines:
has errors - static table function to return if the table has errors, used by the tester class to determine if the table entries had errors, outputs them and aborted the application
error list - static table function to return the list of error, used by the test class to output the table entry errors before aborting the application
setup and check - static table function called by initialize after creating the single table instance to setup and check the table entries
instance - static table function to return a reference to the single table instance, contains checks to make sure that initialize had been called and that the table entries had no errors; and for these errors would abort the application
instance - static table function to return the single table instance, and will create the single table instance upon the first callNow if there are table entry errors, the constructor aborts the application and no other class needs to check for table errors. This check was removed from the tester class. Previously when starting in GUI mode, there was no check for table errors. There is no longer a need to initialize the table in the main function or check to make sure it has been initialized.
constructor - modified to take both the pointer to the table entry array and the count of table entries, now does the setup and check functionality, and if there are errors, they are reported and the application is aborted
The method the program model uses to initialize its table instance reference is the preferred method. The instance function is used to initialize the table instance reference member. The parser and translator classes were modified to use this method.
[commit 7a01ac428b]
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)