18 #ifndef INCLUDED_STDSERIALIZER
19 #define INCLUDED_STDSERIALIZER
25 #define DEBUG_SERIALIZER_ANNOTATE 0 // annotate the stream to help debugging if you're reading the output in a hex editor
33 void Put(
const char* name,
const u8* data,
size_t len)
35 #if DEBUG_SERIALIZER_ANNOTATE
42 m_Stream.write((
const char*)data, (std::streamsize)len);
62 #endif // INCLUDED_STDSERIALIZER
virtual std::ostream & GetStream()
Returns a stream which can be used to serialize data directly.
#define UNUSED2(param)
mark a function local variable or parameter as unused and avoid the corresponding compiler warning...
CStdSerializerImpl(std::ostream &stream)
NONCOPYABLE(CStdSerializerImpl)
CStdSerializer(ScriptInterface &scriptInterface, std::ostream &stream)
std::ostream & GetStream()
Abstraction around a SpiderMonkey JSContext.
Serialize to a binary stream.
void Put(const char *name, const u8 *data, size_t len)