Skip to content

Discussion: EntityProperites - polymorphic type or type field

See also here (!164 (comment 2857921)):

As the type (Note: of an EntityProperty) is "just" a base class, I also like to start the discussion on the type field. What is the purpose of it if you express the type of your property as explicit class type, such as VehicleProperties or PedestrianProperties, but keep the static information as enum too? We do not support other types (currently) and in my opinion nobody should use EntityProperties as class on it's own. At least in my understanding it is just a (😵💫 virtual) base so that we can assemble different types in a container without polluting everybodies code with std::variant (which I personally could live with for value types). We should take one or the other, but not both.