aboutsummaryrefslogtreecommitdiff
path: root/NvBlast/sdk/toolkit/include/NvBlastTkSerializable.h
diff options
context:
space:
mode:
Diffstat (limited to 'NvBlast/sdk/toolkit/include/NvBlastTkSerializable.h')
-rw-r--r--NvBlast/sdk/toolkit/include/NvBlastTkSerializable.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/NvBlast/sdk/toolkit/include/NvBlastTkSerializable.h b/NvBlast/sdk/toolkit/include/NvBlastTkSerializable.h
new file mode 100644
index 0000000..93b9b47
--- /dev/null
+++ b/NvBlast/sdk/toolkit/include/NvBlastTkSerializable.h
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef NVBLASTTKSERIALIZABLE_H
+#define NVBLASTTKSERIALIZABLE_H
+
+
+#include "NvBlastTkIdentifiable.h"
+
+
+// Forward declarations
+namespace physx
+{
+namespace general_PxIOStream2
+{
+class PxFileBuf;
+}
+}
+
+
+namespace Nv
+{
+namespace Blast
+{
+
+/**
+TkSerializable objects support the serialize interface, and are returned by TkFramework::deserialize.
+*/
+class TkSerializable : public TkIdentifiable
+{
+public:
+ /**
+ Write the object data to the user-defined PxFileBuf stream.
+
+ \param[in] stream User-defined stream object.
+
+ \return true if serialization was successful, false otherwise.
+ */
+ virtual bool serialize(physx::general_PxIOStream2::PxFileBuf& stream) const = 0;
+
+ // Data
+
+ /**
+ Integer field available to the user. This data is serialized.
+ */
+ uint64_t userIntData;
+};
+
+} // namespace Blast
+} // namespace Nv
+
+
+#endif // ifndef NVBLASTTKSERIALIZABLE_H