// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:12 ///
/// class StateRecorderImpl final : public StateRecorder ///
///
/// /// /// Implementation of the StateRecorder class that uses a stringstream as underlying store and that implements /// checking if the state doesn't change upon reading /// /// [InteropHandle] public readonly partial struct StateRecorderImpl : IDisposable { /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:16 ///
/// StateRecorderImpl() = default ///
///
/// /// /// Constructor /// /// public static StateRecorderImpl Create() => Jolt.PInvoke.StateRecorderImpl_Create(); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:20 ///
/// virtual void WriteBytes(const void *inData, size_t inNumBytes) override ///
///
/// /// /// Write a string of bytes to the binary stream /// /// public unsafe void WriteBytes(Ptr data, ByteSize numBytes) => Jolt.PInvoke.StateRecorderImpl_WriteBytes(this, data, (nuint)numBytes); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:23 ///
/// void Rewind() ///
///
/// /// /// Rewind the stream for reading /// /// public void Rewind() => Jolt.PInvoke.StateRecorderImpl_Rewind(this); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:26 ///
/// void Clear() ///
///
/// /// /// Clear the stream for reuse /// /// public void Clear() => Jolt.PInvoke.StateRecorderImpl_Clear(this); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:29 ///
/// virtual void ReadBytes(void *outData, size_t inNumBytes) override ///
///
/// /// /// Read a string of bytes from the binary stream /// /// public unsafe void ReadBytes(Ptr data, ByteSize numBytes) => Jolt.PInvoke.StateRecorderImpl_ReadBytes(this, data, (nuint)numBytes); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:32 ///
/// virtual bool IsEOF() const override ///
///
/// /// /// See StreamIn /// /// public bool IsEOF() => Jolt.PInvoke.StateRecorderImpl_IsEOF(this); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:35 ///
/// virtual bool IsFailed() const override ///
///
/// /// /// See StreamIn / StreamOut /// /// public bool IsFailed() => Jolt.PInvoke.StateRecorderImpl_IsFailed(this); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:38 ///
/// bool IsEqual(StateRecorderImpl &inReference) ///
///
/// /// /// Compare this state with a reference state and ensure they are the same /// /// public bool IsEqual(StateRecorderImpl reference) => Jolt.PInvoke.StateRecorderImpl_IsEqual(this, reference); /// /// /// C++: /// Jolt/Physics/StateRecorderImpl.h:44 ///
/// size_t GetDataSize() ///
///
/// /// /// Get size of the binary data in bytes /// /// public nuint GetDataSize() => Jolt.PInvoke.StateRecorderImpl_GetDataSize(this); public static implicit operator StateRecorder(StateRecorderImpl value) => Jolt.PInvoke.StateRecorderImpl_AsStateRecorder(value); public static implicit operator StreamIn(StateRecorderImpl value) => Jolt.PInvoke.StateRecorderImpl_AsStreamIn(value); public static implicit operator StreamOut(StateRecorderImpl value) => Jolt.PInvoke.StateRecorderImpl_AsStreamOut(value); public void Dispose() => Jolt.PInvoke.StateRecorderImpl_Destroy(this); } }