@@ -1847,15 +1847,15 @@ void t_yarp_generator::generate_struct(t_struct* tstruct)
18471847 yarp_type_name = annotations.at (" yarp.type.name" );
18481848 }
18491849 else {
1850- yarp_type_name = " yarp/ " +name ;
1850+ yarp_type_name = " " ;
18511851 }
18521852
18531853 std::string yarp_type_version{};
18541854 if (annotations.find (" yarp.type.version" ) != annotations.end ()) {
18551855 yarp_type_version = annotations.at (" yarp.type.version" );
18561856 }
18571857 else {
1858- yarp_type_version = " 1.0 " ;
1858+ yarp_type_version = " " ;
18591859 }
18601860
18611861 // Open header file
@@ -2247,7 +2247,7 @@ void t_yarp_generator::generate_struct_typeconstexpr(t_struct* tstruct, std::ost
22472247
22482248 f_h_ << indent_h () << " //The name and the version for this message\n " ;
22492249 f_h_ << indent_h () << " static constexpr const char* typeName = \" " << yarp_type_name << " \" ;\n " ;
2250- f_h_ << indent_h () << " static constexpr const char* typeVersion = \" " << " 1.0 " << " \" ;\n " ;
2250+ f_h_ << indent_h () << " static constexpr const char* typeVersion = \" " << yarp_type_version << " \" ;\n " ;
22512251 f_h_ << ' \n ' ;
22522252
22532253 assert (indent_count_h () == 1 );
@@ -2264,14 +2264,14 @@ void t_yarp_generator::generate_struct_gettype(t_struct* tstruct, std::ostringst
22642264 f_h_ << indent_h () << " yarp::os::Type getType() const;\n " ;
22652265 f_h_ << ' \n ' ;
22662266
2267- f_cpp_ << indent_cpp () << " // Convert to a printable string \n " ;
2267+ f_cpp_ << indent_cpp () << " // Get the message type \n " ;
22682268 f_cpp_ << indent_cpp () << " yarp::os::Type " << name << " ::getType() const\n " ;
22692269 f_cpp_ << indent_cpp () << " {\n " ;
22702270 indent_up_cpp ();
22712271 {
2272- f_cpp_ << indent_cpp () << " yarp::os::Type typ = yarp::os::Type::byNameOnWire(typeName);\n " ;
2272+ f_cpp_ << indent_cpp () << " yarp::os::Type typ = yarp::os::Type::byNameOnWire(typeName);\n " ;
22732273 f_cpp_ << indent_cpp () << " typ.setVersion(typeVersion);\n " ;
2274- f_cpp_ << indent_cpp () << " return typ;\n " ;
2274+ f_cpp_ << indent_cpp () << " return typ;\n " ;
22752275 }
22762276 indent_down_cpp ();
22772277 f_cpp_ << indent_cpp () << " }\n " ;
0 commit comments