MCPcopy Create free account
hub / github.com/Siv3D/OpenSiv3D / GetTypeName

Function GetTypeName

Siv3D/src/Siv3D/Script/Bind/ScriptFormat.cpp:45–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 [[nodiscard]]
46 static String GetTypeName(const asITypeInfo* ti)
47 {
48 if (const uint32 subTypeCount = ti->GetSubTypeCount())
49 {
50 String name = Unicode::WidenAscii(ti->GetName());
51 name.push_back(U'<');
52 //bool isFirst = true;
53
54 //for (size_t i = 0; i < subTypeCount; ++i)
55 //{
56 // std::string subTypeName = GetTypeName(ti->GetSubTypeId(i));
57
58 // if (isFirst)
59 // {
60 // name += subTypeName;
61 // isFirst = false;
62 // }
63 // else
64 // {
65 // name += ", ";
66 // name += subTypeName;
67 // }
68 //}
69
70 name.push_back(U'>');
71 return name;
72 }
73 else
74 {
75 return Unicode::WidenAscii(ti->GetName());
76 }
77 }
78
79 [[nodiscard]]
80 static bool IsEnum(const asITypeInfo* ti)

Callers 1

FormatBaseFunction · 0.85

Calls 4

WidenAsciiFunction · 0.85
GetSubTypeCountMethod · 0.45
GetNameMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected