18#ifndef INCLUDED_IDESERIALIZER
19#define INCLUDED_IDESERIALIZER
44 virtual void NumberI32(
const char* name, int32_t&
out, int32_t lower, int32_t upper);
54 virtual void Bool(
const char* name,
bool&
out);
59 virtual void ScriptVal(
const char* name, JS::MutableHandleValue
out) = 0;
70 virtual void RawBytes(
const char* name,
u8* data,
size_t len);
94 virtual void Get(
const char* name,
u8* data,
size_t len) = 0;
ERROR_TYPE(Deserialize, OutOfBounds)
A simple fixed-point number class.
Definition: Fixed.h:120
Deserialization interface; see serialization overview.
Definition: IDeserializer.h:35
virtual int GetVersion() const
Definition: IDeserializer.cpp:200
virtual void NumberU16(const char *name, uint16_t &out, uint16_t lower, uint16_t upper)
Definition: IDeserializer.cpp:52
virtual void NumberFloat_Unbounded(const char *name, float &out)
Definition: IDeserializer.cpp:138
virtual void ScriptString(const char *name, JS::MutableHandleString out)=0
Deserialize a JSString.
virtual void NumberU16_Unbounded(const char *name, uint16_t &out)
Definition: IDeserializer.cpp:110
virtual void NumberI16_Unbounded(const char *name, int16_t &out)
Definition: IDeserializer.cpp:117
virtual std::istream & GetStream()=0
Returns a stream which can be used to deserialize data directly.
virtual void String(const char *name, std::wstring &out, uint32_t minlength, uint32_t maxlength)
Definition: IDeserializer.cpp:176
virtual void Bool(const char *name, bool &out)
Definition: IDeserializer.cpp:155
virtual void NumberI8_Unbounded(const char *name, int8_t &out)
Definition: IDeserializer.cpp:105
virtual void NumberU8_Unbounded(const char *name, uint8_t &out)
Definition: IDeserializer.cpp:100
virtual void NumberFixed_Unbounded(const char *name, fixed &out)
Definition: IDeserializer.cpp:148
virtual void ScriptObjectAssign(const char *name, JS::HandleValue objVal)=0
Deserialize an object and assign its properties to objVal (Essentially equivalent to Object....
virtual void NumberU8(const char *name, uint8_t &out, uint8_t lower, uint8_t upper)
Definition: IDeserializer.cpp:30
virtual void NumberI32_Unbounded(const char *name, int32_t &out)
Definition: IDeserializer.cpp:131
virtual void StringASCII(const char *name, std::string &out, uint32_t minlength, uint32_t maxlength)
Definition: IDeserializer.cpp:162
virtual ~IDeserializer()
Definition: IDeserializer.cpp:26
virtual void NumberU32_Unbounded(const char *name, uint32_t &out)
Definition: IDeserializer.cpp:124
virtual void NumberI8(const char *name, int8_t &out, int8_t lower, int8_t upper)
Definition: IDeserializer.cpp:41
virtual void NumberI32(const char *name, int32_t &out, int32_t lower, int32_t upper)
Definition: IDeserializer.cpp:88
virtual void ScriptVal(const char *name, JS::MutableHandleValue out)=0
Deserialize a JS::Value, replacing 'out'.
virtual void NumberDouble_Unbounded(const char *name, double &out)
Definition: IDeserializer.cpp:143
virtual void Get(const char *name, u8 *data, size_t len)=0
virtual void RawBytes(const char *name, u8 *data, size_t len)
Definition: IDeserializer.cpp:195
virtual void NumberI16(const char *name, int16_t &out, int16_t lower, int16_t upper)
Definition: IDeserializer.cpp:64
virtual void RequireBytesInStream(size_t numBytes)=0
Throws an exception if the stream definitely cannot provide the required number of bytes.
virtual void NumberU32(const char *name, uint32_t &out, uint32_t lower, uint32_t upper)
Definition: IDeserializer.cpp:76
uint8_t u8
Definition: types.h:37
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:407
unsigned short uint16_t
Definition: wposix_types.h:52
unsigned int uint32_t
Definition: wposix_types.h:53
short int16_t
Definition: wposix_types.h:38
unsigned char uint8_t
Definition: wposix_types.h:51
signed char int8_t
Definition: wposix_types.h:37