mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,140 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L34">Jolt/Core/TempAllocator.h:34</see>
|
||||
/// <br/>
|
||||
/// <c>class TempAllocatorImpl final : public TempAllocator</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Default implementation of the temp allocator that allocates a large block through malloc upfront
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[InteropHandle]
|
||||
public readonly partial struct TempAllocatorImpl : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L40">Jolt/Core/TempAllocator.h:40</see>
|
||||
/// <br/>
|
||||
/// <c>explicit TempAllocatorImpl(size_t inSize)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Constructs the allocator with a maximum allocatable size of inSize
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static TempAllocatorImpl Create(nuint size) => Jolt.PInvoke.TempAllocatorImpl_Create(size);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L59">Jolt/Core/TempAllocator.h:59</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void * Allocate(uint inSize) override</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// See: TempAllocator
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorImpl_Allocate(this, size);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L80">Jolt/Core/TempAllocator.h:80</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void Free(void *inAddress, uint inSize) override</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// See: TempAllocator
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public unsafe void Free(Ptr address, uint size) => Jolt.PInvoke.TempAllocatorImpl_Free(this, address, size);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L98">Jolt/Core/TempAllocator.h:98</see>
|
||||
/// <br/>
|
||||
/// <c>bool IsEmpty() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Check if no allocations have been made
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public bool IsEmpty() => Jolt.PInvoke.TempAllocatorImpl_IsEmpty(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L104">Jolt/Core/TempAllocator.h:104</see>
|
||||
/// <br/>
|
||||
/// <c>size_t GetSize() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Get the total size of the fixed buffer
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public ByteSize GetSize() => (ByteSize)Jolt.PInvoke.TempAllocatorImpl_GetSize(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L110">Jolt/Core/TempAllocator.h:110</see>
|
||||
/// <br/>
|
||||
/// <c>size_t GetUsage() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Get current usage in bytes of the buffer
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public ByteSize GetUsage() => (ByteSize)Jolt.PInvoke.TempAllocatorImpl_GetUsage(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L116">Jolt/Core/TempAllocator.h:116</see>
|
||||
/// <br/>
|
||||
/// <c>bool CanAllocate(uint inSize) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Check if an allocation of inSize can be made in this fixed buffer allocator
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public bool CanAllocate(uint size) => Jolt.PInvoke.TempAllocatorImpl_CanAllocate(this, size);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L122">Jolt/Core/TempAllocator.h:122</see>
|
||||
/// <br/>
|
||||
/// <c>bool OwnsMemory(const void *inAddress) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Check if memory block at inAddress is owned by this allocator
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public unsafe bool OwnsMemory(Ptr address) => Jolt.PInvoke.TempAllocatorImpl_OwnsMemory(this, address);
|
||||
public static implicit operator TempAllocator(TempAllocatorImpl value) => Jolt.PInvoke.TempAllocatorImpl_AsTempAllocator(value);
|
||||
public void Dispose() => Jolt.PInvoke.TempAllocatorImpl_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue