Entt: Request for Adding Polypropylene to Similar Projects List in Wiki

Created on 11 Jan 2021  ยท  8Comments  ยท  Source: skypjack/entt

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:

  • an entity in Polypropylene may have multiple components of the same type if desired,
  • a component in Polypropylene can be obtained from an entity by any of its polymorphic types.

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

documentation

Most helpful comment

Maybe it is and I'm not aware of it. If you discover something, PLEASE inform me. ๐Ÿ˜„

All 8 comments

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. ๐Ÿคทโ€โ™‚๏ธ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skypjack picture skypjack  ยท  4Comments

nitishingde picture nitishingde  ยท  3Comments

bjadamson picture bjadamson  ยท  4Comments

xoorath picture xoorath  ยท  3Comments

blockspacer picture blockspacer  ยท  3Comments