diff --git a/src/SerializedObject.h b/src/SerializedObject.h index 3242802fe0..58914bfb78 100644 --- a/src/SerializedObject.h +++ b/src/SerializedObject.h @@ -87,7 +87,6 @@ public: SerializedType& getField(SField::ref field); const SerializedType* peekAtPField(SField::ref field) const; SerializedType* getPField(SField::ref field); - const SOElement* getFieldType(SField::ref field) const; // these throw if the field type doesn't match, or return default values if the // field is optional but not present @@ -130,6 +129,11 @@ public: static std::auto_ptr makeDeserializedObject(SerializedTypeID id, SField::ref name, SerializerIterator&, int depth); + static std::auto_ptr makeNonPresentObject(SField::ref name) + { return makeDefaultObject(STI_NOTPRESENT, name); } + static std::auto_ptr makeDefaultObject(SField::ref name) + { return makeDefaultObject(name.fieldType, name); } + static void unitTest(); };