visitor pattern and COM like objects ?

Discussion in 'C++' started by lothar.behrens@lollisoft.de, Jan 25, 2006.

  1. Guest

    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
     
    , Jan 25, 2006
    #1
    1. Advertising

  2. mlimber Guest

    wrote:
    > 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
     
    mlimber, Jan 25, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Burger
    Replies:
    0
    Views:
    830
    Martin Burger
    Jul 18, 2005
  2. Giovanni Azua
    Replies:
    0
    Views:
    430
    Giovanni Azua
    Nov 30, 2007
  3. C#
    Replies:
    3
    Views:
    319
    Peter Morris
    Aug 1, 2008
  4. aaragon
    Replies:
    9
    Views:
    689
    aaragon
    Aug 14, 2008
  5. Karsten Wutzke

    Code generator and visitor pattern

    Karsten Wutzke, Jul 15, 2010, in forum: Python
    Replies:
    25
    Views:
    1,507
    Mick Krippendorf
    Jul 18, 2010
Loading...

Share This Page