| 251 | } |
| 252 | |
| 253 | void RGPInterop::CreateMapping(const rdcarray<ActionDescription> &actions) |
| 254 | { |
| 255 | const SDFile &file = m_Ctx.GetStructuredFile(); |
| 256 | |
| 257 | for(const ActionDescription &action : actions) |
| 258 | { |
| 259 | for(const APIEvent &ev : action.events) |
| 260 | { |
| 261 | if(ev.chunkIndex == 0 || ev.chunkIndex == APIEvent::NoChunk || |
| 262 | ev.chunkIndex >= file.chunks.size()) |
| 263 | continue; |
| 264 | |
| 265 | const SDChunk *chunk = file.chunks[ev.chunkIndex]; |
| 266 | |
| 267 | if(m_EventNames.contains(chunk->name, Qt::CaseSensitive)) |
| 268 | { |
| 269 | m_Event2RGP[ev.eventId].interoplinearid = (uint32_t)m_RGP2Event.size(); |
| 270 | rdcstr n = chunk->name; |
| 271 | if(n.contains(':')) |
| 272 | n.erase(0, n.find_last_of(":") + 1); |
| 273 | n += "("; |
| 274 | bool first = true; |
| 275 | for(size_t i = 0; i < chunk->NumChildren(); i++) |
| 276 | { |
| 277 | const SDObject *o = chunk->GetChild(i); |
| 278 | if(o->type.flags & SDTypeFlags::Important) |
| 279 | { |
| 280 | if(!first) |
| 281 | n += ", "; |
| 282 | first = false; |
| 283 | n += ToStr(o->AsUInt32()); |
| 284 | } |
| 285 | } |
| 286 | n += ")"; |
| 287 | |
| 288 | m_Event2RGP[ev.eventId].eventname = n; |
| 289 | |
| 290 | m_RGP2Event.push_back(ev.eventId); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | // if we have children, step into them first before going to our next sibling |
| 295 | if(!action.children.empty()) |
| 296 | CreateMapping(action.children); |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | void RGPInterop::CreateMapping(uint32_t version) |
| 301 | { |
nothing calls this directly
no test coverage detected