|
-
July 8th, 2008, 07:29 AM
#1
generic serializer interface
hi, I'm trying to implement a generic serializer interface where each implementation is responsible for serializing some provided data, examples of implementation could be xml, binary etc. where the object would pass its data to a standard interface and each implementation would serialize the data differently.
Does anyone know of any good examples of this type of interface? all I can find is an ISerializable interface where each object must implement a serialize and deserialize method.
-
July 8th, 2008, 02:59 PM
#2
Re: generic serializer interface
-
July 8th, 2008, 03:19 PM
#3
Re: generic serializer interface
The model used by .NET is worth evaluating if you are looking for a custom solution (in native C++). It is well documented and very highly extensible.
Many of the design primciples (but none of the implementation) can be leveraged...
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
July 9th, 2008, 09:54 AM
#4
Re: generic serializer interface
boost::serialization served me well for my needs of serialization capabilities and yes, it does support XML, binary, text and probably any custom archive type that you may want.
The support can be applied in both an intrusive and a non-intrusive way. You are welcome to ask here if you face any problems or mail on the boost mailing lists.
Can you help me with my homework assignment?, Before you post!, Use code tags, How to post!, Codeguru technical FAQs, C++ FAQ Lite, Stroustrup: C++ Style and Technique FAQ, Guru of the Week, Comeau C and C++ FAQs, Comeau C++ Templates FAQs, CUJ @ DDJ, Spam threshold
My Blogs : Learning C++ is fun | Abnegator's reflections
Open Threads : C++ Aha! Moments | Nature of work in C++?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|