I tried to write it in a similar style as the rest of your code. I hope that it's close enough that you can fix/refine it so that it can make it into your codebase. I find that I'm syncing my codelite workspaces with subversion nearly daily.