Dead Simple Persistence Library (DSPL)
Posted: 27 Sep 2011 16:31
There was a question elsewhere in the forum (http://www.rjsoftware.se/Forum/viewtopi ... 8&start=15) about retaining some values through various invocations of a script. While TE's scripting engine doesn't directly offer a "persistence library", the necessary machinery to create one exists in the WStrings object.
So, using that, I knocked up a quick and dirty persistence library (dubbed DSPL for "Dead Simple Persistence Library). It's not fancy, and provides only basic functionality, but I think it might come in handy.
I've attached a zip file that contains 2 script files. First, the DSPL itself (DSPL.cpp). Secondly, a test file named DSPL_test.cpp. The second file just includes the library file and provides example uses of some of the library methods.
To use the library, just "#include" DSPL.cpp in your script files (see DSPL_test.cpp for an example)
Hopefully, someone will find this useful.
Jeff Godfrey
So, using that, I knocked up a quick and dirty persistence library (dubbed DSPL for "Dead Simple Persistence Library). It's not fancy, and provides only basic functionality, but I think it might come in handy.
I've attached a zip file that contains 2 script files. First, the DSPL itself (DSPL.cpp). Secondly, a test file named DSPL_test.cpp. The second file just includes the library file and provides example uses of some of the library methods.
To use the library, just "#include" DSPL.cpp in your script files (see DSPL_test.cpp for an example)
Hopefully, someone will find this useful.
Jeff Godfrey