Give me a few days, I'll release some developer documentation. At a high level the main app operates a standard loop. The Library (when initialised) registers the data types its supports as well as the key subroutines to handle the parsing action. When a parse action is initiated, the main app loops; each time operating on one of the registered data types, the main app provides a support library for opening/closing/reading and writing files and calling the registered Library handlers for:Quote:
Originally Posted by morgurth
- Parsing the data into internal data structures - I used HASH tables for 5E
- Generating lists of data - for FGII's window lists
- Writing the data out in module XML
- Writing the modules's definition (again in XML)
If you take a look at the PAR5Ednd5elib.pm and/or the PAR5Etemplatelib.pm in the subfolder PAR5E, you can get an idea of how it works. Each library exports 3 public routines: initLibrary(), registerDataItems() and registerCustomActions() which perform the initial registration of data and routines.
PAR5E uses abstracted subroutine references to call the custom action routines like parseData, generateReferenceList, copyImages, copyTokens, writeData, writeDefinition, writeReferenceLibrary. Each of these routines is either passed a string to parse or an XML writer object to work on.
