Output serializer that tracks if it actually writes changes to memory or not. More...
#include <TrackChangedSerializer.h>
Inherits BASE_TYPE.
Public Member Functions | |
TrackChangedSerializer (const uint8_t *buffer, uint32_t bufferCapacity) | |
SerializerMode | GetSerializerMode () const override |
bool | Serialize (bool &value, const char *name) override |
bool | Serialize (int8_t &value, const char *name, int8_t minValue, int8_t maxValue) override |
bool | Serialize (int16_t &value, const char *name, int16_t minValue, int16_t maxValue) override |
bool | Serialize (int32_t &value, const char *name, int32_t minValue, int32_t maxValue) override |
bool | Serialize (long &value, const char *name, long minValue, long maxValue) override |
bool | Serialize (AZ::s64 &value, const char *name, AZ::s64 minValue, AZ::s64 maxValue) override |
bool | Serialize (uint8_t &value, const char *name, uint8_t minValue, uint8_t maxValue) override |
bool | Serialize (uint16_t &value, const char *name, uint16_t minValue, uint16_t maxValue) override |
bool | Serialize (uint32_t &value, const char *name, uint32_t minValue, uint32_t maxValue) override |
bool | Serialize (unsigned long &value, const char *name, unsigned long minValue, unsigned long maxValue) override |
bool | Serialize (AZ::u64 &value, const char *name, AZ::u64 minValue, AZ::u64 maxValue) override |
bool | Serialize (float &value, const char *name, float minValue, float maxValue) override |
bool | Serialize (double &value, const char *name, double minValue, double maxValue) override |
bool | SerializeBytes (uint8_t *buffer, uint32_t bufferCapacity, bool isString, uint32_t &outSize, const char *name) override |
bool | BeginObject (const char *name) override |
bool | EndObject (const char *name) override |
const uint8_t * | GetBuffer () const override |
uint32_t | GetCapacity () const override |
uint32_t | GetSize () const override |
void | ClearTrackedChangesFlag () override |
bool | GetTrackedChangesFlag () const override |
virtual bool | Serialize (bool &value, const char *name)=0 |
bool | Serialize (char &value, const char *name, uint8_t minValue=AZStd::numeric_limits< uint8_t >::min(), uint8_t maxValue=AZStd::numeric_limits< uint8_t >::max()) |
virtual bool | Serialize (int8_t &value, const char *name, int8_t minValue=AZStd::numeric_limits< int8_t >::min(), int8_t maxValue=AZStd::numeric_limits< int8_t >::max())=0 |
virtual bool | Serialize (int16_t &value, const char *name, int16_t minValue=AZStd::numeric_limits< int16_t >::min(), int16_t maxValue=AZStd::numeric_limits< int16_t >::max())=0 |
virtual bool | Serialize (int32_t &value, const char *name, int32_t minValue=AZStd::numeric_limits< int32_t >::min(), int32_t maxValue=AZStd::numeric_limits< int32_t >::max())=0 |
virtual bool | Serialize (long &value, const char *name, long minValue=AZStd::numeric_limits< long >::min(), long maxValue=AZStd::numeric_limits< long >::max())=0 |
virtual bool | Serialize (AZ::s64 &value, const char *name, AZ::s64 minValue=AZStd::numeric_limits< AZ::s64 >::min(), AZ::s64 maxValue=AZStd::numeric_limits< AZ::s64 >::max())=0 |
virtual bool | Serialize (uint8_t &value, const char *name, uint8_t minValue=AZStd::numeric_limits< uint8_t >::min(), uint8_t maxValue=AZStd::numeric_limits< uint8_t >::max())=0 |
virtual bool | Serialize (uint16_t &value, const char *name, uint16_t minValue=AZStd::numeric_limits< uint16_t >::min(), uint16_t maxValue=AZStd::numeric_limits< uint16_t >::max())=0 |
virtual bool | Serialize (uint32_t &value, const char *name, uint32_t minValue=AZStd::numeric_limits< uint32_t >::min(), uint32_t maxValue=AZStd::numeric_limits< uint32_t >::max())=0 |
virtual bool | Serialize (unsigned long &value, const char *name, unsigned long minValue=AZStd::numeric_limits< unsigned long >::min(), unsigned long maxValue=AZStd::numeric_limits< uint64_t >::max())=0 |
virtual bool | Serialize (AZ::u64 &value, const char *name, AZ::u64 minValue=AZStd::numeric_limits< AZ::u64 >::min(), AZ::u64 maxValue=AZStd::numeric_limits< AZ::u64 >::max())=0 |
virtual bool | Serialize (float &value, const char *name, float minValue=AZStd::numeric_limits< float >::min(), float maxValue=AZStd::numeric_limits< float >::max())=0 |
virtual bool | Serialize (double &value, const char *name, double minValue=AZStd::numeric_limits< double >::min(), double maxValue=AZStd::numeric_limits< double >::max())=0 |
template<typename TYPE > | |
bool | Serialize (TYPE &value, const char *name) |
Output serializer that tracks if it actually writes changes to memory or not.
AzNetworking::TrackChangedSerializer< BASE_TYPE >::TrackChangedSerializer | ( | const uint8_t * | buffer, |
uint32_t | bufferCapacity | ||
) |
Constructor.
buffer | output buffer to read from |
bufferCapacity | capacity of the buffer in bytes |
virtual bool AzNetworking::ISerializer::Serialize | ( | AZ::s64 & | value, |
const char * | name, | ||
AZ::s64 | minValue = AZStd::numeric_limits<AZ::s64>::min() , |
||
AZ::s64 | maxValue = AZStd::numeric_limits<AZ::s64>::max() |
||
) |
Serialize a signed 64-bit integer (long long).
value | signed 64-bit integer input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | AZ::u64 & | value, |
const char * | name, | ||
AZ::u64 | minValue = AZStd::numeric_limits<AZ::u64>::min() , |
||
AZ::u64 | maxValue = AZStd::numeric_limits<AZ::u64>::max() |
||
) |
Serialize an unsigned 64-bit integer (unsigned long long).
value | unsigned 64-bit integer input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | bool & | value, |
const char * | name | ||
) |
Serialize a boolean.
value | boolean input value to serialize |
name | string name of the value being serialized |
|
inline |
Serialize a character.
value | character input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | double & | value, |
const char * | name, | ||
double | minValue = AZStd::numeric_limits<double>::min() , |
||
double | maxValue = AZStd::numeric_limits<double>::max() |
||
) |
Serialize a 64-bit floating point number.
value | 64-bit floating point input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | float & | value, |
const char * | name, | ||
float | minValue = AZStd::numeric_limits<float>::min() , |
||
float | maxValue = AZStd::numeric_limits<float>::max() |
||
) |
Serialize a 32-bit floating point number.
value | 32-bit floating point input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | int16_t & | value, |
const char * | name, | ||
int16_t | minValue = AZStd::numeric_limits<int16_t>::min() , |
||
int16_t | maxValue = AZStd::numeric_limits<int16_t>::max() |
||
) |
Serialize a signed short.
value | signed short input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | int32_t & | value, |
const char * | name, | ||
int32_t | minValue = AZStd::numeric_limits<int32_t>::min() , |
||
int32_t | maxValue = AZStd::numeric_limits<int32_t>::max() |
||
) |
Serialize a signed integer.
value | signed integer input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | int8_t & | value, |
const char * | name, | ||
int8_t | minValue = AZStd::numeric_limits<int8_t>::min() , |
||
int8_t | maxValue = AZStd::numeric_limits<int8_t>::max() |
||
) |
Serialize a signed byte.
value | signed byte input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | long & | value, |
const char * | name, | ||
long | minValue = AZStd::numeric_limits<long>::min() , |
||
long | maxValue = AZStd::numeric_limits<long>::max() |
||
) |
Serialize a signed long integer.
value | signed long integer input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
|
inline |
Serialize interface for deducing whether or not TYPE is an enum or an object.
value | object instance to serialize |
name | string name of the object |
virtual bool AzNetworking::ISerializer::Serialize | ( | uint16_t & | value, |
const char * | name, | ||
uint16_t | minValue = AZStd::numeric_limits<uint16_t>::min() , |
||
uint16_t | maxValue = AZStd::numeric_limits<uint16_t>::max() |
||
) |
Serialize an unsigned short.
value | unsigned integer short value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | uint32_t & | value, |
const char * | name, | ||
uint32_t | minValue = AZStd::numeric_limits<uint32_t>::min() , |
||
uint32_t | maxValue = AZStd::numeric_limits<uint32_t>::max() |
||
) |
Serialize an unsigned integer.
value | unsigned integer input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | uint8_t & | value, |
const char * | name, | ||
uint8_t | minValue = AZStd::numeric_limits<uint8_t>::min() , |
||
uint8_t | maxValue = AZStd::numeric_limits<uint8_t>::max() |
||
) |
Serialize an unsigned byte.
value | unsigned byte input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |
virtual bool AzNetworking::ISerializer::Serialize | ( | unsigned long & | value, |
const char * | name, | ||
unsigned long | minValue = AZStd::numeric_limits<unsigned long>::min() , |
||
unsigned long | maxValue = AZStd::numeric_limits<uint64_t>::max() |
||
) |
Serialize an unsigned long integer.
value | unsigned long integer input value to serialize |
name | string name of the value being serialized |
minValue | the minimum value expected during serialization |
maxValue | the maximum value expected during serialization |