18#ifndef INCLUDED_DEBUGSERIALIZER
19#define INCLUDED_DEBUGSERIALIZER
37 void Comment(
const std::string& comment);
38 void TextLine(
const std::string& text);
51 virtual void PutNumber(
const char* name, int32_t value);
52 virtual void PutNumber(
const char* name,
float value);
53 virtual void PutNumber(
const char* name,
double value);
55 virtual void PutBool(
const char* name,
bool value);
56 virtual void PutString(
const char* name,
const std::string& value);
57 virtual void PutScriptVal(
const char* name, JS::MutableHandleValue value);
58 virtual void PutRaw(
const char* name,
const u8* data,
size_t len);
Serialize to a human-readable YAML-like format.
Definition: DebugSerializer.h:27
NONCOPYABLE(CDebugSerializer)
void Dedent(int spaces)
Definition: DebugSerializer.cpp:68
void Indent(int spaces)
Definition: DebugSerializer.cpp:63
virtual void PutBool(const char *name, bool value)
Definition: DebugSerializer.cpp:131
virtual void PutRaw(const char *name, const u8 *data, size_t len)
Definition: DebugSerializer.cpp:173
virtual std::ostream & GetStream()
Returns a stream which can be used to serialize data directly.
Definition: DebugSerializer.cpp:192
CDebugSerializer(const ScriptInterface &scriptInterface, std::ostream &stream, bool includeDebugInfo=true)
Definition: DebugSerializer.cpp:58
int m_Indent
Definition: DebugSerializer.h:64
void Comment(const std::string &comment)
Definition: DebugSerializer.cpp:76
void TextLine(const std::string &text)
Definition: DebugSerializer.cpp:81
const ScriptInterface & m_ScriptInterface
Definition: DebugSerializer.h:61
virtual bool IsDebug() const
Returns true if the serializer is being used in debug mode.
Definition: DebugSerializer.cpp:187
std::ostream & m_Stream
Definition: DebugSerializer.h:62
bool m_IsDebug
Definition: DebugSerializer.h:63
virtual void PutScriptVal(const char *name, JS::MutableHandleValue value)
Definition: DebugSerializer.cpp:153
virtual void PutString(const char *name, const std::string &value)
Definition: DebugSerializer.cpp:136
virtual void PutNumber(const char *name, uint8_t value)
Definition: DebugSerializer.cpp:86
A simple fixed-point number class.
Definition: Fixed.h:120
Serialization interface; see serialization overview.
Definition: ISerializer.h:121
Abstraction around a SpiderMonkey JS::Realm.
Definition: ScriptInterface.h:72
uint8_t u8
Definition: types.h:37
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