C ++对象序列化/反序列化的设计模式? [英] Design Patterns for C++ Object Serialization/Deserialization?

查看:111
本文介绍了C ++对象序列化/反序列化的设计模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++中是否存在对象序列化/反序列化的设计模式

?我在哪里可以找到与他们有关的信息?有人可以发布一些真实的编码示例吗?我需要

序列化/反序列化包含数据字段和指针

字段的对象。此外,并非所有字段都需要序列化/反序列化。


谢谢,

Nimmi

解决方案



" Nimmi Srivastav" < NI ************* @ yahoo.com>在消息中写道

新闻:8b ************************* @ posting.google.co m ... < blockquote class =post_quotes>在C ++中是否存在对象序列化/反序列化的设计模式?我在哪里可以找到与他们有关的信息?有人可以发布一些真实的编码示例吗?我需要序列化/反序列化包含数据字段和指针
字段的对象。此外,并非所有字段都需要序列化/反序列化。




在Serializer Pattern上查看本文。它有用C ++编写的示例代码



http://www.riehle.org/computer-scien...-serializer.pd

f


几年前我不得不写一个序列化器,这篇论文是一个非常有用的参考资料。


Michael Feathers
www.objectmentor.com


您可以尝试 www.boost.org


我相信他们有一个正常工作的图书馆。


" Michael D. Borghardt" < MI ***** @ borghardtConsulting.net>写道:

您好,请尝试 www.boost.org

我相信他们有一个正常工作的库。




* 1 *许多XP反对者的
zone,和/或机会主义否认


Are there any design patterns for object serialization/deserialization
in C++? Where can I find information pertaining to them? Can someone
post some real coding examples please? I have a need to
serialize/deserialize objects that contain data fields and pointer
fields. Furthermore, not all the fields need to be
serialized/deserialized.

Thanks,
Nimmi

解决方案


"Nimmi Srivastav" <ni*************@yahoo.com> wrote in message
news:8b*************************@posting.google.co m...

Are there any design patterns for object serialization/deserialization
in C++? Where can I find information pertaining to them? Can someone
post some real coding examples please? I have a need to
serialize/deserialize objects that contain data fields and pointer
fields. Furthermore, not all the fields need to be
serialized/deserialized.



Check out this paper on the Serializer Pattern. It has example code written
in C++:

http://www.riehle.org/computer-scien...-serializer.pd
f

I had to write a serializer several years ago and this paper was a very
useful reference.

Michael Feathers
www.objectmentor.com



Hi try www.boost.org.

I believe they have a working library.


"Michael D. Borghardt" <mi*****@borghardtConsulting.net> wrote:

Hi try www.boost.org.

I believe they have a working library.



*1* example of the EXTENSIVE REUSE that many of the XP naysayers are
either ignorant of, pathologically can''t accept because it conflicts
with their nickel and dime, baby step test driven mythological safe
zone, and or opportunistically deny for


这篇关于C ++对象序列化/反序列化的设计模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆