Dead Simple Persistence Library (DSPL)

Ask questions about how to create a script or swap scripts with other users.
Post Reply
jgodfrey
Posts: 471
Joined: 19 Aug 2011 23:02
Location: Missouri, USA

Dead Simple Persistence Library (DSPL)

Post 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
Attachments
DSPL.zip
(1.54 KiB) Downloaded 662 times
Sladdir
Posts: 18
Joined: 20 Sep 2011 13:27

Re: Dead Simple Persistence Library (DSPL)

Post by Sladdir »

It works greatly! Once again, many thanks to you! :)
jgodfrey
Posts: 471
Joined: 19 Aug 2011 23:02
Location: Missouri, USA

Re: Dead Simple Persistence Library (DSPL)

Post by jgodfrey »

Sladdir wrote:It works greatly! Once again, many thanks to you! :)
That's great Sladdir. Thanks for the feedback.

Jeff
Post Reply