BlobReader.h 979 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include "il2cpp-class-internals.h"
  3. #include "../il2cpp-blob.h"
  4. namespace il2cpp
  5. {
  6. namespace utils
  7. {
  8. class BlobReader
  9. {
  10. public:
  11. // internal
  12. static bool GetConstantValueFromBlob(const Il2CppImage* image, Il2CppTypeEnum type, const char *blob, void *value);
  13. // This overload move the blob pointer as it reads
  14. static bool GetConstantValueFromBlob(const Il2CppImage* image, Il2CppTypeEnum type, const char **blob, void *value, bool deserializeManagedObjects);
  15. // Reads an encoded Il2CppTypeEnum
  16. // For IL2CPP_TYPE_ENUM, the underlying Il2CppTypeEnum will be returned and klass will be the actual enum class
  17. // For IL2CPP_TYPE_SZARRAY, klass will just be System.Array
  18. // For all other Il2CppTypeEnum klass will the the correct Il2CppClass
  19. static Il2CppTypeEnum ReadEncodedTypeEnum(const Il2CppImage* image, const char** blob, Il2CppClass** klass);
  20. };
  21. } /* utils */
  22. } /* il2cpp */