MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / walk_tuple

Method walk_tuple

src/simulate/data_walker.cpp:60–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 void DataWalker::walk_tuple ( char * ps, TypeInfo * ti ) {
61 if ( canVisitTuple(ps,ti) ) {
62 beforeTuple(ps, ti);
63 if ( cancel() ) return;
64 int fieldOffset = 0;
65 for ( uint32_t i=0, is=ti->argCount; i!=is; ++i ) {
66 bool last = i==(ti->argCount-1);
67 TypeInfo * vi = ti->argTypes[i];
68 auto fa = getTypeAlign(vi) - 1;
69 fieldOffset = (fieldOffset + fa) & ~fa;
70 char * pf = ps + fieldOffset;
71 beforeTupleEntry(ps, ti, pf, i, last);
72 if ( cancel() ) return;
73 walk(pf, vi);
74 if ( cancel() ) return;
75 afterTupleEntry(ps, ti, pf, i, last);
76 if ( cancel() ) return;
77 fieldOffset += vi->size;
78 }
79 afterTuple(ps, ti);
80 }
81 }
82
83 void DataWalker::walk_variant ( char * ps, TypeInfo * ti ) {
84 if ( canVisitVariant(ps,ti) ) {

Callers

nothing calls this directly

Calls 8

canVisitTupleFunction · 0.85
beforeTupleFunction · 0.85
cancelFunction · 0.85
getTypeAlignFunction · 0.85
beforeTupleEntryFunction · 0.85
walkFunction · 0.85
afterTupleEntryFunction · 0.85
afterTupleFunction · 0.85

Tested by

no test coverage detected