visitor pattern and COM like objects ?

L

lothar.behrens

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
 
M

mlimber

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

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
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top