I am using OCAF and I am creating documents with attributes of our own types and for that I am using our own presentation drivers. Some of my attributes contain instances of Geom_BoundedCurve and I would like to add them to the persistence mechanism. How can I store Geom_BoundedCurves to binary OCAF documents?
There are two possibilities that I am considering:
1. Replace all my function arguments "Geom_BoundedCurve" with "Adaptor3d_Curve" and use GeomAdaptor_Curve instead of Geom_BoundedCurve. Then while writing the OCAF document to disk, create a TopoDS_Edge out of every Geom_BoundedCurve and store it as a TNaming_NamedShape attribute to the same label as its parent attribute. When retrieving it, use a BRepAdaptor_Curve to be able to call the necessary functions again after retrieval.
2. Use BinTools_CurveSet to "convert" each Geom_BoundedCurve to a string, store the string with BinObjMgt_Persistent::PutCString(...) and when retrieving the curve, convert the string to a curve using again the methods of BinTools_CurveSet.
Both possibilities do not seem that elegant. Is there another possibility? Is there a standard way to store Geom_Curves to OCAF documents, that I am not aware of?
Thank you very much!