MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Serialize

Method Serialize

engine/Poseidon/IO/Serialization/ParamArchive.cpp:130–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130LSError ParamArchive::Serialize(const RStringB& name, bool& value, int minVersion)
131{
132 if (_version < minVersion)
133 {
134 return LSOK;
135 }
136 if (_saving)
137 {
138 _entry->Add(name, value);
139 }
140 else
141 {
142 if (_pass != PassFirst)
143 {
144 return LSOK;
145 }
146 ParamEntry* entry = _entry->FindEntry(name);
147 if (!entry)
148 ON_ERROR(LSNoEntry, name);
149 int intValue = *entry;
150 value = intValue != 0;
151 }
152 return LSOK;
153}
154
155LSError ParamArchive::Serialize(const RStringB& name, int& value, int minVersion)
156{

Callers 1

SerializeArrayMethod · 0.45

Calls 15

ColorClass · 0.85
toIntMethod · 0.80
AddArrayMethod · 0.80
ReserveArrayElementsMethod · 0.80
DirectionUpMethod · 0.80
TimeClass · 0.50
TimeSecClass · 0.50
AddMethod · 0.45
FindEntryMethod · 0.45
GetIntMethod · 0.45
AddValueMethod · 0.45
CompactMethod · 0.45

Tested by

no test coverage detected