CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Location
    Scotland
    Posts
    137

    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.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,902

  3. #3
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    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

  4. #4
    Join Date
    Feb 2005
    Location
    "The Capital"
    Posts
    5,306

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured