Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 25th, 2006, 09:35 AM
lothar.behrens@lollisoft.de
Guest
 
Posts: n/a
Default visitor pattern and COM like objects ?

Hi,

I want to implement a serializiation mechanism for my classes. Having
the book Modern C++ Design
I am thinking about, if I could do it that way, the book describes.

The following conditions are given:

* My objects could be created only on heap.
* They are all derived from pure abstract classes (interfaces)
* The objects are loadable at runtime (dlsym and co)

So the sample class BaseVisitable with a static member function
AcceptImpl may be a problem
in my approach of pure virtual classes.

Are there equivalent nonstatic approaches for pure abstract classes
available ?

Thanks, Lothar

  #2  
Old January 25th, 2006, 03:05 PM
mlimber
Guest
 
Posts: n/a
Default Re: visitor pattern and COM like objects ?

lothar.behrens@lollisoft.de wrote:[color=blue]
> Hi,
>
> I want to implement a serializiation mechanism for my classes. Having
> the book Modern C++ Design
> I am thinking about, if I could do it that way, the book describes.
>
> The following conditions are given:
>
> * My objects could be created only on heap.
> * They are all derived from pure abstract classes (interfaces)
> * The objects are loadable at runtime (dlsym and co)
>
> So the sample class BaseVisitable with a static member function
> AcceptImpl may be a problem
> in my approach of pure virtual classes.
>
> Are there equivalent nonstatic approaches for pure abstract classes
> available ?
>
> Thanks, Lothar[/color]

Check out Boost's serialization library for some ideas:

http://boost.org/libs/serialization/doc/index.html

Also, the FAQ has a section on serialization:

http://parashift.com/c++-faq-lite/serialization.html

Cheers! --M

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles