FSD_File and ShapeSchema Questions

I have code that successfully writes and reads shapes using FSD_File and ShapeSchema (used the Qt sample code). I have a couple of questions:

1. Is it possible to attach the FSD_File to an existing file handle/device? I am embedding the CSF data into my own project file format (the geometry is just one part of the file), so I'd like for FSD_File to write/read directly into my already open file. Currently, I have to create a separate CSF file and then read that data back into memory so I can write it into my project file.

2. Is there a binary ShapeSchema format? The current CSF file is a plain text ASCII file, which probably takes more disk space than a binary format might.


Patrik Mueller's picture


1. FSD_Stream is a typedef for fstream. So if you make which you intherit from FSD_File or FSD_Binary file you could try to use or modify the stream. Take a look at the sources for these classes to see the steps to do it.
2) Take a look at FSD_Binary.