Page 1 of 1

Dead Simple Persistence Library (DSPL)

Posted: 27 Sep 2011 16:31
by jgodfrey
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

Re: Dead Simple Persistence Library (DSPL)

Posted: 27 Sep 2011 18:04
by Sladdir
It works greatly! Once again, many thanks to you! :)

Re: Dead Simple Persistence Library (DSPL)

Posted: 27 Sep 2011 18:34
by jgodfrey
Sladdir wrote:It works greatly! Once again, many thanks to you! :)
That's great Sladdir. Thanks for the feedback.

Jeff