This is the to-string callback for the array type This is generic and will take care of all template instances based on the array template
| 253 | // This is the to-string callback for the array type |
| 254 | // This is generic and will take care of all template instances based on the array template |
| 255 | std::string ArrayToString(void *obj, int expandMembers, CDebugger *dbg) |
| 256 | { |
| 257 | CScriptArray *arr = reinterpret_cast<CScriptArray*>(obj); |
| 258 | |
| 259 | std::stringstream s; |
| 260 | s << "(len=" << arr->GetSize() << ")"; |
| 261 | |
| 262 | if( expandMembers > 0 ) |
| 263 | { |
| 264 | s << " ["; |
| 265 | for( asUINT n = 0; n < arr->GetSize(); n++ ) |
| 266 | { |
| 267 | s << dbg->ToString(arr->At(n), arr->GetElementTypeId(), expandMembers - 1, arr->GetArrayObjectType()->GetEngine()); |
| 268 | if( n < arr->GetSize()-1 ) |
| 269 | s << ", "; |
| 270 | } |
| 271 | s << "]"; |
| 272 | } |
| 273 | |
| 274 | return s.str(); |
| 275 | } |
| 276 | |
| 277 | // This is the to-string callback for the dictionary type |
| 278 | std::string DictionaryToString(void *obj, int expandMembers, CDebugger *dbg) |
nothing calls this directly
no test coverage detected