MCPcopy Create free account
hub / github.com/OpenMW/openmw / append

Method append

components/lua/serialization.cpp:81–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void UserdataSerializer::append(BinaryData& out, std::string_view typeName, const void* data, size_t dataSize)
82 {
83 assert(!typeName.empty() && typeName.size() <= 64);
84 if (typeName.size() <= 8 && dataSize < 16)
85 { // Compact form: 0b1SSSSTTT. SSSS = dataSize, TTT = (typeName size - 1).
86 auto t = static_cast<unsigned char>(CUSTOM_COMPACT_FLAG | (dataSize << 3) | (typeName.size() - 1));
87 out.push_back(t);
88 }
89 else
90 { // Full form: 0b01TTTTTT + 32bit dataSize.
91 auto t = static_cast<unsigned char>(CUSTOM_FULL_FLAG | (typeName.size() - 1));
92 out.push_back(t);
93 appendValue<uint32_t>(out, static_cast<uint32_t>(dataSize));
94 }
95 out.append(typeName.data(), typeName.size());
96 appendData(out, data, dataSize);
97 }
98
99 void UserdataSerializer::appendRefNum(BinaryData& out, ESM::RefNum refnum)
100 {

Callers 15

toDebugStringMethod · 0.45
getFileMethod · 0.45
getPassHeaderMethod · 0.45
compileMethod · 0.45
openHelpMethod · 0.45
lowerCaseUtf8Method · 0.45
parseMethod · 0.45
startProcessMethod · 0.45
processFinishedMethod · 0.45
packageNameToVfsPathFunction · 0.45
packageNameToPathFunction · 0.45

Calls 4

appendDataFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by 2

TESTFunction · 0.36
run_testFunction · 0.36