void SlimeTraceSerializer::visit(const TraceNode & node) { assert(!_cursors.empty()); Cursor * current(_cursors.top()); assert(current != NULL); _cursors.pop(); addTimestamp(*current, node); addPayload(*current, node); addChildrenCursors(*current, node); }
static void start(void *data, const char *el, const char **attr) { int i; struct userdata *d = (struct userdata *)data; for (i = 0; states[i].element != NULL; i++) { if (d->state != states[i].pstate) continue; if (!strcmp(el, states[i].element)) { d->state = states[i].state; break; } } if (states[i].element == NULL) die("E: Unknown element %s\n", el); if (d->state == STATE_PAYLOAD) d->payload = addPayload(d->config, attr); if (d->state == STATE_PAYLOAD_CHAIN) d->chain = addChain(d->config, d->payload); }
void Sim::SFM::Airframe::addPayload(State & state, const PayloadTree & payloadTree, PayloadTree::const_iterator where) { addPayload(state.force, payloadTree, where); }