Boost logo

Boost Users :

Subject: [Boost-users] Deserializing Boost archives using C#
From: Robert Fairlie (rfairlie_at_[hidden])
Date: 2013-07-30 16:05:39


Hi,

I'm currently writing a component in C++ which creates a hierarchy of
objects, and serializes them using the Boost serialization library. The
serialized archive consists of a root "Document" object, which consists of
an STL vector of "Pages". Each page consists of an STL vector of other
object types, which themselves have sub-objects. The platform is Microsoft
Windows.

At some time in the future I want to port the component to C#. One option
would be to call the Boost library from C# using interop, but I'd rather try
to code it completely in C#, as that would bring a lot of portability
benefits.

What I'd ideally like to do therefore is in the future to deserialize with
C# any files currently being saved with C++. Since Boost provides XML
archives I thought I'd look at changing from my current text archives to XML
archives. That was straightforward and I'm now saving to XML archives.

I'm now starting to look at whether it possible to deserialize an XML
archive using C#, possibly by writing a skeleton test component in C#. I'm
pretty familiar with C#, but not XML serialization in C#, so I'm not sure
yet how to map the XML elements (and class ids ?) to C# objects. In the
meantime I was wondering if any one has done anything like this or had any
thoughts on whether this approach is feasible?

Thanks for any advice,

Robert Fairlie

--
View this message in context: http://boost.2283326.n4.nabble.com/Deserializing-Boost-archives-using-C-tp4650123.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net