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
| 234 | // This is the to-string callback for the array type |
| 235 | // This is generic and will take care of all template instances based on the array template |
| 236 | std::string ArrayToString(void *obj, int expandMembers, CDebugger *dbg) |
| 237 | { |
| 238 | CScriptArray *arr = reinterpret_cast<CScriptArray*>(obj); |
| 239 | |
| 240 | std::stringstream s; |
| 241 | s << "(len=" << arr->GetSize() << ")"; |
| 242 | |
| 243 | if( expandMembers > 0 ) |
| 244 | { |
| 245 | s << " ["; |
| 246 | for( asUINT n = 0; n < arr->GetSize(); n++ ) |
| 247 | { |
| 248 | s << dbg->ToString(arr->At(n), arr->GetElementTypeId(), expandMembers - 1, arr->GetArrayObjectType()->GetEngine()); |
| 249 | if( n < arr->GetSize()-1 ) |
| 250 | s << ", "; |
| 251 | } |
| 252 | s << "]"; |
| 253 | } |
| 254 | |
| 255 | return s.str(); |
| 256 | } |
| 257 | |
| 258 | // This is the to-string callback for the dictionary type |
| 259 | std::string DictionaryToString(void *obj, int expandMembers, CDebugger *dbg) |
nothing calls this directly
no test coverage detected