When all C++ compiler and runtime abstraction facilities fail, there's still the preprocessor to save you. ![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
Indeed, but I don't think something like "ClassName()" is necessary. When serialization is delegated to the widgets themselves, I think it's perfectly fine when they throw a class name string to the storage driver themselves (they do so for properties (which are specific and can't be read by an abstract class because they're unknown) so they can for a class name).
Okay, should better have quoted Ceylo in this case -- just too lazy to look for the proper post.
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)
By the way, Tank, if you have already used Boost, might not the library Boost.Serialize be an option? At least, it contains some interesting concepts.
Boost.Serialization would be incredible great, but that means an extra dependency. You're right, I'm using some components of Boost, but those are header-only, which means no building on target systems is necessary that makes distribution easy.
I think I'll go with a selfmade and lightweight serialization solution. However, I still have to think about the design and do some tests if that'll work out and -- more importantly -- will make the whole thing easier or not (regarding to usage *and* design).
@Ceylo:
The code looks good, but I'd choose another approach. However the concept is at least similar to yours.
![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
Thank you.
I'm glad that some other experienced guys are following this thread. I repeat myself, but: I'm always open for opinions.
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)