ObjectStream.cpp 633 B

1234567891011121314151617181920
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #include <Jolt/Jolt.h>
  4. #include <Jolt/ObjectStream/ObjectStream.h>
  5. namespace JPH {
  6. // Define macro to declare functions for a specific primitive type
  7. #define JPH_DECLARE_PRIMITIVE(name) \
  8. bool OSIsType(name *inNull, int inArrayDepth, ObjectStream::EDataType inDataType, const char *inClassName) \
  9. { \
  10. return inArrayDepth == 0 && inDataType == ObjectStream::EDataType::T_##name; \
  11. }
  12. // This file uses the JPH_DECLARE_PRIMITIVE macro to define all types
  13. #include <Jolt/ObjectStream/ObjectStreamTypes.h>
  14. } // JPH