Restore old behavior of toString conversion

We don't want the m_ prefix in the member names. Those
should correspond to the FPP member names. m_ is just for
the C++ implementation.
This commit is contained in:
Robert L. Bocchino Jr 2024-01-18 19:21:12 -08:00
parent d42430d408
commit f8e1f2b0aa
17 changed files with 54 additions and 54 deletions

View File

@ -490,13 +490,13 @@ case class StructCppWriter(
)
if sizes.contains(n) then {
if sizes(n) == 1 then
List(s"m_$n = [ $formatStr ]")
List(s"$n = [ $formatStr ]")
else
s"m_$n = [ $formatStr" ::
s"$n = [ $formatStr" ::
List.fill(sizes(n) - 2)(formatStr) ++
List(s"$formatStr ]")
} else
List(s"m_$n = $formatStr")
List(s"$n = $formatStr")
}).mkString("\"( \"\n\"", ", \"\n\"", "\"\n\" )\";")).map(indentIn),
initStrings,
Line.blank ::

View File

@ -114,7 +114,7 @@ void AbsType ::
{
static const char* formatString =
"( "
"m_t = %s"
"t = %s"
" )";
// Declare strings to hold any serializable toString() arguments

View File

@ -114,7 +114,7 @@ void C_S ::
{
static const char* formatString =
"( "
"m_x = %" PRIu32 ""
"x = %" PRIu32 ""
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -223,9 +223,9 @@ void Default ::
{
static const char* formatString =
"( "
"m_mU32 = %" PRIu32 ", "
"m_mS1 = %s, "
"m_mF64 = %f"
"mU32 = %" PRIu32 ", "
"mS1 = %s, "
"mF64 = %f"
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -162,8 +162,8 @@ void Enum ::
{
static const char* formatString =
"( "
"m_e = %s, "
"m_eArr = [ %s, "
"e = %s, "
"eArr = [ %s, "
"%s, "
"%s ]"
" )";

View File

@ -326,23 +326,23 @@ void Format ::
{
static const char* formatString =
"( "
"m_m1 = %" PRIi32 ", "
"m_m2 = %" PRIu32 ", "
"m_m3 = %" PRIi32 ", "
"m_m4 = %" PRIu32 ", "
"m_m5 = %" PRIx32 ", "
"m_m6 = %" PRIx32 ", "
"m_m7 = %c, "
"m_m8 = %c, "
"m_m9 = %" PRIo32 ", "
"m_m10 = %" PRIo32 ", "
"m_m11 = %e, "
"m_m12 = %f, "
"m_m13 = %g, "
"m_m14 = %.3e, "
"m_m15 = %.3f, "
"m_m16 = %.3g, "
"m_m17 = %.3g%%"
"m1 = %" PRIi32 ", "
"m2 = %" PRIu32 ", "
"m3 = %" PRIi32 ", "
"m4 = %" PRIu32 ", "
"m5 = %" PRIx32 ", "
"m6 = %" PRIx32 ", "
"m7 = %c, "
"m8 = %c, "
"m9 = %" PRIo32 ", "
"m10 = %" PRIo32 ", "
"m11 = %e, "
"m12 = %f, "
"m13 = %g, "
"m14 = %.3e, "
"m15 = %.3f, "
"m16 = %.3g, "
"m17 = %.3g%%"
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -114,7 +114,7 @@ void Included ::
{
static const char* formatString =
"( "
"m_x = %" PRIu32 ""
"x = %" PRIu32 ""
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -114,7 +114,7 @@ void Including ::
{
static const char* formatString =
"( "
"m_x = %s"
"x = %s"
" )";
// Declare strings to hold any serializable toString() arguments

View File

@ -133,8 +133,8 @@ namespace M {
{
static const char* formatString =
"( "
"m_x = %" PRIu32 ", "
"m_y = %f"
"x = %" PRIu32 ", "
"y = %f"
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -116,7 +116,7 @@ namespace M {
{
static const char* formatString =
"( "
"m_x = %s"
"x = %s"
" )";
// Declare strings to hold any serializable toString() arguments

View File

@ -162,8 +162,8 @@ void Modules3 ::
{
static const char* formatString =
"( "
"m_x = %s, "
"m_arr = [ %s, "
"x = %s, "
"arr = [ %s, "
"%s, "
"%s ]"
" )";

View File

@ -178,10 +178,10 @@ void Modules4 ::
{
static const char* formatString =
"( "
"m_arr1 = [ %s, "
"arr1 = [ %s, "
"%s, "
"%s ], "
"m_arr2 = [ %s, "
"arr2 = [ %s, "
"%s, "
"%s, "
"%s, "

View File

@ -393,20 +393,20 @@ void Primitive ::
{
static const char* formatString =
"( "
"m_mF32 = [ %f, "
"mF32 = [ %f, "
"%f, "
"%f ], "
"m_mF64 = %f, "
"m_mI16 = %" PRIi16 ", "
"m_mI32 = %" PRIi32 ", "
"m_mI64 = %" PRIi64 ", "
"m_mI8 = %" PRIi8 ", "
"m_mU16 = %" PRIu16 ", "
"m_mU32 = %" PRIu32 ", "
"m_mU64 = %" PRIu64 ", "
"m_mU8 = %" PRIu8 ", "
"m_m_bool = %d, "
"m_m_string = %s"
"mF64 = %f, "
"mI16 = %" PRIi16 ", "
"mI32 = %" PRIi32 ", "
"mI64 = %" PRIi64 ", "
"mI8 = %" PRIi8 ", "
"mU16 = %" PRIu16 ", "
"mU32 = %" PRIu32 ", "
"mU64 = %" PRIu64 ", "
"mU8 = %" PRIu8 ", "
"m_bool = %d, "
"m_string = %s"
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -114,7 +114,7 @@ void PrimitiveStruct ::
{
static const char* formatString =
"( "
"m_s1 = %s"
"s1 = %s"
" )";
// Declare strings to hold any serializable toString() arguments

View File

@ -114,7 +114,7 @@ void S ::
{
static const char* formatString =
"( "
"m_x = %" PRIu32 ""
"x = %" PRIu32 ""
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];

View File

@ -320,8 +320,8 @@ void StringArray ::
{
static const char* formatString =
"( "
"m_s1 = %s, "
"m_s2 = [ %s, "
"s1 = %s, "
"s2 = [ %s, "
"%s, "
"%s, "
"%s, "

View File

@ -289,8 +289,8 @@ void String ::
{
static const char* formatString =
"( "
"m_s1 = %s, "
"m_s2 = %s"
"s1 = %s, "
"s2 = %s"
" )";
char outputString[FW_SERIALIZABLE_TO_STRING_BUFFER_SIZE];