Question : Using SensorType (and such) in SensorFactory ?
The SensorType
enum is defined in the header wolf.h
and used as a member of the base class SensorBase
.
Why wouldn't we use it as the std::map key of the SensorFactory
as well ?? I do remember a discussion about not centralizing things but looks like it is already the case in wolf.h
. If tomorrow I want to add (e.g.) an omnidirectional camera then I will have to add this sensor type in the aforementioned enum anyway.
Moreover making it a scoped enum would enable a namespace-like grouping of the enumerated sensor types :
typedef class enum SensorType
{
ODOM_2D,
ODOM_3D,
...
}
auto my_sensor_type = SensorType::ODOM_2D;