Wednesday, December 3, 2014

New Table Implementation

The Table class is only remaining class to be modified to utilize C++ and the STL.  The table was poorly designed and was implemented in a way that was more appropriate for C than is was for C++.  Goals of the new implementation include:
  • Eliminating the auto-generated header files, one containing code enumeration and one containing a code names array of C-style strings.
  • Eliminating some unnecessary table entry variables.
  • Eliminating the use of the untyped C-style macros.
  • Reduce the number of values needed to define each code table entry.  Currently many entries have default values.  This was somewhat alleviated by the Expression Information structure where some entries (like commands) don't have an instance of one these.  This may possibly be accomplish using inheritance and templates.
  • Making setup of the table entries easier and less error prone especially when it comes to the associated codes (which will be renamed alternate codes).
I have been investigating how to redesign the table.  Along the way I discovered some things about the table that could be simplified.  So before beginning the new design, these things will be done that may make the transition to the new design a little easier.  This work will begin in a new table topic branch.