eProsima / Fast-DDS-Gen

Fast-DDS IDL code generator tool. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
77 stars 58 forks source link

Generated C++ can't construct in a single line #166

Closed tmayoff closed 11 months ago

tmayoff commented 1 year ago

This might be related to this issue, https://github.com/eProsima/Fast-DDS-Gen/issues/38. For testing I like to setup my tests like this:

const std::vector<Testing::TestMessage> tests = {
      {uuid, 0, "testing", 0},
      {uuid, 1, "Test Message", 1414241},
      {uuid, 2, "Messaging Test", 1245265346},
      {uuid, 3, "Test", std::chrono::system_clock::now().time_since_epoch().count()},
  };

However due to the way the constructors are generated I can't, is it possible to update the constructors to allow this (maybe with some of the suggestion in the linked issue)

tmayoff commented 1 year ago

The same would be nice with the QoS policies. Although I'm not sure if these are generated from IDL

fastdds::DurabilityServiceQosPolicy{Duration_t{}, fastdds::KEEP_ALL_HISTORY_QOS, 1, 10, 10, 10}},
JLBuenoLopez commented 11 months ago

Moving the ticket to the Ideas discussion forum where enhancements and feature requests are discussed.