MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / netStore

Method netStore

source/core/StarNetElementDynamicGroup.hpp:165–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164template <typename Element>
165void NetElementDynamicGroup<Element>::netStore(DataStream& ds, NetCompatibilityRules rules) const {
166 if (!checkWithRules(rules)) return;
167 ds.writeVlqU(m_idMap.size());
168
169 m_buffer.setStreamCompatibilityVersion(rules);
170 for (auto& pair : m_idMap) {
171 ds.writeVlqU(pair.first);
172 pair.second->netStore(m_buffer, rules);
173 ds.write(m_buffer.data());
174 m_buffer.clear();
175 }
176}
177
178template <typename Element>
179void NetElementDynamicGroup<Element>::netLoad(DataStream& ds, NetCompatibilityRules rules) {

Callers 2

addNetElementMethod · 0.45
initNetVersionMethod · 0.45

Calls 6

writeVlqUMethod · 0.80
sizeMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected