- added polyobject serializer.
- added sanity checks to prevent a savegame from being loaded with an incompatible map - refactored a few things to simplify serialization. - started work on main level serializer function.
This commit is contained in:
parent
ab43e0c8cb
commit
daf43f9d35
13 changed files with 221 additions and 200 deletions
|
|
@ -534,6 +534,21 @@ FSerializer &FSerializer::StringPtr(const char *key, const char *&charptr)
|
|||
return *this;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
unsigned FSerializer::GetSize(const char *group)
|
||||
{
|
||||
if (isWriting()) return -1; // we do not know this when writing.
|
||||
|
||||
const rapidjson::Value &val = r->mDocObj[group];
|
||||
if (!val.IsArray()) return -1;
|
||||
return val.Size();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Writes out all collected objects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue