|
Boost Users : |
Subject: Re: [Boost-users] Developing a new boost archive
From: Roberto Fichera (kernel_at_[hidden])
Date: 2012-02-15 10:26:12
On 02/13/2012 05:13 PM, Robert Ramey wrote:
> Roberto Fichera wrote:
>> Hi All in the list,
>>
>> I'm basically new to boost so I hope to find support here to
>> integrate my own serialization library within the boost archive logic.
Just to say that I've solved all my problems. My own boost archive it's finally
able to serialize everything that is defined in terms of boost serialization into
my serialization infrastructure which finally maps everything into our supported
formats.
I had to do so because I need keep compatibility across different supported
languages, framework and architecture using formats like matlab native mxArray
or python native pyobject. Especially matlab was really important because now
I can "materialize" boost object in the matlab workspace very easily.
I'll check the possibility to freely release a boost archive that maps object
defined in terms of boost serialization, without using my serialization
framework of course, into matlab workspace using a set of Mex functions or a
very small API to use inside a Mex.
So far so good! Since I need to get dynamically the type name as string,
I have actually implemented the "stringify" of the type name via the code
below:
template< typename T >
inline const char* type_name()
{
return (char*)
#if defined(__GNUC__) && defined(__cplusplus)
abi::__cxa_demangle( typeid( T ).name(), 0, 0, NULL );
#else
typeid( T ).name();
#endif
}
which of course uses the specific g++ demangler that follow a non standard way
(I'd to follow a similar approach for the MSVC). So, my question is does the
boost library provide a standard way to get the type name as string?
> I looked at your post and had a lot of difficulty in figuring out
> how I could help you. I think the above statement is the source
> of my difficulty.
>
> If you have you're own serialization library, what do you
> need the boost one for? If you want to use the boost one,
> what does your own library have to do with anything?
>
> I should say that creating one's own archive implementation
> is harder than it should be. This is due to the fact that
> documentation and implementation of some details
> of this process are ambiguous and non-obvious. None-the-less
> a number of people have managed to create their own
> archive implementations without too much problem - os
> it IS doable. It does require knowledge of template
> meta-programming and investigation of ohw the current
> libraryies are implemented.
>
> If you want to make an archive implementation which
> some format not supported by the current ones, that
> would be a quesion we might be able to help with. If
> this is what you want to do, you might look at simple log
> archive and trivial archive in thedocumentation. Also there
> are a few other archives around which illustrate how this
> ahs been done. There is one for yaml and one for json
> these are in the sandbox and/or vault. There is also
> included in the package a portable_binary_archive.
> Also special archive implementations have been created
> to support MPI.
>
> Looking at your specific question, I can only say
> I think you need to invest more time in studying the
> above mentioned subjects before I could be of help.
>
> Robert Ramey
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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