Boost logo

Boost Users :

From: Alexandre Gacon (alexandre.gacon_at_[hidden])
Date: 2006-02-10 04:10:30


I looked at the test_no_rtti.cpp and I have a question:

In the cpp file, the macro BOOST_CLASS_TYPE_INFO is used like this:

BOOST_CLASS_TYPE_INFO(
    derived_base,
    extended_type_info_no_rtti<derived_base>
)

But in the documentation, the macro is used like that:

BOOST_CLASS_TYPE_INFO(
    derived_base,
    extended_type_info_no_rtti<base_class>
)

What is the good use of the macro ?

Thank you

Alexandre Gacon

-----Message d'origine-----
De : boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] De la part de Robert Ramey
Envoyé : jeudi 9 février 2006 16:17
À : boost-users_at_[hidden]
Objet : Re: [Boost-users] [Serialization]Working without RTTI

I've included that facility and a test which demonstrates it.

test_no_rtti demonstrates how it can be used with a type_info facility which
uses the string associated with the type via BOOST_CLASS_EXPORT.

Other than that it hasn't been really tested/explored extensively.

After doing all this, it occurred to me that it RTTI would still be required
to serialize the std::vector etc. This could be worked around by some
combination of the above

a) implemented BOOST_CLASS_EXPORT for those serializations in the library

b) making a custom extended_type_info class which uses some other yet to be
determined method.

c) avoiding serialization of types not exported via pointers. That is, only
types serialized via pointers required RTTI. (at least that's the intention
- better test this!!)

Robert Ramey

Alexandre Gacon wrote:
> Hi,
>
> I would like to use the serialization library inside one of my project
> which do not use the RTTI. I produce a first version using
> boost::serialization::extended_type_info to produce the key associated
> to the class.
>
> Is it possible to use my own keys instead of the extended_type_info
> class to serialize my classes ?
>
> Thank you,
>
> Alexandre Gacon
> Project Manager

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net