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

Function FormatBase

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

Source from the content-addressed store, hash-verified

101 }
102
103 String FormatBase(const void** args, const int32* types, size_t num_args)
104 {
105 FormatData formatData;
106
107 for (size_t i = 0; i < num_args; ++i)
108 {
109 const void* ref = args[i];
110 const ScriptTypeID typeID = static_cast<ScriptTypeID>(types[i]);
111
112 switch (typeID)
113 {
114 case ScriptTypeID::Void:
115 break;
116 case ScriptTypeID::Bool:
117 Formatter(formatData, *static_cast<const bool*>(ref));
118 break;
119 case ScriptTypeID::Int8:
120 Formatter(formatData, *static_cast<const int8*>(ref));
121 break;
122 case ScriptTypeID::Int16:
123 Formatter(formatData, *static_cast<const int16*>(ref));
124 break;
125 case ScriptTypeID::Int32:
126 Formatter(formatData, *static_cast<const int32*>(ref));
127 break;
128 case ScriptTypeID::Int64:
129 Formatter(formatData, *static_cast<const int64*>(ref));
130 break;
131 case ScriptTypeID::Uint8:
132 Formatter(formatData, *static_cast<const uint8*>(ref));
133 break;
134 case ScriptTypeID::Uint16:
135 Formatter(formatData, *static_cast<const uint16*>(ref));
136 break;
137 case ScriptTypeID::Uint32:
138 Formatter(formatData, *static_cast<const uint32*>(ref));
139 break;
140 case ScriptTypeID::Uint64:
141 Formatter(formatData, *static_cast<const uint64*>(ref));
142 break;
143 case ScriptTypeID::Float:
144 Formatter(formatData, *static_cast<const float*>(ref));
145 break;
146 case ScriptTypeID::Double:
147 Formatter(formatData, *static_cast<const double*>(ref));
148 break;
149 case ScriptTypeID::Char32:
150 Formatter(formatData, *static_cast<const char32*>(ref));
151 break;
152 case ScriptTypeID::String:
153 Formatter(formatData, *static_cast<const String*>(ref));
154 break;
155 case ScriptTypeID::None_t:
156 Formatter(formatData, U"none");
157 break;
158 case ScriptTypeID::Duration:
159 Formatter(formatData, *static_cast<const Duration*>(ref));
160 break;

Callers 15

Format_T1Function · 0.85
Format_T2Function · 0.85
Format_T3Function · 0.85
Format_T4Function · 0.85
Format_T5Function · 0.85
Format_T6Function · 0.85
Format_T7Function · 0.85
Format_T8Function · 0.85
Format_T9Function · 0.85
Format_T10Function · 0.85
write_T1Method · 0.85
TextWriterShl_T1Function · 0.85

Calls 5

GetTypeInfoFunction · 0.85
GetTypeNameFunction · 0.85
IsEnumFunction · 0.85
GetEnumValueFunction · 0.85
FormatterFunction · 0.50

Tested by

no test coverage detected