[serialization] Support for Boost.Container?
I see that Boost.Serialization has support for serializing STL containers, such as std::vector. However, I can't seem to serialize a boost::container::vector. Do I need to do something special to get this to work, or is it not supported? I need guaranteed support for incomplete types, so I can't use an STL vector. If it is not supported, what is my best bet, for now? Are there any plans to do so? Using Boost.Serialization with Boost.Container is something I would expect to just work, and it seems like most of the STL code could be reused. Thanks.
Jensen, Erik A wrote:
I see that Boost.Serialization has support for serializing STL containers, such as std::vector. However, I can't seem to serialize a boost::container::vector. Do I need to do something special to get this to work, or is it not supported? I need guaranteed support for incomplete types, so I can't use an STL vector.
If it is not supported, what is my best bet, for now? Are there any plans to do so?
My policy is: a) I implemented serialization for all standard library containers and objects b) for boost libraries, the respective authors are encouraged to implement serialization for their own libraries.
Using Boost.Serialization with Boost.Container is something I would expect to just work, and it seems like most of the STL code could be reused.
It likely could - if you implement this feel free to request that the person responsible for Boost.Container add the facility to his library. Robert Ramey
Thanks.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
<rant> IMO, the enforcement of private data encapsulation is, in the end, counterproductive. I much prefer the python approach: private is a 'suggestion', not a demand. If c++ community worked this way, serialization could be added externally to any code. </rant>
Neal Becker wrote:
<rant> IMO, the enforcement of private data encapsulation is, in the end, counterproductive. I much prefer the python approach: private is a 'suggestion', not a demand.
I don't know what this refers to.
If c++ community worked this way, serialization could be added externally to any code.
Again, I'm not sure what what this means. Robert Ramey
</rant>
Le 07/02/13 14:16, Neal Becker a écrit :
<rant> IMO, the enforcement of private data encapsulation is, in the end, counterproductive. I much prefer the python approach: private is a 'suggestion', not a demand.
If c++ community worked this way, serialization could be added externally to any code. </rant>
Well, Boost.Container as any container allows to iterate on all its members so I don't see a problem to add the serialization externally, do you? Vicente
On 2013-02-07 12:44, Vicente J. Botet Escriba wrote:
Le 07/02/13 14:16, Neal Becker a écrit :
<rant> IMO, the enforcement of private data encapsulation is, in the end, counterproductive. I much prefer the python approach: private is a 'suggestion', not a demand.
If c++ community worked this way, serialization could be added externally to any code. </rant>
Well, Boost.Container as any container allows to iterate on all its members so I don't see a problem to add the serialization externally, do you?
It is very easy to add serialization externally for containers where support is not already provided. I have had to do this for a number of Boost containers for software that I am working on. While having it "just work" as the OP suggested would be nice, it's not a lot of work IMHO to add it externally. Tim
El 06/02/2013 22:56, Jensen, Erik A escribió:
I see that Boost.Serialization has support for serializing STL containers, such as std::vector. However, I can’t seem to serialize a boost::container::vector. Do I need to do something special to get this to work, or is it not supported? I need guaranteed support for incomplete types, so I can’t use an STL vector.
If it is not supported, what is my best bet, for now? Are there any plans to do so? Using Boost.Serialization with Boost.Container is something I would expect to just work, and it seems like most of the STL code could be reused.
I don't know much about Boost.Serialization support but the best you can do is add a ticket to Boost.Container so at least this new feature is not forgotten. Maybe we can get some help from people with Boost.Serialization experience to get the work done. Best, Ion
Ion Gaztañaga wrote:
I don't know much about Boost.Serialization support but the best you can do is add a ticket to Boost.Container so at least this new feature is not forgotten. Maybe we can get some help from people with Boost.Serialization experience to get the work done.
This is a good policy. I would encourage the person who needs this to develop it as an edition to the Boost.Container library (which includes testing and documentation of course!). That you can review and test and perhaps incorporate in the library. I think this has been done in several case with success. This scalable, demand driven approach will result in the most efficient use of resources. Robert Ramey
participants (6)
-
Ion Gaztañaga
-
Jensen, Erik A
-
Neal Becker
-
Robert Ramey
-
Tim Moore
-
Vicente J. Botet Escriba