MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / packData

Method packData

Engine/source/console/simDatablock.cpp:363–376  ·  view source on GitHub ↗

packData() and unpackData() do nothing in the stock implementation, but here they've been modified to pack and unpack any substitution statements.

Source from the content-addressed store, hash-verified

361// they've been modified to pack and unpack any substitution statements.
362//
363void SimDataBlock::packData(BitStream* stream)
364{
365 for (S32 i = 0; i < substitutions.size(); i++)
366 {
367 if (substitutions[i])
368 {
369 stream->writeFlag(true);
370 stream->writeString(substitutions[i]->mSlot);
371 stream->write(substitutions[i]->mIdx);
372 stream->writeString(substitutions[i]->mValue);
373 }
374 }
375 stream->writeFlag(false);
376}
377
378void SimDataBlock::unpackData(BitStream* stream)
379{

Callers 1

simDatablock.cppFile · 0.45

Calls 4

sizeMethod · 0.45
writeFlagMethod · 0.45
writeStringMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected