I've just tried that!
Now I have this compiling warnings:
d:\flow project\flowengine\3rdparty\include\boost\serialization\extended_type_info_typeid.hpp(92)
: warning C4541: 'typeid' used on polymorphic type
'FlowEngine::Serializer' with /GR-; unpredictable behavior may result
d:\flow
project\flowengine\3rdparty\include\boost\serialization\extended_type_info_typeid.hpp(86)
: while compiling class template member function 'const
boost::serialization::extended_type_info
*boost::serialization::detail::extended_type_info_typeid_1<T>::get_derived_extended_type_info(const
FlowEngine::Serializer &)'
with
[
T=const FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\extended_type_info_typeid.hpp(111)
: see reference to class template instantiation
'boost::serialization::detail::extended_type_info_typeid_1<T>' being
compiled
with
[
T=const FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(131)
: see reference to class template instantiation
'boost::serialization::extended_type_info_typeid<T>' being compiled
with
[
T=const FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(128)
: while compiling class template member function 'bool
boost::archive::detail::oserializer::is_polymorphic(void)
const'
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(264)
: see reference to class template instantiation
'boost::archive::detail::oserializer' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(263)
: while compiling class template member function 'void
boost::archive::detail::save_non_pointer_type::save_standard::invoke(Archive
&,const T &)'
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(322)
: see reference to class template instantiation
'boost::archive::detail::save_non_pointer_type::save_standard'
being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(310)
: while compiling class template member function 'void
boost::archive::detail::save_non_pointer_type::invoke(Archive
&,const T &)'
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(536)
: see reference to class template instantiation
'boost::archive::detail::save_non_pointer_type' being
compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::save(Archive &,const T &)' being
compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::basic_text_oarchive<Archive>::save_override<T>(T
&,int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_oarchive.hpp(86)
: see reference to function template instantiation 'Archive
&boost::archive::detail::interface_oarchive<Archive>::operator
<<<const T>(T &)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\engine\include\core\serialization\textserializer.h(66)
: see reference to function template instantiation 'Archive
&boost::archive::detail::interface_oarchive<Archive>::operator
&FlowEngine::Serializer(T &)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow project\flowengine\3rdparty\include\boost\smart_cast.hpp(76) :
warning C4541: 'dynamic_cast' used on polymorphic type
'boost::archive::detail::basic_oarchive' with /GR-; unpredictable
behavior may result
d:\flow
project\flowengine\3rdparty\include\boost\smart_cast.hpp(87) : see
reference to function template instantiation 'T
boost::smart_cast_impl::reference<T>::polymorphic::cross::cast<U>(U
&)' being compiled
with
[
T=FlowEngine::TextArchiveO &,
U=boost::archive::detail::basic_oarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\smart_cast.hpp(135) : see
reference to function template instantiation 'T
boost::smart_cast_impl::reference<T>::polymorphic::cast<U>(U &)' being
compiled
with
[
T=FlowEngine::TextArchiveO &,
U=boost::archive::detail::basic_oarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\smart_cast.hpp(293) : see
reference to function template instantiation 'T
boost::smart_cast_impl::reference<T>::cast<U>(U &)' being compiled
with
[
T=FlowEngine::TextArchiveO &,
U=boost::archive::detail::basic_oarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(149)
: see reference to function template instantiation 'T
boost::smart_cast_reference(U
&)' being compiled
with
[
T=FlowEngine::TextArchiveO &,
Archive=FlowEngine::TextArchiveO,
U=boost::archive::detail::basic_oarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(145)
: while compiling class template member function 'void
boost::archive::detail::oserializer::save_object_data(boost::archive::detail::basic_oarchive
&,const void *) const'
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::Serializer
]
d:\flow project\flowengine\3rdparty\include\boost\smart_cast.hpp(76) :
warning C4541: 'dynamic_cast' used on polymorphic type
'boost::archive::detail::basic_iarchive' with /GR-; unpredictable
behavior may result
d:\flow
project\flowengine\3rdparty\include\boost\smart_cast.hpp(87) : see
reference to function template instantiation 'T
boost::smart_cast_impl::reference<T>::polymorphic::cross::cast<U>(U
&)' being compiled
with
[
T=FlowEngine::TextArchiveI &,
U=boost::archive::detail::basic_iarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\smart_cast.hpp(135) : see
reference to function template instantiation 'T
boost::smart_cast_impl::reference<T>::polymorphic::cast<U>(U &)' being
compiled
with
[
T=FlowEngine::TextArchiveI &,
U=boost::archive::detail::basic_iarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\smart_cast.hpp(293) : see
reference to function template instantiation 'T
boost::smart_cast_impl::reference<T>::cast<U>(U &)' being compiled
with
[
T=FlowEngine::TextArchiveI &,
U=boost::archive::detail::basic_iarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(161)
: see reference to function template instantiation 'T
boost::smart_cast_reference(U
&)' being compiled
with
[
T=FlowEngine::TextArchiveI &,
Archive=FlowEngine::TextArchiveI,
U=boost::archive::detail::basic_iarchive
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(157)
: while compiling class template member function 'void
boost::archive::detail::iserializer::load_object_data(boost::archive::detail::basic_iarchive
&,void *,const unsigned int) const'
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(375)
: see reference to class template instantiation
'boost::archive::detail::iserializer' being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(369)
: while compiling class template member function 'void
boost::archive::detail::load_non_pointer_type::load_standard::invoke(Archive
&,T &)'
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(425)
: see reference to class template instantiation
'boost::archive::detail::load_non_pointer_type::load_standard'
being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(418)
: while compiling class template member function 'void
boost::archive::detail::load_non_pointer_type::invoke(Archive
&,T &)'
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\iserializer.hpp(572)
: see reference to class template instantiation
'boost::archive::detail::load_non_pointer_type' being
compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\basic_text_iarchive.hpp(64)
: see reference to function template instantiation 'void
boost::archive::load(Archive &,T &)' being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\text_iarchive.hpp(64)
: see reference to function template instantiation 'void
boost::archive::basic_text_iarchive<Archive>::load_override<T>(T
&,int)' being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_iarchive.hpp(76)
: see reference to function template instantiation 'void
boost::archive::text_iarchive_impl<Archive>::load_override<T>(T
&,int)' being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_iarchive.hpp(83)
: see reference to function template instantiation 'Archive
&boost::archive::detail::interface_iarchive<Archive>::operator >><T>(T
&)' being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow
project\flowengine\engine\include\core\serialization\textserializer.h(97)
: see reference to function template instantiation 'Archive
&boost::archive::detail::interface_iarchive<Archive>::operator
&FlowEngine::Serializer(T &)' being compiled
with
[
Archive=FlowEngine::TextArchiveI,
T=FlowEngine::Serializer
]
d:\flow project\flowengine\3rdparty\include\boost\serialization\extended_type_info_typeid.hpp(92)
: warning C4541: 'typeid' used on polymorphic type 'FlowEngine::A'
with /GR-; unpredictable behavior may result
d:\flow
project\flowengine\3rdparty\include\boost\serialization\extended_type_info_typeid.hpp(86)
: while compiling class template member function 'const
boost::serialization::extended_type_info
*boost::serialization::detail::extended_type_info_typeid_1<T>::get_derived_extended_type_info(const
FlowEngine::A &)'
with
[
T=const FlowEngine::A
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\extended_type_info_typeid.hpp(111)
: see reference to class template instantiation
'boost::serialization::detail::extended_type_info_typeid_1<T>' being
compiled
with
[
T=const FlowEngine::A
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(435)
: see reference to class template instantiation
'boost::serialization::extended_type_info_typeid<T>' being compiled
with
[
T=const FlowEngine::A
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(467)
: see reference to function template instantiation 'void
boost::archive::detail::save_pointer_type::saveFlowEngine::A(Archive
&,const T &,const boost::archive::detail::basic_pointer_oserializer
*)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
TPtr=FlowEngine::A *,
T=FlowEngine::A
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(447)
: while compiling class template member function 'void
boost::archive::detail::save_pointer_type::invoke(Archive
&,const TPtr)'
with
[
Archive=FlowEngine::TextArchiveO,
TPtr=FlowEngine::A *
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(536)
: see reference to class template instantiation
'boost::archive::detail::save_pointer_type' being
compiled
with
[
Archive=FlowEngine::TextArchiveO,
TPtr=FlowEngine::A *
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::save(Archive &,const T &)' being
compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::A *
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::basic_text_oarchive<Archive>::save_override<T>(T
&,int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::A *
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\nvp.hpp(77) :
see reference to function template instantiation 'Archive
&boost::archive::detail::interface_oarchive<Archive>::operator
<<<const T>(T &)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::A *
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\access.hpp(93)
: see reference to function template instantiation 'void
boost::serialization::nvp<T>::save<Archive>(Archivex &,const unsigned
int) const' being compiled
with
[
T=FlowEngine::A *,
Archive=FlowEngine::TextArchiveO,
Archivex=FlowEngine::TextArchiveO
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\split_member.hpp(43)
: see reference to function template instantiation 'void
boost::serialization::access::member_save(Archive &,T
&,const unsigned int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\split_member.hpp(42)
: while compiling class template member function 'void
boost::serialization::detail::member_saver::invoke(Archive
&,const T &,const unsigned int)'
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\split_member.hpp(69)
: see reference to class template instantiation
'boost::serialization::detail::member_saver' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\nvp.hpp(87) :
see reference to function template instantiation 'void
boost::serialization::split_member(Archive
&,boost::serialization::nvp<T> &,const unsigned int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::A *
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\access.hpp(109)
: see reference to function template instantiation 'void
boost::serialization::nvp<T>::serialize<Archive>(Archive &,const
unsigned int)' being compiled
with
[
T=FlowEngine::A *,
Archive=FlowEngine::TextArchiveO
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\serialization.hpp(81)
: see reference to function template instantiation 'void
boost::serialization::access::serialize(Archive &,T &,const
unsigned int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=const boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\serialization\serialization.hpp(140)
: see reference to function template instantiation 'void
boost::serialization::serialize(Archive &,T &,const
unsigned int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=const boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(257)
: see reference to function template instantiation 'void
boost::serialization::serialize_adl(Archive &,T &,const
unsigned int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=const boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(250)
: while compiling class template member function 'void
boost::archive::detail::save_non_pointer_type::save_only::invoke(Archive
&,const boost::serialization::nvp &)'
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(322)
: see reference to class template instantiation
'boost::archive::detail::save_non_pointer_type::save_only'
being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(310)
: while compiling class template member function 'void
boost::archive::detail::save_non_pointer_type::invoke(Archive
&,const boost::serialization::nvp &)'
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\oserializer.hpp(536)
: see reference to class template instantiation
'boost::archive::detail::save_non_pointer_type' being
compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::save(Archive &,const T &)' being
compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=const boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_oarchive.hpp(78)
: see reference to function template instantiation 'void
boost::archive::basic_text_oarchive<Archive>::save_override<T>(T
&,int)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=const boost::serialization::nvp
]
d:\flow
project\flowengine\3rdparty\include\boost\archive\detail\interface_oarchive.hpp(86)
: see reference to function template instantiation 'Archive
&boost::archive::detail::interface_oarchive<Archive>::operator <<<T>(T
&)' being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=const boost::serialization::nvp
]
d:\flow project\flowengine\samples\silvestre\main4.cpp(222) :
see reference to function template instantiation 'Archive
&boost::archive::detail::interface_oarchive<Archive>::operator &(const boost::serialization::nvp<T> &)'
being compiled
with
[
Archive=FlowEngine::TextArchiveO,
T=FlowEngine::A *
]
and crashes in the file dgbheap line 266. It was called here ->
extnded_type_info_typeid.hpp line 92:
return detail::extended_type_info_typeid_0::get_derived_extended_type_info(typeid(t));
Any clue??
I'm going to send to you the files, again so you can have a better look.
Thanks for all the support. This thing is starting to make me crazy :S.
On 1/16/07, Robert Ramey wrote:
The following changes would make your classes compatible with all archive
types
and might well fix your problem.
class C : public Serializer
{
typedef Serializer Parent;
public:
std::string text;
A* m_owner;
int32 dasse;
Vector<float> vector_test;
C():m_owner(0)
{
text = "Ola sua puta rabeta!";
dasse = 69;
vector_test.push_back(1);
vector_test.push_back(1.2f);
vector_test.push_back(1.3f);
vector_test.push_back(1.4f);
}
// standard way of specifying serialization for a class
template<class Archive>
serialize(Archive & ar, const unsigned int version){
ar.template register_type<C>();
ar.Serialize(dasse);
ar.Serialize(text);
//ar.Serialize(m_owner);
//ar.Serialize(vector_test);
}
void Serialize(IArchive& ar, const unsigned int version)
{
// forward to correct function from virtual call
serialize(ar, version);
}
};
BTW - if you want a virtual function interface to the serialization system
you might want to check out "polymorphic archives" in the documentation.
Robert Ramey
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
--
Miguel Silvestre