Add StringAnsi serialization
This commit is contained in:
@@ -82,6 +82,11 @@ public:
|
||||
String(buf.Get());
|
||||
}
|
||||
|
||||
void String(const StringAnsi& value)
|
||||
{
|
||||
String(value.Get(), static_cast<unsigned>(value.Length()));
|
||||
}
|
||||
|
||||
FORCE_INLINE void RawValue(const StringAnsi& str)
|
||||
{
|
||||
RawValue(str.Get(), static_cast<int32>(str.Length()));
|
||||
|
||||
@@ -254,6 +254,19 @@ namespace Serialization
|
||||
v = stream.GetText();
|
||||
}
|
||||
|
||||
inline bool ShouldSerialize(const StringAnsi& v, const void* otherObj)
|
||||
{
|
||||
return !otherObj || v != *(StringAnsi*)otherObj;
|
||||
}
|
||||
inline void Serialize(ISerializable::SerializeStream& stream, const StringAnsi& v, const void* otherObj)
|
||||
{
|
||||
stream.String(v);
|
||||
}
|
||||
inline void Deserialize(ISerializable::DeserializeStream& stream, StringAnsi& v, ISerializeModifier* modifier)
|
||||
{
|
||||
v = stream.GetTextAnsi();
|
||||
}
|
||||
|
||||
FLAXENGINE_API bool ShouldSerialize(const Version& v, const void* otherObj);
|
||||
FLAXENGINE_API void Serialize(ISerializable::SerializeStream& stream, const Version& v, const void* otherObj);
|
||||
FLAXENGINE_API void Deserialize(ISerializable::DeserializeStream& stream, Version& v, ISerializeModifier* modifier);
|
||||
|
||||
Reference in New Issue
Block a user