Wednesday, January 14, 2015

Table – Single Instance

The find code function was the last function in the translator using the table reference member of the class.  The recreator and program model classes also no longer used their table reference members.  Both the translator and recreator classes contained a table access function for use by the various translate and recreate functions of the codes.  These functions were no longer using this access function, so these access functions were removed.  The table reference members were removed from these classes.  (The table reference member has already been removed from the parser class.)

The table reference members were initialized from the static table instance function.  Upon the first call to this function, the table instance is created and initialized.  With the removal of all of the table reference members, there were no calls left to initialize the table.  This function (along with the static table instance member) was replaced with a static table instance in the table source file.  This required the table constructor to be made public.

[branch table commit 2c22674e61]