Похожие чаты

Hi, I have a system that consists of many containers

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.

1 ответов

13 просмотров

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.

Похожие вопросы

Обсуждают сегодня

Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
35
How Will #Monero Be Attacked? First of all I want to tell you that this is not teaching the network attackers, the central regulators. They already know how to attack the net...
Li₿ΞʁLiøη
3
подскажите пожалуйста, как мне освободить результат записанный в переменную result? в чем проблема подскажите если МОЖЕТЕ?
Михаил Helper
28
Здравствуйте товарищи! решил всё таки поставить линукс. Порядок создание разделов /boot/efi 200МиБ; /boot 1000; подсистему / 80000; swap 8Гб Будет норм?
K2
18
Слушайте, ещё такая интересная задачка. Сделан аудит действий пользователей через триггеры в базе, соответственно каждый пользователь имеет свой логин и пароль в базе. Это пре...
Сергей Бычков
12
есть тут кто-то , кто только начал изучать си? если проходите курс на степике или как-то сами изучаете, пишите, может, скооперируемся?..
Eule
25
вопрос по москвину - не понимаю вот такого вопроса похоже Сколько разных всегда завершающихся функций с типом a -> a -> b -> a -> a можно реализовать? Две функции одинаково...
Fedor
11
Скажите, тут нет проблемы? IMyInterface1 = interface function GetInterface2: IInterface2; ... function TMyInterface.GetInterface2: IInterface2; begin Result := TI...
Ruslan aka DUDE
18
There are too many wallet applications in the Egfo ecosystem. It is really hard to keep track of these wallets. Which wallet should we send ergo or other coins to? Why shoul...
Şerafettin Bayrakdar
4
Карта сайта