Design Patterns for C++ Object Serialization/Deserialization?

N

Nimmi Srivastav

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
 
M

Michael Feathers

Nimmi Srivastav said:
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-science/research/1996/plop-1996-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
 
U

Universe

Michael D. Borghardt said:
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 $$$ and fame, "I'm the
alternative" reasons.


"Welcome to Boost.org!

The Boost web site provides free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. The libraries are intended to be widely useful, and
are in regular use by thousands of programmers across a broad spectrum
of applications.

A further goal is to establish "existing practice" and provide
reference implementations so that Boost libraries are suitable for
eventual standardization. Ten Boost libraries will be included in the
C++ Standards Committee's upcoming C++ Standard Library Technical
Report as a step toward becoming part of a future C++ Standard.

Although Boost was begun by members of the C++ Standards Committee
Library Working Group, participation has expanded to include thousands
programmers from the C++ community at large"


*****************END EXCERPT

Elliott
 
B

Ben Measures

Universe said:
*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 $$$ and fame, "I'm the
alternative" reasons.

Eh?...

Perhaps your point could be better conveyed by shorter sentences.
 
R

Robert C. Martin


I've heard some very good things about this library. Actually, I have
some C++ work ahead of me, and this post reminded me about Boost. I
look forward to using it.

-----
Robert C. Martin (Uncle Bob)
Object Mentor Inc.
unclebob @ objectmentor . com
800-338-6716

"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
 
P

Peter Ammon

Universe said:
*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 $$$ and fame, "I'm the
alternative" reasons.

[snip stuff]

Lots of words but few links. Can you be so kind as to point out the
serialization library? I can't find it at
<http://www.boost.org/libs/libraries.htm>

-Peter
 
P

Peter Ammon

Peter said:
Universe said:
*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 $$$ and fame, "I'm the
alternative" reasons.


[snip stuff]

Lots of words but few links. Can you be so kind as to point out the
serialization library? I can't find it at
<http://www.boost.org/libs/libraries.htm>

-Peter

Never mind, someone else pointed it out. It wasn't on the libraries
page because it hasn't been accepted into Boost yet.
 
M

Michael D. Borghardt

Hi.

Sorry about that I read the boost development newgroup at news server
news://news.gmane.org

the group is gmane.comp.lib.boost



Peter Ammon said:
Universe said:
*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 $$$ and fame, "I'm the
alternative" reasons.

[snip stuff]

Lots of words but few links. Can you be so kind as to point out the
serialization library? I can't find it at
<http://www.boost.org/libs/libraries.htm>

-Peter
 
P

Pavel Vozenilek

Peter Ammon said:
Never mind, someone else pointed it out. It wasn't on the libraries
page because it hasn't been accepted into Boost yet.
It has been accepted into Boost recently. It may appear
in release 1.32 or later.

Current version on rrsd.com site is stable.

/Pavel
 
E

EventHelix.com

You should checkout the Microsoft Foundation Classes (MFC) implementation
of object serialization/deserialization.

It seems to be well done and works reliably.

Sandeep
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top