with dynamically polymorphic objects. Right now every container has two methods: to serialize and deserialize its content. Every object that can be stored in the container has its serialization/deserialization code separated from them already.
I want to unbind these containers from the serialization/deserialization code (so it can be injected, probably?). It's because I don't want to force the users of my lib to be bound to the specific way of serialization I've choosen.
But I don't know where to even start reworking this, and how should it look like ideally. Can you give some advices or maybe you've seen some good implementations of such libraries?
Maybe I'm overcomplicating it also, and I just need to give the users ability to get and set the raw data and do whatever they want with it...
The language of implementation: C++. The system I'm talking about: ECS for a game.
Lemme get this straight, you've created a system to serialize/deserialize the components and this system has a collection of components and these collections/containers are what which implements how to serialize and deserialize the components it holds. I dunno if it will be effective but you've already given the users freedom to create their own serialize/deserialize system so providing means for people so they can create these containers so they can just use your system would be a start.
Обсуждают сегодня