// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>

namespace Ghost.Nvtt;

public unsafe partial struct NvttTimingContext : System.IDisposable
{
    /// <summary>
    /// From: <see cref="Api.nvttCreateTimingContext(int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static NvttTimingContext* Create(int detailLevel)
    {
        return Api.nvttCreateTimingContext(detailLevel);
    }

    /// <summary>
    /// From: <see cref="Api.nvttDestroyTimingContext(NvttTimingContext*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Dispose()
    {
        Api.nvttDestroyTimingContext((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttTimingContextSetDetailLevel(NvttTimingContext*, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetDetailLevel(int detailLevel)
    {
        Api.nvttTimingContextSetDetailLevel(
            (NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            detailLevel);
    }

    /// <summary>
    /// From: <see cref="Api.nvttTimingContextGetRecordCount(NvttTimingContext*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int GetRecordCount()
    {
        return Api.nvttTimingContextGetRecordCount((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttTimingContextGetRecord(NvttTimingContext*, int, sbyte*, double*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void GetRecord(int i, sbyte* description, double* seconds)
    {
        Api.nvttTimingContextGetRecord(
            (NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            i,
            description,
            seconds);
    }

    /// <summary>
    /// From: <see cref="Api.nvttTimingContextGetRecordSafe(NvttTimingContext*, int, sbyte*, nuint, double*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public nuint GetRecordSafe(int i, sbyte* outDescription, nuint outDescriptionSize, double* seconds)
    {
        return Api.nvttTimingContextGetRecordSafe(
            (NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            i,
            outDescription,
            outDescriptionSize,
            seconds);
    }

    /// <summary>
    /// From: <see cref="Api.nvttTimingContextPrintRecords(NvttTimingContext*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void PrintRecords()
    {
        Api.nvttTimingContextPrintRecords((NvttTimingContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }
}
