Skip to content

Instantly share code, notes, and snippets.

@raizam
Created November 11, 2020 08:59
Show Gist options
  • Save raizam/2f41085e392e54e4389f3ed1423b5440 to your computer and use it in GitHub Desktop.
Save raizam/2f41085e392e54e4389f3ed1423b5440 to your computer and use it in GitHub Desktop.
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Security;
namespace FlecsSharp
{
public readonly struct CharPtr
{
readonly IntPtr _ptr;
public CharPtr(IntPtr ptr) => this._ptr = ptr;
public static explicit operator CharPtr(IntPtr ptr) => new CharPtr(ptr);
public static implicit operator IntPtr(CharPtr charPtr) => charPtr._ptr;
public unsafe ReadOnlySpan<byte> AsSpan()
{
byte* start = (byte*)_ptr;
byte* current = start;
while (*current != 0)
current++;
return new ReadOnlySpan<byte>(start, (int)(current - start));
}
public unsafe override string ToString() =>
System.Text.Encoding.UTF8.GetString(AsSpan());
}
public class NativeStructAttribute : Attribute
{
public NativeStructAttribute(string name, int size)
{
Size = size;
Name = name;
}
public string Name{get;}
public int Size{get;}
}
#region Enums
// ecs_match_kind_t: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L71
public enum MatchKind : Int32
{
Default = 0,
All = 1,
Any = 2,
Exact = 3,
}
// ecs_sig_from_kind_t: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L125
public enum SigFromKind : Int32
{
Fromany = 0,
Fromowned = 1,
Fromshared = 2,
Fromparent = 3,
Fromsystem = 4,
Fromempty = 5,
Fromentity = 6,
Cascade = 7,
}
// ecs_sig_oper_kind_t: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L137
public enum SigOperKind : Int32
{
And = 0,
Or = 1,
Not = 2,
Optional = 3,
All = 4,
Last = 5,
}
// ecs_sig_inout_kind_t: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L118
public enum SigInoutKind : Int32
{
Inout = 0,
In = 1,
Out = 2,
}
// ecs_system_status_t: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L182
public enum SystemStatus : Int32
{
Statusnone = 0,
Enabled = 1,
Disabled = 2,
Activated = 3,
Deactivated = 4,
}
// EcsMatchFailureReason: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_types.h#L161
public enum MatchFailureReason : Int32
{
Ok = 0,
Notasystem = 1,
Systemisatask = 2,
Entityisdisabled = 3,
Entityisprefab = 4,
Fromself = 5,
Fromowned = 6,
Fromshared = 7,
Fromcontainer = 8,
Fromentity = 9,
Orfromself = 10,
Orfromowned = 11,
Orfromshared = 12,
Orfromcontainer = 13,
Notfromself = 14,
Notfromowned = 15,
Notfromshared = 16,
Notfromcontainer = 17,
}
// ecs_blob_header_kind_t: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/reader_writer.h#L15
public enum BlobHeaderKind : Int32
{
Streamheader = 0,
Tablesegment = 1,
Footersegment = 2,
Tableheader = 3,
Tabletypesize = 4,
Tabletype = 5,
Tablesize = 6,
Tablecolumn = 7,
Tablecolumnheader = 8,
Tablecolumnsize = 9,
Tablecolumndata = 10,
Tablecolumnnameheader = 11,
Tablecolumnnamelength = 12,
Tablecolumnname = 13,
Streamfooter = 14,
}
#endregion
#region Typedefs
public unsafe partial struct Size
{
public Size(Int32 value)
{
Value = value;
}
Int32 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Size(Int32 val) => new Size(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Int32(Size val) => val.Value;
}
public unsafe partial struct MapKey
{
public MapKey(UInt64 value)
{
Value = value;
}
UInt64 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator MapKey(UInt64 val) => new MapKey(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator UInt64(MapKey val) => val.Value;
}
public unsafe partial struct OsThread
{
public OsThread(UInt64 value)
{
Value = value;
}
UInt64 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator OsThread(UInt64 val) => new OsThread(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator UInt64(OsThread val) => val.Value;
}
public unsafe partial struct OsMutex
{
public OsMutex(UInt64 value)
{
Value = value;
}
UInt64 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator OsMutex(UInt64 val) => new OsMutex(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator UInt64(OsMutex val) => val.Value;
}
public unsafe partial struct OsCond
{
public OsCond(UInt64 value)
{
Value = value;
}
UInt64 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator OsCond(UInt64 val) => new OsCond(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator UInt64(OsCond val) => val.Value;
}
public unsafe partial struct OsDl
{
public OsDl(UInt64 value)
{
Value = value;
}
UInt64 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator OsDl(UInt64 val) => new OsDl(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator UInt64(OsDl val) => val.Value;
}
public unsafe partial struct EntityId
{
public EntityId(UInt64 value)
{
Value = value;
}
UInt64 Value;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator EntityId(UInt64 val) => new EntityId(val);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator UInt64(EntityId val) => val.Value;
}
#endregion
#region Structs
//ecs_vector_t
[NativeStruct("ecs_vector_t", 16), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Vector
{
public Vector* Ptr() { fixed(Vector* ptr = &this) return ptr; }
internal int count; //size: 4, offset:0
internal int size; //size: 4, offset:4
internal long elemSize; //size: 8, offset:8
}
//ecs_map_iter_t
[NativeStruct("ecs_map_iter_t", 32), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct MapIter
{
public MapIter* Ptr() { fixed(MapIter* ptr = &this) return ptr; }
internal Map map; //size: 8, offset:0
internal Bucket bucket; //size: 8, offset:8
internal int bucketIndex; //size: 4, offset:16
internal int elementIndex; //size: 4, offset:20
internal IntPtr payload; //size: 8, offset:24
}
//ecs_switch_t
[NativeStruct("ecs_switch_t", 40), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Switch
{
public Switch* Ptr() { fixed(Switch* ptr = &this) return ptr; }
internal ulong min; //size: 8, offset:0
internal ulong max; //size: 8, offset:8
internal SwitchHeader* headers; //size: 8, offset:16
internal Vector* nodes; //size: 8, offset:24
internal Vector* values; //size: 8, offset:32
}
//ecs_switch_header_t
[NativeStruct("ecs_switch_header_t", 8), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct SwitchHeader
{
public SwitchHeader* Ptr() { fixed(SwitchHeader* ptr = &this) return ptr; }
internal int element; //size: 4, offset:0
internal int count; //size: 4, offset:4
}
//ecs_strbuf_t
[NativeStruct("ecs_strbuf_t", 1088), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Strbuf
{
public Strbuf* Ptr() { fixed(Strbuf* ptr = &this) return ptr; }
internal CharPtr buf; //size: 8, offset:0
internal int max; //size: 4, offset:8
internal int size; //size: 4, offset:12
internal int elementCount; //size: 4, offset:16
internal StrbufElementEmbedded firstElement; //size: 536, offset:24
internal StrbufElement* current; //size: 8, offset:560
internal StrbufListElem32 listStack;
internal int listSp; //size: 4, offset:1080
}
//ecs_strbuf_element_embedded
[NativeStruct("ecs_strbuf_element_embedded", 536), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct StrbufElementEmbedded
{
public StrbufElementEmbedded* Ptr() { fixed(StrbufElementEmbedded* ptr = &this) return ptr; }
internal StrbufElement super; //size: 24, offset:0
internal fixed sbyte buf[512];
}
//ecs_strbuf_element
[NativeStruct("ecs_strbuf_element", 24), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct StrbufElement
{
public StrbufElement* Ptr() { fixed(StrbufElement* ptr = &this) return ptr; }
internal byte bufferEmbedded; //size: 1, offset:0
internal int pos; //size: 4, offset:4
internal CharPtr buf; //size: 8, offset:8
internal StrbufElement* next; //size: 8, offset:16
}
//ecs_strbuf_list_elem
[NativeStruct("ecs_strbuf_list_elem", 16), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct StrbufListElem
{
public StrbufListElem* Ptr() { fixed(StrbufListElem* ptr = &this) return ptr; }
internal int count; //size: 4, offset:0
internal readonly CharPtr separator; //size: 8, offset:8
}
//ecs_os_api_t
[NativeStruct("ecs_os_api_t", 256), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct OsApi
{
public OsApi* Ptr() { fixed(OsApi* ptr = &this) return ptr; }
internal IntPtr _init;
internal IntPtr _fini;
internal IntPtr _malloc;
internal IntPtr _realloc;
internal IntPtr _calloc;
internal IntPtr _free;
internal IntPtr _strdup;
internal IntPtr _threadNew;
internal IntPtr _threadJoin;
internal IntPtr _ainc;
internal IntPtr _adec;
internal IntPtr _mutexNew;
internal IntPtr _mutexFree;
internal IntPtr _mutexLock;
internal IntPtr _mutexUnlock;
internal IntPtr _condNew;
internal IntPtr _condFree;
internal IntPtr _condSignal;
internal IntPtr _condBroadcast;
internal IntPtr _condWait;
internal IntPtr _sleep;
internal IntPtr _getTime;
internal IntPtr _log;
internal IntPtr _logError;
internal IntPtr _logDebug;
internal IntPtr _logWarning;
internal IntPtr _abort;
internal IntPtr _dlopen;
internal IntPtr _dlproc;
internal IntPtr _dlclose;
internal IntPtr _moduleToDl;
internal IntPtr _moduleToEtc;
}
//ecs_time_t
[NativeStruct("ecs_time_t", 8), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Time
{
public Time* Ptr() { fixed(Time* ptr = &this) return ptr; }
internal uint sec; //size: 4, offset:0
internal uint nanosec; //size: 4, offset:4
}
//ecs_iter_t
[NativeStruct("ecs_iter_t", 208), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Iter
{
public Iter* Ptr() { fixed(Iter* ptr = &this) return ptr; }
internal World world; //size: 8, offset:0
internal EntityId system; //size: 8, offset:8
internal IterTable* table; //size: 8, offset:16
internal Query query; //size: 8, offset:24
internal int tableCount; //size: 4, offset:32
internal int inactiveTableCount; //size: 4, offset:36
internal int columnCount; //size: 4, offset:40
internal IntPtr tableColumns; //size: 8, offset:48
internal EntityId* entities; //size: 8, offset:56
internal IntPtr param; //size: 8, offset:64
internal float deltaTime; //size: 4, offset:72
internal float deltaSystemTime; //size: 4, offset:76
internal float worldTime; //size: 4, offset:80
internal int frameOffset; //size: 4, offset:84
internal int tableOffset; //size: 4, offset:88
internal int offset; //size: 4, offset:92
internal int count; //size: 4, offset:96
internal int totalCount; //size: 4, offset:100
internal Entities* triggeredBy; //size: 8, offset:104
internal EntityId interruptedBy; //size: 8, offset:112
[StructLayout(LayoutKind.Explicit)]
internal unsafe partial struct anonymous5538_union
{
[FieldOffset(0)]
internal ScopeIter parent; //size: 88, offset:0
[FieldOffset(0)]
internal FilterIter filter; //size: 88, offset:0
[FieldOffset(0)]
internal QueryIter query; //size: 32, offset:0
[FieldOffset(0)]
internal SnapshotIter snapshot; //size: 88, offset:0
}
internal anonymous5538_union anonymous5538; //size: 88, offset:-1
// internal Iter iter; //size: 88, offset:120
}
//ecs_iter_table_t
[NativeStruct("ecs_iter_table_t", 48), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct IterTable
{
public IterTable* Ptr() { fixed(IterTable* ptr = &this) return ptr; }
internal int* columns; //size: 8, offset:0
internal Table table; //size: 8, offset:8
internal _Data data; //size: 8, offset:16
internal EntityId* components; //size: 8, offset:24
internal TypeId* types; //size: 8, offset:32
internal Ref* references; //size: 8, offset:40
}
//ecs_ref_t
[NativeStruct("ecs_ref_t", 48), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Ref
{
public Ref* Ptr() { fixed(Ref* ptr = &this) return ptr; }
internal EntityId entity; //size: 8, offset:0
internal EntityId component; //size: 8, offset:8
internal IntPtr table; //size: 8, offset:16
internal int row; //size: 4, offset:24
internal int allocCount; //size: 4, offset:28
internal Record* record; //size: 8, offset:32
internal readonly IntPtr ptr; //size: 8, offset:40
}
//ecs_record_t
[NativeStruct("ecs_record_t", 16), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Record
{
public Record* Ptr() { fixed(Record* ptr = &this) return ptr; }
internal Table table; //size: 8, offset:0
internal int row; //size: 4, offset:8
}
//ecs_entities_t
[NativeStruct("ecs_entities_t", 16), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Entities
{
public Entities* Ptr() { fixed(Entities* ptr = &this) return ptr; }
internal EntityId* array; //size: 8, offset:0
internal int count; //size: 4, offset:8
}
//ecs_scope_iter_t
[NativeStruct("ecs_scope_iter_t", 88), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct ScopeIter
{
public ScopeIter* Ptr() { fixed(ScopeIter* ptr = &this) return ptr; }
internal Filter filter; //size: 24, offset:0
internal Vector* tables; //size: 8, offset:24
internal int index; //size: 4, offset:32
internal IterTable table; //size: 48, offset:40
}
//ecs_filter_t
[NativeStruct("ecs_filter_t", 24), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Filter
{
public Filter* Ptr() { fixed(Filter* ptr = &this) return ptr; }
internal TypeId include; //size: 8, offset:0
internal TypeId exclude; //size: 8, offset:8
internal MatchKind includeKind; //size: 4, offset:16
internal MatchKind excludeKind; //size: 4, offset:20
}
//ecs_filter_iter_t
[NativeStruct("ecs_filter_iter_t", 88), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct FilterIter
{
public FilterIter* Ptr() { fixed(FilterIter* ptr = &this) return ptr; }
internal Filter filter; //size: 24, offset:0
internal Sparse tables; //size: 8, offset:24
internal int index; //size: 4, offset:32
internal IterTable table; //size: 48, offset:40
}
//ecs_query_iter_t
[NativeStruct("ecs_query_iter_t", 32), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct QueryIter
{
public QueryIter* Ptr() { fixed(QueryIter* ptr = &this) return ptr; }
internal Query query; //size: 8, offset:0
internal PageIter pageIter; //size: 12, offset:8
internal int index; //size: 4, offset:20
internal int sparseSmallest; //size: 4, offset:24
internal int sparseFirst; //size: 4, offset:28
}
//ecs_page_iter_t
[NativeStruct("ecs_page_iter_t", 12), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct PageIter
{
public PageIter* Ptr() { fixed(PageIter* ptr = &this) return ptr; }
internal int offset; //size: 4, offset:0
internal int limit; //size: 4, offset:4
internal int remaining; //size: 4, offset:8
}
//ecs_snapshot_iter_t
[NativeStruct("ecs_snapshot_iter_t", 88), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct SnapshotIter
{
public SnapshotIter* Ptr() { fixed(SnapshotIter* ptr = &this) return ptr; }
internal Filter filter; //size: 24, offset:0
internal Vector* tables; //size: 8, offset:24
internal int index; //size: 4, offset:32
internal IterTable table; //size: 48, offset:40
}
//ecs_sig_t
[NativeStruct("ecs_sig_t", 24), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Sig
{
public Sig* Ptr() { fixed(Sig* ptr = &this) return ptr; }
internal readonly CharPtr name; //size: 8, offset:0
internal CharPtr expr; //size: 8, offset:8
internal Vector* columns; //size: 8, offset:16
}
//EcsComponentLifecycle
[NativeStruct("EcsComponentLifecycle", 40), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct ComponentLifecycle
{
public ComponentLifecycle* Ptr() { fixed(ComponentLifecycle* ptr = &this) return ptr; }
internal IntPtr _ctor;
internal IntPtr _dtor;
internal IntPtr _copy;
internal IntPtr _move;
internal IntPtr ctx; //size: 8, offset:32
}
//ecs_world_info_t
[NativeStruct("ecs_world_info_t", 88), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct WorldInfo
{
public WorldInfo* Ptr() { fixed(WorldInfo* ptr = &this) return ptr; }
internal EntityId lastComponentId; //size: 8, offset:0
internal EntityId lastId; //size: 8, offset:8
internal EntityId minId; //size: 8, offset:16
internal EntityId maxId; //size: 8, offset:24
internal float deltaTimeRaw; //size: 4, offset:32
internal float deltaTime; //size: 4, offset:36
internal float timeScale; //size: 4, offset:40
internal float targetFps; //size: 4, offset:44
internal float frameTimeTotal; //size: 4, offset:48
internal float systemTimeTotal; //size: 4, offset:52
internal float mergeTimeTotal; //size: 4, offset:56
internal float worldTimeTotal; //size: 4, offset:60
internal float worldTimeTotalRaw; //size: 4, offset:64
internal float sleepErr; //size: 4, offset:68
internal int frameCountTotal; //size: 4, offset:72
internal int mergeCountTotal; //size: 4, offset:76
internal int pipelineBuildCountTotal; //size: 4, offset:80
internal int systemsRanFrame; //size: 4, offset:84
}
//ecs_dbg_system_t
[NativeStruct("ecs_dbg_system_t", 32), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct DbgSystem
{
public DbgSystem* Ptr() { fixed(DbgSystem* ptr = &this) return ptr; }
internal EntityId system; //size: 8, offset:0
internal int entitiesMatchedCount; //size: 4, offset:8
internal int activeTableCount; //size: 4, offset:12
internal int inactiveTableCount; //size: 4, offset:16
internal byte enabled; //size: 1, offset:20
internal IntPtr systemData; //size: 8, offset:24
}
//ecs_match_failure_t
[NativeStruct("ecs_match_failure_t", 8), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct MatchFailure
{
public MatchFailure* Ptr() { fixed(MatchFailure* ptr = &this) return ptr; }
internal MatchFailureReason reason; //size: 4, offset:0
internal int column; //size: 4, offset:4
}
//ecs_dbg_entity_t
[NativeStruct("ecs_dbg_entity_t", 32), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct DbgEntity
{
public DbgEntity* Ptr() { fixed(DbgEntity* ptr = &this) return ptr; }
internal EntityId entity; //size: 8, offset:0
internal Table table; //size: 8, offset:8
internal TypeId type; //size: 8, offset:16
internal int row; //size: 4, offset:24
internal byte isWatched; //size: 1, offset:28
}
//ecs_dbg_table_t
[NativeStruct("ecs_dbg_table_t", 72), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct DbgTable
{
public DbgTable* Ptr() { fixed(DbgTable* ptr = &this) return ptr; }
internal Table table; //size: 8, offset:0
internal TypeId type; //size: 8, offset:8
internal TypeId shared; //size: 8, offset:16
internal TypeId container; //size: 8, offset:24
internal TypeId parentEntities; //size: 8, offset:32
internal TypeId baseEntities; //size: 8, offset:40
internal Vector* systemsMatched; //size: 8, offset:48
internal EntityId* entities; //size: 8, offset:56
internal int entitiesCount; //size: 4, offset:64
}
//ecs_reader_t
[NativeStruct("ecs_reader_t", 552), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Reader
{
public Reader* Ptr() { fixed(Reader* ptr = &this) return ptr; }
internal World world; //size: 8, offset:0
internal BlobHeaderKind state; //size: 4, offset:8
internal Iter dataIter; //size: 208, offset:16
internal IntPtr _dataNext;
internal Iter componentIter; //size: 208, offset:232
internal IntPtr _componentNext;
internal TableReader table; //size: 104, offset:448
}
//ecs_table_reader_t
[NativeStruct("ecs_table_reader_t", 104), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct TableReader
{
public TableReader* Ptr() { fixed(TableReader* ptr = &this) return ptr; }
internal BlobHeaderKind state; //size: 4, offset:0
internal int tableIndex; //size: 4, offset:4
internal Table table; //size: 8, offset:8
internal _Data data; //size: 8, offset:16
internal Size typeWritten; //size: 4, offset:24
internal TypeId type; //size: 8, offset:32
internal Vector* columnVector; //size: 8, offset:40
internal int columnIndex; //size: 4, offset:48
internal int totalColumns; //size: 4, offset:52
internal IntPtr columnData; //size: 8, offset:56
internal short columnSize; //size: 2, offset:64
internal short columnAlignment; //size: 2, offset:66
internal Size columnWritten; //size: 4, offset:68
internal int rowIndex; //size: 4, offset:72
internal int rowCount; //size: 4, offset:76
internal readonly CharPtr name; //size: 8, offset:80
internal Size nameLen; //size: 4, offset:88
internal Size nameWritten; //size: 4, offset:92
internal byte hasNextTable; //size: 1, offset:96
}
//ecs_writer_t
[NativeStruct("ecs_writer_t", 128), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Writer
{
public Writer* Ptr() { fixed(Writer* ptr = &this) return ptr; }
internal World world; //size: 8, offset:0
internal BlobHeaderKind state; //size: 4, offset:8
internal TableWriter table; //size: 104, offset:16
internal int error; //size: 4, offset:120
}
//ecs_table_writer_t
[NativeStruct("ecs_table_writer_t", 104), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct TableWriter
{
public TableWriter* Ptr() { fixed(TableWriter* ptr = &this) return ptr; }
internal BlobHeaderKind state; //size: 4, offset:0
internal Table table; //size: 8, offset:8
internal Vector* columnVector; //size: 8, offset:16
internal int typeCount; //size: 4, offset:24
internal int typeMaxCount; //size: 4, offset:28
internal Size typeWritten; //size: 4, offset:32
internal EntityId* typeArray; //size: 8, offset:40
internal int columnIndex; //size: 4, offset:48
internal short columnSize; //size: 2, offset:52
internal short columnAlignment; //size: 2, offset:54
internal Size columnWritten; //size: 4, offset:56
internal IntPtr columnData; //size: 8, offset:64
internal int rowCount; //size: 4, offset:72
internal int rowIndex; //size: 4, offset:76
internal NameWriter name; //size: 24, offset:80
}
//ecs_name_writer_t
[NativeStruct("ecs_name_writer_t", 24), StructLayout(LayoutKind.Sequential)]
public unsafe partial struct NameWriter
{
public NameWriter* Ptr() { fixed(NameWriter* ptr = &this) return ptr; }
internal CharPtr name; //size: 8, offset:0
internal int written; //size: 4, offset:8
internal int len; //size: 4, offset:12
internal int maxLen; //size: 4, offset:16
}
#endregion
#region RefPtr
//ecs_type_t
public unsafe partial struct TypeId
{
IntPtr ptr;
public TypeId(IntPtr ptr) => this.ptr = ptr;
internal TypeId* Ptr => (TypeId*) ptr;
}
#endregion
#region OpaquePtrs
//ecs_sparse_t
public unsafe partial struct Sparse
{
readonly IntPtr ptr;
public Sparse(IntPtr ptr) => this.ptr = ptr;
internal Sparse* Ptr => (Sparse*) ptr;
}
//ecs_map_t
public unsafe partial struct Map
{
readonly IntPtr ptr;
public Map(IntPtr ptr) => this.ptr = ptr;
internal Map* Ptr => (Map*) ptr;
}
//ecs_bucket_t
public unsafe partial struct Bucket
{
readonly IntPtr ptr;
public Bucket(IntPtr ptr) => this.ptr = ptr;
internal Bucket* Ptr => (Bucket*) ptr;
}
//ecs_world_t
public unsafe partial struct World
{
readonly IntPtr ptr;
public World(IntPtr ptr) => this.ptr = ptr;
internal World* Ptr => (World*) ptr;
}
//ecs_table_t
public unsafe partial struct Table
{
readonly IntPtr ptr;
public Table(IntPtr ptr) => this.ptr = ptr;
internal Table* Ptr => (Table*) ptr;
}
//ecs_data_t
public unsafe partial struct _Data
{
readonly IntPtr ptr;
public _Data(IntPtr ptr) => this.ptr = ptr;
internal _Data* Ptr => (_Data*) ptr;
}
//ecs_query_t
public unsafe partial struct Query
{
readonly IntPtr ptr;
public Query(IntPtr ptr) => this.ptr = ptr;
internal Query* Ptr => (Query*) ptr;
}
//ecs_queue_t
public unsafe partial struct Queue
{
readonly IntPtr ptr;
public Queue(IntPtr ptr) => this.ptr = ptr;
internal Queue* Ptr => (Queue*) ptr;
}
//ecs_snapshot_t
public unsafe partial struct Snapshot
{
readonly IntPtr ptr;
public Snapshot(IntPtr ptr) => this.ptr = ptr;
internal Snapshot* Ptr => (Snapshot*) ptr;
}
#endregion
#region Delegates
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int ComparatorDelegate(IntPtr p1, IntPtr p2);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiInitDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiFiniDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate IntPtr OsApiMallocDelegate(Size size);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate IntPtr OsApiReallocDelegate(IntPtr ptr, Size size);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate IntPtr OsApiCallocDelegate(Size size);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiFreeDelegate(IntPtr ptr);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate CharPtr OsApiStrdupDelegate(CharPtr str);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate OsThread OsApiThreadNewDelegate(OsThread ecsOsThreadT, OsThreadCallbackDelegate callback, IntPtr param);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate IntPtr OsThreadCallbackDelegate(IntPtr param0);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate IntPtr OsApiThreadJoinDelegate(OsThread thread);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int OsApiAincDelegate(int* @value);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate OsMutex OsApiMutexNewDelegate(OsMutex ecsOsMutexT);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiMutexFreeDelegate(OsMutex mutex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiMutexLockDelegate(OsMutex mutex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate OsCond OsApiCondNewDelegate(OsCond ecsOsCondT);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiCondFreeDelegate(OsCond cond);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiCondSignalDelegate(OsCond cond);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiCondBroadcastDelegate(OsCond cond);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiCondWaitDelegate(OsCond cond, OsMutex mutex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiSleepDelegate(int sec, int nanosec);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiGetTimeDelegate(Time* timeOut);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiLogDelegate(CharPtr fmt, IntPtr args);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiAbortDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate OsDl OsApiDlopenDelegate(OsDl ecsOsDlT, CharPtr libname);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate OsProcDelegate OsApiDlprocDelegate(OsProcDelegate ecsOsProcT, OsDl lib, CharPtr procname);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsProcDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void OsApiDlcloseDelegate(OsDl lib);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate CharPtr OsApiModuleToPathDelegate(CharPtr moduleId);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void IterActionDelegate(Iter* it);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void FiniActionDelegate(World world, IntPtr ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void XtorDelegate(World world, EntityId component, EntityId* entityPtr, IntPtr ptr, UIntPtr size, int count, IntPtr ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void CopyDelegate(World world, EntityId component, EntityId* dstEntity, EntityId* srcEntity, IntPtr dstPtr, IntPtr srcPtr, UIntPtr size, int count, IntPtr ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void MoveDelegate(World world, EntityId component, EntityId* dstEntity, EntityId* srcEntity, IntPtr dstPtr, IntPtr srcPtr, UIntPtr size, int count, IntPtr ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int CompareActionDelegate(EntityId e1, IntPtr ptr1, EntityId e2, IntPtr ptr2);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int RankTypeActionDelegate(int int32T, World world, EntityId rankComponent, TypeId type);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void ModuleActionDelegate(World world);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void SystemStatusActionDelegate(World world, EntityId system, SystemStatus status, IntPtr ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate bool IterNextActionDelegate(Iter* it);
#endregion
#region Unions
[StructLayout(LayoutKind.Explicit)]
public unsafe partial struct iter
{
[FieldOffset(0)]
internal ScopeIter parent; //size: 88, offset:0
[FieldOffset(0)]
internal FilterIter filter; //size: 88, offset:0
[FieldOffset(0)]
internal QueryIter query; //size: 32, offset:0
[FieldOffset(0)]
internal SnapshotIter snapshot; //size: 88, offset:0
}
#endregion
#region Fixed Arrays
public unsafe partial struct StrbufListElem32
{
private StrbufListElem _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31;
public StrbufListElem* Ptr() { fixed(StrbufListElem* ptr = &this._0) return ptr; }
public StrbufListElem this[int index]
{
get
{
return *(Ptr() + index);
}
}
}
#endregion
internal unsafe static partial class _ecs
{
const string DLL = "flecs";
///<code>
///ecs_vector_t * _ecs_vector_new(ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L65
[DllImport(DLL, EntryPoint = "_ecs_vector_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector vector_new(Size elemSize, short offset, int elemCount);
///<code>
///ecs_vector_t * _ecs_vector_from_array(ecs_size_t, int16_t, int32_t, void *)
///</code>
// _ecs_vector_from_array: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L77
[DllImport(DLL, EntryPoint = "_ecs_vector_from_array", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector vector_from_array(Size elemSize, short offset, int elemCount, IntPtr array);
///<code>
///void _ecs_vector_zero(ecs_vector_t *, ecs_size_t, int16_t)
///</code>
// _ecs_vector_zero: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L87
[DllImport(DLL, EntryPoint = "_ecs_vector_zero", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_zero(out Vector vector, Size elemSize, short offset);
///<code>
///void * _ecs_vector_add(ecs_vector_t **, ecs_size_t, int16_t)
///</code>
// _ecs_vector_add: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L114
[DllImport(DLL, EntryPoint = "_ecs_vector_add", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr vector_add(out Vector* arrayInout, Size elemSize, short offset);
///<code>
///void * _ecs_vector_addn(ecs_vector_t **, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_addn: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L126
[DllImport(DLL, EntryPoint = "_ecs_vector_addn", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr vector_addn(out Vector* arrayInout, Size elemSize, short offset, int elemCount);
///<code>
///void * _ecs_vector_get(const ecs_vector_t *, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L139
[DllImport(DLL, EntryPoint = "_ecs_vector_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr vector_get(out Vector vector, Size elemSize, short offset, int index);
///<code>
///void * _ecs_vector_last(const ecs_vector_t *, ecs_size_t, int16_t)
///</code>
// _ecs_vector_last: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L152
[DllImport(DLL, EntryPoint = "_ecs_vector_last", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr vector_last(out Vector vector, Size elemSize, short offset);
///<code>
///int32_t _ecs_vector_set_min_size(ecs_vector_t **, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_set_min_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L161
[DllImport(DLL, EntryPoint = "_ecs_vector_set_min_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_set_min_size(out Vector* arrayInout, Size elemSize, short offset, int elemCount);
///<code>
///int32_t _ecs_vector_set_min_count(ecs_vector_t **, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_set_min_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L171
[DllImport(DLL, EntryPoint = "_ecs_vector_set_min_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_set_min_count(out Vector* vectorInout, Size elemSize, short offset, int elemCount);
///<code>
///bool _ecs_vector_pop(ecs_vector_t *, ecs_size_t, int16_t, void *)
///</code>
// _ecs_vector_pop: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L185
[DllImport(DLL, EntryPoint = "_ecs_vector_pop", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool vector_pop(out Vector vector, Size elemSize, short offset, IntPtr @value);
///<code>
///int32_t _ecs_vector_move_index(ecs_vector_t **, ecs_vector_t *, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_move_index: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L195
[DllImport(DLL, EntryPoint = "_ecs_vector_move_index", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_move_index(out Vector* dst, out Vector src, Size elemSize, short offset, int index);
///<code>
///int32_t _ecs_vector_remove_index(ecs_vector_t *, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_remove_index: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L206
[DllImport(DLL, EntryPoint = "_ecs_vector_remove_index", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_remove_index(out Vector vector, Size elemSize, short offset, int index);
///<code>
///void _ecs_vector_reclaim(ecs_vector_t **, ecs_size_t, int16_t)
///</code>
// _ecs_vector_reclaim: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L219
[DllImport(DLL, EntryPoint = "_ecs_vector_reclaim", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_reclaim(out Vector* vector, Size elemSize, short offset);
///<code>
///int32_t _ecs_vector_grow(ecs_vector_t **, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_grow: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L228
[DllImport(DLL, EntryPoint = "_ecs_vector_grow", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_grow(out Vector* vector, Size elemSize, short offset, int elemCount);
///<code>
///int32_t _ecs_vector_set_size(ecs_vector_t **, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_set_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L238
[DllImport(DLL, EntryPoint = "_ecs_vector_set_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_set_size(out Vector* vector, Size elemSize, short offset, int elemCount);
///<code>
///int32_t _ecs_vector_set_count(ecs_vector_t **, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_vector_set_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L251
[DllImport(DLL, EntryPoint = "_ecs_vector_set_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_set_count(out Vector* vector, Size elemSize, short offset, int elemCount);
///<code>
///void * _ecs_vector_first(const ecs_vector_t *, ecs_size_t, int16_t)
///</code>
// _ecs_vector_first: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L272
[DllImport(DLL, EntryPoint = "_ecs_vector_first", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr vector_first(out Vector vector, Size elemSize, short offset);
///<code>
///void _ecs_vector_sort(ecs_vector_t *, ecs_size_t, int16_t, ecs_comparator_t)
///</code>
// _ecs_vector_sort: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L284
[DllImport(DLL, EntryPoint = "_ecs_vector_sort", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_sort(out Vector vector, Size elemSize, short offset, ComparatorDelegate compareAction);
///<code>
///void _ecs_vector_memory(const ecs_vector_t *, ecs_size_t, int16_t, int32_t *, int32_t *)
///</code>
// _ecs_vector_memory: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L294
[DllImport(DLL, EntryPoint = "_ecs_vector_memory", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_memory(out Vector vector, Size elemSize, short offset, out int allocd, out int used);
///<code>
///ecs_vector_t * _ecs_vector_copy(const ecs_vector_t *, ecs_size_t, int16_t)
///</code>
// _ecs_vector_copy: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L308
[DllImport(DLL, EntryPoint = "_ecs_vector_copy", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector vector_copy(out Vector src, Size elemSize, short offset);
///<code>
///ecs_sparse_t * _ecs_sparse_new(ecs_size_t)
///</code>
// _ecs_sparse_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L13
[DllImport(DLL, EntryPoint = "_ecs_sparse_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Sparse sparse_new(Size elemSize);
///<code>
///void * _ecs_sparse_add(ecs_sparse_t *, ecs_size_t)
///</code>
// _ecs_sparse_add: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L33
[DllImport(DLL, EntryPoint = "_ecs_sparse_add", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_add(Sparse sparse, Size elemSize);
///<code>
///void * _ecs_sparse_remove_get(ecs_sparse_t *, ecs_size_t, uint64_t)
///</code>
// _ecs_sparse_remove_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L59
[DllImport(DLL, EntryPoint = "_ecs_sparse_remove_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_remove_get(Sparse sparse, Size elemSize, ulong index);
///<code>
///void * _ecs_sparse_get(const ecs_sparse_t *, ecs_size_t, int32_t)
///</code>
// _ecs_sparse_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L78
[DllImport(DLL, EntryPoint = "_ecs_sparse_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_get(Sparse sparse, Size elemSize, int index);
///<code>
///void * _ecs_sparse_get_sparse(const ecs_sparse_t *, ecs_size_t, uint64_t)
///</code>
// _ecs_sparse_get_sparse: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L100
[DllImport(DLL, EntryPoint = "_ecs_sparse_get_sparse", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_get_sparse(Sparse sparse, Size elemSize, ulong index);
///<code>
///void * _ecs_sparse_get_sparse_any(ecs_sparse_t *, ecs_size_t, uint64_t)
///</code>
// _ecs_sparse_get_sparse_any: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L109
[DllImport(DLL, EntryPoint = "_ecs_sparse_get_sparse_any", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_get_sparse_any(Sparse sparse, Size elemSize, ulong index);
///<code>
///void * _ecs_sparse_get_or_create(ecs_sparse_t *, ecs_size_t, uint64_t)
///</code>
// _ecs_sparse_get_or_create: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L118
[DllImport(DLL, EntryPoint = "_ecs_sparse_get_or_create", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_get_or_create(Sparse sparse, Size elemSize, ulong index);
///<code>
///void * _ecs_sparse_set(ecs_sparse_t *, ecs_size_t, uint64_t, void *)
///</code>
// _ecs_sparse_set: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L127
[DllImport(DLL, EntryPoint = "_ecs_sparse_set", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr sparse_set(Sparse sparse, Size elemSize, ulong index, IntPtr @value);
///<code>
///ecs_map_t * _ecs_map_new(ecs_size_t, ecs_size_t, int32_t)
///</code>
// _ecs_map_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L23
[DllImport(DLL, EntryPoint = "_ecs_map_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Map map_new(Size elemSize, Size alignment, int elemCount);
///<code>
///void * _ecs_map_get(const ecs_map_t *, ecs_size_t, ecs_map_key_t)
///</code>
// _ecs_map_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L32
[DllImport(DLL, EntryPoint = "_ecs_map_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr map_get(Map map, Size elemSize, MapKey key);
///<code>
///void * _ecs_map_get_ptr(const ecs_map_t *, ecs_map_key_t)
///</code>
// _ecs_map_get_ptr: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L41
[DllImport(DLL, EntryPoint = "_ecs_map_get_ptr", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr map_get_ptr(Map map, MapKey key);
///<code>
///void _ecs_map_set(ecs_map_t *, ecs_size_t, ecs_map_key_t, const void *)
///</code>
// _ecs_map_set: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L49
[DllImport(DLL, EntryPoint = "_ecs_map_set", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_set(Map map, Size elemSize, MapKey key, IntPtr payload);
///<code>
///void * _ecs_map_next(ecs_map_iter_t *, ecs_size_t, ecs_map_key_t *)
///</code>
// _ecs_map_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L84
[DllImport(DLL, EntryPoint = "_ecs_map_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr map_next(out MapIter iter, Size elemSize, out MapKey key);
///<code>
///void * _ecs_map_next_ptr(ecs_map_iter_t *, ecs_map_key_t *)
///</code>
// _ecs_map_next_ptr: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L93
[DllImport(DLL, EntryPoint = "_ecs_map_next_ptr", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr map_next_ptr(out MapIter iter, out MapKey key);
///<summary>
///////////////////////////////////////////////////////////////////////////////// Tracing/////////////////////////////////////////////////////////////////////////////
///</summary>
///<code>
///void _ecs_trace(int level, const char *file, int32_t line, const char *fmt, ...)
///</code>
// _ecs_trace: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L33
[DllImport(DLL, EntryPoint = "_ecs_trace", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void trace(int level, CharPtr file, int line, CharPtr fmt);
///<code>
///void _ecs_warn(const char *, int32_t, const char *, ...)
///</code>
// _ecs_warn: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L41
[DllImport(DLL, EntryPoint = "_ecs_warn", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void warn(CharPtr file, int line, CharPtr fmt);
///<code>
///void _ecs_err(const char *, int32_t, const char *, ...)
///</code>
// _ecs_err: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L48
[DllImport(DLL, EntryPoint = "_ecs_err", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void err(CharPtr file, int line, CharPtr fmt);
///<summary>
/// Abort
///</summary>
///<code>
///void _ecs_abort(int32_t error_code, const char *param, const char *file,
/// int32_t line)
///</code>
// _ecs_abort: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L110
[DllImport(DLL, EntryPoint = "_ecs_abort", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void abort(int errorCode, CharPtr param, CharPtr file, int line);
///<summary>
/// Assert
///</summary>
///<code>
///void _ecs_assert(bool condition, int32_t error_code, const char *param,
/// const char *condition_str, const char *file, int32_t line)
///</code>
// _ecs_assert: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L121
[DllImport(DLL, EntryPoint = "_ecs_assert", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void assert(bool condition, int errorCode, CharPtr param, CharPtr conditionStr, CharPtr file, int line);
///<code>
///void _ecs_parser_error(const char *, const char *, int64_t, const char *, ...)
///</code>
// _ecs_parser_error: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L138
[DllImport(DLL, EntryPoint = "_ecs_parser_error", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void parser_error(CharPtr name, CharPtr expr, long column, CharPtr fmt);
///<code>
///ecs_queue_t * _ecs_queue_new(ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_queue_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L13
[DllImport(DLL, EntryPoint = "_ecs_queue_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Queue queue_new(Size elemSize, short offset, int elemCount);
///<code>
///ecs_queue_t * _ecs_queue_from_array(ecs_size_t, int16_t, int32_t, void *)
///</code>
// _ecs_queue_from_array: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L22
[DllImport(DLL, EntryPoint = "_ecs_queue_from_array", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Queue queue_from_array(Size elemSize, short offset, int elemCount, IntPtr array);
///<code>
///void * _ecs_queue_push(ecs_queue_t *, ecs_size_t, int16_t)
///</code>
// _ecs_queue_push: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L32
[DllImport(DLL, EntryPoint = "_ecs_queue_push", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr queue_push(Queue queue, Size elemSize, short offset);
///<code>
///void * _ecs_queue_get(ecs_queue_t *, ecs_size_t, int16_t, int32_t)
///</code>
// _ecs_queue_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L41
[DllImport(DLL, EntryPoint = "_ecs_queue_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr queue_get(Queue queue, Size elemSize, short offset, int index);
///<code>
///void * _ecs_queue_last(ecs_queue_t *, ecs_size_t, int16_t)
///</code>
// _ecs_queue_last: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L54
[DllImport(DLL, EntryPoint = "_ecs_queue_last", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr queue_last(Queue queue, Size elemSize, short offset);
#region Size check
internal static void CheckStructSizes()
{
//Test sizes match original sizes
void check(params System.Type[] typeSize)
{
for (int i = 0; i < typeSize.Length; i++)
{
var t = typeSize[i];
NativeStructAttribute cstruct = (NativeStructAttribute)t.GetCustomAttributes(typeof(NativeStructAttribute), false)[0];
var actualSize = Marshal.SizeOf(t);
if (!cstruct.Size.Equals(actualSize))
{
throw new ApplicationException($"Size mismatch for type { t.Name}: Size is { actualSize } but expected { cstruct.Size}.");
}
}
}
check(typeof(SwitchHeader), typeof(Time), typeof(MatchFailure), typeof(PageIter), typeof(Vector), typeof(StrbufListElem), typeof(Record), typeof(Entities), typeof(StrbufElement), typeof(Filter), typeof(Sig), typeof(NameWriter), typeof(MapIter), typeof(QueryIter), typeof(DbgSystem), typeof(DbgEntity), typeof(Switch), typeof(ComponentLifecycle), typeof(IterTable), typeof(Ref), typeof(DbgTable), typeof(ScopeIter), typeof(FilterIter), typeof(SnapshotIter), typeof(WorldInfo), typeof(TableReader), typeof(TableWriter), typeof(Writer), typeof(Iter), typeof(OsApi), typeof(StrbufElementEmbedded), typeof(Reader), typeof(Strbuf));
}
#endregion
}
internal unsafe static partial class ecs
{
const string DLL = "flecs";
///<code>
///void ecs_vector_free(ecs_vector_t *)
///</code>
// ecs_vector_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L96
[DllImport(DLL, EntryPoint = "ecs_vector_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_free(out Vector vector);
///<code>
///void ecs_vector_clear(ecs_vector_t *)
///</code>
// ecs_vector_clear: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L100
[DllImport(DLL, EntryPoint = "ecs_vector_clear", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_clear(out Vector vector);
///<code>
///void ecs_vector_assert_size(ecs_vector_t *, ecs_size_t)
///</code>
// ecs_vector_assert_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L104
[DllImport(DLL, EntryPoint = "ecs_vector_assert_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_assert_size(out Vector vectorInout, Size elemSize);
///<code>
///void ecs_vector_assert_alignment(ecs_vector_t *, ecs_size_t)
///</code>
// ecs_vector_assert_alignment: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L109
[DllImport(DLL, EntryPoint = "ecs_vector_assert_alignment", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_assert_alignment(out Vector vector, Size elemAlignment);
///<code>
///void ecs_vector_remove_last(ecs_vector_t *)
///</code>
// ecs_vector_remove_last: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L181
[DllImport(DLL, EntryPoint = "ecs_vector_remove_last", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void vector_remove_last(out Vector vector);
///<code>
///int32_t ecs_vector_count(const ecs_vector_t *)
///</code>
// ecs_vector_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L264
[DllImport(DLL, EntryPoint = "ecs_vector_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_count(out Vector vector);
///<code>
///int32_t ecs_vector_size(const ecs_vector_t *)
///</code>
// ecs_vector_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/vector.h#L268
[DllImport(DLL, EntryPoint = "ecs_vector_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int vector_size(out Vector vector);
///<code>
///void ecs_sparse_set_id_source(ecs_sparse_t *, uint64_t *)
///</code>
// ecs_sparse_set_id_source: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L17
[DllImport(DLL, EntryPoint = "ecs_sparse_set_id_source", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_set_id_source(Sparse sparse, out ulong idSource);
///<code>
///void ecs_sparse_free(ecs_sparse_t *)
///</code>
// ecs_sparse_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L25
[DllImport(DLL, EntryPoint = "ecs_sparse_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_free(Sparse sparse);
///<code>
///void ecs_sparse_clear(ecs_sparse_t *)
///</code>
// ecs_sparse_clear: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L29
[DllImport(DLL, EntryPoint = "ecs_sparse_clear", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_clear(Sparse sparse);
///<code>
///uint64_t ecs_sparse_last_id(ecs_sparse_t *)
///</code>
// ecs_sparse_last_id: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L41
[DllImport(DLL, EntryPoint = "ecs_sparse_last_id", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ulong sparse_last_id(Sparse sparse);
///<code>
///uint64_t ecs_sparse_new_id(ecs_sparse_t *)
///</code>
// ecs_sparse_new_id: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L45
[DllImport(DLL, EntryPoint = "ecs_sparse_new_id", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ulong sparse_new_id(Sparse sparse);
///<code>
///const uint64_t * ecs_sparse_new_ids(ecs_sparse_t *, int32_t)
///</code>
// ecs_sparse_new_ids: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L49
[DllImport(DLL, EntryPoint = "ecs_sparse_new_ids", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref ulong sparse_new_ids(Sparse sparse, int count);
///<code>
///void ecs_sparse_remove(ecs_sparse_t *, uint64_t)
///</code>
// ecs_sparse_remove: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L54
[DllImport(DLL, EntryPoint = "ecs_sparse_remove", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_remove(Sparse sparse, ulong index);
///<code>
///void ecs_sparse_set_generation(ecs_sparse_t *, uint64_t)
///</code>
// ecs_sparse_set_generation: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L68
[DllImport(DLL, EntryPoint = "ecs_sparse_set_generation", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_set_generation(Sparse sparse, ulong index);
///<code>
///bool ecs_sparse_exists(ecs_sparse_t *, uint64_t)
///</code>
// ecs_sparse_exists: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L73
[DllImport(DLL, EntryPoint = "ecs_sparse_exists", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool sparse_exists(Sparse sparse, ulong index);
///<code>
///bool ecs_sparse_is_alive(const ecs_sparse_t *, uint64_t)
///</code>
// ecs_sparse_is_alive: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L87
[DllImport(DLL, EntryPoint = "ecs_sparse_is_alive", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool sparse_is_alive(Sparse sparse, ulong index);
///<code>
///int32_t ecs_sparse_count(const ecs_sparse_t *)
///</code>
// ecs_sparse_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L92
[DllImport(DLL, EntryPoint = "ecs_sparse_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int sparse_count(Sparse sparse);
///<code>
///int32_t ecs_sparse_size(const ecs_sparse_t *)
///</code>
// ecs_sparse_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L96
[DllImport(DLL, EntryPoint = "ecs_sparse_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int sparse_size(Sparse sparse);
///<code>
///const uint64_t * ecs_sparse_ids(const ecs_sparse_t *)
///</code>
// ecs_sparse_ids: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L138
[DllImport(DLL, EntryPoint = "ecs_sparse_ids", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref ulong sparse_ids(Sparse sparse);
///<code>
///void ecs_sparse_set_size(ecs_sparse_t *, int32_t)
///</code>
// ecs_sparse_set_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L142
[DllImport(DLL, EntryPoint = "ecs_sparse_set_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_set_size(Sparse sparse, int elemCount);
///<code>
///ecs_sparse_t * ecs_sparse_copy(const ecs_sparse_t *)
///</code>
// ecs_sparse_copy: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L147
[DllImport(DLL, EntryPoint = "ecs_sparse_copy", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Sparse sparse_copy(Sparse src);
///<code>
///void ecs_sparse_restore(ecs_sparse_t *, const ecs_sparse_t *)
///</code>
// ecs_sparse_restore: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L151
[DllImport(DLL, EntryPoint = "ecs_sparse_restore", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_restore(Sparse dst, Sparse src);
///<code>
///void ecs_sparse_memory(ecs_sparse_t *, int32_t *, int32_t *)
///</code>
// ecs_sparse_memory: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/sparse.h#L156
[DllImport(DLL, EntryPoint = "ecs_sparse_memory", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sparse_memory(Sparse sparse, out int allocd, out int used);
///<code>
///void ecs_map_free(ecs_map_t *)
///</code>
// ecs_map_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L59
[DllImport(DLL, EntryPoint = "ecs_map_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_free(Map map);
///<code>
///void ecs_map_remove(ecs_map_t *, ecs_map_key_t)
///</code>
// ecs_map_remove: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L63
[DllImport(DLL, EntryPoint = "ecs_map_remove", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_remove(Map map, MapKey key);
///<code>
///void ecs_map_clear(ecs_map_t *)
///</code>
// ecs_map_clear: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L68
[DllImport(DLL, EntryPoint = "ecs_map_clear", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_clear(Map map);
///<code>
///int32_t ecs_map_count(const ecs_map_t *)
///</code>
// ecs_map_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L72
[DllImport(DLL, EntryPoint = "ecs_map_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int map_count(Map map);
///<code>
///int32_t ecs_map_bucket_count(const ecs_map_t *)
///</code>
// ecs_map_bucket_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L76
[DllImport(DLL, EntryPoint = "ecs_map_bucket_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int map_bucket_count(Map map);
///<code>
///ecs_map_iter_t ecs_map_iter(const ecs_map_t *)
///</code>
// ecs_map_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L80
[DllImport(DLL, EntryPoint = "ecs_map_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern MapIter map_iter(Map map);
///<code>
///void ecs_map_grow(ecs_map_t *, int32_t)
///</code>
// ecs_map_grow: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L101
[DllImport(DLL, EntryPoint = "ecs_map_grow", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_grow(Map map, int elemCount);
///<code>
///void ecs_map_set_size(ecs_map_t *, int32_t)
///</code>
// ecs_map_set_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L106
[DllImport(DLL, EntryPoint = "ecs_map_set_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_set_size(Map map, int elemCount);
///<code>
///void ecs_map_memory(ecs_map_t *, int32_t *, int32_t *)
///</code>
// ecs_map_memory: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L111
[DllImport(DLL, EntryPoint = "ecs_map_memory", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void map_memory(Map map, out int allocd, out int used);
///<code>
///ecs_map_t * ecs_map_copy(const ecs_map_t *)
///</code>
// ecs_map_copy: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/map.h#L117
[DllImport(DLL, EntryPoint = "ecs_map_copy", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Map map_copy(Map map);
///<code>
///ecs_switch_t * ecs_switch_new(uint64_t, uint64_t, int32_t)
///</code>
// ecs_switch_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L25
[DllImport(DLL, EntryPoint = "ecs_switch_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Switch switch_new(ulong min, ulong max, int elements);
///<code>
///void ecs_switch_free(ecs_switch_t *)
///</code>
// ecs_switch_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L31
[DllImport(DLL, EntryPoint = "ecs_switch_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_free(out Switch sw);
///<code>
///void ecs_switch_add(ecs_switch_t *)
///</code>
// ecs_switch_add: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L35
[DllImport(DLL, EntryPoint = "ecs_switch_add", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_add(out Switch sw);
///<code>
///void ecs_switch_set_count(ecs_switch_t *, int32_t)
///</code>
// ecs_switch_set_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L39
[DllImport(DLL, EntryPoint = "ecs_switch_set_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_set_count(out Switch sw, int count);
///<code>
///void ecs_switch_set_min_count(ecs_switch_t *, int32_t)
///</code>
// ecs_switch_set_min_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L44
[DllImport(DLL, EntryPoint = "ecs_switch_set_min_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_set_min_count(out Switch sw, int count);
///<code>
///void ecs_switch_addn(ecs_switch_t *, int32_t)
///</code>
// ecs_switch_addn: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L49
[DllImport(DLL, EntryPoint = "ecs_switch_addn", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_addn(out Switch sw, int count);
///<code>
///void ecs_switch_set(ecs_switch_t *, int32_t, uint64_t)
///</code>
// ecs_switch_set: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L54
[DllImport(DLL, EntryPoint = "ecs_switch_set", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_set(out Switch sw, int element, ulong @value);
///<code>
///void ecs_switch_remove(ecs_switch_t *, int32_t)
///</code>
// ecs_switch_remove: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L60
[DllImport(DLL, EntryPoint = "ecs_switch_remove", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void switch_remove(out Switch sw, int element);
///<code>
///uint64_t ecs_switch_get(const ecs_switch_t *, int32_t)
///</code>
// ecs_switch_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L65
[DllImport(DLL, EntryPoint = "ecs_switch_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ulong switch_get(out Switch sw, int element);
///<code>
///ecs_vector_t * ecs_switch_values(const ecs_switch_t *)
///</code>
// ecs_switch_values: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L70
[DllImport(DLL, EntryPoint = "ecs_switch_values", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector switch_values(out Switch sw);
///<code>
///int32_t ecs_switch_case_count(const ecs_switch_t *, uint64_t)
///</code>
// ecs_switch_case_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L74
[DllImport(DLL, EntryPoint = "ecs_switch_case_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int switch_case_count(out Switch sw, ulong @value);
///<code>
///int32_t ecs_switch_first(const ecs_switch_t *, uint64_t)
///</code>
// ecs_switch_first: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L79
[DllImport(DLL, EntryPoint = "ecs_switch_first", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int switch_first(out Switch sw, ulong @value);
///<code>
///int32_t ecs_switch_next(const ecs_switch_t *, int32_t)
///</code>
// ecs_switch_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/switch_list.h#L84
[DllImport(DLL, EntryPoint = "ecs_switch_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int switch_next(out Switch sw, int elem);
///<summary>
/// Append format string to a buffer. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_append(ecs_strbuf_t *buffer, const char *fmt, ...)
///</code>
// ecs_strbuf_append: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L76
[DllImport(DLL, EntryPoint = "ecs_strbuf_append", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_append(out Strbuf buffer, CharPtr fmt);
///<summary>
/// Append format string with argument list to a buffer. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_vappend(ecs_strbuf_t *buffer, const char *fmt, va_list args)
///</code>
// ecs_strbuf_vappend: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L84
[DllImport(DLL, EntryPoint = "ecs_strbuf_vappend", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_vappend(out Strbuf buffer, CharPtr fmt, IntPtr args);
///<summary>
/// Append string to buffer. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_appendstr(ecs_strbuf_t *buffer, const char *str)
///</code>
// ecs_strbuf_appendstr: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L92
[DllImport(DLL, EntryPoint = "ecs_strbuf_appendstr", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_appendstr(out Strbuf buffer, CharPtr str);
///<summary>
/// Append source buffer to destination buffer. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_mergebuff(ecs_strbuf_t *dst_buffer, ecs_strbuf_t *src_buffer)
///</code>
// ecs_strbuf_mergebuff: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L99
[DllImport(DLL, EntryPoint = "ecs_strbuf_mergebuff", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_mergebuff(out Strbuf dstBuffer, out Strbuf srcBuffer);
///<summary>
/// Append string to buffer, transfer ownership to buffer. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_appendstr_zerocpy(ecs_strbuf_t *buffer, char *str)
///</code>
// ecs_strbuf_appendstr_zerocpy: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L106
[DllImport(DLL, EntryPoint = "ecs_strbuf_appendstr_zerocpy", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_appendstr_zerocpy(out Strbuf buffer, CharPtr str);
///<summary>
/// Append string to buffer, do not free/modify string. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_appendstr_zerocpy_const(ecs_strbuf_t *buffer, const char *str)
///</code>
// ecs_strbuf_appendstr_zerocpy_const: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L113
[DllImport(DLL, EntryPoint = "ecs_strbuf_appendstr_zerocpy_const", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_appendstr_zerocpy_const(out Strbuf buffer, CharPtr str);
///<summary>
/// Append n characters to buffer. Returns false when max is reached, true when there is still space
///</summary>
///<code>
///bool ecs_strbuf_appendstrn(ecs_strbuf_t *buffer, const char *str, int32_t n)
///</code>
// ecs_strbuf_appendstrn: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L120
[DllImport(DLL, EntryPoint = "ecs_strbuf_appendstrn", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_appendstrn(out Strbuf buffer, CharPtr str, int n);
///<summary>
/// Return result string (also resets buffer)
///</summary>
///<code>
///char *ecs_strbuf_get(ecs_strbuf_t *buffer)
///</code>
// ecs_strbuf_get: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L127
[DllImport(DLL, EntryPoint = "ecs_strbuf_get", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr strbuf_get(out Strbuf buffer);
///<summary>
/// Reset buffer without returning a string
///</summary>
///<code>
///void ecs_strbuf_reset(ecs_strbuf_t *buffer)
///</code>
// ecs_strbuf_reset: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L132
[DllImport(DLL, EntryPoint = "ecs_strbuf_reset", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void strbuf_reset(out Strbuf buffer);
///<summary>
/// Push a list
///</summary>
///<code>
///void ecs_strbuf_list_push(ecs_strbuf_t *buffer, const char *list_open,
/// const char *separator)
///</code>
// ecs_strbuf_list_push: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L137
[DllImport(DLL, EntryPoint = "ecs_strbuf_list_push", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void strbuf_list_push(out Strbuf buffer, CharPtr listOpen, CharPtr separator);
///<summary>
/// Pop a new list
///</summary>
///<code>
///void ecs_strbuf_list_pop(ecs_strbuf_t *buffer, const char *list_close)
///</code>
// ecs_strbuf_list_pop: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L144
[DllImport(DLL, EntryPoint = "ecs_strbuf_list_pop", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void strbuf_list_pop(out Strbuf buffer, CharPtr listClose);
///<summary>
/// Insert a new element in list
///</summary>
///<code>
///void ecs_strbuf_list_next(ecs_strbuf_t *buffer)
///</code>
// ecs_strbuf_list_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L150
[DllImport(DLL, EntryPoint = "ecs_strbuf_list_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void strbuf_list_next(out Strbuf buffer);
///<summary>
/// Append formatted string as a new element in list
///</summary>
///<code>
///bool ecs_strbuf_list_append(ecs_strbuf_t *buffer, const char *fmt, ...)
///</code>
// ecs_strbuf_list_append: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L155
[DllImport(DLL, EntryPoint = "ecs_strbuf_list_append", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_list_append(out Strbuf buffer, CharPtr fmt);
///<summary>
/// Append string as a new element in list
///</summary>
///<code>
///bool ecs_strbuf_list_appendstr(ecs_strbuf_t *buffer, const char *str)
///</code>
// ecs_strbuf_list_appendstr: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/strbuf.h#L162
[DllImport(DLL, EntryPoint = "ecs_strbuf_list_appendstr", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool strbuf_list_appendstr(out Strbuf buffer, CharPtr str);
///<code>
///void ecs_os_init()
///</code>
// ecs_os_init: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L245
[DllImport(DLL, EntryPoint = "ecs_os_init", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_init();
///<code>
///void ecs_os_fini()
///</code>
// ecs_os_fini: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L248
[DllImport(DLL, EntryPoint = "ecs_os_fini", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_fini();
///<code>
///void ecs_os_set_api(ecs_os_api_t *)
///</code>
// ecs_os_set_api: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L251
[DllImport(DLL, EntryPoint = "ecs_os_set_api", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_set_api(out OsApi osApi);
///<code>
///void ecs_os_set_api_defaults()
///</code>
// ecs_os_set_api_defaults: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L255
[DllImport(DLL, EntryPoint = "ecs_os_set_api_defaults", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_set_api_defaults();
///<summary>
/// Logging (use functions to avoid using variadic macro arguments)
///</summary>
///<code>
///void ecs_os_log(const char *fmt, ...)
///</code>
// ecs_os_log: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L319
[DllImport(DLL, EntryPoint = "ecs_os_log", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_log(CharPtr fmt);
///<code>
///void ecs_os_warn(const char *, ...)
///</code>
// ecs_os_warn: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L322
[DllImport(DLL, EntryPoint = "ecs_os_warn", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_warn(CharPtr fmt);
///<code>
///void ecs_os_err(const char *, ...)
///</code>
// ecs_os_err: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L325
[DllImport(DLL, EntryPoint = "ecs_os_err", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_err(CharPtr fmt);
///<code>
///void ecs_os_dbg(const char *, ...)
///</code>
// ecs_os_dbg: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L328
[DllImport(DLL, EntryPoint = "ecs_os_dbg", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void os_dbg(CharPtr fmt);
///<summary>
/// Sleep with floating point time
///</summary>
///<code>
///void ecs_sleepf(double t)
///</code>
// ecs_sleepf: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L344
[DllImport(DLL, EntryPoint = "ecs_sleepf", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sleepf(double t);
///<summary>
/// Measure time since provided timestamp
///</summary>
///<code>
///double ecs_time_measure(ecs_time_t *start)
///</code>
// ecs_time_measure: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L349
[DllImport(DLL, EntryPoint = "ecs_time_measure", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern double time_measure(out Time start);
///<summary>
/// Calculate difference between two timestamps
///</summary>
///<code>
///ecs_time_t ecs_time_sub(ecs_time_t t1, ecs_time_t t2)
///</code>
// ecs_time_sub: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L354
[DllImport(DLL, EntryPoint = "ecs_time_sub", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Time time_sub(Time t1, Time t2);
///<summary>
/// Convert time value to a double
///</summary>
///<code>
///double ecs_time_to_double(ecs_time_t t)
///</code>
// ecs_time_to_double: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L360
[DllImport(DLL, EntryPoint = "ecs_time_to_double", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern double time_to_double(Time t);
///<code>
///void * ecs_os_memdup(const void *, ecs_size_t)
///</code>
// ecs_os_memdup: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L364
[DllImport(DLL, EntryPoint = "ecs_os_memdup", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr os_memdup(IntPtr src, Size size);
///<summary>
/// Are heap functions available?
///</summary>
///<code>
///bool ecs_os_has_heap()
///</code>
// ecs_os_has_heap: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L370
[DllImport(DLL, EntryPoint = "ecs_os_has_heap", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool os_has_heap();
///<summary>
/// Are threading functions available?
///</summary>
///<code>
///bool ecs_os_has_threading()
///</code>
// ecs_os_has_threading: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L374
[DllImport(DLL, EntryPoint = "ecs_os_has_threading", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool os_has_threading();
///<summary>
/// Are time functions available?
///</summary>
///<code>
///bool ecs_os_has_time()
///</code>
// ecs_os_has_time: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L378
[DllImport(DLL, EntryPoint = "ecs_os_has_time", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool os_has_time();
///<summary>
/// Are logging functions available?
///</summary>
///<code>
///bool ecs_os_has_logging()
///</code>
// ecs_os_has_logging: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L382
[DllImport(DLL, EntryPoint = "ecs_os_has_logging", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool os_has_logging();
///<summary>
/// Are dynamic library functions available?
///</summary>
///<code>
///bool ecs_os_has_dl()
///</code>
// ecs_os_has_dl: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L386
[DllImport(DLL, EntryPoint = "ecs_os_has_dl", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool os_has_dl();
///<summary>
/// Are module path functions available?
///</summary>
///<code>
///bool ecs_os_has_modules()
///</code>
// ecs_os_has_modules: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/os_api.h#L390
[DllImport(DLL, EntryPoint = "ecs_os_has_modules", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool os_has_modules();
///<summary>
///////////////////////////////////////////////////////////////////////////////// Functions used in declarative (macro) API/////////////////////////////////////////////////////////////////////////////
///</summary>
///<code>
///ecs_entity_t ecs_new_entity(ecs_world_t *world, ecs_entity_t e, const char *id,
/// const char *components)
///</code>
// ecs_new_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L44
[DllImport(DLL, EntryPoint = "ecs_new_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_entity(World world, EntityId e, CharPtr id, CharPtr components);
///<code>
///ecs_entity_t ecs_new_component(ecs_world_t *, ecs_entity_t, const char *, size_t, size_t)
///</code>
// ecs_new_component: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L51
[DllImport(DLL, EntryPoint = "ecs_new_component", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_component(World world, EntityId e, CharPtr id, UIntPtr size, UIntPtr alignment);
///<code>
///ecs_entity_t ecs_new_module(ecs_world_t *, ecs_entity_t, const char *, size_t, size_t)
///</code>
// ecs_new_module: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L59
[DllImport(DLL, EntryPoint = "ecs_new_module", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_module(World world, EntityId e, CharPtr name, UIntPtr size, UIntPtr alignment);
///<code>
///ecs_entity_t ecs_new_type(ecs_world_t *, ecs_entity_t, const char *, const char *)
///</code>
// ecs_new_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L67
[DllImport(DLL, EntryPoint = "ecs_new_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_type(World world, EntityId e, CharPtr id, CharPtr components);
///<code>
///ecs_entity_t ecs_new_prefab(ecs_world_t *, ecs_entity_t, const char *, const char *)
///</code>
// ecs_new_prefab: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L74
[DllImport(DLL, EntryPoint = "ecs_new_prefab", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_prefab(World world, EntityId e, CharPtr id, CharPtr sig);
///<code>
///ecs_entity_t ecs_new_system(ecs_world_t *, ecs_entity_t, const char *, ecs_entity_t, const char *, ecs_iter_action_t)
///</code>
// ecs_new_system: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L81
[DllImport(DLL, EntryPoint = "ecs_new_system", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_system(World world, EntityId e, CharPtr name, EntityId phase, CharPtr signature, IterActionDelegate action);
///<code>
///ecs_entity_t ecs_new_trigger(ecs_world_t *, ecs_entity_t, const char *, ecs_entity_t, const char *, ecs_iter_action_t)
///</code>
// ecs_new_trigger: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L90
[DllImport(DLL, EntryPoint = "ecs_new_trigger", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_trigger(World world, EntityId e, CharPtr name, EntityId kind, CharPtr component, IterActionDelegate action);
///<code>
///ecs_entity_t ecs_new_pipeline(ecs_world_t *, ecs_entity_t, const char *, const char *)
///</code>
// ecs_new_pipeline: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L99
[DllImport(DLL, EntryPoint = "ecs_new_pipeline", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_pipeline(World world, EntityId e, CharPtr name, CharPtr expr);
///<code>
///char * ecs_module_path_from_c(const char *)
///</code>
// ecs_module_path_from_c: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L106
[DllImport(DLL, EntryPoint = "ecs_module_path_from_c", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr module_path_from_c(CharPtr cName);
///<code>
///bool ecs_component_has_actions(ecs_world_t *, ecs_entity_t)
///</code>
// ecs_component_has_actions: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L110
[DllImport(DLL, EntryPoint = "ecs_component_has_actions", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool component_has_actions(World world, EntityId component);
///<summary>
/// Parse signature.
///</summary>
///<code>
///void ecs_sig_init(ecs_world_t *world, const char *name, const char *expr,
/// ecs_sig_t *sig)
///</code>
// ecs_sig_init: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L168
[DllImport(DLL, EntryPoint = "ecs_sig_init", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sig_init(World world, CharPtr name, CharPtr expr, out Sig sig);
///<summary>
/// Release signature resources
///</summary>
///<code>
///void ecs_sig_deinit(ecs_sig_t *sig)
///</code>
// ecs_sig_deinit: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L176
[DllImport(DLL, EntryPoint = "ecs_sig_deinit", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void sig_deinit(out Sig sig);
///<summary>
/// Add column to signature.
///</summary>
///<code>
///int ecs_sig_add(ecs_world_t *world, ecs_sig_t *sig,
/// ecs_sig_from_kind_t from_kind, ecs_sig_oper_kind_t oper_kind,
/// ecs_sig_inout_kind_t access_kind, ecs_entity_t component,
/// ecs_entity_t source, const char *arg_name)
///</code>
// ecs_sig_add: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L181
[DllImport(DLL, EntryPoint = "ecs_sig_add", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int sig_add(World world, out Sig sig, SigFromKind fromKind, SigOperKind operKind, SigInoutKind accessKind, EntityId component, EntityId source, CharPtr argName);
///<summary>
/// Create query based on signature object.
///</summary>
///<code>
///ecs_query_t *ecs_query_new_w_sig(ecs_world_t *world, ecs_entity_t system,
/// ecs_sig_t *sig)
///</code>
// ecs_query_new_w_sig: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/api_support.h#L193
[DllImport(DLL, EntryPoint = "ecs_query_new_w_sig", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Query query_new_w_sig(World world, EntityId system, out Sig sig);
///<code>
///void ecs_log_push()
///</code>
// ecs_log_push: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L54
[DllImport(DLL, EntryPoint = "ecs_log_push", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void log_push();
///<code>
///void ecs_log_pop()
///</code>
// ecs_log_pop: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L57
[DllImport(DLL, EntryPoint = "ecs_log_pop", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void log_pop();
///<summary>
/// Get description for error code
///</summary>
///<code>
///const char *ecs_strerror(int32_t error_code)
///</code>
// ecs_strerror: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/private/log.h#L105
[DllImport(DLL, EntryPoint = "ecs_strerror", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr strerror(int errorCode);
///<code>
///ecs_type_t ecs_type_from_entity(ecs_world_t *, ecs_entity_t)
///</code>
// ecs_type_from_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L14
[DllImport(DLL, EntryPoint = "ecs_type_from_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId type_from_entity(World world, EntityId entity);
///<code>
///ecs_entity_t ecs_type_to_entity(ecs_world_t *, ecs_type_t)
///</code>
// ecs_type_to_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L19
[DllImport(DLL, EntryPoint = "ecs_type_to_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId type_to_entity(World world, TypeId type);
///<code>
///char * ecs_type_str(ecs_world_t *, ecs_type_t)
///</code>
// ecs_type_str: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L24
[DllImport(DLL, EntryPoint = "ecs_type_str", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr type_str(World world, TypeId type);
///<code>
///ecs_type_t ecs_type_from_str(ecs_world_t *, const char *)
///</code>
// ecs_type_from_str: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L29
[DllImport(DLL, EntryPoint = "ecs_type_from_str", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId type_from_str(World world, CharPtr expr);
///<code>
///ecs_type_t ecs_type_find(ecs_world_t *, ecs_entity_t *, int32_t)
///</code>
// ecs_type_find: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L34
[DllImport(DLL, EntryPoint = "ecs_type_find", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId type_find(World world, out EntityId array, int count);
///<code>
///ecs_type_t ecs_type_merge(ecs_world_t *, ecs_type_t, ecs_type_t, ecs_type_t)
///</code>
// ecs_type_merge: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L40
[DllImport(DLL, EntryPoint = "ecs_type_merge", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId type_merge(World world, TypeId type, TypeId typeAdd, TypeId typeRemove);
///<code>
///ecs_type_t ecs_type_add(ecs_world_t *, ecs_type_t, ecs_entity_t)
///</code>
// ecs_type_add: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L47
[DllImport(DLL, EntryPoint = "ecs_type_add", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId type_add(World world, TypeId type, EntityId entity);
///<code>
///ecs_type_t ecs_type_remove(ecs_world_t *, ecs_type_t, ecs_entity_t)
///</code>
// ecs_type_remove: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L53
[DllImport(DLL, EntryPoint = "ecs_type_remove", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId type_remove(World world, TypeId type, EntityId entity);
///<code>
///bool ecs_type_has_entity(ecs_world_t *, ecs_type_t, ecs_entity_t)
///</code>
// ecs_type_has_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L59
[DllImport(DLL, EntryPoint = "ecs_type_has_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool type_has_entity(World world, TypeId type, EntityId entity);
///<code>
///bool ecs_type_has_type(ecs_world_t *, ecs_type_t, ecs_type_t)
///</code>
// ecs_type_has_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L65
[DllImport(DLL, EntryPoint = "ecs_type_has_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool type_has_type(World world, TypeId type, TypeId has);
///<code>
///bool ecs_type_owns_entity(ecs_world_t *, ecs_type_t, ecs_entity_t, bool)
///</code>
// ecs_type_owns_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L71
[DllImport(DLL, EntryPoint = "ecs_type_owns_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool type_owns_entity(World world, TypeId type, EntityId entity, bool owned);
///<code>
///bool ecs_type_owns_type(ecs_world_t *, ecs_type_t, ecs_type_t, bool)
///</code>
// ecs_type_owns_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L78
[DllImport(DLL, EntryPoint = "ecs_type_owns_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool type_owns_type(World world, TypeId type, TypeId has, bool owned);
///<code>
///ecs_entity_t ecs_type_get_entity_for_xor(ecs_world_t *, ecs_type_t, ecs_entity_t)
///</code>
// ecs_type_get_entity_for_xor: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L85
[DllImport(DLL, EntryPoint = "ecs_type_get_entity_for_xor", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId type_get_entity_for_xor(World world, TypeId type, EntityId xorTag);
///<code>
///int32_t ecs_type_index_of(ecs_type_t, ecs_entity_t)
///</code>
// ecs_type_index_of: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L91
[DllImport(DLL, EntryPoint = "ecs_type_index_of", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int type_index_of(TypeId type, EntityId component);
///<code>
///int32_t ecs_type_trait_index_of(ecs_type_t, int32_t, ecs_entity_t)
///</code>
// ecs_type_trait_index_of: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/type.h#L96
[DllImport(DLL, EntryPoint = "ecs_type_trait_index_of", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int type_trait_index_of(TypeId type, int startIndex, EntityId trait);
///<summary>
/// Create a new world. A world manages all the ECS data and supporting infrastructure. Applications must have at least one world. Entities, component and system handles are local to a world and should not be shared between worlds.
///</summary>
///<returns>
/// A new world object
///</returns>
///<remarks>
/// This operation creates a world with all builtin modules loaded.
///</remarks>
///<code>
///ecs_world_t *ecs_init()
///</code>
// ecs_init: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L557
[DllImport(DLL, EntryPoint = "ecs_init", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern World init();
///<summary>
/// Same as ecs_init, but with minimal set of modules loaded.
///</summary>
///<returns>
/// A new world object
///</returns>
///<code>
///ecs_world_t *ecs_mini()
///</code>
// ecs_mini: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L564
[DllImport(DLL, EntryPoint = "ecs_mini", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern World mini();
///<summary>
/// Create a new world with arguments. Same as ecs_init, but allows passing in command line arguments. These can be used to dynamically enable flecs features to an application. Currently these arguments are not used.
///</summary>
///<returns>
/// A new world object
///</returns>
///<code>
///ecs_world_t *ecs_init_w_args(int argc, char *argv[])
///</code>
// ecs_init_w_args: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L574
[DllImport(DLL, EntryPoint = "ecs_init_w_args", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern World init_w_args(int argc, out sbyte argv);
///<summary>
/// Delete a world. This operation deletes the world, and everything it contains.
///</summary>
///<param name="world"> [in] The world to delete. </param>
///<returns>
/// Zero if successful, non-zero if failed.
///</returns>
///<code>
///int ecs_fini(ecs_world_t *world)
///</code>
// ecs_fini: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L585
[DllImport(DLL, EntryPoint = "ecs_fini", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int fini(World world);
///<summary>
/// Register action to be executed when world is destroyed. Fini actions are typically used when a module needs to clean up before a world shuts down.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="action"> [in] The function to execute. </param>
///<param name="ctx"> [in] Userdata to pass to the function </param>
///<code>
///void ecs_atfini(ecs_world_t *world, ecs_fini_action_t action, void *ctx)
///</code>
// ecs_atfini: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L596
[DllImport(DLL, EntryPoint = "ecs_atfini", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void atfini(World world, FiniActionDelegate action, IntPtr ctx);
///<summary>
/// Register action to be executed once after frame. Post frame actions are typically used for calling operations that cannot be invoked during iteration, such as changing the number of threads.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="action"> [in] The function to execute. </param>
///<param name="ctx"> [in] Userdata to pass to the function </param>
///<code>
///void ecs_run_post_frame(ecs_world_t *world, ecs_fini_action_t action, void *ctx)
///</code>
// ecs_run_post_frame: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L609
[DllImport(DLL, EntryPoint = "ecs_run_post_frame", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void run_post_frame(World world, FiniActionDelegate action, IntPtr ctx);
///<summary>
/// Register ctor, dtor, copy & move actions for component.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="component"> [in] The component id for which to register the actions </param>
///<param name="actions"> [in] Type that contains the component actions.</param>
///<code>
///void ecs_set_component_actions_w_entity(ecs_world_t *world,
/// ecs_entity_t component,
/// EcsComponentLifecycle *actions)
///</code>
// ecs_set_component_actions_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L621
[DllImport(DLL, EntryPoint = "ecs_set_component_actions_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_component_actions_w_entity(World world, EntityId component, out ComponentLifecycle actions);
///<summary>
/// Set a world context. This operation allows an application to register custom data with a world that can be accessed anywhere where the application has the world object.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="ctx"> [in] A pointer to a user defined structure.</param>
///<code>
///void ecs_set_context(ecs_world_t *world, void *ctx)
///</code>
// ecs_set_context: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L639
[DllImport(DLL, EntryPoint = "ecs_set_context", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_context(World world, IntPtr ctx);
///<summary>
/// Get the world context. This operation retrieves a previously set world context.
///</summary>
///<param name="world"> [in] The world. </param>
///<returns>
/// The context set with ecs_set_context. If no context was set, the function returns NULL.
///</returns>
///<code>
///void *ecs_get_context(ecs_world_t *world)
///</code>
// ecs_get_context: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L651
[DllImport(DLL, EntryPoint = "ecs_get_context", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr get_context(World world);
///<summary>
/// Get world info.
///</summary>
///<param name="world"> [in] The world. </param>
///<returns>
/// Pointer to the world info. This pointer will remain valid for as long as the world is valid.
///</returns>
///<code>
///const ecs_world_info_t *ecs_get_world_info(ecs_world_t *world)
///</code>
// ecs_get_world_info: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L661
[DllImport(DLL, EntryPoint = "ecs_get_world_info", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref WorldInfo get_world_info(World world);
///<summary>
/// Dimension the world for a specified number of entities. This operation will preallocate memory in the world for the specified number of entities. Specifying a number lower than the current number of entities in the world will have no effect. Note that this function does not allocate memory for components (use ecs_dim_type for that).
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity_count"> [in] The number of entities to preallocate.</param>
///<code>
///void ecs_dim(ecs_world_t *world, int32_t entity_count)
///</code>
// ecs_dim: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L674
[DllImport(DLL, EntryPoint = "ecs_dim", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void dim(World world, int entityCount);
///<summary>
/// Dimension a type for a specified number of entities. This operation will preallocate memory for a type (table) for the specified number of entites. Specifying a number lower than the current number of entities in the table will have no effect.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] Handle to the type, as obtained by ecs_type_get. </param>
///<param name="entity_count"> [in] The number of entities to preallocate.</param>
///<code>
///void ecs_dim_type(ecs_world_t *world, ecs_type_t type, int32_t entity_count)
///</code>
// ecs_dim_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L688
[DllImport(DLL, EntryPoint = "ecs_dim_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void dim_type(World world, TypeId type, int entityCount);
///<summary>
/// Set a range for issueing new entity ids. This function constrains the entity identifiers returned by ecs_new to the specified range. This operation can be used to ensure that multiple processes can run in the same simulation without requiring a central service that coordinates issueing identifiers.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="id_start"> [in] The start of the range. </param>
///<param name="id_end"> [in] The end of the range.</param>
///<remarks>
/// If id_end is set to 0, the range is infinite. If id_end is set to a non-zero value, it has to be larger than id_start. If id_end is set and ecs_new is invoked after an id is issued that is equal to id_end, the application will abort.
///</remarks>
///<code>
///void ecs_set_entity_range(ecs_world_t *world, ecs_entity_t id_start,
/// ecs_entity_t id_end)
///</code>
// ecs_set_entity_range: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L709
[DllImport(DLL, EntryPoint = "ecs_set_entity_range", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_entity_range(World world, EntityId idStart, EntityId idEnd);
///<summary>
/// Enable/disable range limits. When an application is both a receiver of range-limited entities and a producer of range-limited entities, range checking needs to be temporarily disabled when inserting received entities. Range checking is disabled on a stage, so setting this value is thread safe.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="enable"> [in] True if range checking should be enabled, false to disable. </param>
///<returns>
/// The previous value.
///</returns>
///<code>
///bool ecs_enable_range_check(ecs_world_t *world, bool enable)
///</code>
// ecs_enable_range_check: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L725
[DllImport(DLL, EntryPoint = "ecs_enable_range_check", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool enable_range_check(World world, bool enable);
///<summary>
/// Enable world locking while in progress. When locking is enabled, Flecs will lock the world while in progress. This allows applications to interact with the world from other threads without running into race conditions.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="enable"> [in] True if locking is to be enabled. </param>
///<returns>
/// The previous value of the setting.
///</returns>
///<remarks>
/// This is a better alternative to applications putting a lock around calls to ecs_progress, since ecs_progress can sleep when FPS control is enabled, which is time during which other threads could perform work.
/// Locking must be enabled before applications can use the ecs_lock and ecs_unlock functions. Locking is turned off by default.
///</remarks>
///<code>
///bool ecs_enable_locking(ecs_world_t *world, bool enable)
///</code>
// ecs_enable_locking: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L746
[DllImport(DLL, EntryPoint = "ecs_enable_locking", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool enable_locking(World world, bool enable);
///<summary>
/// Locks the world. See ecs_enable_locking for details.
///</summary>
///<param name="world"> [in] The world.</param>
///<code>
///void ecs_lock(ecs_world_t *world)
///</code>
// ecs_lock: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L756
[DllImport(DLL, EntryPoint = "ecs_lock", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void @lock(World world);
///<summary>
/// Unlocks the world. See ecs_enable_locking for details.
///</summary>
///<param name="world"> [in] The world.</param>
///<code>
///void ecs_unlock(ecs_world_t *world)
///</code>
// ecs_unlock: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L765
[DllImport(DLL, EntryPoint = "ecs_unlock", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void unlock(World world);
///<summary>
/// Wait until world becomes available. When a non-flecs thread needs to interact with the world, it should invoke this function to wait until the world becomes available (as in, it is not progressing the frame). Invoking this function guarantees that the thread will not starve. (as opposed to simply taking the world lock).
///</summary>
///<param name="world"> [in] The world.</param>
///<remarks>
/// An application will have to invoke ecs_end_wait after this function returns.
///</remarks>
///<code>
///void ecs_begin_wait(ecs_world_t *world)
///</code>
// ecs_begin_wait: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L778
[DllImport(DLL, EntryPoint = "ecs_begin_wait", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void begin_wait(World world);
///<summary>
/// Release world after calling ecs_begin_wait. This operation should be invoked after invoking ecs_begin_wait, and will release the world back to the thread running the main loop.
///</summary>
///<param name="world"> [in] The world.</param>
///<code>
///void ecs_end_wait(ecs_world_t *world)
///</code>
// ecs_end_wait: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L787
[DllImport(DLL, EntryPoint = "ecs_end_wait", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void end_wait(World world);
///<summary>
/// Enable or disable tracing. This will enable builtin tracing. For tracing to work, it will have to be compiled in which requires defining one of the following macro's:
///</summary>
///<param name="level"> [in] Desired tracing level.</param>
///<remarks>
/// ECS_TRACE_0 - All tracing is disabled ECS_TRACE_1 - Enable tracing level 1 ECS_TRACE_2 - Enable tracing level 2 and below ECS_TRACE_3 - Enable tracing level 3 and below
/// If no tracing level is defined and this is a debug build, ECS_TRACE_3 will have been automatically defined.
/// The provided level corresponds with the tracing level. If -1 is provided as value, warnings are disabled. If -2 is provided, errors are disabled as well.
///</remarks>
///<code>
///void ecs_tracing_enable(int level)
///</code>
// ecs_tracing_enable: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L808
[DllImport(DLL, EntryPoint = "ecs_tracing_enable", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void tracing_enable(int level);
///<summary>
/// Create new entity id. This operation returns an unused entity id.
///</summary>
///<param name="world"> [in] The world. </param>
///<returns>
/// The new entity id.
///</returns>
///<code>
///ecs_entity_t ecs_new_id(ecs_world_t *world)
///</code>
// ecs_new_id: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L825
[DllImport(DLL, EntryPoint = "ecs_new_id", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_id(World world);
///<summary>
/// Create new component id. This operation returns a new component id. Component ids are the same as entity ids, but can make use of the [1 .. ECS_HI_COMPONENT_ID] range.
///</summary>
///<param name="world"> [in] The world. </param>
///<returns>
/// The new component id.
///</returns>
///<remarks>
/// This operation does not recycle ids.
///</remarks>
///<code>
///ecs_entity_t ecs_new_component_id(ecs_world_t *world)
///</code>
// ecs_new_component_id: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L838
[DllImport(DLL, EntryPoint = "ecs_new_component_id", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_component_id(World world);
///<summary>
/// Create new entity. This operation creates a new entity with a single entity in its type. The entity may contain type roles. This operation recycles ids.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity to initialize the new entity with. </param>
///<returns>
/// The new entity.
///</returns>
///<code>
///ecs_entity_t ecs_new_w_entity(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_new_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L850
[DllImport(DLL, EntryPoint = "ecs_new_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_w_entity(World world, EntityId entity);
///<summary>
/// Create new entity. This operation creates a new entity initialized with a type. This operation recycles ids.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type to initialize the new entity with. </param>
///<returns>
/// The new entity.
///</returns>
///<code>
///ecs_entity_t ecs_new_w_type(ecs_world_t *world, ecs_type_t type)
///</code>
// ecs_new_w_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L863
[DllImport(DLL, EntryPoint = "ecs_new_w_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_w_type(World world, TypeId type);
///<summary>
/// Create N new entities. This operation is the same as ecs_new_w_entity, but creates N entities instead of one and does not recycle ids.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="count"> [in] The number of entities to create. </param>
///<returns>
/// The first entity id of the newly created entities.
///</returns>
///<code>
///const ecs_entity_t *ecs_bulk_new_w_entity(ecs_world_t *world,
/// ecs_entity_t entity, int32_t count)
///</code>
// ecs_bulk_new_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L889
[DllImport(DLL, EntryPoint = "ecs_bulk_new_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref EntityId bulk_new_w_entity(World world, EntityId entity, int count);
///<summary>
/// Create N new entities. This operation is the same as ecs_new_w_type, but creates N entities instead of one and does not recycle ids.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type. </param>
///<param name="count"> [in] The number of entities to create. </param>
///<returns>
/// The first entity id of the newly created entities.
///</returns>
///<code>
///const ecs_entity_t *ecs_bulk_new_w_type(ecs_world_t *world, ecs_type_t type,
/// int32_t count)
///</code>
// ecs_bulk_new_w_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L904
[DllImport(DLL, EntryPoint = "ecs_bulk_new_w_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref EntityId bulk_new_w_type(World world, TypeId type, int count);
///<summary>
/// Create N new entities and initialize components. This operation is the same as ecs_bulk_new_w_type, but initializes components with the provided component array. Instead of a type the operation accepts an array of component identifiers (entities). The component arrays need to be provided in the same order as the component identifiers.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="count"> [in] The number of entities to create. </param>
///<param name="data"> [in] The data arrays to initialize the components with. </param>
///<param name="components"> [in] Array with component identifiers. </param>
///<returns>
/// The first entity id of the newly created entities.
///</returns>
///<code>
///const ecs_entity_t *ecs_bulk_new_w_data(ecs_world_t *world, int32_t count,
/// ecs_entities_t *component_ids,
/// void *data)
///</code>
// ecs_bulk_new_w_data: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L922
[DllImport(DLL, EntryPoint = "ecs_bulk_new_w_data", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref EntityId bulk_new_w_data(World world, int count, out Entities componentIds, IntPtr data);
///<summary>
/// Clone an entity This operation clones the components of one entity into another entity. If no destination entity is provided, a new entity will be created. Component values are not copied unless copy_value is true.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="dst"> [in] The entity to copy the components to. </param>
///<param name="src"> [in] The entity to copy the components from. </param>
///<param name="copy_value"> [in] If true, the value of components will be copied to dst. </param>
///<returns>
/// The destination entity.
///</returns>
///<code>
///ecs_entity_t ecs_clone(ecs_world_t *world, ecs_entity_t dst, ecs_entity_t src,
/// bool copy_value)
///</code>
// ecs_clone: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L952
[DllImport(DLL, EntryPoint = "ecs_clone", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId clone(World world, EntityId dst, EntityId src, bool copyValue);
///<summary>
/// Add an entity to an entity. This operation adds a single entity to the type of an entity. Type roles may be used in combination with the added entity. If the entity already has the entity, this operation will have no side effects.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="entity_add"> [in] The entity to add.</param>
///<code>
///void ecs_add_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t entity_add)
///</code>
// ecs_add_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L975
[DllImport(DLL, EntryPoint = "ecs_add_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void add_entity(World world, EntityId entity, EntityId entityAdd);
///<summary>
/// Add a type to an entity. This operation adds a type to an entity. The resulting type of the entity will be the union of the previous type and the provided type. If the added type did not have new components, this operation will have no side effects.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="type"> [in] The type to add.</param>
///<code>
///void ecs_add_type(ecs_world_t *world, ecs_entity_t entity, ecs_type_t type)
///</code>
// ecs_add_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L990
[DllImport(DLL, EntryPoint = "ecs_add_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void add_type(World world, EntityId entity, TypeId type);
///<summary>
/// Remove an entity from an entity. This operation removes a single entity from the type of an entity. Type roles may be used in combination with the added entity. If the entity does not have the entity, this operation will have no side effects.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="entity_remove"> [in] The entity to remove.</param>
///<code>
///void ecs_remove_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t entity_remove)
///</code>
// ecs_remove_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1021
[DllImport(DLL, EntryPoint = "ecs_remove_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void remove_entity(World world, EntityId entity, EntityId entityRemove);
///<summary>
/// Remove a type from an entity. This operation removes a type to an entity. The resulting type of the entity will be the difference of the previous type and the provided type. If the type did not overlap with the entity type, this operation has no side effects.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="type"> [in] The type to remove.</param>
///<code>
///void ecs_remove_type(ecs_world_t *world, ecs_entity_t entity, ecs_type_t type)
///</code>
// ecs_remove_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1036
[DllImport(DLL, EntryPoint = "ecs_remove_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void remove_type(World world, EntityId entity, TypeId type);
///<summary>
/// Add / remove entity from entities matching a filter. Combination of ecs_add_entity and ecs_remove_entity.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="to_add"> [in] The entity to add. </param>
///<param name="to_remove"> [in] The entity to remove.</param>
///<code>
///void ecs_add_remove_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t to_add, ecs_entity_t to_remove)
///</code>
// ecs_add_remove_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1066
[DllImport(DLL, EntryPoint = "ecs_add_remove_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void add_remove_entity(World world, EntityId entity, EntityId toAdd, EntityId toRemove);
///<summary>
/// Add / remove type from entities matching a filter. Combination of ecs_add_type and ecs_remove_type.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="to_add"> [in] The type to add. </param>
///<param name="to_remove"> [in] The type to remove.</param>
///<code>
///void ecs_add_remove_type(ecs_world_t *world, ecs_entity_t entity,
/// ecs_type_t to_add, ecs_type_t to_remove)
///</code>
// ecs_add_remove_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1081
[DllImport(DLL, EntryPoint = "ecs_add_remove_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void add_remove_type(World world, EntityId entity, TypeId toAdd, TypeId toRemove);
///<summary>
/// Get case for switch. This operation gets the current case for the specified switch. If the current switch is not set for the entity, the operation will return 0.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="e"> [in] The entity. </param>
///<param name="sw"> [in] The switch for which to obtain the case. </param>
///<returns>
/// The current case for the specified switch.
///</returns>
///<code>
///ecs_entity_t ecs_get_case(ecs_world_t *world, ecs_entity_t e, ecs_entity_t sw)
///</code>
// ecs_get_case: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1213
[DllImport(DLL, EntryPoint = "ecs_get_case", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId get_case(World world, EntityId e, EntityId sw);
///<summary>
/// Clear all components. This operation will clear all components from an entity but will not delete the entity itself. This effectively prevents the entity id from being recycled.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity.</param>
///<code>
///void ecs_clear(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_clear: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1234
[DllImport(DLL, EntryPoint = "ecs_clear", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void clear(World world, EntityId entity);
///<summary>
/// Delete an entity. This operation will delete an entity and all of its components. The entity id will be recycled. Repeatedly calling ecs_delete without ecs_new, ecs_new_w_entity or ecs_new_w_type will cause a memory leak as it will cause the list with ids that can be recycled to grow unbounded.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity.</param>
///<code>
///void ecs_delete(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_delete: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1248
[DllImport(DLL, EntryPoint = "ecs_delete", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void delete(World world, EntityId entity);
///<summary>
/// Delete children of an entity. This operation deletes all children of a parent entity. If a parent has no children this operation has no effect.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The parent entity.</param>
///<code>
///void ecs_delete_children(ecs_world_t *world, ecs_entity_t parent)
///</code>
// ecs_delete_children: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1261
[DllImport(DLL, EntryPoint = "ecs_delete_children", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void delete_children(World world, EntityId parent);
///<summary>
/// Get an immutable pointer to a component. This operation obtains a const pointer to the requested component. The operation accepts the component entity id.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="component"> [in] The entity id of the component to obtain. </param>
///<returns>
/// The component pointer, NULL if the entity does not have the component.
///</returns>
///<code>
///const void *ecs_get_w_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t component)
///</code>
// ecs_get_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1282
[DllImport(DLL, EntryPoint = "ecs_get_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr get_w_entity(World world, EntityId entity, EntityId component);
///<summary>
/// Get an immutable reference to a component. This operation is similar to ecs_get_w_entity but it stores temporary information in a `ecs_ref_t` value which allows subsequent lookups to be faster.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="ref"> [in] Pointer to a ecs_ref_t value. Must be initialized. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="component"> [in] The entity id of the component to obtain. </param>
///<returns>
/// The component pointer, NULL if the entity does not have the component.
///</returns>
///<code>
///const void *ecs_get_ref_w_entity(ecs_world_t *world, ecs_ref_t *ref,
/// ecs_entity_t entity, ecs_entity_t component)
///</code>
// ecs_get_ref_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1312
[DllImport(DLL, EntryPoint = "ecs_get_ref_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr get_ref_w_entity(World world, out Ref @ref, EntityId entity, EntityId component);
///<summary>
/// Get a mutable pointer to a component. This operation is similar to ecs_get_w_entity but it returns a mutable pointer. If this operation is invoked from inside a system, the entity will be staged and a pointer to the staged component will be returned.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="component"> [in] The entity id of the component to obtain. </param>
///<param name="is_added"> [in] Out parameter that returns true if the component was added. </param>
///<returns>
/// The component pointer.
///</returns>
///<remarks>
/// If the entity did not yet have the component, the component will be added by this operation. In this case the is_added out parameter will be set to true.
///</remarks>
///<code>
///void *ecs_get_mut_w_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t component, bool *is_added)
///</code>
// ecs_get_mut_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1345
[DllImport(DLL, EntryPoint = "ecs_get_mut_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr get_mut_w_entity(World world, EntityId entity, EntityId component, out bool isAdded);
///<summary>
/// Signal that a component has been modified. This operation allows an application to signal to Flecs that a component has been modified. As a result, OnSet systems will be invoked.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="component"> [in] The entity id of the component that was modified.</param>
///<remarks>
/// This operation is commonly used together with ecs_get_mut.
///</remarks>
///<code>
///void ecs_modified_w_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t component)
///</code>
// ecs_modified_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1374
[DllImport(DLL, EntryPoint = "ecs_modified_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void modified_w_entity(World world, EntityId entity, EntityId component);
///<summary>
/// Set the value of a component. This operation allows an application to set the value of a component. The operation is equivalent to calling ecs_get_mut and ecs_modified.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="component"> [in] The entity id of the component to set. </param>
///<param name="size"> [in] The size of the pointer to the value. </param>
///<param name="ptr"> [in] The pointer to the value. </param>
///<returns>
/// The entity. A new entity if no entity was provided.
///</returns>
///<remarks>
/// If the provided entity is 0, a new entity will be created.
///</remarks>
///<code>
///ecs_entity_t ecs_set_ptr_w_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t component, size_t size,
/// const void *ptr)
///</code>
// ecs_set_ptr_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1411
[DllImport(DLL, EntryPoint = "ecs_set_ptr_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId set_ptr_w_entity(World world, EntityId entity, EntityId component, UIntPtr size, IntPtr ptr);
///<summary>
/// Test if an entity has an entity. This operation returns true if the entity has the provided entity in its type.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="to_check"> [in] The entity to test for. </param>
///<returns>
/// True if the entity has the entity, false if not.
///</returns>
///<code>
///bool ecs_has_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t to_check)
///</code>
// ecs_has_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1485
[DllImport(DLL, EntryPoint = "ecs_has_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool has_entity(World world, EntityId entity, EntityId toCheck);
///<summary>
/// Test if an entity has a type. This operation returns true if the entity has the provided type in its type.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="type"> [in] The type to test for. </param>
///<returns>
/// True if the entity has the type, false if not.
///</returns>
///<code>
///bool ecs_has_type(ecs_world_t *world, ecs_entity_t entity, ecs_type_t type)
///</code>
// ecs_has_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1500
[DllImport(DLL, EntryPoint = "ecs_has_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool has_type(World world, EntityId entity, TypeId type);
///<summary>
/// Test whether an entity is alive.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="e"> [in] The entity. </param>
///<returns>
/// True if the entity is alive, false if the entity is not alive.
///</returns>
///<code>
///bool ecs_is_alive(ecs_world_t *world, ecs_entity_t e)
///</code>
// ecs_is_alive: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1558
[DllImport(DLL, EntryPoint = "ecs_is_alive", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool is_alive(World world, EntityId e);
///<summary>
/// Test whether an entity exists. Similar as ecs_is_alive, but ignores entity generation count.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="e"> [in] The entity. </param>
///<returns>
/// True if the entity exists, false if the entity does not exist.
///</returns>
///<code>
///bool ecs_exists(ecs_world_t *world, ecs_entity_t e)
///</code>
// ecs_exists: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1570
[DllImport(DLL, EntryPoint = "ecs_exists", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool exists(World world, EntityId e);
///<summary>
/// Get the type of an entity.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<returns>
/// The type of the entity, NULL if the entity has no components.
///</returns>
///<code>
///ecs_type_t ecs_get_type(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_get_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1581
[DllImport(DLL, EntryPoint = "ecs_get_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId get_type(World world, EntityId entity);
///<summary>
/// Get the name of an entity. This will return the name as specified in the EcsName component.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<returns>
/// The type of the entity, NULL if the entity has no name.
///</returns>
///<code>
///const char *ecs_get_name(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_get_name: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1593
[DllImport(DLL, EntryPoint = "ecs_get_name", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr get_name(World world, EntityId entity);
///<summary>
/// Convert type role to string. This operation converts a type role to a string.
///</summary>
///<param name="entity"> [in] The entity containing the type role. </param>
///<param name="world"> [in] The world. </param>
///<returns>
/// The type role string, or NULL if no type role is provided.
///</returns>
///<code>
///const char *ecs_role_str(ecs_entity_t entity)
///</code>
// ecs_role_str: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1605
[DllImport(DLL, EntryPoint = "ecs_role_str", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr role_str(EntityId entity);
///<summary>
/// Convert entity identifier to string. This operation interprets type roles and translates them to a string.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity to convert to a string. </param>
///<param name="buffer"> [in] The buffer in which to store the string. </param>
///<param name="buffer_len"> [in] The length of the provided buffer. </param>
///<returns>
/// The number of characters required to write the string.
///</returns>
///<code>
///size_t ecs_entity_str(ecs_world_t *world, ecs_entity_t entity, char *buffer,
/// size_t buffer_len)
///</code>
// ecs_entity_str: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1618
[DllImport(DLL, EntryPoint = "ecs_entity_str", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern UIntPtr entity_str(World world, EntityId entity, CharPtr buffer, UIntPtr bufferLen);
///<summary>
/// Get the parent of an entity. This will return a parent of the entity that has the specified component. If the component is 0, the operation will return the first parent that it finds in the entity type (an entity with a CHILDOF role).
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="component"> [in] The entity id of a component that the parent must have. </param>
///<returns>
/// The parent of the entity, 0 if no parent was found.
///</returns>
///<code>
///ecs_entity_t ecs_get_parent_w_entity(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t component)
///</code>
// ecs_get_parent_w_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1635
[DllImport(DLL, EntryPoint = "ecs_get_parent_w_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId get_parent_w_entity(World world, EntityId entity, EntityId component);
///<summary>
/// Enable or disable an entity. This operation enables or disables an entity by adding or removing the EcsDisabled tag. A disabled entity will not be matched with any systems, unless the system explicitly specifies the EcsDisabled tag.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity to enable or disable. </param>
///<param name="enabled"> [in] true to enable the entity, false to disable.</param>
///<code>
///void ecs_enable(ecs_world_t *world, ecs_entity_t entity, bool enabled)
///</code>
// ecs_enable: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1662
[DllImport(DLL, EntryPoint = "ecs_enable", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void enable(World world, EntityId entity, bool enabled);
///<summary>
/// Count entities that have an entity. Returns the number of entities that have the specified entity.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<returns>
/// The number of entities that have the entity.
///</returns>
///<code>
///int32_t ecs_count_entity(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_count_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1675
[DllImport(DLL, EntryPoint = "ecs_count_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int count_entity(World world, EntityId entity);
///<summary>
/// Count entities that have a type. Returns the number of entities that have the specified type.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type. </param>
///<returns>
/// The number of entities that have the type.
///</returns>
///<code>
///int32_t ecs_count_type(ecs_world_t *world, ecs_type_t type)
///</code>
// ecs_count_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1687
[DllImport(DLL, EntryPoint = "ecs_count_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int count_type(World world, TypeId type);
///<summary>
/// Count entities that match a filter. Returns the number of entities that match the specified filter.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type. </param>
///<returns>
/// The number of entities that match the specified filter.
///</returns>
///<code>
///int32_t ecs_count_w_filter(ecs_world_t *world, const ecs_filter_t *filter)
///</code>
// ecs_count_w_filter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1709
[DllImport(DLL, EntryPoint = "ecs_count_w_filter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int count_w_filter(World world, out Filter filter);
///<summary>
/// Lookup an entity by name. Returns an entity that matches the specified name. Only looks for entities in the current scope (root if no scope is provided).
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="name"> [in] The entity name. </param>
///<returns>
/// The entity with the specified name, or 0 if no entity was found.
///</returns>
///<code>
///ecs_entity_t ecs_lookup(ecs_world_t *world, const char *name)
///</code>
// ecs_lookup: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1730
[DllImport(DLL, EntryPoint = "ecs_lookup", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId lookup(World world, CharPtr name);
///<summary>
/// Lookup a child entity by name. Returns an entity that matches the specified name. Only looks for entities in the provided parent. If no parent is provided, look in the current scope ( root if no scope is provided).
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="name"> [in] The entity name. </param>
///<returns>
/// The entity with the specified name, or 0 if no entity was found.
///</returns>
///<code>
///ecs_entity_t ecs_lookup_child(ecs_world_t *world, ecs_entity_t parent,
/// const char *name)
///</code>
// ecs_lookup_child: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1744
[DllImport(DLL, EntryPoint = "ecs_lookup_child", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId lookup_child(World world, EntityId parent, CharPtr name);
///<summary>
/// Lookup an entity from a path. Lookup an entity from a provided path, relative to the provided parent. The operation will use the provided separator to tokenize the path expression. If the provided path contains the prefix, the search will start from the root.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The entity from which to resolve the path. </param>
///<param name="path"> [in] The path to resolve. </param>
///<param name="sep"> [in] The path separator. </param>
///<param name="prefix"> [in] The path prefix. </param>
///<returns>
/// The entity if found, else 0.
///</returns>
///<remarks>
/// If the entity is not found in the provided parent, the operation will continue to search in the parent of the parent, until the root is reached. If the entity is still not found, the lookup will search in the flecs.core scope. If the entity is not found there either, the function returns 0.
///</remarks>
///<code>
///ecs_entity_t ecs_lookup_path_w_sep(ecs_world_t *world, ecs_entity_t parent,
/// const char *path, const char *sep,
/// const char *prefix)
///</code>
// ecs_lookup_path_w_sep: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1767
[DllImport(DLL, EntryPoint = "ecs_lookup_path_w_sep", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId lookup_path_w_sep(World world, EntityId parent, CharPtr path, CharPtr sep, CharPtr prefix);
///<summary>
/// Lookup an entity by its symbol name. This looks up an entity by the symbol name that was provided in EcsName. The operation does not take into account scoping, which means it will search all entities that have an EcsName.
///</summary>
///<remarks>
/// This operation can be useful to resolve, for example, a type by its C identifier, which does not include the Flecs namespacing.
///</remarks>
///<code>
///ecs_entity_t ecs_lookup_symbol(ecs_world_t *world, const char *name)
///</code>
// ecs_lookup_symbol: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1807
[DllImport(DLL, EntryPoint = "ecs_lookup_symbol", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId lookup_symbol(World world, CharPtr name);
///<summary>
/// Add alias for entity to global scope
///</summary>
///<code>
///void ecs_use(ecs_world_t *world, ecs_entity_t entity, const char *name)
///</code>
// ecs_use: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1813
[DllImport(DLL, EntryPoint = "ecs_use", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void use(World world, EntityId entity, CharPtr name);
///<summary>
/// Get a path identifier for an entity. This operation creates a path that contains the names of the entities from the specified parent to the provided entity, separated by the provided separator. If no parent is provided the path will be relative to the root. If a prefix is provided, the path will be prefixed by the prefix.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The entity from which to create the path. </param>
///<param name="child"> [in] The entity to which to create the path. </param>
///<param name="component"> [in] The component of the parent. </param>
///<returns>
/// The relative entity path.
///</returns>
///<remarks>
/// If the parent is equal to the provided child, the operation will return an empty string. If a nonzero component is provided, the path will be created by looking for parents with that component.
/// The returned path should be freed by the application.
///</remarks>
///<code>
///char *ecs_get_path_w_sep(ecs_world_t *world, ecs_entity_t parent,
/// ecs_entity_t child, ecs_entity_t component,
/// const char *sep, const char *prefix)
///</code>
// ecs_get_path_w_sep: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1844
[DllImport(DLL, EntryPoint = "ecs_get_path_w_sep", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr get_path_w_sep(World world, EntityId parent, EntityId child, EntityId component, CharPtr sep, CharPtr prefix);
///<summary>
/// Find or create entity from path. This operation will find or create an entity from a path, and will create any intermediate entities if required. If the entity already exists, no entities will be created.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The entity relative to which the entity should be created. </param>
///<param name="path"> [in] The path to create the entity for. </param>
///<param name="sep"> [in] The separator used in the path. </param>
///<param name="prefix"> [in] The prefix used in the path. </param>
///<returns>
/// The entity.
///</returns>
///<remarks>
/// If the path starts with the prefix, then the entity will be created from the root scope.
///</remarks>
///<code>
///ecs_entity_t ecs_new_from_path_w_sep(ecs_world_t *world, ecs_entity_t parent,
/// const char *path, const char *sep,
/// const char *prefix)
///</code>
// ecs_new_from_path_w_sep: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1893
[DllImport(DLL, EntryPoint = "ecs_new_from_path_w_sep", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId new_from_path_w_sep(World world, EntityId parent, CharPtr path, CharPtr sep, CharPtr prefix);
///<summary>
/// Add specified path to entity. This operation is similar to ecs_new_from_path, but will instead add the path to an existing entity.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity to which to add the path. </param>
///<param name="parent"> [in] The entity relative to which the entity should be created. </param>
///<param name="path"> [in] The path to create the entity for. </param>
///<param name="sep"> [in] The separator used in the path. </param>
///<param name="prefix"> [in] The prefix used in the path. </param>
///<returns>
/// The entity.
///</returns>
///<remarks>
/// If an entity already exists for the path, it will be returned instead.
///</remarks>
///<code>
///ecs_entity_t ecs_add_path_w_sep(ecs_world_t *world, ecs_entity_t entity,
/// ecs_entity_t parent, const char *path,
/// const char *sep, const char *prefix)
///</code>
// ecs_add_path_w_sep: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1937
[DllImport(DLL, EntryPoint = "ecs_add_path_w_sep", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId add_path_w_sep(World world, EntityId entity, EntityId parent, CharPtr path, CharPtr sep, CharPtr prefix);
///<summary>
/// Does entity have children.
///</summary>
///<param name="world"> [in] The world </param>
///<param name="entity"> [in] The entity </param>
///<returns>
/// True if the entity has children, false if not.
///</returns>
///<code>
///int32_t ecs_get_child_count(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_get_child_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1984
[DllImport(DLL, EntryPoint = "ecs_get_child_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int get_child_count(World world, EntityId entity);
///<summary>
/// Return a scope iterator. A scope iterator iterates over all the child entities of the specified parent.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The parent entity for which to iterate the children. </param>
///<returns>
/// The iterator.
///</returns>
///<code>
///ecs_iter_t ecs_scope_iter(ecs_world_t *world, ecs_entity_t parent)
///</code>
// ecs_scope_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L1997
[DllImport(DLL, EntryPoint = "ecs_scope_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Iter scope_iter(World world, EntityId parent);
///<summary>
/// Return a filtered scope iterator. Same as ecs_scope_iter, but results will be filtered.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The parent entity for which to iterate the children. </param>
///<returns>
/// The iterator.
///</returns>
///<code>
///ecs_iter_t ecs_scope_iter_w_filter(ecs_world_t *world, ecs_entity_t parent,
/// ecs_filter_t *filter)
///</code>
// ecs_scope_iter_w_filter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2009
[DllImport(DLL, EntryPoint = "ecs_scope_iter_w_filter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Iter scope_iter_w_filter(World world, EntityId parent, out Filter filter);
///<summary>
/// Progress the scope iterator. This operation progresses the scope iterator to the next table. The iterator must have been initialized with `ecs_scope_iter`. This operation must be invoked at least once before interpreting the contents of the iterator.
///</summary>
///<param name="it"> [in] The iterator </param>
///<returns>
/// True if more data is available, false if not.
///</returns>
///<code>
///bool ecs_scope_next(ecs_iter_t *it)
///</code>
// ecs_scope_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2023
[DllImport(DLL, EntryPoint = "ecs_scope_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool scope_next(out Iter it);
///<summary>
/// Set the current scope. This operation sets the scope of the current stage to the provided entity. As a result new entities will be created in this scope, and lookups will be relative to the provided scope.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="scope"> [in] The entity to use as scope. </param>
///<returns>
/// The previous scope.
///</returns>
///<remarks>
/// It is considered good practice to restore the scope to the old value.
///</remarks>
///<code>
///ecs_entity_t ecs_set_scope(ecs_world_t *world, ecs_entity_t scope)
///</code>
// ecs_set_scope: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2038
[DllImport(DLL, EntryPoint = "ecs_set_scope", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId set_scope(World world, EntityId scope);
///<summary>
/// Get the current scope. Get the scope set by ecs_set_scope. If no scope is set, this operation will return 0.
///</summary>
///<param name="world"> [in] The world. </param>
///<returns>
/// The current scope.
///</returns>
///<code>
///ecs_entity_t ecs_get_scope(ecs_world_t *world)
///</code>
// ecs_get_scope: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2050
[DllImport(DLL, EntryPoint = "ecs_get_scope", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId get_scope(World world);
///<summary>
/// Set a name prefix for newly created entities. This is a utility that lets C modules use prefixed names for C types and C functions, while using names for the entity names that do not have the prefix. The name prefix is currently only used by ECS_COMPONENT.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="prefix"> [in] The name prefix to use. </param>
///<returns>
/// The previous prefix.
///</returns>
///<code>
///const char *ecs_set_name_prefix(ecs_world_t *world, const char *prefix)
///</code>
// ecs_set_name_prefix: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2063
[DllImport(DLL, EntryPoint = "ecs_set_name_prefix", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern CharPtr set_name_prefix(World world, CharPtr prefix);
///<summary>
/// Return a filter iterator. A filter iterator lets an application iterate over entities that match the specified filter. If NULL is provided for the filter, the iterator will iterate all tables in the world.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="filter"> [in] The filter. </param>
///<returns>
/// An iterator that can be used with ecs_filter_next.
///</returns>
///<code>
///ecs_iter_t ecs_filter_iter(ecs_world_t *world, const ecs_filter_t *filter)
///</code>
// ecs_filter_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2084
[DllImport(DLL, EntryPoint = "ecs_filter_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Iter filter_iter(World world, out Filter filter);
///<summary>
/// Iterate tables matched by filter. This operation progresses the filter iterator to the next table. The iterator must have been initialized with `ecs_filter_iter`. This operation must be invoked at least once before interpreting the contents of the iterator.
///</summary>
///<param name="it"> [in] The iterator </param>
///<returns>
/// True if more data is available, false if not.
///</returns>
///<code>
///bool ecs_filter_next(ecs_iter_t *iter)
///</code>
// ecs_filter_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2098
[DllImport(DLL, EntryPoint = "ecs_filter_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool filter_next(out Iter iter);
///<summary>
/// Create a query. This operation creates a query. Queries are used to iterate over entities that match a signature expression and are the fastest way to find and iterate over entities and their components.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="sig"> [in] The query signature expression. </param>
///<returns>
/// The new query.
///</returns>
///<remarks>
/// Queries should be created once, and reused multiple times. While iterating a query is a cheap operation, creating and deleting a query is expensive. The reason for this is that queries are "prematched", which means that a query stores state about which entities (or rather, tables) match with the query. Building up this state happens during query creation.
/// Once a query is created, matching only happens when new tables are created. In most applications this is an infrequent process, since it only occurs when a new combination of components is introduced. While matching is expensive, it is importent to note that matching does not happen on a per-entity basis, but on a per-table basis. This means that the average time spent on matching per frame should rapidly approach zero over the lifetime of an application.
/// A query provides direct access to the component arrays. When an application creates/deletes entities or adds/removes components, these arrays can shift component values around, or may grow in size. This can cause unexpected or undefined behavior to occur if these operations are performed while iterating. To prevent this from happening an application should either not perform these operations while iterating, or use deferred operations (see ecs_defer_begin and ecs_defer_end).
/// Queries can be created and deleted dynamically. If a query was not deleted (using ecs_query_free) before the world is deleted, it will be deleted automatically.
///</remarks>
///<code>
///ecs_query_t *ecs_query_new(ecs_world_t *world, const char *sig)
///</code>
// ecs_query_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2144
[DllImport(DLL, EntryPoint = "ecs_query_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Query query_new(World world, CharPtr sig);
///<summary>
/// Create a subquery. A subquery is just like a regular query, except that it is matched against the matched tables of a parent query. Reducing the number of global (normal) queries can improve performance, as new archetypes have to be matched against fewer queries.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="parent"> [in] The parent query. </param>
///<param name="sig"> [in] The query signature expression. </param>
///<returns>
/// The new subquery.
///</returns>
///<remarks>
/// Subqueries are cheaper to create than regular queries, because the initial set of tables they have to match against is smaller. This makes subqueries more suitable for creating while the simulation.
/// Subqueries are not registered with tables directly, and instead receive new table notifications from their parent query. This means that there is less administrative overhead associated with subqueries.
/// Subqueries can be nested, which allows for the creation of increasingly more specific query hierarchies that are considerably more efficient than when all queries would be created as global queries.
///</remarks>
///<code>
///ecs_query_t *ecs_subquery_new(ecs_world_t *world, ecs_query_t *parent,
/// const char *sig)
///</code>
// ecs_subquery_new: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2172
[DllImport(DLL, EntryPoint = "ecs_subquery_new", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Query subquery_new(World world, Query parent, CharPtr sig);
///<summary>
/// Cleanup a query. This operation frees a query.
///</summary>
///<param name="query"> [in] The query.</param>
///<code>
///void ecs_query_free(ecs_query_t *query)
///</code>
// ecs_query_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2183
[DllImport(DLL, EntryPoint = "ecs_query_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void query_free(Query query);
///<summary>
/// Return a query iterator. A query iterator lets an application iterate over entities that match the specified query. If a sorting function is specified, the query will check whether a resort is required upon creating the iterator.
///</summary>
///<param name="query"> [in] The query to iterate. </param>
///<returns>
/// The query iterator.
///</returns>
///<remarks>
/// Creating a query iterator is a cheap operation that does not allocate any resources. An application does not need to deinitialize or free a query iterator before it goes out of scope.
/// To iterate the iterator, an application should use ecs_query_next to progress the iterator and test if it has data.
/// Query iteration requires an outer and an inner loop. The outer loop uses ecs_query_next to test if new tables are available. The inner loop iterates the entities in the table, and is usually a for loop that uses iter.count to loop through the entities and component arrays.
/// The two loops are necessary because of how data is stored internally. Entities are grouped by the components they have, in tables. A single query can (and often does) match with multiple tables. Because each table has its own set of arrays, an application has to reobtain pointers to those arrays for each matching table.
///</remarks>
///<code>
///ecs_iter_t ecs_query_iter(ecs_query_t *query)
///</code>
// ecs_query_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2213
[DllImport(DLL, EntryPoint = "ecs_query_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Iter query_iter(Query query);
///<summary>
/// Iterate over a query. This operation is similar to ecs_query_iter, but starts iterating from a specified offset, and will not iterate more than limit entities.
///</summary>
///<param name="query"> [in] The query to iterate. </param>
///<param name="offset"> [in] The number of entities to skip. </param>
///<param name="limit"> [in] The maximum number of entities to iterate. </param>
///<returns>
/// The query iterator.
///</returns>
///<code>
///ecs_iter_t ecs_query_iter_page(ecs_query_t *query, int32_t offset,
/// int32_t limit)
///</code>
// ecs_query_iter_page: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2226
[DllImport(DLL, EntryPoint = "ecs_query_iter_page", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Iter query_iter_page(Query query, int offset, int limit);
///<summary>
/// Progress the query iterator. This operation progresses the query iterator to the next table. The iterator must have been initialized with `ecs_query_iter`. This operation must be invoked at least once before interpreting the contents of the iterator.
///</summary>
///<param name="iter"> [in] The iterator. </param>
///<returns>
/// True if more data is available, false if not.
///</returns>
///<code>
///bool ecs_query_next(ecs_iter_t *iter)
///</code>
// ecs_query_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2241
[DllImport(DLL, EntryPoint = "ecs_query_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool query_next(out Iter iter);
///<summary>
/// Progress the query iterator with filter. This operation is the same as ecs_query_next, but accepts a filter as an argument. Entities not matching the filter will be skipped by the iterator.
///</summary>
///<param name="iter"> [in] The iterator. </param>
///<param name="filter"> [in] The filter to apply to the iterator. </param>
///<returns>
/// True if more data is available, false if not.
///</returns>
///<code>
///bool ecs_query_next_w_filter(ecs_iter_t *iter, const ecs_filter_t *filter)
///</code>
// ecs_query_next_w_filter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2253
[DllImport(DLL, EntryPoint = "ecs_query_next_w_filter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool query_next_w_filter(out Iter iter, out Filter filter);
///<summary>
/// Progress the query iterator for a worker thread. This operation is similar to ecs_query_next, but provides the ability to divide entities up across multiple worker threads. The operation accepts a current thread id and a total thread id, which is used to determine which subset of entities should be assigned to the current thread.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="current"> [in] Thread id of current thread. </param>
///<param name="total"> [in] Total number of threads. </param>
///<returns>
/// True if more data is available, false if not.
///</returns>
///<remarks>
/// Current should be less than total, and there should be as many as total threads. If there are less entities in a table than there are threads, only as many threads as there are entities will iterate that table.
///</remarks>
///<code>
///bool ecs_query_next_worker(ecs_iter_t *it, int32_t current, int32_t total)
///</code>
// ecs_query_next_worker: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2272
[DllImport(DLL, EntryPoint = "ecs_query_next_worker", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool query_next_worker(out Iter it, int current, int total);
///<summary>
/// Sort the output of a query. This enables sorting of entities across matched tables. As a result of this operation, the order of entities in the matched tables may be changed. Resorting happens when a query iterator is obtained, and only if the table data has changed.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="query"> [in] The query. </param>
///<param name="component"> [in] The component used to sort. </param>
///<param name="compare"> [in] The compare function used to sort the components.</param>
///<remarks>
/// If multiple queries that match the same (sub)set of tables specify different sorting functions, resorting is likely to happen every time an iterator is obtained, which can significantly slow down iterations.
/// The sorting function will be applied to the specified component. Resorting only happens if that component has changed, or when the entity order in the table has changed. If no component is provided, resorting only happens when the entity order changes.
///</remarks>
///<code>
///void ecs_query_order_by(ecs_world_t *world, ecs_query_t *query,
/// ecs_entity_t component, ecs_compare_action_t compare)
///</code>
// ecs_query_order_by: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2298
[DllImport(DLL, EntryPoint = "ecs_query_order_by", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void query_order_by(World world, Query query, EntityId component, CompareActionDelegate compare);
///<summary>
/// Group and sort matched tables. Similar yo ecs_query_order_by, but instead of sorting individual entities, this operation only sorts matched tables. This can be useful of a query needs to enforce a certain iteration order upon the tables it is iterating, for example by giving a certain component or tag a higher priority.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="query"> [in] The query. </param>
///<param name="component"> [in] The component used to determine the group rank. </param>
///<param name="rank_action"> [in] The rank action.</param>
///<remarks>
/// The sorting function assigns a "rank" to each type, which is then used to sort the tables. Tables with higher ranks will appear later in the iteration.
/// Resorting happens when a query iterator is obtained, and only if the set of matched tables for a query has changed. If table sorting is enabled together with entity sorting, table sorting takes precedence, and entities will be sorted within each set of tables that are assigned the same rank.
///</remarks>
///<code>
///void ecs_query_group_by(ecs_world_t *world, ecs_query_t *query,
/// ecs_entity_t component,
/// ecs_rank_type_action_t rank_action)
///</code>
// ecs_query_group_by: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2324
[DllImport(DLL, EntryPoint = "ecs_query_group_by", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void query_group_by(World world, Query query, EntityId component, RankTypeActionDelegate rankAction);
///<summary>
/// Returns whether the query data changed since the last iteration. This operation must be invoked before obtaining the iterator, as this will reset the changed state. The operation will return true after: - new entities have been matched with - matched entities were deleted - matched components were changed
///</summary>
///<param name="query"> [in] The query. </param>
///<returns>
/// true if entities changed, otherwise false.
///</returns>
///<code>
///bool ecs_query_changed(ecs_query_t *query)
///</code>
// ecs_query_changed: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2341
[DllImport(DLL, EntryPoint = "ecs_query_changed", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool query_changed(Query query);
///<summary>
/// Returns whether query is orphaned. When the parent query of a subquery is deleted, it is left in an orphaned state. The only valid operation on an orphaned query is deleting it. Only subqueries can be orphaned.
///</summary>
///<param name="query"> [in] The query. </param>
///<returns>
/// true if query is orphaned, otherwise false.
///</returns>
///<code>
///bool ecs_query_orphaned(ecs_query_t *query)
///</code>
// ecs_query_orphaned: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2353
[DllImport(DLL, EntryPoint = "ecs_query_orphaned", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool query_orphaned(Query query);
///<summary>
/// Obtain column data. This operation is to be used to obtain a component array for a specific column in the system or query signature. The column is identified by the provided index. For example, if this is the provided signature:
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="size"> [in] The size of the component. </param>
///<param name="column"> [in] The index identifying the column in a signature. </param>
///<returns>
/// A pointer to the column data.
///</returns>
///<remarks>
/// Position, Velocity
/// Position is at index 1, and Velocity is at index 2.
/// This operation may return NULL if the column is optional, and the current table does not have the data. Additionally, if the column points to a shared component or a reference, the returned value should be interpreted as a pointer instead of an array.
/// The provided size must match the size of the component, otherwise the function may fail.
///</remarks>
///<code>
///void *ecs_column_w_size(const ecs_iter_t *it, size_t size, int32_t column)
///</code>
// ecs_column_w_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2386
[DllImport(DLL, EntryPoint = "ecs_column_w_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr column_w_size(out Iter it, UIntPtr size, int column);
///<summary>
/// Get column index by name. This function obtains a column index by name. This function can only be used if a query signature contains names.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="name"> [in] The column name. </param>
///<returns>
/// Index of the column (to be used with ecs_column_* functions).
///</returns>
///<code>
///int32_t ecs_column_index_from_name(const ecs_iter_t *it, const char *name)
///</code>
// ecs_column_index_from_name: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2412
[DllImport(DLL, EntryPoint = "ecs_column_index_from_name", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int column_index_from_name(out Iter it, CharPtr name);
///<summary>
/// Test if column is owned or not. The following signature shows an example of one owned components and two components that are not owned by the current entity:
///</summary>
///<param name="it"> [in] The it parameter passed into the system. </param>
///<param name="index"> [in] The index identifying the column in a system signature. </param>
///<returns>
/// True if column is owned, false if column is not.
///</returns>
///<remarks>
/// Position, PARENT:Velocity, MyEntity:Mass
/// Position is an owned component. Velocity and Mass both belong to a different entity. This operation will return false for Position, and true for Velocity and Mass. If a component is matched from a prefab, this operation will also return false.
///</remarks>
///<code>
///bool ecs_is_owned(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_is_owned: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2432
[DllImport(DLL, EntryPoint = "ecs_is_owned", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool is_owned(out Iter it, int column);
///<summary>
/// Obtain a single element. This operation is similar to ecs_column, but instead of an array it obtains a single element from a component array. The advantage of using ecs_element is that a system can be agnostic towards whether a component is owned or not, at the cost of some additional performance overhead.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="size"> [in] The component size. </param>
///<param name="column"> [in] The index identifying the column in a signature. </param>
///<param name="row"> [in] The current row in the table. </param>
///<returns>
/// A pointer to the current element.
///</returns>
///<code>
///void *ecs_element_w_size(const ecs_iter_t *it, size_t size, int32_t column,
/// int32_t row)
///</code>
// ecs_element_w_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2449
[DllImport(DLL, EntryPoint = "ecs_element_w_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr element_w_size(out Iter it, UIntPtr size, int column, int row);
///<summary>
/// Obtain the source of a signature column. This operation returns the source of a signature column. By default this will return 0 for regular columns, but for columns where the components are provided by entities other than the entity being iterated over, this will return the source of the component.
///</summary>
///<param name="it"> [in] Pointer to the it object passed into the system callback. </param>
///<param name="column"> [in] The index identifying the column in a signature. </param>
///<returns>
/// The source entity for the column.
///</returns>
///<code>
///ecs_entity_t ecs_column_source(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_column_source: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2479
[DllImport(DLL, EntryPoint = "ecs_column_source", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId column_source(out Iter it, int column);
///<summary>
/// Obtain the entity id of the signature column. This operation returns the entity id of the component or tag used in the system signature. For example, when provided this signature:
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="column"> [in] The index identifying the column in a signature. </param>
///<returns>
/// The entity id of the signature column.
///</returns>
///<remarks>
/// Position, Velocity
/// ecs_column_entity(world, 1) will return the component handle for Position and ecs_column_entity(world, 2) will return the componnet handle for Velocity.
///</remarks>
///<code>
///ecs_entity_t ecs_column_entity(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_column_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2497
[DllImport(DLL, EntryPoint = "ecs_column_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId column_entity(out Iter it, int column);
///<summary>
/// Obtain the type of a column from inside a system. This operation is equivalent to ecs_column_entity, except that it returns a type, instead of an entity handle. Invoking this function is the same as doing:
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="column"> [in] The index identifying the column in a signature. </param>
///<returns>
/// The type for the specified column, or NULL if failed.
///</returns>
///<remarks>
/// ecs_type_from_entity( ecs_column_entity(it, index));
///</remarks>
///<code>
///ecs_type_t ecs_column_type(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_column_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2513
[DllImport(DLL, EntryPoint = "ecs_column_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId column_type(out Iter it, int column);
///<summary>
/// Get the size of the component of the specified column.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="column"> [in] The column for which to obtain the size.</param>
///<code>
///size_t ecs_column_size(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_column_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2523
[DllImport(DLL, EntryPoint = "ecs_column_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern UIntPtr column_size(out Iter it, int column);
///<summary>
/// Is the column readonly. This operation returns if the column is a readonly column. Readonly columns are marked in the system signature with the [in] modifier.
///</summary>
///<param name="it"> [in] Pointer to the it object passed into the system callback. </param>
///<param name="column"> [in] An index identifying the column. </param>
///<returns>
/// True if the column is readonly, false otherwise.
///</returns>
///<code>
///bool ecs_is_readonly(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_is_readonly: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2535
[DllImport(DLL, EntryPoint = "ecs_is_readonly", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool is_readonly(out Iter it, int column);
///<summary>
/// Get type of table that system is currently iterating over. This will return the type for all entities that are currently being iterated over, until ecs_iter_next is invoked.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<returns>
/// The type of the current table.
///</returns>
///<code>
///ecs_type_t ecs_iter_type(const ecs_iter_t *it)
///</code>
// ecs_iter_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2547
[DllImport(DLL, EntryPoint = "ecs_iter_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId iter_type(out Iter it);
///<summary>
/// Get component array from table. In some cases an application may require access to the table component arrays directly instead of going through the signature to table mapping. A typical scenario where this would be used is when using a filter iterator, where there is no signature, and thus ecs_column cannot be used.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="column"> [in] The index identifying the column in a table. </param>
///<returns>
/// The component array corresponding to the column index.
///</returns>
///<code>
///void *ecs_table_column(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_table_column: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2561
[DllImport(DLL, EntryPoint = "ecs_table_column", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr table_column(out Iter it, int column);
///<summary>
/// Get the size of a table column.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="column"> [in] The column for which to obtain the size.</param>
///<code>
///size_t ecs_table_column_size(const ecs_iter_t *it, int32_t column)
///</code>
// ecs_table_column_size: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2571
[DllImport(DLL, EntryPoint = "ecs_table_column_size", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern UIntPtr table_column_size(out Iter it, int column);
///<summary>
/// Get the index of the table column for a component.
///</summary>
///<param name="it"> [in] The iterator. </param>
///<param name="component"> [in] The component for which to obtain the index.</param>
///<code>
///int32_t ecs_table_component_index(const ecs_iter_t *it, ecs_entity_t component)
///</code>
// ecs_table_component_index: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2581
[DllImport(DLL, EntryPoint = "ecs_table_component_index", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int table_component_index(out Iter it, EntityId component);
///<summary>
/// Begin frame.
///</summary>
///<code>
///float ecs_frame_begin(ecs_world_t *world, float delta_time)
///</code>
// ecs_frame_begin: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2630
[DllImport(DLL, EntryPoint = "ecs_frame_begin", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern float frame_begin(World world, float deltaTime);
///<summary>
/// End frame.
///</summary>
///<code>
///void ecs_frame_end(ecs_world_t *world)
///</code>
// ecs_frame_end: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2636
[DllImport(DLL, EntryPoint = "ecs_frame_end", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void frame_end(World world);
///<summary>
/// Begin staging. When staging is enabled, modifications to entities are stored to a stage. This ensures that arrays are not modified while iterating. Modifications are merged back to the "main stage" when ecs_staging_end is invoked.
///</summary>
///<param name="world"> [in] The world </param>
///<returns>
/// Whether world is currently staged.
///</returns>
///<code>
///bool ecs_staging_begin(ecs_world_t *world)
///</code>
// ecs_staging_begin: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2648
[DllImport(DLL, EntryPoint = "ecs_staging_begin", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool staging_begin(World world);
///<summary>
/// End staging. If any data was staged, this operation will merge that data back to the main stage.
///</summary>
///<param name="world"> [in] The world</param>
///<code>
///void ecs_staging_end(ecs_world_t *world)
///</code>
// ecs_staging_end: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2658
[DllImport(DLL, EntryPoint = "ecs_staging_end", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void staging_end(World world);
///<summary>
/// Manually merge. When automerging is set to false, an application can invoke this operation to force merging all stages.
///</summary>
///<param name="world"> [in] The world.</param>
///<code>
///void ecs_merge(ecs_world_t *world)
///</code>
// ecs_merge: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2668
[DllImport(DLL, EntryPoint = "ecs_merge", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void merge(World world);
///<summary>
/// Defer operations until end of frame. When this operation is invoked while iterating, operations inbetween the defer_begin and defer_end operations are executed at the end of the frame.
///</summary>
///<remarks>
/// This operation is thread safe.
///</remarks>
///<code>
///void ecs_defer_begin(ecs_world_t *world)
///</code>
// ecs_defer_begin: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2678
[DllImport(DLL, EntryPoint = "ecs_defer_begin", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void defer_begin(World world);
///<summary>
/// End block of operations to defer. See defer_begin.
///</summary>
///<remarks>
/// This operation is thread safe.
///</remarks>
///<code>
///void ecs_defer_end(ecs_world_t *world)
///</code>
// ecs_defer_end: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2687
[DllImport(DLL, EntryPoint = "ecs_defer_end", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void defer_end(World world);
///<summary>
/// Enable / disable automerging. When automerging is enabled, running a pipeline will automatically merge when necessary. With automerging disabled, merging will not happen unless the application manually invokes ecs_merge.
///</summary>
///<param name="world"> [in] The world.</param>
///<code>
///void ecs_set_automerge(ecs_world_t *world, bool auto_merge)
///</code>
// ecs_set_automerge: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs.h#L2698
[DllImport(DLL, EntryPoint = "ecs_set_automerge", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_automerge(World world, bool autoMerge);
///<summary>
/// Import a module. This operation will load a modules and store the public module handles in the handles_out out parameter. The module name will be used to verify if the module was already loaded, in which case it won't be reimported. The name will be translated from PascalCase to an entity path (pascal.case) before the lookup occurs.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="module"> [in] The module to load. </param>
///<param name="module_name"> [in] The name of the module to load. </param>
///<param name="handles_out"> [in] A struct with handles to the module components/systems. </param>
///<param name="handles_size"> [in] Size of the handles_out parameter. </param>
///<param name="flags"> [in] An integer that will be passed into the module import action. </param>
///<returns>
/// The module entity.
///</returns>
///<remarks>
/// Module contents will be stored as children of the module entity. This prevents modules from accidentally defining conflicting identifiers. This is enforced by setting the scope before and after loading the module to the module entity id.
/// A more convenient way to import a module is by using the ECS_IMPORT macro.
///</remarks>
///<code>
///ecs_entity_t ecs_import(ecs_world_t *world, ecs_module_action_t module,
/// const char *module_name, void *handles_out,
/// size_t handles_size)
///</code>
// ecs_import: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/module.h#L42
[DllImport(DLL, EntryPoint = "ecs_import", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId import(World world, ModuleActionDelegate module, CharPtr moduleName, IntPtr handlesOut, UIntPtr handlesSize);
///<summary>
/// Import a module from a library. Similar to ecs_import, except that this operation will attempt to load the module from a dynamic library.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="library_name"> [in] The name of the library to load. </param>
///<param name="module_name"> [in] The name of the module to load. </param>
///<param name="flags"> [in] The flags to pass to the module.</param>
///<remarks>
/// A library may contain multiple modules, which is why both a library name and a module name need to be provided. If only a library name is provided, the library name will be reused for the module name.
/// The library will be looked up using a canonical name, which is in the same form as a module, like `flecs.components.transform`. To transform this identifier to a platform specific library name, the operation relies on the module_to_dl callback of the os_api which the application has to override if the default does not yield the correct library name.
///</remarks>
///<code>
///ecs_entity_t ecs_import_from_library(ecs_world_t *world,
/// const char *library_name,
/// const char *module_name)
///</code>
// ecs_import_from_library: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/module.h#L69
[DllImport(DLL, EntryPoint = "ecs_import_from_library", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId import_from_library(World world, CharPtr libraryName, CharPtr moduleName);
///<summary>
/// Run a specific system manually. This operation runs a single system manually. It is an efficient way to invoke logic on a set of entities, as manual systems are only matched to tables at creation time or after creation time, when a new table is created.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="system"> [in] The system to run. </param>
///<param name="param"> [in] A user-defined parameter to pass to the system. </param>
///<param name="delta_time:"> [in] The time passed since the last system invocation. </param>
///<returns>
/// handle to last evaluated entity if system was interrupted.
///</returns>
///<remarks>
/// Manual systems are useful to evaluate lists of prematched entities at application defined times. Because none of the matching logic is evaluated before the system is invoked, manual systems are much more efficient than manually obtaining a list of entities and retrieving their components.
/// An application may pass custom data to a system through the param parameter. This data can be accessed by the system through the param member in the ecs_iter_t value that is passed to the system callback.
/// Any system may interrupt execution by setting the interrupted_by member in the ecs_iter_t value. This is particularly useful for manual systems, where the value of interrupted_by is returned by this operation. This, in cominbation with the param argument lets applications use manual systems to lookup entities: once the entity has been found its handle is passed to interrupted_by, which is then subsequently returned.
///</remarks>
///<code>
///ecs_entity_t ecs_run(ecs_world_t *world, ecs_entity_t system, float delta_time,
/// void *param)
///</code>
// ecs_run: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L144
[DllImport(DLL, EntryPoint = "ecs_run", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId run(World world, EntityId system, float deltaTime, IntPtr param);
///<summary>
/// Run system with offset/limit and type filter. This operation is the same as ecs_run, but filters the entities that will be iterated by the system.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="system"> [in] The system to invoke. </param>
///<param name="filter"> [in] A component or type to filter matched entities. </param>
///<param name="param"> [in] A user-defined parameter to pass to the system. </param>
///<param name="delta_time:"> [in] The time passed since the last system invocation. </param>
///<returns>
/// handle to last evaluated entity if system was interrupted.
///</returns>
///<remarks>
/// Entities can be filtered in two ways. Offset and limit control the range of entities that is iterated over. The range is applied to all entities matched with the system, thus may cover multiple archetypes.
/// The type filter controls which entity types the system will evaluate. Only types that contain all components in the type filter will be iterated over. A type filter is only evaluated once per table, which makes filtering cheap if the number of entities is large and the number of tables is small, but not as cheap as filtering in the system signature.
///</remarks>
///<code>
///ecs_entity_t ecs_run_w_filter(ecs_world_t *world, ecs_entity_t system,
/// float delta_time, int32_t offset, int32_t limit,
/// const ecs_filter_t *filter, void *param)
///</code>
// ecs_run_w_filter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L172
[DllImport(DLL, EntryPoint = "ecs_run_w_filter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId run_w_filter(World world, EntityId system, float deltaTime, int offset, int limit, out Filter filter, IntPtr param);
///<summary>
/// Set system status action. The status action is invoked whenever a system is enabled or disabled. Note that a system may be enabled but may not actually match any entities. In this case the system is enabled but not _active_.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="system"> [in] The system for which to set the action. </param>
///<param name="action"> [in] The action. </param>
///<param name="ctx"> [in] Context that will be passed to the action when invoked.</param>
///<remarks>
/// In addition to communicating the enabled / disabled status, the action also communicates changes in the activation status of the system. A system becomes active when it has one or more matching entities, and becomes inactive when it no longer matches any entities.
/// A system switches between enabled and disabled when an application invokes the ecs_enable operation with a state different from the state of the system, for example the system is disabled, and ecs_enable is invoked with enabled: true.
/// Additionally a system may switch between enabled and disabled when it is an EcsOnDemand system, and interest is generated or lost for one of its [out] columns.
///</remarks>
///<code>
///void ecs_set_system_status_action(ecs_world_t *world, ecs_entity_t system,
/// ecs_system_status_action_t action,
/// const void *ctx)
///</code>
// ecs_set_system_status_action: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L220
[DllImport(DLL, EntryPoint = "ecs_set_system_status_action", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_system_status_action(World world, EntityId system, SystemStatusActionDelegate action, IntPtr ctx);
///<code>
///int ecs_dbg_system(ecs_world_t *, ecs_entity_t, ecs_dbg_system_t *)
///</code>
// ecs_dbg_system: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L241
[DllImport(DLL, EntryPoint = "ecs_dbg_system", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int dbg_system(World world, EntityId system, out DbgSystem dbgOut);
///<code>
///ecs_table_t * ecs_dbg_get_active_table(ecs_world_t *, ecs_dbg_system_t *, int32_t)
///</code>
// ecs_dbg_get_active_table: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L247
[DllImport(DLL, EntryPoint = "ecs_dbg_get_active_table", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Table dbg_get_active_table(World world, out DbgSystem dbg, int index);
///<code>
///ecs_table_t * ecs_dbg_get_inactive_table(ecs_world_t *, ecs_dbg_system_t *, int32_t)
///</code>
// ecs_dbg_get_inactive_table: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L253
[DllImport(DLL, EntryPoint = "ecs_dbg_get_inactive_table", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Table dbg_get_inactive_table(World world, out DbgSystem dbg, int index);
///<code>
///ecs_type_t ecs_dbg_get_column_type(ecs_world_t *, ecs_entity_t, int32_t)
///</code>
// ecs_dbg_get_column_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L259
[DllImport(DLL, EntryPoint = "ecs_dbg_get_column_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId dbg_get_column_type(World world, EntityId system, int columnIndex);
///<code>
///bool ecs_dbg_match_entity(ecs_world_t *, ecs_entity_t, ecs_entity_t, ecs_match_failure_t *)
///</code>
// ecs_dbg_match_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/system.h#L265
[DllImport(DLL, EntryPoint = "ecs_dbg_match_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool dbg_match_entity(World world, EntityId entity, EntityId system, out MatchFailure failureInfoOut);
///<summary>
/// Set a custom pipeline. This operation sets the pipeline to run when ecs_progress is invoked.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="pipeline"> [in] The pipeline to set.</param>
///<code>
///void ecs_set_pipeline(ecs_world_t *world, ecs_entity_t pipeline)
///</code>
// ecs_set_pipeline: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L29
[DllImport(DLL, EntryPoint = "ecs_set_pipeline", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_pipeline(World world, EntityId pipeline);
///<summary>
/// Get the current pipeline. This operation gets the current pipeline.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="pipeline"> [in] The pipeline to set.</param>
///<code>
///ecs_entity_t ecs_get_pipeline(ecs_world_t *world)
///</code>
// ecs_get_pipeline: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L40
[DllImport(DLL, EntryPoint = "ecs_get_pipeline", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId get_pipeline(World world);
///<summary>
/// Progress a world. This operation progresses the world by running all systems that are both enabled and periodic on their matching entities.
///</summary>
///<param name="world"> [in] The world to progress. </param>
///<param name="delta_time"> [in] The time passed since the last frame. </param>
///<returns>
/// false if ecs_quit has been called, true otherwise.
///</returns>
///<remarks>
/// An application can pass a delta_time into the function, which is the time passed since the last frame. This value is passed to systems so they can update entity values proportional to the elapsed time since their last invocation.
/// When an application passes 0 to delta_time, ecs_progress will automatically measure the time passed since the last frame. If an application does not uses time management, it should pass a non-zero value for delta_time (1.0 is recommended). That way, no time will be wasted measuring the time.
///</remarks>
///<code>
///bool ecs_progress(ecs_world_t *world, float delta_time)
///</code>
// ecs_progress: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L62
[DllImport(DLL, EntryPoint = "ecs_progress", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool progress(World world, float deltaTime);
///<summary>
/// Set target frames per second (FPS) for application. Setting the target FPS ensures that ecs_progress is not invoked faster than the specified FPS. When enabled, ecs_progress tracks the time passed since the last invocation, and sleeps the remaining time of the frame (if any).
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="fps"> [in] The target FPS.</param>
///<remarks>
/// This feature ensures systems are ran at a consistent interval, as well as conserving CPU time by not running systems more often than required.
/// Note that ecs_progress only sleeps if there is time left in the frame. Both time spent in flecs as time spent outside of flecs are taken into account.
///</remarks>
///<code>
///void ecs_set_target_fps(ecs_world_t *world, float fps)
///</code>
// ecs_set_target_fps: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L82
[DllImport(DLL, EntryPoint = "ecs_set_target_fps", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_target_fps(World world, float fps);
///<summary>
/// Set time scale. Increase or decrease simulation speed by the provided multiplier.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="scale"> [in] The scale to apply (default = 1).</param>
///<code>
///void ecs_set_time_scale(ecs_world_t *world, float scale)
///</code>
// ecs_set_time_scale: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L93
[DllImport(DLL, EntryPoint = "ecs_set_time_scale", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_time_scale(World world, float scale);
///<summary>
/// Reset world clock. Reset the clock that keeps track of the total time passed in the simulation.
///</summary>
///<param name="world"> [in] The world.</param>
///<code>
///void ecs_reset_clock(ecs_world_t *world)
///</code>
// ecs_reset_clock: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L103
[DllImport(DLL, EntryPoint = "ecs_reset_clock", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void reset_clock(World world);
///<summary>
/// Signal exit This operation signals that the application should quit. It will cause ecs_progress to return false.
///</summary>
///<param name="world"> [in] The world to quit.</param>
///<code>
///void ecs_quit(ecs_world_t *world)
///</code>
// ecs_quit: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L113
[DllImport(DLL, EntryPoint = "ecs_quit", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void quit(World world);
///<summary>
/// Deactivate systems that are not matched with tables. By default Flecs deactivates systems that are not matched with any tables. However, once a system has been matched with a table it remains activated, to prevent systems from continuously becoming active and inactive.
///</summary>
///<param name="world"> [in] The world.</param>
///<remarks>
/// To re-deactivate systems, an application can invoke this function, which will deactivate all systems that are not matched with any tables.
///</remarks>
///<code>
///void ecs_deactivate_systems(ecs_world_t *world)
///</code>
// ecs_deactivate_systems: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L127
[DllImport(DLL, EntryPoint = "ecs_deactivate_systems", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void deactivate_systems(World world);
///<summary>
/// Set number of worker threads. Setting this value to a value higher than 1 will start as many threads and will cause systems to evenly distribute matched entities across threads. The operation may be called multiple times to reconfigure the number of threads used, but never while running a system / pipeline.
///</summary>
///<code>
///void ecs_set_threads(ecs_world_t *world, int32_t threads)
///</code>
// ecs_set_threads: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L141
[DllImport(DLL, EntryPoint = "ecs_set_threads", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_threads(World world, int threads);
///<summary>
/// Get current number of threads.
///</summary>
///<code>
///int32_t ecs_get_threads(ecs_world_t *world)
///</code>
// ecs_get_threads: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L147
[DllImport(DLL, EntryPoint = "ecs_get_threads", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int get_threads(World world);
///<summary>
/// Get current thread index
///</summary>
///<code>
///int32_t ecs_get_thread_index(ecs_world_t *world)
///</code>
// ecs_get_thread_index: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/pipeline.h#L152
[DllImport(DLL, EntryPoint = "ecs_get_thread_index", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int get_thread_index(World world);
///<summary>
/// Set timer timeout. This operation executes any systems associated with the timer after the specified timeout value. If the entity contains an existing timer, the timeout value will be reset.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="timer"> [in] The timer for which to set the timeout (0 to create one). </param>
///<param name="timeout"> [in] The timeout value. </param>
///<returns>
/// The timer entity.
///</returns>
///<remarks>
/// Any entity can be used as a timer (including systems). If a timeout value is set on a system entity, it will be automatically applied to that system.
/// The timer is synchronous, and is incremented each frame by delta_time.
///</remarks>
///<code>
///ecs_entity_t ecs_set_timeout(ecs_world_t *world, ecs_entity_t timer,
/// float timeout)
///</code>
// ecs_set_timeout: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L62
[DllImport(DLL, EntryPoint = "ecs_set_timeout", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId set_timeout(World world, EntityId timer, float timeout);
///<summary>
/// Get current timeout value for the specified timer. This operation returns the value set by ecs_set_timeout. If no timer is active for this entity, the operation returns 0.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="timer"> [in] The timer. </param>
///<returns>
/// The current timeout value, or 0 if no timer is active.
///</returns>
///<remarks>
/// After the timeout expires the timer component is removed from the entity. This means that if ecs_get_timeout is invoked after the timer is expired, the operation will return 0.
///</remarks>
///<code>
///float ecs_get_timeout(ecs_world_t *world, ecs_entity_t timer)
///</code>
// ecs_get_timeout: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L80
[DllImport(DLL, EntryPoint = "ecs_get_timeout", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern float get_timeout(World world, EntityId timer);
///<summary>
/// Set timer interval. This operation will continously invoke systems associated with the timer after the interval period expires. If the entity contains an existing timer, the interval value will be reset.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="timer"> [in] The timer for which to set the interval (0 to create one). </param>
///<param name="interval"> [in] The interval value. </param>
///<returns>
/// The timer entity.
///</returns>
///<remarks>
/// Any entity can be used as a timer (including systems). If an interval value is set on a system entity, it will be automatically applied to that system.
/// The timer is synchronous, and is incremented each frame by delta_time.
///</remarks>
///<code>
///ecs_entity_t ecs_set_interval(ecs_world_t *world, ecs_entity_t timer,
/// float interval)
///</code>
// ecs_set_interval: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L100
[DllImport(DLL, EntryPoint = "ecs_set_interval", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId set_interval(World world, EntityId timer, float interval);
///<summary>
/// Get current interval value for the specified timer. This operation returns the value set by ecs_set_interval. If no timer is active for this entity, the operation returns 0.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="timer"> [in] The timer for which to set the interval. If 0, an entity will be created. </param>
///<returns>
/// The current interval value, or 0 if no timer is active.
///</returns>
///<code>
///float ecs_get_interval(ecs_world_t *world, ecs_entity_t timer)
///</code>
// ecs_get_interval: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L114
[DllImport(DLL, EntryPoint = "ecs_get_interval", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern float get_interval(World world, EntityId timer);
///<summary>
/// Start timer. This operation resets the timer and starts it with the specified timeout. The entity must have the EcsTimer component (added by ecs_set_timeout and ecs_set_interval). If the entity does not have the EcsTimer component this operation will assert.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="timer"> [in] The timer to start.</param>
///<code>
///void ecs_start_timer(ecs_world_t *world, ecs_entity_t timer)
///</code>
// ecs_start_timer: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L128
[DllImport(DLL, EntryPoint = "ecs_start_timer", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void start_timer(World world, EntityId timer);
///<summary>
/// Stop timer This operation stops a timer from triggering. The entity must have the EcsTimer component or this operation will assert.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="timer"> [in] The timer to stop.</param>
///<code>
///void ecs_stop_timer(ecs_world_t *world, ecs_entity_t timer)
///</code>
// ecs_stop_timer: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L140
[DllImport(DLL, EntryPoint = "ecs_stop_timer", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void stop_timer(World world, EntityId timer);
///<summary>
/// Set rate filter. This operation sets the source and rate for a rate filter. A rate filter samples another tick source (or frames, if none provided) and ticks when the number of sampled ticks equals the rate.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="filter"> [in] The filter entity (0 to create one). </param>
///<param name="rate"> [in] The rate to apply. </param>
///<param name="source"> [in] The tick source (0 to use frames) </param>
///<returns>
/// The filter entity.
///</returns>
///<code>
///ecs_entity_t ecs_set_rate_filter(ecs_world_t *world, ecs_entity_t filter,
/// int32_t rate, ecs_entity_t source)
///</code>
// ecs_set_rate_filter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L156
[DllImport(DLL, EntryPoint = "ecs_set_rate_filter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern EntityId set_rate_filter(World world, EntityId filter, int rate, EntityId source);
///<summary>
/// Assign tick source to system. This operation associates a system with a tick source. If the system is both active and enabled at the moment the tick source fires, it will be executed. If no tick source is associated with a system, it will be invoked every frame.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="system"> [in] The system to associate with the timer. </param>
///<param name="timer"> [in] The timer to associate with the system.</param>
///<remarks>
/// To disassociate a tick source from a system, use 0 for the tick_source parameter.
/// Timer and rate filter entities are valid tick sources. An application can also create its own tick source by setting the EcsTickSource component on an entity.
/// If an entity without the EcsTickSource component is provided as tick source, the system will not be executed.
///</remarks>
///<code>
///void ecs_set_tick_source(ecs_world_t *world, ecs_entity_t system,
/// ecs_entity_t tick_source)
///</code>
// ecs_set_tick_source: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/modules/timer.h#L183
[DllImport(DLL, EntryPoint = "ecs_set_tick_source", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void set_tick_source(World world, EntityId system, EntityId tickSource);
///<summary>
/// Add an entity to entities matching a filter. This operation is the same as ecs_add_entity, but is applied to all entities that match the provided filter.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity_add"> [in] The entity to add. </param>
///<param name="filter"> [in] The filter.</param>
///<code>
///void ecs_bulk_add_entity(ecs_world_t *world, ecs_entity_t entity_add,
/// const ecs_filter_t *filter)
///</code>
// ecs_bulk_add_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/bulk.h#L24
[DllImport(DLL, EntryPoint = "ecs_bulk_add_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void bulk_add_entity(World world, EntityId entityAdd, out Filter filter);
///<summary>
/// Add a type to entities matching a filter. This operation is the same as ecs_add_type but is applied to all entities that match the provided filter.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type to add. </param>
///<param name="filter"> [in] The filter.</param>
///<code>
///void ecs_bulk_add_type(ecs_world_t *world, ecs_type_t type,
/// const ecs_filter_t *filter)
///</code>
// ecs_bulk_add_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/bulk.h#L38
[DllImport(DLL, EntryPoint = "ecs_bulk_add_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void bulk_add_type(World world, TypeId type, out Filter filter);
///<summary>
/// Removes an entity from entities matching a filter. This operation is the same as ecs_remove_entity, but is applied to all entities that match the provided filter.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity_remove"> [in] The entity to remove. </param>
///<param name="filter"> [in] The filter.</param>
///<code>
///void ecs_bulk_remove_entity(ecs_world_t *world, ecs_entity_t entity_remove,
/// const ecs_filter_t *filter)
///</code>
// ecs_bulk_remove_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/bulk.h#L63
[DllImport(DLL, EntryPoint = "ecs_bulk_remove_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void bulk_remove_entity(World world, EntityId entityRemove, out Filter filter);
///<summary>
/// Remove a type from entities matching a filter. This operation is the same as ecs_remove_type but is applied to all entities that match the provided filter.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type to remove. </param>
///<param name="filter"> [in] The filter.</param>
///<code>
///void ecs_bulk_remove_type(ecs_world_t *world, ecs_type_t type,
/// const ecs_filter_t *filter)
///</code>
// ecs_bulk_remove_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/bulk.h#L77
[DllImport(DLL, EntryPoint = "ecs_bulk_remove_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void bulk_remove_type(World world, TypeId type, out Filter filter);
///<summary>
/// Add / remove type from entities matching a filter. Combination of ecs_bulk_add_type and ecs_bulk_remove_type.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="to_add"> [in] The type to add. </param>
///<param name="to_remove"> [in] The type to remove. </param>
///<param name="filter"> [in] The filter.</param>
///<code>
///void ecs_bulk_add_remove_type(ecs_world_t *world, ecs_type_t to_add,
/// ecs_type_t to_remove, const ecs_filter_t *filter)
///</code>
// ecs_bulk_add_remove_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/bulk.h#L102
[DllImport(DLL, EntryPoint = "ecs_bulk_add_remove_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void bulk_add_remove_type(World world, TypeId toAdd, TypeId toRemove, out Filter filter);
///<summary>
/// Delete entities matching a filter. This operation is the same as ecs_delete, but applies to all entities that match a filter.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="filter"> [in] The filter.</param>
///<code>
///void ecs_bulk_delete(ecs_world_t *world, const ecs_filter_t *filter)
///</code>
// ecs_bulk_delete: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/bulk.h#L127
[DllImport(DLL, EntryPoint = "ecs_bulk_delete", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void bulk_delete(World world, out Filter filter);
///<code>
///void ecs_dbg_entity(ecs_world_t *, ecs_entity_t, ecs_dbg_entity_t *)
///</code>
// ecs_dbg_entity: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/dbg.h#L33
[DllImport(DLL, EntryPoint = "ecs_dbg_entity", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void dbg_entity(World world, EntityId entity, out DbgEntity dbgOut);
///<code>
///ecs_table_t * ecs_dbg_find_table(ecs_world_t *, ecs_type_t)
///</code>
// ecs_dbg_find_table: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/dbg.h#L39
[DllImport(DLL, EntryPoint = "ecs_dbg_find_table", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Table dbg_find_table(World world, TypeId type);
///<code>
///ecs_table_t * ecs_dbg_get_table(ecs_world_t *, int32_t)
///</code>
// ecs_dbg_get_table: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/dbg.h#L44
[DllImport(DLL, EntryPoint = "ecs_dbg_get_table", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Table dbg_get_table(World world, int index);
///<code>
///bool ecs_dbg_filter_table(ecs_world_t *, ecs_table_t *, ecs_filter_t *)
///</code>
// ecs_dbg_filter_table: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/dbg.h#L49
[DllImport(DLL, EntryPoint = "ecs_dbg_filter_table", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool dbg_filter_table(World world, Table table, out Filter filter);
///<code>
///void ecs_dbg_table(ecs_world_t *, ecs_table_t *, ecs_dbg_table_t *)
///</code>
// ecs_dbg_table: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/dbg.h#L55
[DllImport(DLL, EntryPoint = "ecs_dbg_table", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void dbg_table(World world, Table table, out DbgTable dbgOut);
///<code>
///int32_t ecs_queue_index(ecs_queue_t *)
///</code>
// ecs_queue_index: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L63
[DllImport(DLL, EntryPoint = "ecs_queue_index", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int queue_index(Queue queue);
///<code>
///int32_t ecs_queue_count(ecs_queue_t *)
///</code>
// ecs_queue_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L67
[DllImport(DLL, EntryPoint = "ecs_queue_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int queue_count(Queue queue);
///<code>
///void ecs_queue_free(ecs_queue_t *)
///</code>
// ecs_queue_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/queue.h#L71
[DllImport(DLL, EntryPoint = "ecs_queue_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void queue_free(Queue queue);
///<summary>
/// Initialize a reader. A reader serializes data in a world to a sequence of bytes that can be stored in a file or sent across a network.
///</summary>
///<param name="world"> [in] The world to serialize. </param>
///<returns>
/// The reader.
///</returns>
///<code>
///ecs_reader_t ecs_reader_init(ecs_world_t *world)
///</code>
// ecs_reader_init: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/reader_writer.h#L129
[DllImport(DLL, EntryPoint = "ecs_reader_init", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Reader reader_init(World world);
///<summary>
/// Initialize a snapshot reader. A snapshot reader serializes data in a snapshot to a sequence of bytes that can be stored in a file or sent across a network. A snapshot reader has as advantage that serialization can take place asynchronously while the world is progressing.
///</summary>
///<param name="iter"> [in] Iterator to the data to be serialized. </param>
///<param name="world"> [in] The world in which the snapshot is taken. </param>
///<returns>
/// The reader.
///</returns>
///<code>
///ecs_reader_t ecs_reader_init_w_iter(ecs_iter_t *iter,
/// ecs_iter_next_action_t next)
///</code>
// ecs_reader_init_w_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/reader_writer.h#L143
[DllImport(DLL, EntryPoint = "ecs_reader_init_w_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Reader reader_init_w_iter(out Iter iter, IterNextActionDelegate next);
///<summary>
/// Read from a reader. This operation reads a specified number of bytes from a reader and stores it in the specified buffer. When there are no more bytes to read from the reader the operation will return 0, otherwise it will return the number of bytes read.
///</summary>
///<param name="buffer"> [in] The buffer in which to store the read bytes. </param>
///<param name="size"> [in] The maximum number of bytes to read. </param>
///<param name="reader"> [in] The reader from which to read the bytes. </param>
///<returns>
/// The number of bytes read.
///</returns>
///<remarks>
/// The specified buffer must be at least as big as the specified size, and the specified size must be a multiple of 4.
///</remarks>
///<code>
///ecs_size_t ecs_reader_read(char *buffer, ecs_size_t size, ecs_reader_t *reader)
///</code>
// ecs_reader_read: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/reader_writer.h#L162
[DllImport(DLL, EntryPoint = "ecs_reader_read", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Size reader_read(CharPtr buffer, Size size, out Reader reader);
///<summary>
/// Initialize a writer. A writer deserializes data from a sequence of bytes into a world. This enables applications to restore data from disk or the network.
///</summary>
///<param name="world"> [in] The world in which to deserialize the data. </param>
///<returns>
/// The writer.
///</returns>
///<remarks>
/// The provided world must be either empty or compatible with the data to deserialize, where compatible means that the serialized component ids and sizes must match exactly with those in the world. Errors can occur if a world is provided in which components have been declared in a different order, or when components have different type definitions.
///</remarks>
///<code>
///ecs_writer_t ecs_writer_init(ecs_world_t *world)
///</code>
// ecs_writer_init: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/reader_writer.h#L181
[DllImport(DLL, EntryPoint = "ecs_writer_init", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Writer writer_init(World world);
///<summary>
/// Write to a writer. This operation writes a specified number of bytes from a specified buffer into the writer. The writer will restore the deserialized data into the original serialized entities. The write operation may be invoked multiple times with partial buffers, which allows applications to use static buffers when reading from, for example, a file or the network.
///</summary>
///<param name="buffer"> [in] The buffer to deserialize. </param>
///<param name="size"> [in] The maximum number of bytes. </param>
///<param name="writer"> [in] The writer to write to. </param>
///<returns>
/// Zero if success, non-zero if failed to deserialize.
///</returns>
///<remarks>
/// The data contained in the buffers must have been serialized with the ecs_reader_read operation. If the data does not match the expected format, or the data contains conflicts with the world, the operation will fail. The data must be provided in the same order as produced by ecs_reader_read, but the used buffer size does not have to be the same as the one used by ecs_reader_read. The buffer size must be a multiple of 4.
///</remarks>
///<code>
///int ecs_writer_write(const char *buffer, ecs_size_t size, ecs_writer_t *writer)
///</code>
// ecs_writer_write: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/reader_writer.h#L204
[DllImport(DLL, EntryPoint = "ecs_writer_write", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int writer_write(CharPtr buffer, Size size, out Writer writer);
///<summary>
/// Create a snapshot. This operation makes a copy of all component in the world that matches the specified filter.
///</summary>
///<param name="world"> [in] The world to snapshot. </param>
///<param name="return"> [in] The snapshot.</param>
///<code>
///ecs_snapshot_t *ecs_snapshot_take(ecs_world_t *world)
///</code>
// ecs_snapshot_take: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/snapshot.h#L23
[DllImport(DLL, EntryPoint = "ecs_snapshot_take", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Snapshot snapshot_take(World world);
///<summary>
/// Create a filtered snapshot. This operation is the same as ecs_snapshot_take, but accepts an iterator so an application can control what is stored by the snapshot.
///</summary>
///<param name="iter"> [in] An iterator to the data to be stored by the snapshot. </param>
///<param name="next"> [in] A function pointer to the next operation for the iterator. </param>
///<param name="return"> [in] The snapshot.</param>
///<code>
///ecs_snapshot_t *ecs_snapshot_take_w_iter(ecs_iter_t *iter,
/// ecs_iter_next_action_t action)
///</code>
// ecs_snapshot_take_w_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/snapshot.h#L35
[DllImport(DLL, EntryPoint = "ecs_snapshot_take_w_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Snapshot snapshot_take_w_iter(out Iter iter, IterNextActionDelegate action);
///<summary>
/// Restore a snapshot. This operation restores the world to the state it was in when the specified snapshot was taken. A snapshot can only be used once for restoring, as its data replaces the data that is currently in the world. This operation also resets the last issued entity handle, so any calls to ecs_new may return entity ids that have been issued before restoring the snapshot.
///</summary>
///<param name="world"> [in] The world to restore the snapshot to. </param>
///<param name="snapshot"> [in] The snapshot to restore. </param>
///<remarks>
/// The world in which the snapshot is restored must be the same as the world in which the snapshot is taken.
///</remarks>
///<code>
///void ecs_snapshot_restore(ecs_world_t *world, ecs_snapshot_t *snapshot)
///</code>
// ecs_snapshot_restore: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/snapshot.h#L54
[DllImport(DLL, EntryPoint = "ecs_snapshot_restore", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void snapshot_restore(World world, Snapshot snapshot);
///<summary>
/// Obtain iterator to snapshot data.
///</summary>
///<param name="snapshot"> [in] The snapshot to iterate over. </param>
///<returns>
/// Iterator to snapshot data.
///</returns>
///<code>
///ecs_iter_t ecs_snapshot_iter(ecs_snapshot_t *snapshot,
/// const ecs_filter_t *filter)
///</code>
// ecs_snapshot_iter: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/snapshot.h#L63
[DllImport(DLL, EntryPoint = "ecs_snapshot_iter", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Iter snapshot_iter(Snapshot snapshot, out Filter filter);
///<summary>
/// Progress snapshot iterator.
///</summary>
///<param name="iter"> [in] The snapshot iterator. </param>
///<returns>
/// True if more data is available, otherwise false.
///</returns>
///<code>
///bool ecs_snapshot_next(ecs_iter_t *iter)
///</code>
// ecs_snapshot_next: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/snapshot.h#L73
[DllImport(DLL, EntryPoint = "ecs_snapshot_next", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern bool snapshot_next(out Iter iter);
///<summary>
/// Free snapshot resources. This frees resources associated with a snapshot without restoring it.
///</summary>
///<param name="snapshot"> [in] The snapshot to free. </param>
///<param name="world"> [in] The world. </param>
///<code>
///void ecs_snapshot_free(ecs_snapshot_t *snapshot)
///</code>
// ecs_snapshot_free: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/snapshot.h#L84
[DllImport(DLL, EntryPoint = "ecs_snapshot_free", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void snapshot_free(Snapshot snapshot);
///<summary>
/// Find or create table with specified component string. The provided string must be a comma-separated list of fully qualified component identifiers. The returned table will have the specified components. Two lists that are the same but specify components in a different order will return the same table.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The components. </param>
///<returns>
/// The new or existing table, or NULL if the string contains an error.
///</returns>
///<code>
///ecs_table_t *ecs_table_from_str(ecs_world_t *world, const char *type)
///</code>
// ecs_table_from_str: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L30
[DllImport(DLL, EntryPoint = "ecs_table_from_str", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Table table_from_str(World world, CharPtr type);
///<summary>
/// Find or create table from type. Same as ecs_table_from_str, but provides the type directly.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="type"> [in] The type. </param>
///<returns>
/// The new or existing table.
///</returns>
///<code>
///ecs_table_t *ecs_table_from_type(ecs_world_t *world, ecs_type_t type)
///</code>
// ecs_table_from_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L42
[DllImport(DLL, EntryPoint = "ecs_table_from_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Table table_from_type(World world, TypeId type);
///<summary>
/// Get type for table.
///</summary>
///<param name="table"> [in] The table. </param>
///<returns>
/// The type of the table.
///</returns>
///<code>
///ecs_type_t ecs_table_get_type(ecs_table_t *table)
///</code>
// ecs_table_get_type: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L52
[DllImport(DLL, EntryPoint = "ecs_table_get_type", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern TypeId table_get_type(Table table);
///<summary>
/// Insert record into table. This will create a new record for the table, which inserts a value for each component. An optional entity and record can be provided.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="table"> [in] The table. </param>
///<param name="entity"> [in] The entity. </param>
///<param name="record"> [in] The entity-index record for the specified entity. </param>
///<returns>
/// A record containing the table and table row.
///</returns>
///<remarks>
/// If a non-zero entity id is provided, a record must also be provided and vice versa. The record must be created by the entity index. If the provided record is not created for the specified entity, the behavior will be undefined.
/// If the provided record is not managed by the entity index, the behavior will be undefined.
/// The returned record contains a reference to the table and the table row. The data pointed to by the record is guaranteed not to move unless one or more rows are removed from this table. A row can be removed as result of a delete, or by adding/removing components from an entity stored in the table.
///</remarks>
///<code>
///ecs_record_t ecs_table_insert(ecs_world_t *world, ecs_table_t *table,
/// ecs_entity_t entity, ecs_record_t *record)
///</code>
// ecs_table_insert: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L78
[DllImport(DLL, EntryPoint = "ecs_table_insert", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern Record table_insert(World world, Table table, EntityId entity, out Record record);
///<summary>
/// Returns the number of records in the table. This operation returns the number of records that have been populated through the regular (entity) API as well as the number of records that have been inserted using the direct access API.
///</summary>
///<param name="table"> [in] The table. </param>
///<param name="world"> [in] The world. </param>
///<returns>
/// The number of records in a table.
///</returns>
///<code>
///int32_t ecs_table_count(ecs_table_t *table)
///</code>
// ecs_table_count: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L94
[DllImport(DLL, EntryPoint = "ecs_table_count", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int table_count(Table table);
///<summary>
/// Find the index of a column in a table. Table columns are stored in the order of their respective component ids. As this is not trivial for an application to deduce, this operation returns the index of a column in a table for a given component. This index can be used in other table operations to identify a column.
///</summary>
///<param name="table"> [in] The table. </param>
///<param name="component"> [in] The component for which to retrieve the column index. </param>
///<returns>
/// The column index, or -1 if the table does not have the component.
///</returns>
///<remarks>
/// The returned index is determined separately for each table. Indices obtained for one table should not be used for another table.
///</remarks>
///<code>
///int32_t ecs_table_find_column(ecs_table_t *table, ecs_entity_t component)
///</code>
// ecs_table_find_column: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L111
[DllImport(DLL, EntryPoint = "ecs_table_find_column", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern int table_find_column(Table table, EntityId component);
///<summary>
/// Get table column. This operation returns the pointer to a column array. A column contains all the data for a component for the provided table in a contiguous array.
///</summary>
///<param name="table"> [in] The table. </param>
///<param name="column"> [in] The column index. </param>
///<returns>
/// Vector that contains the column array.
///</returns>
///<remarks>
/// The returned pointer is not stable, and may change when a table needs to resize its arrays, for example in order to accomodate for more records.
///</remarks>
///<code>
///ecs_vector_t *ecs_table_get_column(ecs_table_t *table, int32_t column)
///</code>
// ecs_table_get_column: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L127
[DllImport(DLL, EntryPoint = "ecs_table_get_column", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector table_get_column(Table table, int column);
///<summary>
/// Set table column. This operation enables an application to set a component column for a table. After the operation the column is owned by the table. Any operations that change the column after this operation can cause undefined behavior.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="table"> [in] The table. </param>
///<param name="column"> [in] The column index. </param>
///<param name="vector"> [in] The column data to assing.</param>
///<remarks>
/// Care must be taken that all columns in a table have the same number of elements. If one column has less elements than another, the behavior is undefined. The operation will not check if the assigned column is of the same size as other columns, as this would prevent an application from assigning a set of different columns to a table of a different size.
/// Setting a column will not delete the previous column. It is the responsibility of the application to ensure that the old column is deleted properly (using ecs_table_delete_column).
/// The provided vector must have the same element size and alignment as the target column. If the size and/or alignment do not match, the behavior will be undefined. In debug mode the operation may assert.
///</remarks>
///<code>
///void ecs_table_set_column(ecs_world_t *world, ecs_table_t *table,
/// int32_t column, ecs_vector_t *vector)
///</code>
// ecs_table_set_column: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L156
[DllImport(DLL, EntryPoint = "ecs_table_set_column", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void table_set_column(World world, Table table, int column, out Vector vector);
///<summary>
/// Get the vector containing entity ids for the table. This operation obtains the vector with entity ids for the current table. Each entity id is associated with one record, and ids are stored in the same order as the table records. The element type of the vector is ecs_entity_t.
///</summary>
///<param name="table"> [in] The table. </param>
///<returns>
/// The vector containing the table's entities.
///</returns>
///<code>
///ecs_vector_t *ecs_table_get_entities(ecs_table_t *table)
///</code>
// ecs_table_get_entities: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L171
[DllImport(DLL, EntryPoint = "ecs_table_get_entities", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector table_get_entities(Table table);
///<summary>
/// Get the vector containing pointers to entity records. A table stores cached pointers to entity records for fast access. This operation provides direct access to the vector. The element type of the vector is ecs_record_t*.
///</summary>
///<param name="table"> [in] The table. </param>
///<returns>
/// The vector containing the entity records.
///</returns>
///<code>
///ecs_vector_t *ecs_table_get_records(ecs_table_t *table)
///</code>
// ecs_table_get_records: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L183
[DllImport(DLL, EntryPoint = "ecs_table_get_records", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Vector table_get_records(Table table);
///<summary>
/// Set the vector containing entity ids for the table. This operation sets the vector with entity ids for a table. In addition the operation also requires setting a vector with pointers to records. The record pointers in the vector need to be managed by the entity index. If they are not, this can cause undefined behavior.
///</summary>
///<param name="table"> [in] The table. </param>
///<param name="entities"> [in] The entity vector. </param>
///<param name="records"> [in] The record vector.</param>
///<remarks>
/// The provided vectors must have the same number of elements as the number of records in the table. If the element count is not the same, this causes undefined behavior.
/// A table must have an entity and record vector, even if the table does not contain entities. For each record that is not an entity, the entity vector should contain 0, and the record vector should contain NULL.
///</remarks>
///<code>
///void ecs_table_set_entities(ecs_table_t *table, ecs_vector_t *entities,
/// ecs_vector_t *records)
///</code>
// ecs_table_set_entities: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L205
[DllImport(DLL, EntryPoint = "ecs_table_set_entities", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void table_set_entities(Table table, out Vector entities, out Vector records);
///<summary>
/// Delete a column. This operation frees the memory of a table column and will invoke the component destructor if registered.
///</summary>
///<param name="table"> [in] The table. </param>
///<param name="column"> [in] The column index. </param>
///<param name="vector"> [in] The column vector to delete.</param>
///<remarks>
/// The provided vector does not need to be the same as the vector in the table. The reason the table must be provided is so that the operation can retrieve the correct destructor for the component. If the component does not have a destructor, an application can alternatively delete the vector directly.
/// If the specified vector is NULL, the column of the table will be removed and the table will be updated to no longer point at the column. If an explicit column is provided, the table is not modified. If a column is deleted that is still being pointed to by a table, behavior is undefined. It is the responsibility of the application to ensure that a table no longer points to a deleted column, by using ecs_table_set_column.
/// Simultaneously, if this operation is used to delete a table column, the application should make sure that if the table contains other columns, they are either also deleted, or that the deleted column is replaced by a column of the same size. Note that this also goes for the entity and record vectors, they should have the same number of elements as the other columns.
/// The vector must be of the same component as the specified column. If the vector is not of the same component, behavior will be undefined. In debug mode the API may assert, though it may not always be able to detect a mismatching vector/column.
/// After this operation the vector should no longer be used by the application.
///</remarks>
///<code>
///void ecs_table_delete_column(ecs_world_t *world, ecs_table_t *table,
/// int32_t column, ecs_vector_t *vector)
///</code>
// ecs_table_delete_column: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L244
[DllImport(DLL, EntryPoint = "ecs_table_delete_column", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void table_delete_column(World world, Table table, int column, out Vector vector);
///<summary>
/// Find a record for a given entity. This operation finds an existing record in the entity index for a given entity. The returned pointer is stable for the lifecycle of the world and can be used as argument for the ecs_record_update operation.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="entity"> [in] The entity. </param>
///<returns>
/// The record that belongs to the entity, or NULL if not found.
///</returns>
///<remarks>
/// The returned record (if found) points to the adminstration that relates an entity id to a table. Updating the value of the returned record will cause operations like ecs_get and ecs_has to look in the updated table.
/// Updating this record to a table in which the entity is not stored causes undefined behavior.
/// When the entity has never been created or is not alive this operation will return NULL.
///</remarks>
///<code>
///ecs_record_t *ecs_record_find(ecs_world_t *world, ecs_entity_t entity)
///</code>
// ecs_record_find: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L270
[DllImport(DLL, EntryPoint = "ecs_record_find", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern ref Record record_find(World world, EntityId entity);
///<summary>
/// Get value from record. This operation gets a component value from a record. The provided column index must match the table of the record.
///</summary>
///<param name="r"> [in] The record. </param>
///<param name="column"> [in] The column index of the component to get.</param>
///<code>
///void *ecs_record_get_column(ecs_record_t *r, int32_t column, size_t size)
///</code>
// ecs_record_get_column: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L282
[DllImport(DLL, EntryPoint = "ecs_record_get_column", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern IntPtr record_get_column(out Record r, int column, UIntPtr size);
///<summary>
/// Copy value to a component for a record. This operation sets the component value of a single component for a record. If the component type has a copy action it will be used, otherwise the value be memcpyd into the component array.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="r"> [in] The record to set. </param>
///<param name="column"> [in] The column index of the component to set. </param>
///<param name="size"> [in] The size of the component. </param>
///<param name="value"> [in] Pointer to the value to copy.</param>
///<remarks>
/// The provided record does not need to be managed by the entity index but does need to point to a valid record in the table. If the provided index is outside of the range indicating the number of records in the table, behavior is undefined. In debug mode it will cause the operation to assert.
///</remarks>
///<code>
///void ecs_record_copy_to(ecs_world_t *world, ecs_record_t *r, int32_t column,
/// size_t size, const void *value, int32_t count)
///</code>
// ecs_record_copy_to: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L304
[DllImport(DLL, EntryPoint = "ecs_record_copy_to", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void record_copy_to(World world, out Record r, int column, UIntPtr size, IntPtr @value, int count);
///<summary>
/// Memcpy value to a component for a record. Same as ecs_record_copy_to, except that this operation will always use memcpy. This operation should only be used for components that can be safely memcpyd. If the operation is used for a component that has a copy or move action, the behavior is undefined. In debug mode the operation may assert.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="r"> [in] The record to set. </param>
///<param name="column"> [in] The column index of the component to set. </param>
///<param name="size"> [in] The size of the component. </param>
///<param name="value"> [in] Pointer to the value to move. </param>
///<code>
///void ecs_record_copy_pod_to(ecs_world_t *world, ecs_record_t *r, int32_t column,
/// size_t size, const void *value, int32_t count)
///</code>
// ecs_record_copy_pod_to: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L325
[DllImport(DLL, EntryPoint = "ecs_record_copy_pod_to", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void record_copy_pod_to(World world, out Record r, int column, UIntPtr size, IntPtr @value, int count);
///<summary>
/// Move value to a component for a record. Same as ecs_record_copy_to, except that it uses the move action. If the component has no move action the value will be memcpyd into the component array. After this operation the application can no longer assume that the value passed into the function is valid.
///</summary>
///<param name="world"> [in] The world. </param>
///<param name="r"> [in] The record to set. </param>
///<param name="column"> [in] The column index of the component to set. </param>
///<param name="size"> [in] The size of the component. </param>
///<param name="value"> [in] Pointer to the value to move.</param>
///<code>
///void ecs_record_move_to(ecs_world_t *world, ecs_record_t *r, int32_t column,
/// size_t size, void *value, int32_t count)
///</code>
// ecs_record_move_to: https://github.com/SanderMertens/flecs/blob/e5800839435abd15f1debc7623502392136f789a/include/flecs/addons/direct_access.h#L346
[DllImport(DLL, EntryPoint = "ecs_record_move_to", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
public static extern void record_move_to(World world, out Record r, int column, UIntPtr size, IntPtr @value, int count);
#region Size check
internal static void CheckStructSizes()
{
//Test sizes match original sizes
void check(params System.Type[] typeSize)
{
for (int i = 0; i < typeSize.Length; i++)
{
var t = typeSize[i];
NativeStructAttribute cstruct = (NativeStructAttribute)t.GetCustomAttributes(typeof(NativeStructAttribute), false)[0];
var actualSize = Marshal.SizeOf(t);
if (!cstruct.Size.Equals(actualSize))
{
throw new ApplicationException($"Size mismatch for type { t.Name}: Size is { actualSize } but expected { cstruct.Size}.");
}
}
}
check(typeof(SwitchHeader), typeof(Time), typeof(MatchFailure), typeof(PageIter), typeof(Vector), typeof(StrbufListElem), typeof(Record), typeof(Entities), typeof(StrbufElement), typeof(Filter), typeof(Sig), typeof(NameWriter), typeof(MapIter), typeof(QueryIter), typeof(DbgSystem), typeof(DbgEntity), typeof(Switch), typeof(ComponentLifecycle), typeof(IterTable), typeof(Ref), typeof(DbgTable), typeof(ScopeIter), typeof(FilterIter), typeof(SnapshotIter), typeof(WorldInfo), typeof(TableReader), typeof(TableWriter), typeof(Writer), typeof(Iter), typeof(OsApi), typeof(StrbufElementEmbedded), typeof(Reader), typeof(Strbuf));
}
#endregion
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment