diff options
Diffstat (limited to 'Runtime/Serialize/DumpSerializedDataToText.h')
-rw-r--r-- | Runtime/Serialize/DumpSerializedDataToText.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Runtime/Serialize/DumpSerializedDataToText.h b/Runtime/Serialize/DumpSerializedDataToText.h new file mode 100644 index 0000000..f78cb81 --- /dev/null +++ b/Runtime/Serialize/DumpSerializedDataToText.h @@ -0,0 +1,24 @@ +#pragma once + +#ifndef UNITY_INCLUDE_SERIALIZATION_DUMP +#define UNITY_INCLUDE_SERIALIZATION_DUMP 0 +#endif + +// Debugging functions that dump the state of an object or typetree/bytearray to stdout +// Used in BinaryToTextFile by defining UNITY_INCLUDE_SERIALIZATION_DUMP +#if UNITY_EDITOR || UNITY_INCLUDE_SERIALIZATION_DUMP || DEBUGMODE +#include <iostream> +#include "Runtime/Utilities/dynamic_array.h" + +class TypeTree; + +enum DumpOutputMode +{ + kDumpNormal, + kDumpClean, +}; + +void DumpSerializedDataToText (const TypeTree& typeTree, dynamic_array<UInt8>& data); +void RecursiveOutput (const TypeTree& type, const UInt8* data, int* offset, int tab, std::ostream& os, DumpOutputMode mode, int pathID, bool doSwap, int arrayIndex); +#endif + |