Dear Michele Caini,
May I ask you to add my ECS Polypropylene to your Similar-Projects List in your wiki?
Polypropylene stands for _POLYmorphism aware PROPertY Library for mutablE dyNamic objEcts_ (๐ ) and is a prototypical C++17 library. It is a hybrid solution between an ECS and dynamic mixins with a focus on supporting polymorphism and multiplicity on components. To this end, Polypropylene is more object-oriented and not a strict ECS. If I saw correctly, the biggest design differences to EnTT are that:
which Polypropylene pays for with a more intrusive API (and very likely worse performance) than EnTT (Note, in Polypropylene components are called Properties):
class Pizza : public PAX::Entity<Pizza> {};
class TomatoSauce : public PAX::Property<Pizza> {
PAX_PROPERTY(TomatoSauce, PAX_PROPERTY_IS_CONCRETE)
PAX_PROPERTY_DERIVES(PAX::Property<Pizza>)
PAX_PROPERTY_IS_SINGLE
public:
unsigned int scoville = 0;
};
class Cheese : public PAX::Property<Pizza> {
PAX_PROPERTY(Cheese, PAX_PROPERTY_IS_ABSTRACT)
PAX_PROPERTY_DERIVES(PAX::Property<Pizza>)
PAX_PROPERTY_IS_MULTIPLE
PAX_PROPERTY_DEPENDS_ON(TomatoSauce)
};
class Mozzarella : public Cheese {
PAX_PROPERTY(Mozzarella, PAX_PROPERTY_IS_CONCRETE)
PAX_PROPERTY_DERIVES(Cheese)
PAX_PROPERTY_IS_SINGLE
};
Pizza pizza;
pizza.add(new TomatoSauce()); // otherwise we cannot add cheese
pizza.add(new Mozzarella());
// no dynamic_casts here
pizza.get<TomatoSauce>()->scoville = 3000; // put Tabasco in ;)
Mozzarella * mozzarella = pizza.get<Mozzarella>();
const std::vector<Cheese*>& cheeses = pizza.get<Cheese>(); // There might be multiple cheese types apart from mozzarella, so we get a vector.
There are more features in Polypropylene but this should be a more than detailed introduction to my work. ๐
Thanks in any case and kind regards ๐
Paul
Yeah, sure. I'd be glad to add it. ๐
Do you want to create a PR for it, so that you can customize the description?
Otherwise I can add it on my own. Not a problem. Just le me know. Thanks.
Done.
Wow, cool thank you very much! :) The description is great!
Sorry, that I couldn't respond earlier.
I also didn't know yet that pull-requests also work on changes to a project's wiki, so lesson learned for next time. :)
Cheers
Paul
didn't know yet that pull-requests also work on changes to a project's wiki
They don't afaik. ๐
It's just that the wiki pages are also in the repo for EnTT, because they are used to generate part of the online documentation.
Oh cool! Storing all the documentation in the repository itself sounds like a good idea in general. I will have a look at how you do it. :) I already wondered why this is not the default for GitHub wikis as Github already adds a .github directory to the repository for other GitHub related tasks. ๐คทโโ๏ธ
Maybe it is and I'm not aware of it. If you discover something, PLEASE inform me. ๐
You, too. :D So for now, you copy the contents of your files in docs/md/ by hand each time after a change?
Yeah, exactly. I update them for the autogenerated online documentation, so I would do it anyway, then I copy the same files to the wiki when needed. ๐คทโโ๏ธ
Most helpful comment
Maybe it is and I'm not aware of it. If you discover something, PLEASE inform me. ๐