mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Refactor Serializer and SerializerIterator interfaces:
* Remove unused members * SerialIter holds only a pointer and offset now * Use free functions for some Serializer members * Use SerialIter in some places instead of Serializer
This commit is contained in:
committed by
Nik Bougalis
parent
a691632995
commit
bb4127a6fb
@@ -94,7 +94,7 @@ STObject::makeDefaultObject (SerializedTypeID id, SField::ref name)
|
||||
// VFALCO TODO Remove the 'depth' parameter
|
||||
std::unique_ptr<STBase>
|
||||
STObject::makeDeserializedObject (SerializedTypeID id, SField::ref name,
|
||||
SerializerIterator& sit, int depth)
|
||||
SerialIter& sit, int depth)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -259,7 +259,7 @@ bool STObject::isFieldAllowed (SField::ref field)
|
||||
}
|
||||
|
||||
// return true = terminated with end-of-object
|
||||
bool STObject::set (SerializerIterator& sit, int depth)
|
||||
bool STObject::set (SerialIter& sit, int depth)
|
||||
{
|
||||
bool reachedEndOfObject = false;
|
||||
|
||||
@@ -313,7 +313,7 @@ bool STObject::set (SerializerIterator& sit, int depth)
|
||||
|
||||
|
||||
std::unique_ptr<STBase>
|
||||
STObject::deserialize (SerializerIterator& sit, SField::ref name)
|
||||
STObject::deserialize (SerialIter& sit, SField::ref name)
|
||||
{
|
||||
std::unique_ptr <STObject> object (std::make_unique <STObject> (name));
|
||||
object->set (sit, 1);
|
||||
|
||||
Reference in New Issue
Block a user