diff --git a/native/flecs b/native/flecs index fa9d3557..9e06477d 160000 --- a/native/flecs +++ b/native/flecs @@ -1 +1 @@ -Subproject commit fa9d355760c109c7bfea5b19da5a288eb3acf027 +Subproject commit 9e06477db0fdf9317bf583ff4b1318622283165f diff --git a/native/flecs_helpers.c b/native/flecs_helpers.c index 80c02a41..996a98cb 100644 --- a/native/flecs_helpers.c +++ b/native/flecs_helpers.c @@ -3,1199 +3,1207 @@ #else #define BINDGEN_API __attribute__((visibility("default"))) #endif -extern void* ECS_AUTO_OVERRIDE; -extern void* ecs_block_allocator_alloc_count; -extern void* ecs_block_allocator_free_count; -extern void* ecs_http_busy_count; -extern void* ecs_http_request_handled_error_count; -extern void* ecs_http_request_handled_ok_count; -extern void* ecs_http_request_invalid_count; -extern void* ecs_http_request_not_handled_count; -extern void* ecs_http_request_preflight_count; -extern void* ecs_http_request_received_count; -extern void* ecs_http_send_error_count; -extern void* ecs_http_send_ok_count; -extern void* ecs_os_api; -extern void* ecs_os_api_calloc_count; -extern void* ecs_os_api_free_count; -extern void* ecs_os_api_malloc_count; -extern void* ecs_os_api_realloc_count; -extern void* ECS_PAIR; -extern void* ecs_stack_allocator_alloc_count; -extern void* ecs_stack_allocator_free_count; -extern void* ECS_TOGGLE; -extern void* EcsAcceleration; -extern void* EcsAcyclic; -extern void* EcsAlertCritical; -extern void* EcsAlertError; -extern void* EcsAlertInfo; -extern void* EcsAlertWarning; -extern void* EcsAlias; -extern void* EcsAmount; -extern void* EcsAmpere; -extern void* EcsAngle; -extern void* EcsAny; -extern void* EcsAtto; -extern void* EcsBar; -extern void* EcsBel; -extern void* EcsBits; -extern void* EcsBitsPerSecond; -extern void* EcsBytes; -extern void* EcsBytesPerSecond; -extern void* EcsCandela; -extern void* EcsCanToggle; -extern void* EcsCelsius; -extern void* EcsCenti; -extern void* EcsCentiMeters; -extern void* EcsChildOf; -extern void* EcsColor; -extern void* EcsColorCss; -extern void* EcsColorHsl; -extern void* EcsColorRgb; -extern void* EcsConstant; -extern void* EcsCounter; -extern void* EcsCounterId; -extern void* EcsCounterIncrement; -extern void* EcsData; -extern void* EcsDataRate; -extern void* EcsDate; -extern void* EcsDays; -extern void* EcsDeca; -extern void* EcsDeci; -extern void* EcsDeciBel; -extern void* EcsDegrees; -extern void* EcsDelete; -extern void* EcsDependsOn; -extern void* EcsDisabled; -extern void* EcsDocBrief; -extern void* EcsDocColor; -extern void* EcsDocDetail; -extern void* EcsDocLink; -extern void* EcsDocUuid; -extern void* EcsDontInherit; -extern void* EcsDuration; -extern void* EcsElectricCurrent; -extern void* EcsEmpty; -extern void* EcsExa; -extern void* EcsExbi; -extern void* EcsExclusive; -extern void* EcsFahrenheit; -extern void* EcsFemto; -extern void* EcsFinal; -extern void* EcsFlecs; -extern void* EcsFlecsCore; -extern void* EcsForce; -extern void* EcsFrequency; -extern void* EcsGauge; -extern void* EcsGibi; -extern void* EcsGibiBytes; -extern void* EcsGiga; -extern void* EcsGigaBits; -extern void* EcsGigaBitsPerSecond; -extern void* EcsGigaBytes; -extern void* EcsGigaBytesPerSecond; -extern void* EcsGigaHertz; -extern void* EcsGrams; -extern void* EcsHecto; -extern void* EcsHertz; -extern void* EcsHours; -extern void* EcsInherit; -extern void* EcsInheritable; -extern void* EcsIsA; -extern void* EcsKelvin; -extern void* EcsKibi; -extern void* EcsKibiBytes; -extern void* EcsKilo; -extern void* EcsKiloBits; -extern void* EcsKiloBitsPerSecond; -extern void* EcsKiloBytes; -extern void* EcsKiloBytesPerSecond; -extern void* EcsKiloGrams; -extern void* EcsKiloHertz; -extern void* EcsKiloMeters; -extern void* EcsKiloMetersPerHour; -extern void* EcsKiloMetersPerSecond; -extern void* EcsLength; -extern void* EcsLuminousIntensity; -extern void* EcsMass; -extern void* EcsMebi; -extern void* EcsMebiBytes; -extern void* EcsMega; -extern void* EcsMegaBits; -extern void* EcsMegaBitsPerSecond; -extern void* EcsMegaBytes; -extern void* EcsMegaBytesPerSecond; -extern void* EcsMegaHertz; -extern void* EcsMeters; -extern void* EcsMetersPerSecond; -extern void* EcsMetric; -extern void* EcsMetricInstance; -extern void* EcsMicro; -extern void* EcsMicroMeters; -extern void* EcsMicroSeconds; -extern void* EcsMiles; -extern void* EcsMilesPerHour; -extern void* EcsMilli; -extern void* EcsMilliMeters; -extern void* EcsMilliSeconds; -extern void* EcsMinutes; -extern void* EcsModule; -extern void* EcsMole; -extern void* EcsMonitor; -extern void* EcsName; -extern void* EcsNano; -extern void* EcsNanoMeters; -extern void* EcsNanoSeconds; -extern void* EcsNewton; -extern void* EcsNotQueryable; -extern void* EcsObserver; -extern void* EcsOnAdd; -extern void* EcsOnDelete; -extern void* EcsOnDeleteTarget; -extern void* EcsOneOf; -extern void* EcsOnInstantiate; -extern void* EcsOnLoad; -extern void* EcsOnRemove; -extern void* EcsOnSet; -extern void* EcsOnStart; -extern void* EcsOnStore; -extern void* EcsOnTableCreate; -extern void* EcsOnTableDelete; -extern void* EcsOnUpdate; -extern void* EcsOnValidate; -extern void* EcsOverride; -extern void* EcsPairIsTag; -extern void* EcsPanic; -extern void* EcsPascal; -extern void* EcsPebi; -extern void* EcsPercentage; -extern void* EcsPeriod1d; -extern void* EcsPeriod1h; -extern void* EcsPeriod1m; -extern void* EcsPeriod1s; -extern void* EcsPeriod1w; -extern void* EcsPeta; -extern void* EcsPhase; -extern void* EcsPico; -extern void* EcsPicoMeters; -extern void* EcsPicoSeconds; -extern void* EcsPixels; -extern void* EcsPostFrame; -extern void* EcsPostLoad; -extern void* EcsPostUpdate; -extern void* EcsPredEq; -extern void* EcsPredLookup; -extern void* EcsPredMatch; -extern void* EcsPrefab; -extern void* EcsPreFrame; -extern void* EcsPressure; -extern void* EcsPreStore; -extern void* EcsPreUpdate; -extern void* EcsPrivate; -extern void* EcsQuantity; -extern void* EcsQuery; -extern void* EcsRadians; -extern void* EcsReflexive; -extern void* EcsRelationship; -extern void* EcsRemove; -extern void* EcsScopeClose; -extern void* EcsScopeOpen; -extern void* EcsScriptTemplate; -extern void* EcsSeconds; -extern void* EcsSlotOf; -extern void* EcsSparse; -extern void* EcsSpeed; -extern void* EcsSymbol; -extern void* EcsSymmetric; -extern void* EcsSystem; -extern void* EcsTarget; -extern void* EcsTebi; -extern void* EcsTemperature; -extern void* EcsTera; -extern void* EcsThis; -extern void* EcsTime; -extern void* EcsTrait; -extern void* EcsTransitive; -extern void* EcsTraversable; -extern void* EcsUnion; -extern void* EcsUnitPrefixes; -extern void* EcsUri; -extern void* EcsUriFile; -extern void* EcsUriHyperlink; -extern void* EcsUriImage; -extern void* EcsVariable; -extern void* EcsWildcard; -extern void* EcsWith; -extern void* EcsWorld; -extern void* EcsYobi; -extern void* EcsYocto; -extern void* EcsYotta; -extern void* EcsZebi; -extern void* EcsZepto; -extern void* EcsZetta; -extern void* FLECS_IDecs_bool_tID_; -extern void* FLECS_IDecs_byte_tID_; -extern void* FLECS_IDecs_char_tID_; -extern void* FLECS_IDecs_entity_tID_; -extern void* FLECS_IDecs_f32_tID_; -extern void* FLECS_IDecs_f64_tID_; -extern void* FLECS_IDecs_i16_tID_; -extern void* FLECS_IDecs_i32_tID_; -extern void* FLECS_IDecs_i64_tID_; -extern void* FLECS_IDecs_i8_tID_; -extern void* FLECS_IDecs_id_tID_; -extern void* FLECS_IDecs_iptr_tID_; -extern void* FLECS_IDecs_string_tID_; -extern void* FLECS_IDecs_u16_tID_; -extern void* FLECS_IDecs_u32_tID_; -extern void* FLECS_IDecs_u64_tID_; -extern void* FLECS_IDecs_u8_tID_; -extern void* FLECS_IDecs_uptr_tID_; -extern void* FLECS_IDEcsAlertCriticalID_; -extern void* FLECS_IDEcsAlertErrorID_; -extern void* FLECS_IDEcsAlertID_; -extern void* FLECS_IDEcsAlertInfoID_; -extern void* FLECS_IDEcsAlertInstanceID_; -extern void* FLECS_IDEcsAlertsActiveID_; -extern void* FLECS_IDEcsAlertTimeoutID_; -extern void* FLECS_IDEcsAlertWarningID_; -extern void* FLECS_IDEcsArrayID_; -extern void* FLECS_IDEcsBitmaskID_; -extern void* FLECS_IDEcsComponentID_; -extern void* FLECS_IDEcsCounterID_; -extern void* FLECS_IDEcsCounterIdID_; -extern void* FLECS_IDEcsCounterIncrementID_; -extern void* FLECS_IDEcsDefaultChildComponentID_; -extern void* FLECS_IDEcsDocDescriptionID_; -extern void* FLECS_IDEcsEnumID_; -extern void* FLECS_IDEcsGaugeID_; -extern void* FLECS_IDEcsIdentifierID_; -extern void* FLECS_IDEcsMemberID_; -extern void* FLECS_IDEcsMemberRangesID_; -extern void* FLECS_IDEcsMetricID_; -extern void* FLECS_IDEcsMetricInstanceID_; -extern void* FLECS_IDEcsMetricSourceID_; -extern void* FLECS_IDEcsMetricValueID_; -extern void* FLECS_IDEcsOpaqueID_; -extern void* FLECS_IDEcsPipelineID_; -extern void* FLECS_IDEcsPipelineStatsID_; -extern void* FLECS_IDEcsPolyID_; -extern void* FLECS_IDEcsPrimitiveID_; -extern void* FLECS_IDEcsRateFilterID_; -extern void* FLECS_IDEcsRestID_; -extern void* FLECS_IDEcsScriptConstVarID_; -extern void* FLECS_IDEcsScriptFunctionID_; -extern void* FLECS_IDEcsScriptID_; -extern void* FLECS_IDEcsScriptMethodID_; -extern void* FLECS_IDEcsScriptTemplateID_; -extern void* FLECS_IDEcsStructID_; -extern void* FLECS_IDEcsSystemStatsID_; -extern void* FLECS_IDEcsTickSourceID_; -extern void* FLECS_IDEcsTimerID_; -extern void* FLECS_IDEcsTypeID_; -extern void* FLECS_IDEcsTypeSerializerID_; -extern void* FLECS_IDEcsUnitID_; -extern void* FLECS_IDEcsUnitPrefixID_; -extern void* FLECS_IDEcsVectorID_; -extern void* FLECS_IDEcsWorldStatsID_; -extern void* FLECS_IDEcsWorldSummaryID_; -extern void* FLECS_IDFlecsAlertsID_; -extern void* FLECS_IDFlecsMetricsID_; -extern void* FLECS_IDFlecsStatsID_; +extern void* ECS_AUTO_OVERRIDE; +extern void* ecs_block_allocator_alloc_count; +extern void* ecs_block_allocator_free_count; +extern void* ecs_http_busy_count; +extern void* ecs_http_request_handled_error_count; +extern void* ecs_http_request_handled_ok_count; +extern void* ecs_http_request_invalid_count; +extern void* ecs_http_request_not_handled_count; +extern void* ecs_http_request_preflight_count; +extern void* ecs_http_request_received_count; +extern void* ecs_http_send_error_count; +extern void* ecs_http_send_ok_count; +extern void* ecs_os_api; +extern void* ecs_os_api_calloc_count; +extern void* ecs_os_api_free_count; +extern void* ecs_os_api_malloc_count; +extern void* ecs_os_api_realloc_count; +extern void* ECS_PAIR; +extern void* ecs_stack_allocator_alloc_count; +extern void* ecs_stack_allocator_free_count; +extern void* ECS_TOGGLE; +extern void* EcsAcceleration; +extern void* EcsAcyclic; +extern void* EcsAlertCritical; +extern void* EcsAlertError; +extern void* EcsAlertInfo; +extern void* EcsAlertWarning; +extern void* EcsAlias; +extern void* EcsAmount; +extern void* EcsAmpere; +extern void* EcsAngle; +extern void* EcsAny; +extern void* EcsAtto; +extern void* EcsBar; +extern void* EcsBel; +extern void* EcsBits; +extern void* EcsBitsPerSecond; +extern void* EcsBytes; +extern void* EcsBytesPerSecond; +extern void* EcsCandela; +extern void* EcsCanToggle; +extern void* EcsCelsius; +extern void* EcsCenti; +extern void* EcsCentiMeters; +extern void* EcsChildOf; +extern void* EcsColor; +extern void* EcsColorCss; +extern void* EcsColorHsl; +extern void* EcsColorRgb; +extern void* EcsConstant; +extern void* EcsCounter; +extern void* EcsCounterId; +extern void* EcsCounterIncrement; +extern void* EcsData; +extern void* EcsDataRate; +extern void* EcsDate; +extern void* EcsDays; +extern void* EcsDeca; +extern void* EcsDeci; +extern void* EcsDeciBel; +extern void* EcsDegrees; +extern void* EcsDelete; +extern void* EcsDependsOn; +extern void* EcsDisabled; +extern void* EcsDocBrief; +extern void* EcsDocColor; +extern void* EcsDocDetail; +extern void* EcsDocLink; +extern void* EcsDocUuid; +extern void* EcsDontFragment; +extern void* EcsDontInherit; +extern void* EcsDuration; +extern void* EcsElectricCurrent; +extern void* EcsEmpty; +extern void* EcsExa; +extern void* EcsExbi; +extern void* EcsExclusive; +extern void* EcsFahrenheit; +extern void* EcsFemto; +extern void* EcsFinal; +extern void* EcsFlecs; +extern void* EcsFlecsCore; +extern void* EcsForce; +extern void* EcsFrequency; +extern void* EcsGauge; +extern void* EcsGibi; +extern void* EcsGibiBytes; +extern void* EcsGiga; +extern void* EcsGigaBits; +extern void* EcsGigaBitsPerSecond; +extern void* EcsGigaBytes; +extern void* EcsGigaBytesPerSecond; +extern void* EcsGigaHertz; +extern void* EcsGrams; +extern void* EcsHecto; +extern void* EcsHertz; +extern void* EcsHours; +extern void* EcsInherit; +extern void* EcsInheritable; +extern void* EcsIsA; +extern void* EcsKelvin; +extern void* EcsKibi; +extern void* EcsKibiBytes; +extern void* EcsKilo; +extern void* EcsKiloBits; +extern void* EcsKiloBitsPerSecond; +extern void* EcsKiloBytes; +extern void* EcsKiloBytesPerSecond; +extern void* EcsKiloGrams; +extern void* EcsKiloHertz; +extern void* EcsKiloMeters; +extern void* EcsKiloMetersPerHour; +extern void* EcsKiloMetersPerSecond; +extern void* EcsLength; +extern void* EcsLuminousIntensity; +extern void* EcsMass; +extern void* EcsMebi; +extern void* EcsMebiBytes; +extern void* EcsMega; +extern void* EcsMegaBits; +extern void* EcsMegaBitsPerSecond; +extern void* EcsMegaBytes; +extern void* EcsMegaBytesPerSecond; +extern void* EcsMegaHertz; +extern void* EcsMeters; +extern void* EcsMetersPerSecond; +extern void* EcsMetric; +extern void* EcsMetricInstance; +extern void* EcsMicro; +extern void* EcsMicroMeters; +extern void* EcsMicroSeconds; +extern void* EcsMiles; +extern void* EcsMilesPerHour; +extern void* EcsMilli; +extern void* EcsMilliMeters; +extern void* EcsMilliSeconds; +extern void* EcsMinutes; +extern void* EcsModule; +extern void* EcsMole; +extern void* EcsMonitor; +extern void* EcsName; +extern void* EcsNano; +extern void* EcsNanoMeters; +extern void* EcsNanoSeconds; +extern void* EcsNewton; +extern void* EcsNotQueryable; +extern void* EcsObserver; +extern void* EcsOnAdd; +extern void* EcsOnDelete; +extern void* EcsOnDeleteTarget; +extern void* EcsOneOf; +extern void* EcsOnInstantiate; +extern void* EcsOnLoad; +extern void* EcsOnRemove; +extern void* EcsOnSet; +extern void* EcsOnStart; +extern void* EcsOnStore; +extern void* EcsOnTableCreate; +extern void* EcsOnTableDelete; +extern void* EcsOnUpdate; +extern void* EcsOnValidate; +extern void* EcsOrderedChildren; +extern void* EcsOverride; +extern void* EcsPairIsTag; +extern void* EcsPanic; +extern void* EcsPascal; +extern void* EcsPebi; +extern void* EcsPercentage; +extern void* EcsPeriod1d; +extern void* EcsPeriod1h; +extern void* EcsPeriod1m; +extern void* EcsPeriod1s; +extern void* EcsPeriod1w; +extern void* EcsPeta; +extern void* EcsPhase; +extern void* EcsPico; +extern void* EcsPicoMeters; +extern void* EcsPicoSeconds; +extern void* EcsPixels; +extern void* EcsPostFrame; +extern void* EcsPostLoad; +extern void* EcsPostUpdate; +extern void* EcsPredEq; +extern void* EcsPredLookup; +extern void* EcsPredMatch; +extern void* EcsPrefab; +extern void* EcsPreFrame; +extern void* EcsPressure; +extern void* EcsPreStore; +extern void* EcsPreUpdate; +extern void* EcsPrivate; +extern void* EcsQuantity; +extern void* EcsQuery; +extern void* EcsRadians; +extern void* EcsReflexive; +extern void* EcsRelationship; +extern void* EcsRemove; +extern void* EcsScopeClose; +extern void* EcsScopeOpen; +extern void* EcsScriptTemplate; +extern void* EcsSeconds; +extern void* EcsSlotOf; +extern void* EcsSparse; +extern void* EcsSpeed; +extern void* EcsSymbol; +extern void* EcsSymmetric; +extern void* EcsSystem; +extern void* EcsTarget; +extern void* EcsTebi; +extern void* EcsTemperature; +extern void* EcsTera; +extern void* EcsThis; +extern void* EcsTime; +extern void* EcsTrait; +extern void* EcsTransitive; +extern void* EcsTraversable; +extern void* EcsUnitPrefixes; +extern void* EcsUri; +extern void* EcsUriFile; +extern void* EcsUriHyperlink; +extern void* EcsUriImage; +extern void* EcsVariable; +extern void* EcsWildcard; +extern void* EcsWith; +extern void* EcsWorld; +extern void* EcsYobi; +extern void* EcsYocto; +extern void* EcsYotta; +extern void* EcsZebi; +extern void* EcsZepto; +extern void* EcsZetta; +extern void* FLECS_IDecs_bool_tID_; +extern void* FLECS_IDecs_byte_tID_; +extern void* FLECS_IDecs_char_tID_; +extern void* FLECS_IDecs_entity_tID_; +extern void* FLECS_IDecs_f32_tID_; +extern void* FLECS_IDecs_f64_tID_; +extern void* FLECS_IDecs_i16_tID_; +extern void* FLECS_IDecs_i32_tID_; +extern void* FLECS_IDecs_i64_tID_; +extern void* FLECS_IDecs_i8_tID_; +extern void* FLECS_IDecs_id_tID_; +extern void* FLECS_IDecs_iptr_tID_; +extern void* FLECS_IDecs_string_tID_; +extern void* FLECS_IDecs_u16_tID_; +extern void* FLECS_IDecs_u32_tID_; +extern void* FLECS_IDecs_u64_tID_; +extern void* FLECS_IDecs_u8_tID_; +extern void* FLECS_IDecs_uptr_tID_; +extern void* FLECS_IDEcsAlertCriticalID_; +extern void* FLECS_IDEcsAlertErrorID_; +extern void* FLECS_IDEcsAlertID_; +extern void* FLECS_IDEcsAlertInfoID_; +extern void* FLECS_IDEcsAlertInstanceID_; +extern void* FLECS_IDEcsAlertsActiveID_; +extern void* FLECS_IDEcsAlertTimeoutID_; +extern void* FLECS_IDEcsAlertWarningID_; +extern void* FLECS_IDEcsArrayID_; +extern void* FLECS_IDEcsBitmaskID_; +extern void* FLECS_IDEcsComponentID_; +extern void* FLECS_IDEcsCounterID_; +extern void* FLECS_IDEcsCounterIdID_; +extern void* FLECS_IDEcsCounterIncrementID_; +extern void* FLECS_IDEcsDefaultChildComponentID_; +extern void* FLECS_IDEcsDocDescriptionID_; +extern void* FLECS_IDEcsEnumID_; +extern void* FLECS_IDEcsGaugeID_; +extern void* FLECS_IDEcsIdentifierID_; +extern void* FLECS_IDEcsMemberID_; +extern void* FLECS_IDEcsMemberRangesID_; +extern void* FLECS_IDEcsMetricID_; +extern void* FLECS_IDEcsMetricInstanceID_; +extern void* FLECS_IDEcsMetricSourceID_; +extern void* FLECS_IDEcsMetricValueID_; +extern void* FLECS_IDEcsOpaqueID_; +extern void* FLECS_IDEcsPipelineID_; +extern void* FLECS_IDEcsPipelineStatsID_; +extern void* FLECS_IDEcsPolyID_; +extern void* FLECS_IDEcsPrimitiveID_; +extern void* FLECS_IDEcsRateFilterID_; +extern void* FLECS_IDEcsRestID_; +extern void* FLECS_IDEcsScriptConstVarID_; +extern void* FLECS_IDEcsScriptFunctionID_; +extern void* FLECS_IDEcsScriptID_; +extern void* FLECS_IDEcsScriptMethodID_; +extern void* FLECS_IDEcsScriptRngID_; +extern void* FLECS_IDEcsScriptTemplateID_; +extern void* FLECS_IDEcsStructID_; +extern void* FLECS_IDEcsSystemStatsID_; +extern void* FLECS_IDEcsTickSourceID_; +extern void* FLECS_IDEcsTimerID_; +extern void* FLECS_IDEcsTypeID_; +extern void* FLECS_IDEcsTypeSerializerID_; +extern void* FLECS_IDEcsUnitID_; +extern void* FLECS_IDEcsUnitPrefixID_; +extern void* FLECS_IDEcsVectorID_; +extern void* FLECS_IDEcsWorldStatsID_; +extern void* FLECS_IDEcsWorldSummaryID_; +extern void* FLECS_IDFlecsAlertsID_; +extern void* FLECS_IDFlecsMetricsID_; +extern void* FLECS_IDFlecsStatsID_; BINDGEN_API void* ECS_AUTO_OVERRIDE_BindgenGetExtern() { return &ECS_AUTO_OVERRIDE; -} +} BINDGEN_API void* ecs_block_allocator_alloc_count_BindgenGetExtern() { return &ecs_block_allocator_alloc_count; -} +} BINDGEN_API void* ecs_block_allocator_free_count_BindgenGetExtern() { return &ecs_block_allocator_free_count; -} +} BINDGEN_API void* ecs_http_busy_count_BindgenGetExtern() { return &ecs_http_busy_count; -} +} BINDGEN_API void* ecs_http_request_handled_error_count_BindgenGetExtern() { return &ecs_http_request_handled_error_count; -} +} BINDGEN_API void* ecs_http_request_handled_ok_count_BindgenGetExtern() { return &ecs_http_request_handled_ok_count; -} +} BINDGEN_API void* ecs_http_request_invalid_count_BindgenGetExtern() { return &ecs_http_request_invalid_count; -} +} BINDGEN_API void* ecs_http_request_not_handled_count_BindgenGetExtern() { return &ecs_http_request_not_handled_count; -} +} BINDGEN_API void* ecs_http_request_preflight_count_BindgenGetExtern() { return &ecs_http_request_preflight_count; -} +} BINDGEN_API void* ecs_http_request_received_count_BindgenGetExtern() { return &ecs_http_request_received_count; -} +} BINDGEN_API void* ecs_http_send_error_count_BindgenGetExtern() { return &ecs_http_send_error_count; -} +} BINDGEN_API void* ecs_http_send_ok_count_BindgenGetExtern() { return &ecs_http_send_ok_count; -} +} BINDGEN_API void* ecs_os_api_BindgenGetExtern() { return &ecs_os_api; -} +} BINDGEN_API void* ecs_os_api_calloc_count_BindgenGetExtern() { return &ecs_os_api_calloc_count; -} +} BINDGEN_API void* ecs_os_api_free_count_BindgenGetExtern() { return &ecs_os_api_free_count; -} +} BINDGEN_API void* ecs_os_api_malloc_count_BindgenGetExtern() { return &ecs_os_api_malloc_count; -} +} BINDGEN_API void* ecs_os_api_realloc_count_BindgenGetExtern() { return &ecs_os_api_realloc_count; -} +} BINDGEN_API void* ECS_PAIR_BindgenGetExtern() { return &ECS_PAIR; -} +} BINDGEN_API void* ecs_stack_allocator_alloc_count_BindgenGetExtern() { return &ecs_stack_allocator_alloc_count; -} +} BINDGEN_API void* ecs_stack_allocator_free_count_BindgenGetExtern() { return &ecs_stack_allocator_free_count; -} +} BINDGEN_API void* ECS_TOGGLE_BindgenGetExtern() { return &ECS_TOGGLE; -} +} BINDGEN_API void* EcsAcceleration_BindgenGetExtern() { return &EcsAcceleration; -} +} BINDGEN_API void* EcsAcyclic_BindgenGetExtern() { return &EcsAcyclic; -} +} BINDGEN_API void* EcsAlertCritical_BindgenGetExtern() { return &EcsAlertCritical; -} +} BINDGEN_API void* EcsAlertError_BindgenGetExtern() { return &EcsAlertError; -} +} BINDGEN_API void* EcsAlertInfo_BindgenGetExtern() { return &EcsAlertInfo; -} +} BINDGEN_API void* EcsAlertWarning_BindgenGetExtern() { return &EcsAlertWarning; -} +} BINDGEN_API void* EcsAlias_BindgenGetExtern() { return &EcsAlias; -} +} BINDGEN_API void* EcsAmount_BindgenGetExtern() { return &EcsAmount; -} +} BINDGEN_API void* EcsAmpere_BindgenGetExtern() { return &EcsAmpere; -} +} BINDGEN_API void* EcsAngle_BindgenGetExtern() { return &EcsAngle; -} +} BINDGEN_API void* EcsAny_BindgenGetExtern() { return &EcsAny; -} +} BINDGEN_API void* EcsAtto_BindgenGetExtern() { return &EcsAtto; -} +} BINDGEN_API void* EcsBar_BindgenGetExtern() { return &EcsBar; -} +} BINDGEN_API void* EcsBel_BindgenGetExtern() { return &EcsBel; -} +} BINDGEN_API void* EcsBits_BindgenGetExtern() { return &EcsBits; -} +} BINDGEN_API void* EcsBitsPerSecond_BindgenGetExtern() { return &EcsBitsPerSecond; -} +} BINDGEN_API void* EcsBytes_BindgenGetExtern() { return &EcsBytes; -} +} BINDGEN_API void* EcsBytesPerSecond_BindgenGetExtern() { return &EcsBytesPerSecond; -} +} BINDGEN_API void* EcsCandela_BindgenGetExtern() { return &EcsCandela; -} +} BINDGEN_API void* EcsCanToggle_BindgenGetExtern() { return &EcsCanToggle; -} +} BINDGEN_API void* EcsCelsius_BindgenGetExtern() { return &EcsCelsius; -} +} BINDGEN_API void* EcsCenti_BindgenGetExtern() { return &EcsCenti; -} +} BINDGEN_API void* EcsCentiMeters_BindgenGetExtern() { return &EcsCentiMeters; -} +} BINDGEN_API void* EcsChildOf_BindgenGetExtern() { return &EcsChildOf; -} +} BINDGEN_API void* EcsColor_BindgenGetExtern() { return &EcsColor; -} +} BINDGEN_API void* EcsColorCss_BindgenGetExtern() { return &EcsColorCss; -} +} BINDGEN_API void* EcsColorHsl_BindgenGetExtern() { return &EcsColorHsl; -} +} BINDGEN_API void* EcsColorRgb_BindgenGetExtern() { return &EcsColorRgb; -} +} BINDGEN_API void* EcsConstant_BindgenGetExtern() { return &EcsConstant; -} +} BINDGEN_API void* EcsCounter_BindgenGetExtern() { return &EcsCounter; -} +} BINDGEN_API void* EcsCounterId_BindgenGetExtern() { return &EcsCounterId; -} +} BINDGEN_API void* EcsCounterIncrement_BindgenGetExtern() { return &EcsCounterIncrement; -} +} BINDGEN_API void* EcsData_BindgenGetExtern() { return &EcsData; -} +} BINDGEN_API void* EcsDataRate_BindgenGetExtern() { return &EcsDataRate; -} +} BINDGEN_API void* EcsDate_BindgenGetExtern() { return &EcsDate; -} +} BINDGEN_API void* EcsDays_BindgenGetExtern() { return &EcsDays; -} +} BINDGEN_API void* EcsDeca_BindgenGetExtern() { return &EcsDeca; -} +} BINDGEN_API void* EcsDeci_BindgenGetExtern() { return &EcsDeci; -} +} BINDGEN_API void* EcsDeciBel_BindgenGetExtern() { return &EcsDeciBel; -} +} BINDGEN_API void* EcsDegrees_BindgenGetExtern() { return &EcsDegrees; -} +} BINDGEN_API void* EcsDelete_BindgenGetExtern() { return &EcsDelete; -} +} BINDGEN_API void* EcsDependsOn_BindgenGetExtern() { return &EcsDependsOn; -} +} BINDGEN_API void* EcsDisabled_BindgenGetExtern() { return &EcsDisabled; -} +} BINDGEN_API void* EcsDocBrief_BindgenGetExtern() { return &EcsDocBrief; -} +} BINDGEN_API void* EcsDocColor_BindgenGetExtern() { return &EcsDocColor; -} +} BINDGEN_API void* EcsDocDetail_BindgenGetExtern() { return &EcsDocDetail; -} +} BINDGEN_API void* EcsDocLink_BindgenGetExtern() { return &EcsDocLink; -} +} BINDGEN_API void* EcsDocUuid_BindgenGetExtern() { return &EcsDocUuid; -} +} +BINDGEN_API void* EcsDontFragment_BindgenGetExtern() { + return &EcsDontFragment; +} BINDGEN_API void* EcsDontInherit_BindgenGetExtern() { return &EcsDontInherit; -} +} BINDGEN_API void* EcsDuration_BindgenGetExtern() { return &EcsDuration; -} +} BINDGEN_API void* EcsElectricCurrent_BindgenGetExtern() { return &EcsElectricCurrent; -} +} BINDGEN_API void* EcsEmpty_BindgenGetExtern() { return &EcsEmpty; -} +} BINDGEN_API void* EcsExa_BindgenGetExtern() { return &EcsExa; -} +} BINDGEN_API void* EcsExbi_BindgenGetExtern() { return &EcsExbi; -} +} BINDGEN_API void* EcsExclusive_BindgenGetExtern() { return &EcsExclusive; -} +} BINDGEN_API void* EcsFahrenheit_BindgenGetExtern() { return &EcsFahrenheit; -} +} BINDGEN_API void* EcsFemto_BindgenGetExtern() { return &EcsFemto; -} +} BINDGEN_API void* EcsFinal_BindgenGetExtern() { return &EcsFinal; -} +} BINDGEN_API void* EcsFlecs_BindgenGetExtern() { return &EcsFlecs; -} +} BINDGEN_API void* EcsFlecsCore_BindgenGetExtern() { return &EcsFlecsCore; -} +} BINDGEN_API void* EcsForce_BindgenGetExtern() { return &EcsForce; -} +} BINDGEN_API void* EcsFrequency_BindgenGetExtern() { return &EcsFrequency; -} +} BINDGEN_API void* EcsGauge_BindgenGetExtern() { return &EcsGauge; -} +} BINDGEN_API void* EcsGibi_BindgenGetExtern() { return &EcsGibi; -} +} BINDGEN_API void* EcsGibiBytes_BindgenGetExtern() { return &EcsGibiBytes; -} +} BINDGEN_API void* EcsGiga_BindgenGetExtern() { return &EcsGiga; -} +} BINDGEN_API void* EcsGigaBits_BindgenGetExtern() { return &EcsGigaBits; -} +} BINDGEN_API void* EcsGigaBitsPerSecond_BindgenGetExtern() { return &EcsGigaBitsPerSecond; -} +} BINDGEN_API void* EcsGigaBytes_BindgenGetExtern() { return &EcsGigaBytes; -} +} BINDGEN_API void* EcsGigaBytesPerSecond_BindgenGetExtern() { return &EcsGigaBytesPerSecond; -} +} BINDGEN_API void* EcsGigaHertz_BindgenGetExtern() { return &EcsGigaHertz; -} +} BINDGEN_API void* EcsGrams_BindgenGetExtern() { return &EcsGrams; -} +} BINDGEN_API void* EcsHecto_BindgenGetExtern() { return &EcsHecto; -} +} BINDGEN_API void* EcsHertz_BindgenGetExtern() { return &EcsHertz; -} +} BINDGEN_API void* EcsHours_BindgenGetExtern() { return &EcsHours; -} +} BINDGEN_API void* EcsInherit_BindgenGetExtern() { return &EcsInherit; -} +} BINDGEN_API void* EcsInheritable_BindgenGetExtern() { return &EcsInheritable; -} +} BINDGEN_API void* EcsIsA_BindgenGetExtern() { return &EcsIsA; -} +} BINDGEN_API void* EcsKelvin_BindgenGetExtern() { return &EcsKelvin; -} +} BINDGEN_API void* EcsKibi_BindgenGetExtern() { return &EcsKibi; -} +} BINDGEN_API void* EcsKibiBytes_BindgenGetExtern() { return &EcsKibiBytes; -} +} BINDGEN_API void* EcsKilo_BindgenGetExtern() { return &EcsKilo; -} +} BINDGEN_API void* EcsKiloBits_BindgenGetExtern() { return &EcsKiloBits; -} +} BINDGEN_API void* EcsKiloBitsPerSecond_BindgenGetExtern() { return &EcsKiloBitsPerSecond; -} +} BINDGEN_API void* EcsKiloBytes_BindgenGetExtern() { return &EcsKiloBytes; -} +} BINDGEN_API void* EcsKiloBytesPerSecond_BindgenGetExtern() { return &EcsKiloBytesPerSecond; -} +} BINDGEN_API void* EcsKiloGrams_BindgenGetExtern() { return &EcsKiloGrams; -} +} BINDGEN_API void* EcsKiloHertz_BindgenGetExtern() { return &EcsKiloHertz; -} +} BINDGEN_API void* EcsKiloMeters_BindgenGetExtern() { return &EcsKiloMeters; -} +} BINDGEN_API void* EcsKiloMetersPerHour_BindgenGetExtern() { return &EcsKiloMetersPerHour; -} +} BINDGEN_API void* EcsKiloMetersPerSecond_BindgenGetExtern() { return &EcsKiloMetersPerSecond; -} +} BINDGEN_API void* EcsLength_BindgenGetExtern() { return &EcsLength; -} +} BINDGEN_API void* EcsLuminousIntensity_BindgenGetExtern() { return &EcsLuminousIntensity; -} +} BINDGEN_API void* EcsMass_BindgenGetExtern() { return &EcsMass; -} +} BINDGEN_API void* EcsMebi_BindgenGetExtern() { return &EcsMebi; -} +} BINDGEN_API void* EcsMebiBytes_BindgenGetExtern() { return &EcsMebiBytes; -} +} BINDGEN_API void* EcsMega_BindgenGetExtern() { return &EcsMega; -} +} BINDGEN_API void* EcsMegaBits_BindgenGetExtern() { return &EcsMegaBits; -} +} BINDGEN_API void* EcsMegaBitsPerSecond_BindgenGetExtern() { return &EcsMegaBitsPerSecond; -} +} BINDGEN_API void* EcsMegaBytes_BindgenGetExtern() { return &EcsMegaBytes; -} +} BINDGEN_API void* EcsMegaBytesPerSecond_BindgenGetExtern() { return &EcsMegaBytesPerSecond; -} +} BINDGEN_API void* EcsMegaHertz_BindgenGetExtern() { return &EcsMegaHertz; -} +} BINDGEN_API void* EcsMeters_BindgenGetExtern() { return &EcsMeters; -} +} BINDGEN_API void* EcsMetersPerSecond_BindgenGetExtern() { return &EcsMetersPerSecond; -} +} BINDGEN_API void* EcsMetric_BindgenGetExtern() { return &EcsMetric; -} +} BINDGEN_API void* EcsMetricInstance_BindgenGetExtern() { return &EcsMetricInstance; -} +} BINDGEN_API void* EcsMicro_BindgenGetExtern() { return &EcsMicro; -} +} BINDGEN_API void* EcsMicroMeters_BindgenGetExtern() { return &EcsMicroMeters; -} +} BINDGEN_API void* EcsMicroSeconds_BindgenGetExtern() { return &EcsMicroSeconds; -} +} BINDGEN_API void* EcsMiles_BindgenGetExtern() { return &EcsMiles; -} +} BINDGEN_API void* EcsMilesPerHour_BindgenGetExtern() { return &EcsMilesPerHour; -} +} BINDGEN_API void* EcsMilli_BindgenGetExtern() { return &EcsMilli; -} +} BINDGEN_API void* EcsMilliMeters_BindgenGetExtern() { return &EcsMilliMeters; -} +} BINDGEN_API void* EcsMilliSeconds_BindgenGetExtern() { return &EcsMilliSeconds; -} +} BINDGEN_API void* EcsMinutes_BindgenGetExtern() { return &EcsMinutes; -} +} BINDGEN_API void* EcsModule_BindgenGetExtern() { return &EcsModule; -} +} BINDGEN_API void* EcsMole_BindgenGetExtern() { return &EcsMole; -} +} BINDGEN_API void* EcsMonitor_BindgenGetExtern() { return &EcsMonitor; -} +} BINDGEN_API void* EcsName_BindgenGetExtern() { return &EcsName; -} +} BINDGEN_API void* EcsNano_BindgenGetExtern() { return &EcsNano; -} +} BINDGEN_API void* EcsNanoMeters_BindgenGetExtern() { return &EcsNanoMeters; -} +} BINDGEN_API void* EcsNanoSeconds_BindgenGetExtern() { return &EcsNanoSeconds; -} +} BINDGEN_API void* EcsNewton_BindgenGetExtern() { return &EcsNewton; -} +} BINDGEN_API void* EcsNotQueryable_BindgenGetExtern() { return &EcsNotQueryable; -} +} BINDGEN_API void* EcsObserver_BindgenGetExtern() { return &EcsObserver; -} +} BINDGEN_API void* EcsOnAdd_BindgenGetExtern() { return &EcsOnAdd; -} +} BINDGEN_API void* EcsOnDelete_BindgenGetExtern() { return &EcsOnDelete; -} +} BINDGEN_API void* EcsOnDeleteTarget_BindgenGetExtern() { return &EcsOnDeleteTarget; -} +} BINDGEN_API void* EcsOneOf_BindgenGetExtern() { return &EcsOneOf; -} +} BINDGEN_API void* EcsOnInstantiate_BindgenGetExtern() { return &EcsOnInstantiate; -} +} BINDGEN_API void* EcsOnLoad_BindgenGetExtern() { return &EcsOnLoad; -} +} BINDGEN_API void* EcsOnRemove_BindgenGetExtern() { return &EcsOnRemove; -} +} BINDGEN_API void* EcsOnSet_BindgenGetExtern() { return &EcsOnSet; -} +} BINDGEN_API void* EcsOnStart_BindgenGetExtern() { return &EcsOnStart; -} +} BINDGEN_API void* EcsOnStore_BindgenGetExtern() { return &EcsOnStore; -} +} BINDGEN_API void* EcsOnTableCreate_BindgenGetExtern() { return &EcsOnTableCreate; -} +} BINDGEN_API void* EcsOnTableDelete_BindgenGetExtern() { return &EcsOnTableDelete; -} +} BINDGEN_API void* EcsOnUpdate_BindgenGetExtern() { return &EcsOnUpdate; -} +} BINDGEN_API void* EcsOnValidate_BindgenGetExtern() { return &EcsOnValidate; -} +} +BINDGEN_API void* EcsOrderedChildren_BindgenGetExtern() { + return &EcsOrderedChildren; +} BINDGEN_API void* EcsOverride_BindgenGetExtern() { return &EcsOverride; -} +} BINDGEN_API void* EcsPairIsTag_BindgenGetExtern() { return &EcsPairIsTag; -} +} BINDGEN_API void* EcsPanic_BindgenGetExtern() { return &EcsPanic; -} +} BINDGEN_API void* EcsPascal_BindgenGetExtern() { return &EcsPascal; -} +} BINDGEN_API void* EcsPebi_BindgenGetExtern() { return &EcsPebi; -} +} BINDGEN_API void* EcsPercentage_BindgenGetExtern() { return &EcsPercentage; -} +} BINDGEN_API void* EcsPeriod1d_BindgenGetExtern() { return &EcsPeriod1d; -} +} BINDGEN_API void* EcsPeriod1h_BindgenGetExtern() { return &EcsPeriod1h; -} +} BINDGEN_API void* EcsPeriod1m_BindgenGetExtern() { return &EcsPeriod1m; -} +} BINDGEN_API void* EcsPeriod1s_BindgenGetExtern() { return &EcsPeriod1s; -} +} BINDGEN_API void* EcsPeriod1w_BindgenGetExtern() { return &EcsPeriod1w; -} +} BINDGEN_API void* EcsPeta_BindgenGetExtern() { return &EcsPeta; -} +} BINDGEN_API void* EcsPhase_BindgenGetExtern() { return &EcsPhase; -} +} BINDGEN_API void* EcsPico_BindgenGetExtern() { return &EcsPico; -} +} BINDGEN_API void* EcsPicoMeters_BindgenGetExtern() { return &EcsPicoMeters; -} +} BINDGEN_API void* EcsPicoSeconds_BindgenGetExtern() { return &EcsPicoSeconds; -} +} BINDGEN_API void* EcsPixels_BindgenGetExtern() { return &EcsPixels; -} +} BINDGEN_API void* EcsPostFrame_BindgenGetExtern() { return &EcsPostFrame; -} +} BINDGEN_API void* EcsPostLoad_BindgenGetExtern() { return &EcsPostLoad; -} +} BINDGEN_API void* EcsPostUpdate_BindgenGetExtern() { return &EcsPostUpdate; -} +} BINDGEN_API void* EcsPredEq_BindgenGetExtern() { return &EcsPredEq; -} +} BINDGEN_API void* EcsPredLookup_BindgenGetExtern() { return &EcsPredLookup; -} +} BINDGEN_API void* EcsPredMatch_BindgenGetExtern() { return &EcsPredMatch; -} +} BINDGEN_API void* EcsPrefab_BindgenGetExtern() { return &EcsPrefab; -} +} BINDGEN_API void* EcsPreFrame_BindgenGetExtern() { return &EcsPreFrame; -} +} BINDGEN_API void* EcsPressure_BindgenGetExtern() { return &EcsPressure; -} +} BINDGEN_API void* EcsPreStore_BindgenGetExtern() { return &EcsPreStore; -} +} BINDGEN_API void* EcsPreUpdate_BindgenGetExtern() { return &EcsPreUpdate; -} +} BINDGEN_API void* EcsPrivate_BindgenGetExtern() { return &EcsPrivate; -} +} BINDGEN_API void* EcsQuantity_BindgenGetExtern() { return &EcsQuantity; -} +} BINDGEN_API void* EcsQuery_BindgenGetExtern() { return &EcsQuery; -} +} BINDGEN_API void* EcsRadians_BindgenGetExtern() { return &EcsRadians; -} +} BINDGEN_API void* EcsReflexive_BindgenGetExtern() { return &EcsReflexive; -} +} BINDGEN_API void* EcsRelationship_BindgenGetExtern() { return &EcsRelationship; -} +} BINDGEN_API void* EcsRemove_BindgenGetExtern() { return &EcsRemove; -} +} BINDGEN_API void* EcsScopeClose_BindgenGetExtern() { return &EcsScopeClose; -} +} BINDGEN_API void* EcsScopeOpen_BindgenGetExtern() { return &EcsScopeOpen; -} +} BINDGEN_API void* EcsScriptTemplate_BindgenGetExtern() { return &EcsScriptTemplate; -} +} BINDGEN_API void* EcsSeconds_BindgenGetExtern() { return &EcsSeconds; -} +} BINDGEN_API void* EcsSlotOf_BindgenGetExtern() { return &EcsSlotOf; -} +} BINDGEN_API void* EcsSparse_BindgenGetExtern() { return &EcsSparse; -} +} BINDGEN_API void* EcsSpeed_BindgenGetExtern() { return &EcsSpeed; -} +} BINDGEN_API void* EcsSymbol_BindgenGetExtern() { return &EcsSymbol; -} +} BINDGEN_API void* EcsSymmetric_BindgenGetExtern() { return &EcsSymmetric; -} +} BINDGEN_API void* EcsSystem_BindgenGetExtern() { return &EcsSystem; -} +} BINDGEN_API void* EcsTarget_BindgenGetExtern() { return &EcsTarget; -} +} BINDGEN_API void* EcsTebi_BindgenGetExtern() { return &EcsTebi; -} +} BINDGEN_API void* EcsTemperature_BindgenGetExtern() { return &EcsTemperature; -} +} BINDGEN_API void* EcsTera_BindgenGetExtern() { return &EcsTera; -} +} BINDGEN_API void* EcsThis_BindgenGetExtern() { return &EcsThis; -} +} BINDGEN_API void* EcsTime_BindgenGetExtern() { return &EcsTime; -} +} BINDGEN_API void* EcsTrait_BindgenGetExtern() { return &EcsTrait; -} +} BINDGEN_API void* EcsTransitive_BindgenGetExtern() { return &EcsTransitive; -} +} BINDGEN_API void* EcsTraversable_BindgenGetExtern() { return &EcsTraversable; -} -BINDGEN_API void* EcsUnion_BindgenGetExtern() { - return &EcsUnion; -} +} BINDGEN_API void* EcsUnitPrefixes_BindgenGetExtern() { return &EcsUnitPrefixes; -} +} BINDGEN_API void* EcsUri_BindgenGetExtern() { return &EcsUri; -} +} BINDGEN_API void* EcsUriFile_BindgenGetExtern() { return &EcsUriFile; -} +} BINDGEN_API void* EcsUriHyperlink_BindgenGetExtern() { return &EcsUriHyperlink; -} +} BINDGEN_API void* EcsUriImage_BindgenGetExtern() { return &EcsUriImage; -} +} BINDGEN_API void* EcsVariable_BindgenGetExtern() { return &EcsVariable; -} +} BINDGEN_API void* EcsWildcard_BindgenGetExtern() { return &EcsWildcard; -} +} BINDGEN_API void* EcsWith_BindgenGetExtern() { return &EcsWith; -} +} BINDGEN_API void* EcsWorld_BindgenGetExtern() { return &EcsWorld; -} +} BINDGEN_API void* EcsYobi_BindgenGetExtern() { return &EcsYobi; -} +} BINDGEN_API void* EcsYocto_BindgenGetExtern() { return &EcsYocto; -} +} BINDGEN_API void* EcsYotta_BindgenGetExtern() { return &EcsYotta; -} +} BINDGEN_API void* EcsZebi_BindgenGetExtern() { return &EcsZebi; -} +} BINDGEN_API void* EcsZepto_BindgenGetExtern() { return &EcsZepto; -} +} BINDGEN_API void* EcsZetta_BindgenGetExtern() { return &EcsZetta; -} +} BINDGEN_API void* FLECS_IDecs_bool_tID__BindgenGetExtern() { return &FLECS_IDecs_bool_tID_; -} +} BINDGEN_API void* FLECS_IDecs_byte_tID__BindgenGetExtern() { return &FLECS_IDecs_byte_tID_; -} +} BINDGEN_API void* FLECS_IDecs_char_tID__BindgenGetExtern() { return &FLECS_IDecs_char_tID_; -} +} BINDGEN_API void* FLECS_IDecs_entity_tID__BindgenGetExtern() { return &FLECS_IDecs_entity_tID_; -} +} BINDGEN_API void* FLECS_IDecs_f32_tID__BindgenGetExtern() { return &FLECS_IDecs_f32_tID_; -} +} BINDGEN_API void* FLECS_IDecs_f64_tID__BindgenGetExtern() { return &FLECS_IDecs_f64_tID_; -} +} BINDGEN_API void* FLECS_IDecs_i16_tID__BindgenGetExtern() { return &FLECS_IDecs_i16_tID_; -} +} BINDGEN_API void* FLECS_IDecs_i32_tID__BindgenGetExtern() { return &FLECS_IDecs_i32_tID_; -} +} BINDGEN_API void* FLECS_IDecs_i64_tID__BindgenGetExtern() { return &FLECS_IDecs_i64_tID_; -} +} BINDGEN_API void* FLECS_IDecs_i8_tID__BindgenGetExtern() { return &FLECS_IDecs_i8_tID_; -} +} BINDGEN_API void* FLECS_IDecs_id_tID__BindgenGetExtern() { return &FLECS_IDecs_id_tID_; -} +} BINDGEN_API void* FLECS_IDecs_iptr_tID__BindgenGetExtern() { return &FLECS_IDecs_iptr_tID_; -} +} BINDGEN_API void* FLECS_IDecs_string_tID__BindgenGetExtern() { return &FLECS_IDecs_string_tID_; -} +} BINDGEN_API void* FLECS_IDecs_u16_tID__BindgenGetExtern() { return &FLECS_IDecs_u16_tID_; -} +} BINDGEN_API void* FLECS_IDecs_u32_tID__BindgenGetExtern() { return &FLECS_IDecs_u32_tID_; -} +} BINDGEN_API void* FLECS_IDecs_u64_tID__BindgenGetExtern() { return &FLECS_IDecs_u64_tID_; -} +} BINDGEN_API void* FLECS_IDecs_u8_tID__BindgenGetExtern() { return &FLECS_IDecs_u8_tID_; -} +} BINDGEN_API void* FLECS_IDecs_uptr_tID__BindgenGetExtern() { return &FLECS_IDecs_uptr_tID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertCriticalID__BindgenGetExtern() { return &FLECS_IDEcsAlertCriticalID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertErrorID__BindgenGetExtern() { return &FLECS_IDEcsAlertErrorID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertID__BindgenGetExtern() { return &FLECS_IDEcsAlertID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertInfoID__BindgenGetExtern() { return &FLECS_IDEcsAlertInfoID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertInstanceID__BindgenGetExtern() { return &FLECS_IDEcsAlertInstanceID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertsActiveID__BindgenGetExtern() { return &FLECS_IDEcsAlertsActiveID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertTimeoutID__BindgenGetExtern() { return &FLECS_IDEcsAlertTimeoutID_; -} +} BINDGEN_API void* FLECS_IDEcsAlertWarningID__BindgenGetExtern() { return &FLECS_IDEcsAlertWarningID_; -} +} BINDGEN_API void* FLECS_IDEcsArrayID__BindgenGetExtern() { return &FLECS_IDEcsArrayID_; -} +} BINDGEN_API void* FLECS_IDEcsBitmaskID__BindgenGetExtern() { return &FLECS_IDEcsBitmaskID_; -} +} BINDGEN_API void* FLECS_IDEcsComponentID__BindgenGetExtern() { return &FLECS_IDEcsComponentID_; -} +} BINDGEN_API void* FLECS_IDEcsCounterID__BindgenGetExtern() { return &FLECS_IDEcsCounterID_; -} +} BINDGEN_API void* FLECS_IDEcsCounterIdID__BindgenGetExtern() { return &FLECS_IDEcsCounterIdID_; -} +} BINDGEN_API void* FLECS_IDEcsCounterIncrementID__BindgenGetExtern() { return &FLECS_IDEcsCounterIncrementID_; -} +} BINDGEN_API void* FLECS_IDEcsDefaultChildComponentID__BindgenGetExtern() { return &FLECS_IDEcsDefaultChildComponentID_; -} +} BINDGEN_API void* FLECS_IDEcsDocDescriptionID__BindgenGetExtern() { return &FLECS_IDEcsDocDescriptionID_; -} +} BINDGEN_API void* FLECS_IDEcsEnumID__BindgenGetExtern() { return &FLECS_IDEcsEnumID_; -} +} BINDGEN_API void* FLECS_IDEcsGaugeID__BindgenGetExtern() { return &FLECS_IDEcsGaugeID_; -} +} BINDGEN_API void* FLECS_IDEcsIdentifierID__BindgenGetExtern() { return &FLECS_IDEcsIdentifierID_; -} +} BINDGEN_API void* FLECS_IDEcsMemberID__BindgenGetExtern() { return &FLECS_IDEcsMemberID_; -} +} BINDGEN_API void* FLECS_IDEcsMemberRangesID__BindgenGetExtern() { return &FLECS_IDEcsMemberRangesID_; -} +} BINDGEN_API void* FLECS_IDEcsMetricID__BindgenGetExtern() { return &FLECS_IDEcsMetricID_; -} +} BINDGEN_API void* FLECS_IDEcsMetricInstanceID__BindgenGetExtern() { return &FLECS_IDEcsMetricInstanceID_; -} +} BINDGEN_API void* FLECS_IDEcsMetricSourceID__BindgenGetExtern() { return &FLECS_IDEcsMetricSourceID_; -} +} BINDGEN_API void* FLECS_IDEcsMetricValueID__BindgenGetExtern() { return &FLECS_IDEcsMetricValueID_; -} +} BINDGEN_API void* FLECS_IDEcsOpaqueID__BindgenGetExtern() { return &FLECS_IDEcsOpaqueID_; -} +} BINDGEN_API void* FLECS_IDEcsPipelineID__BindgenGetExtern() { return &FLECS_IDEcsPipelineID_; -} +} BINDGEN_API void* FLECS_IDEcsPipelineStatsID__BindgenGetExtern() { return &FLECS_IDEcsPipelineStatsID_; -} +} BINDGEN_API void* FLECS_IDEcsPolyID__BindgenGetExtern() { return &FLECS_IDEcsPolyID_; -} +} BINDGEN_API void* FLECS_IDEcsPrimitiveID__BindgenGetExtern() { return &FLECS_IDEcsPrimitiveID_; -} +} BINDGEN_API void* FLECS_IDEcsRateFilterID__BindgenGetExtern() { return &FLECS_IDEcsRateFilterID_; -} +} BINDGEN_API void* FLECS_IDEcsRestID__BindgenGetExtern() { return &FLECS_IDEcsRestID_; -} +} BINDGEN_API void* FLECS_IDEcsScriptConstVarID__BindgenGetExtern() { return &FLECS_IDEcsScriptConstVarID_; -} +} BINDGEN_API void* FLECS_IDEcsScriptFunctionID__BindgenGetExtern() { return &FLECS_IDEcsScriptFunctionID_; -} +} BINDGEN_API void* FLECS_IDEcsScriptID__BindgenGetExtern() { return &FLECS_IDEcsScriptID_; -} +} BINDGEN_API void* FLECS_IDEcsScriptMethodID__BindgenGetExtern() { return &FLECS_IDEcsScriptMethodID_; -} +} +BINDGEN_API void* FLECS_IDEcsScriptRngID__BindgenGetExtern() { + return &FLECS_IDEcsScriptRngID_; +} BINDGEN_API void* FLECS_IDEcsScriptTemplateID__BindgenGetExtern() { return &FLECS_IDEcsScriptTemplateID_; -} +} BINDGEN_API void* FLECS_IDEcsStructID__BindgenGetExtern() { return &FLECS_IDEcsStructID_; -} +} BINDGEN_API void* FLECS_IDEcsSystemStatsID__BindgenGetExtern() { return &FLECS_IDEcsSystemStatsID_; -} +} BINDGEN_API void* FLECS_IDEcsTickSourceID__BindgenGetExtern() { return &FLECS_IDEcsTickSourceID_; -} +} BINDGEN_API void* FLECS_IDEcsTimerID__BindgenGetExtern() { return &FLECS_IDEcsTimerID_; -} +} BINDGEN_API void* FLECS_IDEcsTypeID__BindgenGetExtern() { return &FLECS_IDEcsTypeID_; -} +} BINDGEN_API void* FLECS_IDEcsTypeSerializerID__BindgenGetExtern() { return &FLECS_IDEcsTypeSerializerID_; -} +} BINDGEN_API void* FLECS_IDEcsUnitID__BindgenGetExtern() { return &FLECS_IDEcsUnitID_; -} +} BINDGEN_API void* FLECS_IDEcsUnitPrefixID__BindgenGetExtern() { return &FLECS_IDEcsUnitPrefixID_; -} +} BINDGEN_API void* FLECS_IDEcsVectorID__BindgenGetExtern() { return &FLECS_IDEcsVectorID_; -} +} BINDGEN_API void* FLECS_IDEcsWorldStatsID__BindgenGetExtern() { return &FLECS_IDEcsWorldStatsID_; -} +} BINDGEN_API void* FLECS_IDEcsWorldSummaryID__BindgenGetExtern() { return &FLECS_IDEcsWorldSummaryID_; -} +} BINDGEN_API void* FLECS_IDFlecsAlertsID__BindgenGetExtern() { return &FLECS_IDFlecsAlertsID_; -} +} BINDGEN_API void* FLECS_IDFlecsMetricsID__BindgenGetExtern() { return &FLECS_IDFlecsMetricsID_; -} +} BINDGEN_API void* FLECS_IDFlecsStatsID__BindgenGetExtern() { return &FLECS_IDFlecsStatsID_; -} +} diff --git a/src/Flecs.NET.Bindgen/Flecs.NET.Bindgen.csproj b/src/Flecs.NET.Bindgen/Flecs.NET.Bindgen.csproj index 6c1fa754..34a857c3 100644 --- a/src/Flecs.NET.Bindgen/Flecs.NET.Bindgen.csproj +++ b/src/Flecs.NET.Bindgen/Flecs.NET.Bindgen.csproj @@ -1,34 +1,36 @@ - - - - exe - net9.0 - enable - enable - false - false - $(NETCoreSdkRuntimeIdentifier) - $(NoWarn);NETSDK1201 - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - + + + + exe + net9.0 + enable + enable + false + false + $(NETCoreSdkRuntimeIdentifier) + $(NoWarn);NETSDK1201 + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + PreserveNewest + + + + + + + + diff --git a/src/Flecs.NET.Bindgen/Program.cs b/src/Flecs.NET.Bindgen/Program.cs index e73a7e59..7ed23d9f 100644 --- a/src/Flecs.NET.Bindgen/Program.cs +++ b/src/Flecs.NET.Bindgen/Program.cs @@ -1,51 +1,51 @@ -using System.Runtime.CompilerServices; -using Bindgen.NET; - -BindingOptions bindingOptions = new() -{ - Namespace = "Flecs.NET.Bindings", - Class = "flecs", - - DllImportPath = "flecs", - - SuppressedWarnings = { "CS8981" }, - - SystemIncludeDirectories = { Path.Combine(BuildConstants.ZigLibPath, "include") }, - IncludeDirectories = { GetFlecsIncludePath() }, - - InputFile = GetFlecsHeaderPath(), - OutputFile = GetBindingsOutputPath(), - NativeOutputFile = GetBindingsHelperOutputPath(), - - GenerateExternVariables = true, - GenerateDisableRuntimeMarshallingAttribute = true, - - Ignored = {"FLECS_IDEcsPipelineQueryID_"} -}; - -if (OperatingSystem.IsMacOS()) - bindingOptions.SystemIncludeDirectories.Add(Path.Combine(BuildConstants.ZigLibPath, "libc", "include", "any-macos-any")); - -BindingGenerator.Generate(bindingOptions); - -return; - -string GetFlecsIncludePath([CallerFilePath] string filePath = "") -{ - return Path.GetFullPath(Path.Combine(filePath, "..", "..", "..", "native", "flecs", "include")); -} - -string GetFlecsHeaderPath([CallerFilePath] string filePath = "") -{ - return Path.GetFullPath(Path.Combine(filePath, "..", "..", "..", "native", "flecs", "include", "flecs.h")); -} - -string GetBindingsOutputPath([CallerFilePath] string filePath = "") -{ - return Path.GetFullPath(Path.Combine(filePath, "..", "..", "Flecs.NET.Bindings", "Flecs.g.cs")); -} - -string GetBindingsHelperOutputPath([CallerFilePath] string filePath = "") -{ - return Path.GetFullPath(Path.Combine(filePath, "..", "..", "..", "native", "flecs_helpers.c")); -} +using System.Runtime.CompilerServices; +using Bindgen.NET; + +BindingOptions bindingOptions = new() +{ + Namespace = "Flecs.NET.Bindings", + Class = "flecs", + + DllImportPath = "flecs", + + SuppressedWarnings = { "CS8981" }, + + SystemIncludeDirectories = { Path.Combine(BuildConstants.ZigLibPath, "include") }, + IncludeDirectories = { GetFlecsIncludePath() }, + + InputFile = GetFlecsHeaderPath(), + OutputFile = GetBindingsOutputPath(), + NativeOutputFile = GetBindingsHelperOutputPath(), + + GenerateExternVariables = true, + GenerateDisableRuntimeMarshallingAttribute = true, + + Ignored = {"FLECS_IDEcsPipelineQueryID_"} +}; + +if (OperatingSystem.IsMacOS()) + bindingOptions.SystemIncludeDirectories.Add(Path.Combine(BuildConstants.ZigLibPath, "libc", "include", "any-macos-any")); + +BindingGenerator.Generate(bindingOptions); + +return; + +string GetFlecsIncludePath([CallerFilePath] string filePath = "") +{ + return Path.GetFullPath(Path.Combine(filePath, "..", "..", "..", "native", "flecs", "include")); +} + +string GetFlecsHeaderPath([CallerFilePath] string filePath = "") +{ + return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Environment.ProcessPath!)!, "bootstrap.h")); +} + +string GetBindingsOutputPath([CallerFilePath] string filePath = "") +{ + return Path.GetFullPath(Path.Combine(filePath, "..", "..", "Flecs.NET.Bindings", "Flecs.g.cs")); +} + +string GetBindingsHelperOutputPath([CallerFilePath] string filePath = "") +{ + return Path.GetFullPath(Path.Combine(filePath, "..", "..", "..", "native", "flecs_helpers.c")); +} diff --git a/src/Flecs.NET.Bindgen/bootstrap.h b/src/Flecs.NET.Bindgen/bootstrap.h new file mode 100644 index 00000000..f8860d54 --- /dev/null +++ b/src/Flecs.NET.Bindgen/bootstrap.h @@ -0,0 +1,3 @@ +#define FLECS_SCRIPT_MATH + +#include \ No newline at end of file diff --git a/src/Flecs.NET.Bindings/Flecs.g.cs b/src/Flecs.NET.Bindings/Flecs.g.cs index af35eccf..5cece7f3 100644 --- a/src/Flecs.NET.Bindings/Flecs.g.cs +++ b/src/Flecs.NET.Bindings/Flecs.g.cs @@ -223,6 +223,12 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_enum_init")] public static extern ulong ecs_enum_init(ecs_world_t* world, ecs_enum_desc_t* desc); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_exclusive_access_begin")] + public static extern void ecs_exclusive_access_begin(ecs_world_t* world, byte* thread_name); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_exclusive_access_end")] + public static extern void ecs_exclusive_access_end(ecs_world_t* world, bool lock_world); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_exists")] public static extern bool ecs_exists(ecs_world_t* world, ulong entity); @@ -322,9 +328,15 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_mut_id")] public static extern void* ecs_get_mut_id(ecs_world_t* world, ulong entity, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_mut_modified_id")] + public static extern void* ecs_get_mut_modified_id(ecs_world_t* world, ulong entity, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_name")] public static extern byte* ecs_get_name(ecs_world_t* world, ulong entity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_ordered_children")] + public static extern ecs_entities_t ecs_get_ordered_children(ecs_world_t* world, ulong parent); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_parent")] public static extern ulong ecs_get_parent(ecs_world_t* world, ulong entity); @@ -424,6 +436,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_id_in_use")] public static extern bool ecs_id_in_use(ecs_world_t* world, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_id_is_any")] + public static extern bool ecs_id_is_any(ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_id_is_pair")] public static extern bool ecs_id_is_pair(ulong id); @@ -487,6 +502,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_first")] public static extern ulong ecs_iter_first(ecs_iter_t* it); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_get_group")] + public static extern ulong ecs_iter_get_group(ecs_iter_t* it); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_get_var")] public static extern ulong ecs_iter_get_var(ecs_iter_t* it, int var_id); @@ -496,6 +514,15 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_get_var_as_table")] public static extern ecs_table_t* ecs_iter_get_var_as_table(ecs_iter_t* it, int var_id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_get_var_count")] + public static extern int ecs_iter_get_var_count(ecs_iter_t* it); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_get_var_name")] + public static extern byte* ecs_iter_get_var_name(ecs_iter_t* it, int var_id); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_get_vars")] + public static extern ecs_var_t* ecs_iter_get_vars(ecs_iter_t* it); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_iter_is_true")] public static extern bool ecs_iter_is_true(ecs_iter_t* it); @@ -1186,6 +1213,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_set_binding_ctx")] public static extern void ecs_set_binding_ctx(ecs_world_t* world, void* ctx, delegate* unmanaged ctx_free); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_set_child_order")] + public static extern void ecs_set_child_order(ecs_world_t* world, ulong parent, ulong* children, int child_count); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_set_ctx")] public static extern void ecs_set_ctx(ecs_world_t* world, void* ctx, delegate* unmanaged ctx_free); @@ -1261,6 +1291,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_should_quit")] public static extern bool ecs_should_quit(ecs_world_t* world); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_shrink")] + public static extern void ecs_shrink(ecs_world_t* world); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_sleepf")] public static extern void ecs_sleepf(double t); @@ -1588,6 +1621,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_vec_remove_last")] public static extern void ecs_vec_remove_last(ecs_vec_t* vec); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_vec_remove_ordered")] + public static extern void ecs_vec_remove_ordered(ecs_vec_t* v, int size, int index); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_vec_reset")] public static extern ecs_vec_t* ecs_vec_reset(ecs_allocator_t* allocator, ecs_vec_t* vec, int size); @@ -1711,17 +1747,29 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_brealloc_w_dbg_info")] public static extern void* flecs_brealloc_w_dbg_info(ecs_block_allocator_t* dst, ecs_block_allocator_t* src, void* memory, byte* type_name); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_check_exclusive_world_access_read")] + public static extern void flecs_check_exclusive_world_access_read(ecs_world_t* world); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_check_exclusive_world_access_write")] + public static extern void flecs_check_exclusive_world_access_write(ecs_world_t* world); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_chresc")] public static extern byte* flecs_chresc(byte* @out, byte @in, byte delimiter); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_chrparse")] public static extern byte* flecs_chrparse(byte* @in, byte* @out); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_get_id")] + public static extern ulong flecs_component_get_id(ecs_component_record_t* cr); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_get_table")] + public static extern ecs_table_record_t* flecs_component_get_table(ecs_component_record_t* cr, ecs_table_t* table); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_ids_get")] public static extern ulong flecs_component_ids_get(ecs_world_t* world, int index); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_ids_get_alive")] - public static extern ulong flecs_component_ids_get_alive(ecs_world_t* stage_world, int index); + public static extern ulong flecs_component_ids_get_alive(ecs_world_t* world, int index); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_ids_index_get")] public static extern int flecs_component_ids_index_get(); @@ -1729,8 +1777,17 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_ids_set")] public static extern void flecs_component_ids_set(ecs_world_t* world, int index, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_iter")] + public static extern bool flecs_component_iter(ecs_component_record_t* cr, ecs_table_cache_iter_t* iter_out); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_component_next")] + public static extern ecs_table_record_t* flecs_component_next(ecs_table_cache_iter_t* iter); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_components_get")] + public static extern ecs_component_record_t* flecs_components_get(ecs_world_t* world, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_default_ctor")] - public static extern void flecs_default_ctor(void* ptr, int count, ecs_type_info_t* ctx); + public static extern void flecs_default_ctor(void* ptr, int count, ecs_type_info_t* type_info); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_dump_backtrace")] public static extern void flecs_dump_backtrace(void* stream); @@ -1774,9 +1831,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_hm_bucket_remove")] public static extern void flecs_hm_bucket_remove(ecs_hashmap_t* map, ecs_hm_bucket_t* bucket, ulong hash, int index); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_identifier_is_0")] - public static extern bool flecs_identifier_is_0(byte* id); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_module_path_from_c")] public static extern byte* flecs_module_path_from_c(byte* c_name); @@ -1798,6 +1852,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_poly_release_")] public static extern int flecs_poly_release_(void* poly); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_query_trivial_cached_next")] + public static extern bool flecs_query_trivial_cached_next(ecs_iter_t* it); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_resume_readonly")] public static extern void flecs_resume_readonly(ecs_world_t* world, ecs_suspend_readonly_state_t* state); @@ -1811,7 +1868,7 @@ public partial class BindgenInternal public static extern int flecs_sparse_count(ecs_sparse_t* sparse); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_ensure")] - public static extern void* flecs_sparse_ensure(ecs_sparse_t* sparse, int elem_size, ulong id); + public static extern void* flecs_sparse_ensure(ecs_sparse_t* sparse, int elem_size, ulong id, bool* is_new); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_ensure_fast")] public static extern void* flecs_sparse_ensure_fast(ecs_sparse_t* sparse, int elem_size, ulong id); @@ -1822,18 +1879,21 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_get")] public static extern void* flecs_sparse_get(ecs_sparse_t* sparse, int elem_size, ulong id); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_get_any")] - public static extern void* flecs_sparse_get_any(ecs_sparse_t* sparse, int elem_size, ulong id); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_get_dense")] public static extern void* flecs_sparse_get_dense(ecs_sparse_t* sparse, int elem_size, int index); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_has")] + public static extern bool flecs_sparse_has(ecs_sparse_t* sparse, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_ids")] public static extern ulong* flecs_sparse_ids(ecs_sparse_t* sparse); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_init")] public static extern void flecs_sparse_init(ecs_sparse_t* result, ecs_allocator_t* allocator, ecs_block_allocator_t* page_allocator, int size); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_insert")] + public static extern void* flecs_sparse_insert(ecs_sparse_t* sparse, int elem_size, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_is_alive")] public static extern bool flecs_sparse_is_alive(ecs_sparse_t* sparse, ulong id); @@ -1844,13 +1904,13 @@ public partial class BindgenInternal public static extern ulong flecs_sparse_new_id(ecs_sparse_t* sparse); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_remove")] - public static extern void flecs_sparse_remove(ecs_sparse_t* sparse, int elem_size, ulong id); + public static extern bool flecs_sparse_remove(ecs_sparse_t* sparse, int size, ulong id); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_remove_fast")] - public static extern void* flecs_sparse_remove_fast(ecs_sparse_t* sparse, int size, ulong index); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_remove_w_gen")] + public static extern bool flecs_sparse_remove_w_gen(ecs_sparse_t* sparse, int size, ulong id); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_try")] - public static extern void* flecs_sparse_try(ecs_sparse_t* sparse, int elem_size, ulong id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_sparse_shrink")] + public static extern void flecs_sparse_shrink(ecs_sparse_t* sparse); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_stack_alloc")] public static extern void* flecs_stack_alloc(ecs_stack_t* stack, int size, int align); @@ -1888,32 +1948,20 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_suspend_readonly")] public static extern ecs_world_t* flecs_suspend_readonly(ecs_world_t* world, ecs_suspend_readonly_state_t* state); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_fini")] - public static extern void flecs_switch_fini(ecs_switch_t* sw); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_table_id")] + public static extern ulong flecs_table_id(ecs_table_t* table); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_first")] - public static extern uint flecs_switch_first(ecs_switch_t* sw, ulong value); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_get")] - public static extern ulong flecs_switch_get(ecs_switch_t* sw, uint element); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_init")] - public static extern void flecs_switch_init(ecs_switch_t* sw, ecs_allocator_t* allocator); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_next")] - public static extern uint flecs_switch_next(ecs_switch_t* sw, uint previous); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_reset")] - public static extern bool flecs_switch_reset(ecs_switch_t* sw, uint element); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_table_observed_count")] + public static extern int flecs_table_observed_count(ecs_table_t* table); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_set")] - public static extern bool flecs_switch_set(ecs_switch_t* sw, uint element, ulong value); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_table_record_get_component")] + public static extern ecs_component_record_t* flecs_table_record_get_component(ecs_table_record_t* tr); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_switch_targets")] - public static extern ecs_map_iter_t flecs_switch_targets(ecs_switch_t* sw); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_table_records")] + public static extern ecs_table_records_t flecs_table_records(ecs_table_t* table); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_table_observed_count")] - public static extern int flecs_table_observed_count(ecs_table_t* table); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_table_traverse_add")] + public static extern ecs_table_t* flecs_table_traverse_add(ecs_world_t* world, ecs_table_t* table, ulong* id_ptr, ecs_table_diff_t* diff); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "flecs_to_snake_case")] public static extern byte* flecs_to_snake_case(byte* str); @@ -1942,6 +1990,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "FlecsScriptImport")] public static extern void FlecsScriptImport(ecs_world_t* world); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "FlecsScriptMathImport")] + public static extern void FlecsScriptMathImport(ecs_world_t* world); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "FlecsStatsImport")] public static extern void FlecsStatsImport(ecs_world_t* world); @@ -2251,17 +2302,17 @@ public partial struct ecs_sparse_t public partial struct ecs_block_allocator_t { - public ecs_block_allocator_chunk_header_t* head; - - public ecs_block_allocator_block_t* block_head; + public int data_size; public int chunk_size; - public int data_size; - public int chunks_per_block; - public int block_size; + public int block_size; + + public ecs_block_allocator_chunk_header_t* head; + + public ecs_block_allocator_block_t* block_head; } public partial struct ecs_map_t @@ -2356,27 +2407,6 @@ public partial struct ecs_map_params_t public ecs_block_allocator_t entry_allocator; } - public partial struct ecs_switch_node_t - { - public uint next; - - public uint prev; - } - - public partial struct ecs_switch_page_t - { - public ecs_vec_t nodes; - - public ecs_vec_t values; - } - - public partial struct ecs_switch_t - { - public ecs_map_t hdrs; - - public ecs_vec_t pages; - } - public partial struct ecs_strbuf_list_elem { public int count; @@ -2539,11 +2569,13 @@ public partial struct ecs_query_t { public ecs_header_t hdr; - public InlineArrays.ecs_term_t_32 terms; + public ecs_term_t* terms; + + public int* sizes; - public InlineArrays.int_32 sizes; + public ulong* ids; - public InlineArrays.ulong_32 ids; + public ulong bloom_filter; public uint flags; @@ -2642,8 +2674,16 @@ public partial struct ecs_iter_t public ecs_world_t* real_world; + public int offset; + + public int count; + public ulong* entities; + public void** ptrs; + + public ecs_table_record_t** trs; + public int* sizes; public ecs_table_t* table; @@ -2652,16 +2692,10 @@ public partial struct ecs_iter_t public ulong* ids; - public ecs_var_t* variables; - - public ecs_table_record_t** trs; - public ulong* sources; public ulong constrained_vars; - public ulong group_id; - public uint set_fields; public uint ref_fields; @@ -2682,12 +2716,8 @@ public partial struct ecs_iter_t public byte term_index; - public byte variable_count; - public ecs_query_t* query; - public byte** variable_names; - public void* param; public void* ctx; @@ -2704,10 +2734,6 @@ public partial struct ecs_iter_t public int frame_offset; - public int offset; - - public int count; - public uint flags; public ulong interrupted_by; @@ -2731,7 +2757,9 @@ public partial struct ecs_ref_t public ulong table_id; - public uint table_version; + public uint table_version_fast; + + public ushort table_version; public ecs_record_t* record; @@ -2756,6 +2784,10 @@ public partial struct ecs_type_hooks_t public delegate* unmanaged move_dtor; + public delegate* unmanaged cmp; + + public delegate* unmanaged equals; + public uint flags; public delegate* unmanaged on_add; @@ -2792,7 +2824,7 @@ public partial struct ecs_type_info_t public partial struct ecs_record_t { - public ecs_id_record_t* idr; + public ecs_component_record_t* cr; public ecs_table_t* table; @@ -2801,7 +2833,7 @@ public partial struct ecs_record_t public int dense; } - public partial struct ecs_id_record_t + public partial struct ecs_component_record_t { } @@ -2811,8 +2843,6 @@ public partial struct ecs_mixins_t public partial struct ecs_header_t { - public int magic; - public int type; public int refcount; @@ -2820,21 +2850,6 @@ public partial struct ecs_header_t public ecs_mixins_t* mixins; } - public partial struct ecs_table_cache_hdr_t - { - public ecs_table_cache_t* cache; - - public ecs_table_t* table; - - public ecs_table_cache_hdr_t* prev; - - public ecs_table_cache_hdr_t* next; - } - - public partial struct ecs_table_cache_t - { - } - public partial struct ecs_table_record_t { public ecs_table_cache_hdr_t hdr; @@ -2857,7 +2872,11 @@ public partial struct ecs_data_t { } - public partial struct ecs_query_cache_table_match_t + public partial struct ecs_query_cache_match_t + { + } + + public partial struct ecs_query_cache_group_t { } @@ -2921,6 +2940,17 @@ public partial struct ecs_table_cache_iter_t public bool iter_empty; } + public partial struct ecs_table_cache_hdr_t + { + public ecs_table_cache_t* cache; + + public ecs_table_t* table; + + public ecs_table_cache_hdr_t* prev; + + public ecs_table_cache_hdr_t* next; + } + public partial struct ecs_each_iter_t { public ecs_table_cache_iter_t it; @@ -2943,8 +2973,6 @@ public partial struct ecs_query_op_profile_t public partial struct ecs_query_iter_t { - public ecs_query_t* query; - public ecs_var_t* vars; public ecs_query_var_t* query_vars; @@ -2953,21 +2981,25 @@ public partial struct ecs_query_iter_t public ecs_query_op_ctx_t* op_ctx; - public ecs_query_cache_table_match_t* node; + public ulong* written; + + public ecs_query_cache_group_t* group; - public ecs_query_cache_table_match_t* prev; + public ecs_vec_t* tables; - public ecs_query_cache_table_match_t* last; + public ecs_vec_t* all_tables; - public ulong* written; + public ecs_query_cache_match_t* elem; - public int skip_count; + public int cur; + + public int all_cur; public ecs_query_op_profile_t* profile; public short op; - public short sp; + public bool iter_single_group; } public partial struct ecs_query_var_t @@ -2982,28 +3014,19 @@ public partial struct ecs_query_op_ctx_t { } - public partial struct ecs_iter_cache_t - { - public ecs_stack_cursor_t* stack_cursor; - - public byte used; - - public byte allocated; - } - public partial struct ecs_iter_private_t { - public ecs_iter_private_t.AnonymousRecord_api_types_L153_C5 iter; + public ecs_iter_private_t.AnonymousRecord_api_types_L143_C5 iter; public void* entity_iter; - public ecs_iter_cache_t cache; + public ecs_stack_cursor_t* stack_cursor; } public partial struct ecs_iter_private_t { [StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)] - public partial struct AnonymousRecord_api_types_L153_C5 + public partial struct AnonymousRecord_api_types_L143_C5 { [System.Runtime.InteropServices.FieldOffset(0)] public ecs_query_iter_t query; @@ -3091,6 +3114,28 @@ public partial struct flecs_hashmap_result_t public ulong hash; } + public partial struct ecs_table_cache_t + { + } + + public partial struct ecs_table_diff_t + { + public ecs_type_t added; + + public ecs_type_t removed; + + public uint added_flags; + + public uint removed_flags; + } + + public partial struct ecs_table_records_t + { + public ecs_table_record_t* array; + + public int count; + } + public partial struct ecs_value_t { public ulong type; @@ -3331,14 +3376,14 @@ public partial struct ecs_world_info_t public int table_count; - public ecs_world_info_t.AnonymousRecord_flecs_L1468_C5 cmd; + public ecs_world_info_t.AnonymousRecord_flecs_L1484_C5 cmd; public byte* name_prefix; } public partial struct ecs_world_info_t { - public partial struct AnonymousRecord_flecs_L1468_C5 + public partial struct AnonymousRecord_flecs_L1484_C5 { public long add_count; @@ -3368,6 +3413,8 @@ public partial struct AnonymousRecord_flecs_L1468_C5 public partial struct ecs_query_group_info_t { + public ulong id; + public int match_count; public int table_count; @@ -3429,9 +3476,7 @@ public partial struct ecs_query_count_t public int entities; - public int tables; - - public int empty_tables; + public int tables; } public partial struct ecs_app_desc_t @@ -3622,8 +3667,6 @@ public partial struct ecs_system_t public ecs_query_t* query; - public ulong query_entity; - public ulong tick_source; public bool multi_threaded; @@ -3650,10 +3693,6 @@ public partial struct ecs_system_t public long last_frame; - public ecs_world_t* world; - - public ulong entity; - public delegate* unmanaged dtor; } @@ -4166,6 +4205,13 @@ public partial struct ecs_world_to_json_desc_t public bool serialize_modules; } + public partial struct EcsScriptRng + { + public ulong seed; + + public void* impl; + } + public partial struct ecs_script_template_t { } @@ -4429,7 +4475,9 @@ public partial struct EcsEnum { public ulong underlying_type; - public ecs_map_t constants; + public ecs_map_t constants; + + public ecs_vec_t ordered_constants; } public partial struct ecs_bitmask_constant_t @@ -4445,7 +4493,9 @@ public partial struct ecs_bitmask_constant_t public partial struct EcsBitmask { - public ecs_map_t constants; + public ecs_map_t constants; + + public ecs_vec_t ordered_constants; } public partial struct EcsArray @@ -4477,6 +4527,10 @@ public partial struct EcsOpaque public delegate* unmanaged serialize; + public delegate* unmanaged serialize_member; + + public delegate* unmanaged serialize_element; + public delegate* unmanaged assign_bool; public delegate* unmanaged assign_char; @@ -4706,17 +4760,17 @@ public partial struct byte_512 public partial struct InlineArrays { - [InlineArray(32)] - public partial struct ecs_term_t_32 + [InlineArray(8)] + public partial struct ulong_8 { - public ecs_term_t Item0; + public ulong Item0; } } public partial struct InlineArrays { - [InlineArray(32)] - public partial struct int_32 + [InlineArray(2)] + public partial struct int_2 { public int Item0; } @@ -4724,17 +4778,17 @@ public partial struct int_32 public partial struct InlineArrays { - [InlineArray(32)] - public partial struct ulong_32 + [InlineArray(2)] + public partial struct ecs_commands_t_2 { - public ulong Item0; + public ecs_commands_t Item0; } } public partial struct InlineArrays { - [InlineArray(8)] - public partial struct ulong_8 + [InlineArray(32)] + public partial struct ulong_32 { public ulong Item0; } @@ -4742,19 +4796,10 @@ public partial struct ulong_8 public partial struct InlineArrays { - [InlineArray(2)] - public partial struct int_2 - { - public int Item0; - } - } - - public partial struct InlineArrays - { - [InlineArray(2)] - public partial struct ecs_commands_t_2 + [InlineArray(32)] + public partial struct ecs_term_t_32 { - public ecs_commands_t Item0; + public ecs_term_t Item0; } } @@ -4977,8 +5022,6 @@ public partial struct ecs_member_t_32 public const uint ECS_ROW_MASK = 268435455; - public const int ECS_STACK_PAGE_SIZE = 4096; - public const int ecs_stage_t_magic = 1701016435; public const int ECS_STAT_WINDOW = 60; @@ -4987,41 +5030,49 @@ public partial struct ecs_member_t_32 public const int ECS_STRBUF_SMALL_STRING_SIZE = 512; - public const int ECS_TYPE_HOOK_COPY = 4; + public const uint ECS_TYPE_HOOK_CMP = 256; + + public const uint ECS_TYPE_HOOK_CMP_ILLEGAL = 524288; - public const int ECS_TYPE_HOOK_COPY_CTOR = 16; + public const uint ECS_TYPE_HOOK_COPY = 4; - public const int ECS_TYPE_HOOK_COPY_CTOR_ILLEGAL = 4096; + public const uint ECS_TYPE_HOOK_COPY_CTOR = 16; - public const int ECS_TYPE_HOOK_COPY_ILLEGAL = 1024; + public const uint ECS_TYPE_HOOK_COPY_CTOR_ILLEGAL = 32768; - public const int ECS_TYPE_HOOK_CTOR = 1; + public const uint ECS_TYPE_HOOK_COPY_ILLEGAL = 8192; - public const int ECS_TYPE_HOOK_CTOR_ILLEGAL = 256; + public const uint ECS_TYPE_HOOK_CTOR = 1; - public const int ECS_TYPE_HOOK_CTOR_MOVE_DTOR = 64; + public const uint ECS_TYPE_HOOK_CTOR_ILLEGAL = 1024; - public const int ECS_TYPE_HOOK_CTOR_MOVE_DTOR_ILLEGAL = 16384; + public const uint ECS_TYPE_HOOK_CTOR_MOVE_DTOR = 64; - public const int ECS_TYPE_HOOK_DTOR = 2; + public const uint ECS_TYPE_HOOK_CTOR_MOVE_DTOR_ILLEGAL = 131072; - public const int ECS_TYPE_HOOK_DTOR_ILLEGAL = 512; + public const uint ECS_TYPE_HOOK_DTOR = 2; - public const int ECS_TYPE_HOOK_MOVE = 8; + public const uint ECS_TYPE_HOOK_DTOR_ILLEGAL = 4096; - public const int ECS_TYPE_HOOK_MOVE_CTOR = 32; + public const uint ECS_TYPE_HOOK_EQUALS = 512; - public const int ECS_TYPE_HOOK_MOVE_CTOR_ILLEGAL = 8192; + public const uint ECS_TYPE_HOOK_EQUALS_ILLEGAL = 1048576; - public const int ECS_TYPE_HOOK_MOVE_DTOR = 128; + public const uint ECS_TYPE_HOOK_MOVE = 8; - public const int ECS_TYPE_HOOK_MOVE_DTOR_ILLEGAL = 32768; + public const uint ECS_TYPE_HOOK_MOVE_CTOR = 32; - public const int ECS_TYPE_HOOK_MOVE_ILLEGAL = 2048; + public const uint ECS_TYPE_HOOK_MOVE_CTOR_ILLEGAL = 65536; - public const int ECS_TYPE_HOOKS = 255; + public const uint ECS_TYPE_HOOK_MOVE_DTOR = 128; - public const int ECS_TYPE_HOOKS_ILLEGAL = 65280; + public const uint ECS_TYPE_HOOK_MOVE_DTOR_ILLEGAL = 262144; + + public const uint ECS_TYPE_HOOK_MOVE_ILLEGAL = 16384; + + public const uint ECS_TYPE_HOOKS = 1023; + + public const uint ECS_TYPE_HOOKS_ILLEGAL = 2094080; public const int ECS_UNSUPPORTED = 6; @@ -5039,6 +5090,8 @@ public partial struct ecs_member_t_32 public const ulong EcsDesc = 576460752303423488; + public const uint EcsEntityHasDontFragment = 268435456; + public const uint EcsEntityIsId = 2147483648; public const uint EcsEntityIsTarget = 1073741824; @@ -5055,7 +5108,9 @@ public partial struct ecs_member_t_32 public const uint EcsIdCanToggle = 8192; - public const uint EcsIdEventMask = 31916032; + public const uint EcsIdDontFragment = 16777216; + + public const uint EcsIdEventMask = 283574272; public const uint EcsIdExclusive = 512; @@ -5075,25 +5130,25 @@ public partial struct ecs_member_t_32 public const uint EcsIdIsTransitive = 16384; - public const uint EcsIdIsUnion = 16777216; - public const uint EcsIdMarkedForDelete = 1073741824; + public const uint EcsIdMatchDontFragment = 33554432; + public const uint EcsIdOnDeleteDelete = 2; public const uint EcsIdOnDeleteMask = 7; - public const uint EcsIdOnDeleteObjectDelete = 16; + public const uint EcsIdOnDeletePanic = 4; - public const uint EcsIdOnDeleteObjectMask = 56; + public const uint EcsIdOnDeleteRemove = 1; - public const uint EcsIdOnDeleteObjectPanic = 32; + public const uint EcsIdOnDeleteTargetDelete = 16; - public const uint EcsIdOnDeleteObjectRemove = 8; + public const uint EcsIdOnDeleteTargetMask = 56; - public const uint EcsIdOnDeletePanic = 4; + public const uint EcsIdOnDeleteTargetPanic = 32; - public const uint EcsIdOnDeleteRemove = 1; + public const uint EcsIdOnDeleteTargetRemove = 8; public const uint EcsIdOnInstantiateDontInherit = 256; @@ -5103,6 +5158,8 @@ public partial struct ecs_member_t_32 public const uint EcsIdOnInstantiateOverride = 64; + public const uint EcsIdOrderedChildren = 268435456; + public const uint EcsIdTag = 2048; public const uint EcsIdTraversable = 1024; @@ -5115,7 +5172,7 @@ public partial struct ecs_member_t_32 public const ulong EcsIsVariable = 288230376151711744; - public const uint EcsIterCacheSearch = 32768; + public const uint EcsIterCached = 32768; public const uint EcsIterCppEach = 524288; @@ -5129,9 +5186,11 @@ public partial struct ecs_member_t_32 public const uint EcsIterIsValid = 1; + public const uint EcsIterMatchEmptyTables = 8; + public const uint EcsIterNoData = 2; - public const uint EcsIterNoResults = 8; + public const uint EcsIterNoResults = 4; public const uint EcsIterProfile = 128; @@ -5141,23 +5200,37 @@ public partial struct ecs_member_t_32 public const uint EcsIterTrivialCached = 16384; + public const uint EcsIterTrivialChangeDetection = 32; + public const uint EcsIterTrivialSearch = 256; public const uint EcsIterTrivialTest = 2048; - public const uint EcsObserverBypassQuery = 32; + public const uint EcsNonTrivialIdInherit = 4; + + public const uint EcsNonTrivialIdNonFragmenting = 2; + + public const uint EcsNonTrivialIdSparse = 1; + + public const uint EcsObserverBypassQuery = 128; + + public const uint EcsObserverIsDisabled = 32; + + public const uint EcsObserverIsMonitor = 16; + + public const uint EcsObserverIsMulti = 8; - public const uint EcsObserverIsDisabled = 8; + public const uint EcsObserverIsParentDisabled = 64; - public const uint EcsObserverIsMonitor = 4; + public const uint EcsObserverKeepAlive = 2048; - public const uint EcsObserverIsMulti = 2; + public const uint EcsObserverMatchDisabled = 4; - public const uint EcsObserverIsParentDisabled = 16; + public const uint EcsObserverMatchPrefab = 2; - public const uint EcsObserverYieldOnCreate = 64; + public const uint EcsObserverYieldOnCreate = 256; - public const uint EcsObserverYieldOnDelete = 128; + public const uint EcsObserverYieldOnDelete = 512; public const uint EcsOsApiHighResolutionTimer = 1; @@ -5171,11 +5244,13 @@ public partial struct ecs_member_t_32 public const uint EcsQueryCacheYieldEmptyTables = 134217728; + public const uint EcsQueryDetectChanges = 256; + public const uint EcsQueryHasCacheable = 16777216; - public const uint EcsQueryHasCondSet = 65536; + public const uint EcsQueryHasChangeDetection = 4194304; - public const uint EcsQueryHasMonitor = 4194304; + public const uint EcsQueryHasCondSet = 65536; public const uint EcsQueryHasNonThisOutTerms = 2097152; @@ -5209,15 +5284,19 @@ public partial struct ecs_member_t_32 public const uint EcsQueryMatchWildcards = 16384; - public const uint EcsQueryNested = 268435456; + public const uint EcsQueryNested = 536870912; public const uint EcsQueryTableOnly = 128; + public const uint EcsQueryTrivialCache = 268435456; + public const ulong EcsSelf = 9223372036854775808; - public const uint EcsTableAddEdgeFlags = 25231360; + public const uint EcsTableAddEdgeFlags = 8454144; - public const uint EcsTableEdgeFlags = 25362432; + public const uint EcsTableEdgeFlags = 8585216; + + public const uint EcsTableEdgeReparent = 536870912; public const uint EcsTableHasAddActions = 328712; @@ -5229,6 +5308,8 @@ public partial struct ecs_member_t_32 public const uint EcsTableHasCtors = 1024; + public const uint EcsTableHasDontFragment = 16777216; + public const uint EcsTableHasDtors = 2048; public const uint EcsTableHasIsA = 8; @@ -5255,6 +5336,8 @@ public partial struct ecs_member_t_32 public const uint EcsTableHasOnTableFill = 524288; + public const uint EcsTableHasOrderedChildren = 268435456; + public const uint EcsTableHasOverrides = 32768; public const uint EcsTableHasPairs = 64; @@ -5265,9 +5348,7 @@ public partial struct ecs_member_t_32 public const uint EcsTableHasToggle = 16384; - public const uint EcsTableHasTraversable = 67108864; - - public const uint EcsTableHasUnion = 16777216; + public const uint EcsTableHasTraversable = 134217728; public const uint EcsTableIsComplex = 8408064; @@ -5279,7 +5360,11 @@ public partial struct ecs_member_t_32 public const uint EcsTableNotQueryable = 512; - public const uint EcsTableRemoveEdgeFlags = 25296896; + public const uint EcsTableOverrideDontFragment = 33554432; + + public const uint EcsTableRemoveEdgeFlags = 276955136; + + public const uint EcsTermDontFragment = 16384; public const uint EcsTermIdInherited = 16; @@ -5287,7 +5372,7 @@ public partial struct ecs_member_t_32 public const uint EcsTermIsMember = 512; - public const uint EcsTermIsOr = 16384; + public const uint EcsTermIsOr = 8192; public const uint EcsTermIsScope = 256; @@ -5297,8 +5382,6 @@ public partial struct ecs_member_t_32 public const uint EcsTermIsTrivial = 32; - public const uint EcsTermIsUnion = 8192; - public const uint EcsTermKeepAlive = 2048; public const uint EcsTermMatchAny = 1; @@ -5337,7 +5420,7 @@ public partial struct ecs_member_t_32 public const int FLECS_DAG_DEPTH_MAX = 128; - public const int FLECS_ENTITY_PAGE_BITS = 12; + public const int FLECS_ENTITY_PAGE_BITS = 10; public const int FLECS_EVENT_DESC_MAX = 8; @@ -5347,18 +5430,6 @@ public partial struct ecs_member_t_32 public const int FLECS_ID_DESC_MAX = 32; - public const int flecs_iter_cache_all = 255; - - public const uint flecs_iter_cache_ids = 1; - - public const uint flecs_iter_cache_ptrs = 8; - - public const uint flecs_iter_cache_sources = 4; - - public const uint flecs_iter_cache_trs = 2; - - public const uint flecs_iter_cache_variables = 16; - public const int FLECS_QUERY_SCOPE_NESTING_MAX = 8; public const int FLECS_QUERY_VARIABLE_COUNT_MAX = 64; @@ -5369,19 +5440,23 @@ public partial struct ecs_member_t_32 public const int FLECS_SPARSE_PAGE_SIZE = 64; + public const int FLECS_STACK_PAGE_OFFSET = 32; + + public const int FLECS_STACK_PAGE_SIZE = 992; + public const int FLECS_TERM_ARG_COUNT_MAX = 16; public const int FLECS_TERM_COUNT_MAX = 32; public const int FLECS_VARIABLE_COUNT_MAX = 64; - public const string FLECS_VERSION = "4.0.4"; + public const string FLECS_VERSION = "4.1.0"; public const int FLECS_VERSION_MAJOR = 4; - public const int FLECS_VERSION_MINOR = 0; + public const int FLECS_VERSION_MINOR = 1; - public const int FLECS_VERSION_PATCH = 4; + public const int FLECS_VERSION_PATCH = 0; [DllImport(BindgenInternal.DllImportPath, EntryPoint = "ECS_AUTO_OVERRIDE_BindgenGetExtern")] private static extern void* ECS_AUTO_OVERRIDE_BindgenGetExtern(); @@ -5590,6 +5665,9 @@ public partial struct ecs_member_t_32 [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsDocUuid_BindgenGetExtern")] private static extern void* EcsDocUuid_BindgenGetExtern(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsDontFragment_BindgenGetExtern")] + private static extern void* EcsDontFragment_BindgenGetExtern(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsDontInherit_BindgenGetExtern")] private static extern void* EcsDontInherit_BindgenGetExtern(); @@ -5863,6 +5941,9 @@ public partial struct ecs_member_t_32 [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsOnValidate_BindgenGetExtern")] private static extern void* EcsOnValidate_BindgenGetExtern(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsOrderedChildren_BindgenGetExtern")] + private static extern void* EcsOrderedChildren_BindgenGetExtern(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsOverride_BindgenGetExtern")] private static extern void* EcsOverride_BindgenGetExtern(); @@ -6025,9 +6106,6 @@ public partial struct ecs_member_t_32 [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsTraversable_BindgenGetExtern")] private static extern void* EcsTraversable_BindgenGetExtern(); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsUnion_BindgenGetExtern")] - private static extern void* EcsUnion_BindgenGetExtern(); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsUnitPrefixes_BindgenGetExtern")] private static extern void* EcsUnitPrefixes_BindgenGetExtern(); @@ -6235,6 +6313,9 @@ public partial struct ecs_member_t_32 [DllImport(BindgenInternal.DllImportPath, EntryPoint = "FLECS_IDEcsScriptMethodID__BindgenGetExtern")] private static extern void* FLECS_IDEcsScriptMethodID__BindgenGetExtern(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "FLECS_IDEcsScriptRngID__BindgenGetExtern")] + private static extern void* FLECS_IDEcsScriptRngID__BindgenGetExtern(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "FLECS_IDEcsScriptTemplateID__BindgenGetExtern")] private static extern void* FLECS_IDEcsScriptTemplateID__BindgenGetExtern(); @@ -6418,6 +6499,8 @@ public partial struct ecs_member_t_32 private static void* EcsDocUuid_Ptr; + private static void* EcsDontFragment_Ptr; + private static void* EcsDontInherit_Ptr; private static void* EcsDuration_Ptr; @@ -6600,6 +6683,8 @@ public partial struct ecs_member_t_32 private static void* EcsOnValidate_Ptr; + private static void* EcsOrderedChildren_Ptr; + private static void* EcsOverride_Ptr; private static void* EcsPairIsTag_Ptr; @@ -6708,8 +6793,6 @@ public partial struct ecs_member_t_32 private static void* EcsTraversable_Ptr; - private static void* EcsUnion_Ptr; - private static void* EcsUnitPrefixes_Ptr; private static void* EcsUri_Ptr; @@ -6848,6 +6931,8 @@ public partial struct ecs_member_t_32 private static void* FLECS_IDEcsScriptMethodID__Ptr; + private static void* FLECS_IDEcsScriptRngID__Ptr; + private static void* FLECS_IDEcsScriptTemplateID__Ptr; private static void* FLECS_IDEcsStructID__Ptr; @@ -7016,6 +7101,8 @@ public partial struct ecs_member_t_32 public static ref ulong EcsDocUuid => ref *(ulong*)(EcsDocUuid_Ptr == null ? EcsDocUuid_Ptr = EcsDocUuid_BindgenGetExtern() : EcsDocUuid_Ptr); + public static ref ulong EcsDontFragment => ref *(ulong*)(EcsDontFragment_Ptr == null ? EcsDontFragment_Ptr = EcsDontFragment_BindgenGetExtern() : EcsDontFragment_Ptr); + public static ref ulong EcsDontInherit => ref *(ulong*)(EcsDontInherit_Ptr == null ? EcsDontInherit_Ptr = EcsDontInherit_BindgenGetExtern() : EcsDontInherit_Ptr); public static ref ulong EcsDuration => ref *(ulong*)(EcsDuration_Ptr == null ? EcsDuration_Ptr = EcsDuration_BindgenGetExtern() : EcsDuration_Ptr); @@ -7198,6 +7285,8 @@ public partial struct ecs_member_t_32 public static ref ulong EcsOnValidate => ref *(ulong*)(EcsOnValidate_Ptr == null ? EcsOnValidate_Ptr = EcsOnValidate_BindgenGetExtern() : EcsOnValidate_Ptr); + public static ref ulong EcsOrderedChildren => ref *(ulong*)(EcsOrderedChildren_Ptr == null ? EcsOrderedChildren_Ptr = EcsOrderedChildren_BindgenGetExtern() : EcsOrderedChildren_Ptr); + public static ref ulong EcsOverride => ref *(ulong*)(EcsOverride_Ptr == null ? EcsOverride_Ptr = EcsOverride_BindgenGetExtern() : EcsOverride_Ptr); public static ref ulong EcsPairIsTag => ref *(ulong*)(EcsPairIsTag_Ptr == null ? EcsPairIsTag_Ptr = EcsPairIsTag_BindgenGetExtern() : EcsPairIsTag_Ptr); @@ -7306,8 +7395,6 @@ public partial struct ecs_member_t_32 public static ref ulong EcsTraversable => ref *(ulong*)(EcsTraversable_Ptr == null ? EcsTraversable_Ptr = EcsTraversable_BindgenGetExtern() : EcsTraversable_Ptr); - public static ref ulong EcsUnion => ref *(ulong*)(EcsUnion_Ptr == null ? EcsUnion_Ptr = EcsUnion_BindgenGetExtern() : EcsUnion_Ptr); - public static ref ulong EcsUnitPrefixes => ref *(ulong*)(EcsUnitPrefixes_Ptr == null ? EcsUnitPrefixes_Ptr = EcsUnitPrefixes_BindgenGetExtern() : EcsUnitPrefixes_Ptr); public static ref ulong EcsUri => ref *(ulong*)(EcsUri_Ptr == null ? EcsUri_Ptr = EcsUri_BindgenGetExtern() : EcsUri_Ptr); @@ -7446,6 +7533,8 @@ public partial struct ecs_member_t_32 public static ref ulong FLECS_IDEcsScriptMethodID_ => ref *(ulong*)(FLECS_IDEcsScriptMethodID__Ptr == null ? FLECS_IDEcsScriptMethodID__Ptr = FLECS_IDEcsScriptMethodID__BindgenGetExtern() : FLECS_IDEcsScriptMethodID__Ptr); + public static ref ulong FLECS_IDEcsScriptRngID_ => ref *(ulong*)(FLECS_IDEcsScriptRngID__Ptr == null ? FLECS_IDEcsScriptRngID__Ptr = FLECS_IDEcsScriptRngID__BindgenGetExtern() : FLECS_IDEcsScriptRngID__Ptr); + public static ref ulong FLECS_IDEcsScriptTemplateID_ => ref *(ulong*)(FLECS_IDEcsScriptTemplateID__Ptr == null ? FLECS_IDEcsScriptTemplateID__Ptr = FLECS_IDEcsScriptTemplateID__BindgenGetExtern() : FLECS_IDEcsScriptTemplateID__Ptr); public static ref ulong FLECS_IDEcsStructID_ => ref *(ulong*)(FLECS_IDEcsStructID__Ptr == null ? FLECS_IDEcsStructID__Ptr = FLECS_IDEcsStructID__BindgenGetExtern() : FLECS_IDEcsStructID__Ptr); @@ -7980,178 +8069,70 @@ public override int GetHashCode() } } - public partial struct ecs_switch_node_t : IEquatable + public partial struct ecs_strbuf_list_elem : IEquatable { - public bool Equals(ecs_switch_node_t other) + public bool Equals(ecs_strbuf_list_elem other) { - fixed (ecs_switch_node_t* __self = &this) + fixed (ecs_strbuf_list_elem* __self = &this) { - return new Span(__self, sizeof(ecs_switch_node_t)).SequenceEqual(new Span(&other, sizeof(ecs_switch_node_t))); + return new Span(__self, sizeof(ecs_strbuf_list_elem)).SequenceEqual(new Span(&other, sizeof(ecs_strbuf_list_elem))); } } public override bool Equals(object? obj) { - return obj is ecs_switch_node_t other && Equals(other); + return obj is ecs_strbuf_list_elem other && Equals(other); } - public static bool operator ==(ecs_switch_node_t left, ecs_switch_node_t right) + public static bool operator ==(ecs_strbuf_list_elem left, ecs_strbuf_list_elem right) { return left.Equals(right); } - public static bool operator !=(ecs_switch_node_t left, ecs_switch_node_t right) + public static bool operator !=(ecs_strbuf_list_elem left, ecs_strbuf_list_elem right) { return !(left == right); } public override int GetHashCode() { - fixed (ecs_switch_node_t* __self = &this) + fixed (ecs_strbuf_list_elem* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_switch_node_t))); + hash.AddBytes(new Span(__self, sizeof(ecs_strbuf_list_elem))); return hash.ToHashCode(); } } } - public partial struct ecs_switch_page_t : IEquatable + public partial struct ecs_strbuf_t : IEquatable { - public bool Equals(ecs_switch_page_t other) + public bool Equals(ecs_strbuf_t other) { - fixed (ecs_switch_page_t* __self = &this) + fixed (ecs_strbuf_t* __self = &this) { - return new Span(__self, sizeof(ecs_switch_page_t)).SequenceEqual(new Span(&other, sizeof(ecs_switch_page_t))); + return new Span(__self, sizeof(ecs_strbuf_t)).SequenceEqual(new Span(&other, sizeof(ecs_strbuf_t))); } } public override bool Equals(object? obj) { - return obj is ecs_switch_page_t other && Equals(other); + return obj is ecs_strbuf_t other && Equals(other); } - public static bool operator ==(ecs_switch_page_t left, ecs_switch_page_t right) + public static bool operator ==(ecs_strbuf_t left, ecs_strbuf_t right) { return left.Equals(right); } - public static bool operator !=(ecs_switch_page_t left, ecs_switch_page_t right) + public static bool operator !=(ecs_strbuf_t left, ecs_strbuf_t right) { return !(left == right); } public override int GetHashCode() { - fixed (ecs_switch_page_t* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_switch_page_t))); - return hash.ToHashCode(); - } - } - } - - public partial struct ecs_switch_t : IEquatable - { - public bool Equals(ecs_switch_t other) - { - fixed (ecs_switch_t* __self = &this) - { - return new Span(__self, sizeof(ecs_switch_t)).SequenceEqual(new Span(&other, sizeof(ecs_switch_t))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_switch_t other && Equals(other); - } - - public static bool operator ==(ecs_switch_t left, ecs_switch_t right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_switch_t left, ecs_switch_t right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_switch_t* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_switch_t))); - return hash.ToHashCode(); - } - } - } - - public partial struct ecs_strbuf_list_elem : IEquatable - { - public bool Equals(ecs_strbuf_list_elem other) - { - fixed (ecs_strbuf_list_elem* __self = &this) - { - return new Span(__self, sizeof(ecs_strbuf_list_elem)).SequenceEqual(new Span(&other, sizeof(ecs_strbuf_list_elem))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_strbuf_list_elem other && Equals(other); - } - - public static bool operator ==(ecs_strbuf_list_elem left, ecs_strbuf_list_elem right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_strbuf_list_elem left, ecs_strbuf_list_elem right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_strbuf_list_elem* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_strbuf_list_elem))); - return hash.ToHashCode(); - } - } - } - - public partial struct ecs_strbuf_t : IEquatable - { - public bool Equals(ecs_strbuf_t other) - { - fixed (ecs_strbuf_t* __self = &this) - { - return new Span(__self, sizeof(ecs_strbuf_t)).SequenceEqual(new Span(&other, sizeof(ecs_strbuf_t))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_strbuf_t other && Equals(other); - } - - public static bool operator ==(ecs_strbuf_t left, ecs_strbuf_t right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_strbuf_t left, ecs_strbuf_t right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_strbuf_t* __self = &this) + fixed (ecs_strbuf_t* __self = &this) { HashCode hash = new(); hash.AddBytes(new Span(__self, sizeof(ecs_strbuf_t))); @@ -8700,37 +8681,37 @@ public override int GetHashCode() } } - public partial struct ecs_id_record_t : IEquatable + public partial struct ecs_component_record_t : IEquatable { - public bool Equals(ecs_id_record_t other) + public bool Equals(ecs_component_record_t other) { - fixed (ecs_id_record_t* __self = &this) + fixed (ecs_component_record_t* __self = &this) { - return new Span(__self, sizeof(ecs_id_record_t)).SequenceEqual(new Span(&other, sizeof(ecs_id_record_t))); + return new Span(__self, sizeof(ecs_component_record_t)).SequenceEqual(new Span(&other, sizeof(ecs_component_record_t))); } } public override bool Equals(object? obj) { - return obj is ecs_id_record_t other && Equals(other); + return obj is ecs_component_record_t other && Equals(other); } - public static bool operator ==(ecs_id_record_t left, ecs_id_record_t right) + public static bool operator ==(ecs_component_record_t left, ecs_component_record_t right) { return left.Equals(right); } - public static bool operator !=(ecs_id_record_t left, ecs_id_record_t right) + public static bool operator !=(ecs_component_record_t left, ecs_component_record_t right) { return !(left == right); } public override int GetHashCode() { - fixed (ecs_id_record_t* __self = &this) + fixed (ecs_component_record_t* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_id_record_t))); + hash.AddBytes(new Span(__self, sizeof(ecs_component_record_t))); return hash.ToHashCode(); } } @@ -8808,78 +8789,6 @@ public override int GetHashCode() } } - public partial struct ecs_table_cache_hdr_t : IEquatable - { - public bool Equals(ecs_table_cache_hdr_t other) - { - fixed (ecs_table_cache_hdr_t* __self = &this) - { - return new Span(__self, sizeof(ecs_table_cache_hdr_t)).SequenceEqual(new Span(&other, sizeof(ecs_table_cache_hdr_t))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_table_cache_hdr_t other && Equals(other); - } - - public static bool operator ==(ecs_table_cache_hdr_t left, ecs_table_cache_hdr_t right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_table_cache_hdr_t left, ecs_table_cache_hdr_t right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_table_cache_hdr_t* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_table_cache_hdr_t))); - return hash.ToHashCode(); - } - } - } - - public partial struct ecs_table_cache_t : IEquatable - { - public bool Equals(ecs_table_cache_t other) - { - fixed (ecs_table_cache_t* __self = &this) - { - return new Span(__self, sizeof(ecs_table_cache_t)).SequenceEqual(new Span(&other, sizeof(ecs_table_cache_t))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_table_cache_t other && Equals(other); - } - - public static bool operator ==(ecs_table_cache_t left, ecs_table_cache_t right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_table_cache_t left, ecs_table_cache_t right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_table_cache_t* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_table_cache_t))); - return hash.ToHashCode(); - } - } - } - public partial struct ecs_table_record_t : IEquatable { public bool Equals(ecs_table_record_t other) @@ -8988,37 +8897,73 @@ public override int GetHashCode() } } - public partial struct ecs_query_cache_table_match_t : IEquatable + public partial struct ecs_query_cache_match_t : IEquatable + { + public bool Equals(ecs_query_cache_match_t other) + { + fixed (ecs_query_cache_match_t* __self = &this) + { + return new Span(__self, sizeof(ecs_query_cache_match_t)).SequenceEqual(new Span(&other, sizeof(ecs_query_cache_match_t))); + } + } + + public override bool Equals(object? obj) + { + return obj is ecs_query_cache_match_t other && Equals(other); + } + + public static bool operator ==(ecs_query_cache_match_t left, ecs_query_cache_match_t right) + { + return left.Equals(right); + } + + public static bool operator !=(ecs_query_cache_match_t left, ecs_query_cache_match_t right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ecs_query_cache_match_t* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ecs_query_cache_match_t))); + return hash.ToHashCode(); + } + } + } + + public partial struct ecs_query_cache_group_t : IEquatable { - public bool Equals(ecs_query_cache_table_match_t other) + public bool Equals(ecs_query_cache_group_t other) { - fixed (ecs_query_cache_table_match_t* __self = &this) + fixed (ecs_query_cache_group_t* __self = &this) { - return new Span(__self, sizeof(ecs_query_cache_table_match_t)).SequenceEqual(new Span(&other, sizeof(ecs_query_cache_table_match_t))); + return new Span(__self, sizeof(ecs_query_cache_group_t)).SequenceEqual(new Span(&other, sizeof(ecs_query_cache_group_t))); } } public override bool Equals(object? obj) { - return obj is ecs_query_cache_table_match_t other && Equals(other); + return obj is ecs_query_cache_group_t other && Equals(other); } - public static bool operator ==(ecs_query_cache_table_match_t left, ecs_query_cache_table_match_t right) + public static bool operator ==(ecs_query_cache_group_t left, ecs_query_cache_group_t right) { return left.Equals(right); } - public static bool operator !=(ecs_query_cache_table_match_t left, ecs_query_cache_table_match_t right) + public static bool operator !=(ecs_query_cache_group_t left, ecs_query_cache_group_t right) { return !(left == right); } public override int GetHashCode() { - fixed (ecs_query_cache_table_match_t* __self = &this) + fixed (ecs_query_cache_group_t* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_query_cache_table_match_t))); + hash.AddBytes(new Span(__self, sizeof(ecs_query_cache_group_t))); return hash.ToHashCode(); } } @@ -9276,6 +9221,42 @@ public override int GetHashCode() } } + public partial struct ecs_table_cache_hdr_t : IEquatable + { + public bool Equals(ecs_table_cache_hdr_t other) + { + fixed (ecs_table_cache_hdr_t* __self = &this) + { + return new Span(__self, sizeof(ecs_table_cache_hdr_t)).SequenceEqual(new Span(&other, sizeof(ecs_table_cache_hdr_t))); + } + } + + public override bool Equals(object? obj) + { + return obj is ecs_table_cache_hdr_t other && Equals(other); + } + + public static bool operator ==(ecs_table_cache_hdr_t left, ecs_table_cache_hdr_t right) + { + return left.Equals(right); + } + + public static bool operator !=(ecs_table_cache_hdr_t left, ecs_table_cache_hdr_t right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ecs_table_cache_hdr_t* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ecs_table_cache_hdr_t))); + return hash.ToHashCode(); + } + } + } + public partial struct ecs_each_iter_t : IEquatable { public bool Equals(ecs_each_iter_t other) @@ -9492,42 +9473,6 @@ public override int GetHashCode() } } - public partial struct ecs_iter_cache_t : IEquatable - { - public bool Equals(ecs_iter_cache_t other) - { - fixed (ecs_iter_cache_t* __self = &this) - { - return new Span(__self, sizeof(ecs_iter_cache_t)).SequenceEqual(new Span(&other, sizeof(ecs_iter_cache_t))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_iter_cache_t other && Equals(other); - } - - public static bool operator ==(ecs_iter_cache_t left, ecs_iter_cache_t right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_iter_cache_t left, ecs_iter_cache_t right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_iter_cache_t* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_iter_cache_t))); - return hash.ToHashCode(); - } - } - } - public partial struct ecs_iter_private_t : IEquatable { public bool Equals(ecs_iter_private_t other) @@ -9566,37 +9511,37 @@ public override int GetHashCode() public partial struct ecs_iter_private_t { - public partial struct AnonymousRecord_api_types_L153_C5 : IEquatable + public partial struct AnonymousRecord_api_types_L143_C5 : IEquatable { - public bool Equals(AnonymousRecord_api_types_L153_C5 other) + public bool Equals(AnonymousRecord_api_types_L143_C5 other) { - fixed (AnonymousRecord_api_types_L153_C5* __self = &this) + fixed (AnonymousRecord_api_types_L143_C5* __self = &this) { - return new Span(__self, sizeof(AnonymousRecord_api_types_L153_C5)).SequenceEqual(new Span(&other, sizeof(AnonymousRecord_api_types_L153_C5))); + return new Span(__self, sizeof(AnonymousRecord_api_types_L143_C5)).SequenceEqual(new Span(&other, sizeof(AnonymousRecord_api_types_L143_C5))); } } public override bool Equals(object? obj) { - return obj is AnonymousRecord_api_types_L153_C5 other && Equals(other); + return obj is AnonymousRecord_api_types_L143_C5 other && Equals(other); } - public static bool operator ==(AnonymousRecord_api_types_L153_C5 left, AnonymousRecord_api_types_L153_C5 right) + public static bool operator ==(AnonymousRecord_api_types_L143_C5 left, AnonymousRecord_api_types_L143_C5 right) { return left.Equals(right); } - public static bool operator !=(AnonymousRecord_api_types_L153_C5 left, AnonymousRecord_api_types_L153_C5 right) + public static bool operator !=(AnonymousRecord_api_types_L143_C5 left, AnonymousRecord_api_types_L143_C5 right) { return !(left == right); } public override int GetHashCode() { - fixed (AnonymousRecord_api_types_L153_C5* __self = &this) + fixed (AnonymousRecord_api_types_L143_C5* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(AnonymousRecord_api_types_L153_C5))); + hash.AddBytes(new Span(__self, sizeof(AnonymousRecord_api_types_L143_C5))); return hash.ToHashCode(); } } @@ -9819,6 +9764,114 @@ public override int GetHashCode() } } + public partial struct ecs_table_cache_t : IEquatable + { + public bool Equals(ecs_table_cache_t other) + { + fixed (ecs_table_cache_t* __self = &this) + { + return new Span(__self, sizeof(ecs_table_cache_t)).SequenceEqual(new Span(&other, sizeof(ecs_table_cache_t))); + } + } + + public override bool Equals(object? obj) + { + return obj is ecs_table_cache_t other && Equals(other); + } + + public static bool operator ==(ecs_table_cache_t left, ecs_table_cache_t right) + { + return left.Equals(right); + } + + public static bool operator !=(ecs_table_cache_t left, ecs_table_cache_t right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ecs_table_cache_t* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ecs_table_cache_t))); + return hash.ToHashCode(); + } + } + } + + public partial struct ecs_table_diff_t : IEquatable + { + public bool Equals(ecs_table_diff_t other) + { + fixed (ecs_table_diff_t* __self = &this) + { + return new Span(__self, sizeof(ecs_table_diff_t)).SequenceEqual(new Span(&other, sizeof(ecs_table_diff_t))); + } + } + + public override bool Equals(object? obj) + { + return obj is ecs_table_diff_t other && Equals(other); + } + + public static bool operator ==(ecs_table_diff_t left, ecs_table_diff_t right) + { + return left.Equals(right); + } + + public static bool operator !=(ecs_table_diff_t left, ecs_table_diff_t right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ecs_table_diff_t* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ecs_table_diff_t))); + return hash.ToHashCode(); + } + } + } + + public partial struct ecs_table_records_t : IEquatable + { + public bool Equals(ecs_table_records_t other) + { + fixed (ecs_table_records_t* __self = &this) + { + return new Span(__self, sizeof(ecs_table_records_t)).SequenceEqual(new Span(&other, sizeof(ecs_table_records_t))); + } + } + + public override bool Equals(object? obj) + { + return obj is ecs_table_records_t other && Equals(other); + } + + public static bool operator ==(ecs_table_records_t left, ecs_table_records_t right) + { + return left.Equals(right); + } + + public static bool operator !=(ecs_table_records_t left, ecs_table_records_t right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ecs_table_records_t* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ecs_table_records_t))); + return hash.ToHashCode(); + } + } + } + public partial struct ecs_value_t : IEquatable { public bool Equals(ecs_value_t other) @@ -10145,37 +10198,37 @@ public override int GetHashCode() public partial struct ecs_world_info_t { - public partial struct AnonymousRecord_flecs_L1468_C5 : IEquatable + public partial struct AnonymousRecord_flecs_L1484_C5 : IEquatable { - public bool Equals(AnonymousRecord_flecs_L1468_C5 other) + public bool Equals(AnonymousRecord_flecs_L1484_C5 other) { - fixed (AnonymousRecord_flecs_L1468_C5* __self = &this) + fixed (AnonymousRecord_flecs_L1484_C5* __self = &this) { - return new Span(__self, sizeof(AnonymousRecord_flecs_L1468_C5)).SequenceEqual(new Span(&other, sizeof(AnonymousRecord_flecs_L1468_C5))); + return new Span(__self, sizeof(AnonymousRecord_flecs_L1484_C5)).SequenceEqual(new Span(&other, sizeof(AnonymousRecord_flecs_L1484_C5))); } } public override bool Equals(object? obj) { - return obj is AnonymousRecord_flecs_L1468_C5 other && Equals(other); + return obj is AnonymousRecord_flecs_L1484_C5 other && Equals(other); } - public static bool operator ==(AnonymousRecord_flecs_L1468_C5 left, AnonymousRecord_flecs_L1468_C5 right) + public static bool operator ==(AnonymousRecord_flecs_L1484_C5 left, AnonymousRecord_flecs_L1484_C5 right) { return left.Equals(right); } - public static bool operator !=(AnonymousRecord_flecs_L1468_C5 left, AnonymousRecord_flecs_L1468_C5 right) + public static bool operator !=(AnonymousRecord_flecs_L1484_C5 left, AnonymousRecord_flecs_L1484_C5 right) { return !(left == right); } public override int GetHashCode() { - fixed (AnonymousRecord_flecs_L1468_C5* __self = &this) + fixed (AnonymousRecord_flecs_L1484_C5* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(AnonymousRecord_flecs_L1468_C5))); + hash.AddBytes(new Span(__self, sizeof(AnonymousRecord_flecs_L1484_C5))); return hash.ToHashCode(); } } @@ -12189,6 +12242,42 @@ public override int GetHashCode() } } + public partial struct EcsScriptRng : IEquatable + { + public bool Equals(EcsScriptRng other) + { + fixed (EcsScriptRng* __self = &this) + { + return new Span(__self, sizeof(EcsScriptRng)).SequenceEqual(new Span(&other, sizeof(EcsScriptRng))); + } + } + + public override bool Equals(object? obj) + { + return obj is EcsScriptRng other && Equals(other); + } + + public static bool operator ==(EcsScriptRng left, EcsScriptRng right) + { + return left.Equals(right); + } + + public static bool operator !=(EcsScriptRng left, EcsScriptRng right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (EcsScriptRng* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(EcsScriptRng))); + return hash.ToHashCode(); + } + } + } + public partial struct ecs_script_template_t : IEquatable { public bool Equals(ecs_script_template_t other) @@ -14033,76 +14122,37 @@ public override int GetHashCode() public partial struct InlineArrays { - public partial struct ecs_term_t_32 : IEquatable - { - public bool Equals(ecs_term_t_32 other) - { - fixed (ecs_term_t_32* __self = &this) - { - return new Span(__self, sizeof(ecs_term_t_32)).SequenceEqual(new Span(&other, sizeof(ecs_term_t_32))); - } - } - - public override bool Equals(object? obj) - { - return obj is ecs_term_t_32 other && Equals(other); - } - - public static bool operator ==(ecs_term_t_32 left, ecs_term_t_32 right) - { - return left.Equals(right); - } - - public static bool operator !=(ecs_term_t_32 left, ecs_term_t_32 right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (ecs_term_t_32* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_term_t_32))); - return hash.ToHashCode(); - } - } - } - } - - public partial struct InlineArrays - { - public partial struct int_32 : IEquatable + public partial struct ulong_8 : IEquatable { - public bool Equals(int_32 other) + public bool Equals(ulong_8 other) { - fixed (int_32* __self = &this) + fixed (ulong_8* __self = &this) { - return new Span(__self, sizeof(int_32)).SequenceEqual(new Span(&other, sizeof(int_32))); + return new Span(__self, sizeof(ulong_8)).SequenceEqual(new Span(&other, sizeof(ulong_8))); } } public override bool Equals(object? obj) { - return obj is int_32 other && Equals(other); + return obj is ulong_8 other && Equals(other); } - public static bool operator ==(int_32 left, int_32 right) + public static bool operator ==(ulong_8 left, ulong_8 right) { return left.Equals(right); } - public static bool operator !=(int_32 left, int_32 right) + public static bool operator !=(ulong_8 left, ulong_8 right) { return !(left == right); } public override int GetHashCode() { - fixed (int_32* __self = &this) + fixed (ulong_8* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(int_32))); + hash.AddBytes(new Span(__self, sizeof(ulong_8))); return hash.ToHashCode(); } } @@ -14111,37 +14161,37 @@ public override int GetHashCode() public partial struct InlineArrays { - public partial struct ulong_32 : IEquatable + public partial struct int_2 : IEquatable { - public bool Equals(ulong_32 other) + public bool Equals(int_2 other) { - fixed (ulong_32* __self = &this) + fixed (int_2* __self = &this) { - return new Span(__self, sizeof(ulong_32)).SequenceEqual(new Span(&other, sizeof(ulong_32))); + return new Span(__self, sizeof(int_2)).SequenceEqual(new Span(&other, sizeof(int_2))); } } public override bool Equals(object? obj) { - return obj is ulong_32 other && Equals(other); + return obj is int_2 other && Equals(other); } - public static bool operator ==(ulong_32 left, ulong_32 right) + public static bool operator ==(int_2 left, int_2 right) { return left.Equals(right); } - public static bool operator !=(ulong_32 left, ulong_32 right) + public static bool operator !=(int_2 left, int_2 right) { return !(left == right); } public override int GetHashCode() { - fixed (ulong_32* __self = &this) + fixed (int_2* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ulong_32))); + hash.AddBytes(new Span(__self, sizeof(int_2))); return hash.ToHashCode(); } } @@ -14150,37 +14200,37 @@ public override int GetHashCode() public partial struct InlineArrays { - public partial struct ulong_8 : IEquatable + public partial struct ecs_commands_t_2 : IEquatable { - public bool Equals(ulong_8 other) + public bool Equals(ecs_commands_t_2 other) { - fixed (ulong_8* __self = &this) + fixed (ecs_commands_t_2* __self = &this) { - return new Span(__self, sizeof(ulong_8)).SequenceEqual(new Span(&other, sizeof(ulong_8))); + return new Span(__self, sizeof(ecs_commands_t_2)).SequenceEqual(new Span(&other, sizeof(ecs_commands_t_2))); } } public override bool Equals(object? obj) { - return obj is ulong_8 other && Equals(other); + return obj is ecs_commands_t_2 other && Equals(other); } - public static bool operator ==(ulong_8 left, ulong_8 right) + public static bool operator ==(ecs_commands_t_2 left, ecs_commands_t_2 right) { return left.Equals(right); } - public static bool operator !=(ulong_8 left, ulong_8 right) + public static bool operator !=(ecs_commands_t_2 left, ecs_commands_t_2 right) { return !(left == right); } public override int GetHashCode() { - fixed (ulong_8* __self = &this) + fixed (ecs_commands_t_2* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ulong_8))); + hash.AddBytes(new Span(__self, sizeof(ecs_commands_t_2))); return hash.ToHashCode(); } } @@ -14189,37 +14239,37 @@ public override int GetHashCode() public partial struct InlineArrays { - public partial struct int_2 : IEquatable + public partial struct ulong_32 : IEquatable { - public bool Equals(int_2 other) + public bool Equals(ulong_32 other) { - fixed (int_2* __self = &this) + fixed (ulong_32* __self = &this) { - return new Span(__self, sizeof(int_2)).SequenceEqual(new Span(&other, sizeof(int_2))); + return new Span(__self, sizeof(ulong_32)).SequenceEqual(new Span(&other, sizeof(ulong_32))); } } public override bool Equals(object? obj) { - return obj is int_2 other && Equals(other); + return obj is ulong_32 other && Equals(other); } - public static bool operator ==(int_2 left, int_2 right) + public static bool operator ==(ulong_32 left, ulong_32 right) { return left.Equals(right); } - public static bool operator !=(int_2 left, int_2 right) + public static bool operator !=(ulong_32 left, ulong_32 right) { return !(left == right); } public override int GetHashCode() { - fixed (int_2* __self = &this) + fixed (ulong_32* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(int_2))); + hash.AddBytes(new Span(__self, sizeof(ulong_32))); return hash.ToHashCode(); } } @@ -14228,37 +14278,37 @@ public override int GetHashCode() public partial struct InlineArrays { - public partial struct ecs_commands_t_2 : IEquatable + public partial struct ecs_term_t_32 : IEquatable { - public bool Equals(ecs_commands_t_2 other) + public bool Equals(ecs_term_t_32 other) { - fixed (ecs_commands_t_2* __self = &this) + fixed (ecs_term_t_32* __self = &this) { - return new Span(__self, sizeof(ecs_commands_t_2)).SequenceEqual(new Span(&other, sizeof(ecs_commands_t_2))); + return new Span(__self, sizeof(ecs_term_t_32)).SequenceEqual(new Span(&other, sizeof(ecs_term_t_32))); } } public override bool Equals(object? obj) { - return obj is ecs_commands_t_2 other && Equals(other); + return obj is ecs_term_t_32 other && Equals(other); } - public static bool operator ==(ecs_commands_t_2 left, ecs_commands_t_2 right) + public static bool operator ==(ecs_term_t_32 left, ecs_term_t_32 right) { return left.Equals(right); } - public static bool operator !=(ecs_commands_t_2 left, ecs_commands_t_2 right) + public static bool operator !=(ecs_term_t_32 left, ecs_term_t_32 right) { return !(left == right); } public override int GetHashCode() { - fixed (ecs_commands_t_2* __self = &this) + fixed (ecs_term_t_32* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ecs_commands_t_2))); + hash.AddBytes(new Span(__self, sizeof(ecs_term_t_32))); return hash.ToHashCode(); } } diff --git a/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs b/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs index 16aa6247..4a8f131e 100644 --- a/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +++ b/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs @@ -1,1156 +1,1162 @@ -using Flecs.NET.Codegen.Helpers; - -namespace Flecs.NET.Codegen.Generators; - -public class QueryBuilder : GeneratorBase -{ - public override void Generate() - { - for (int i = 0; i < Generator.GenericCount; i++) - { - AddSource($"QueryBuilder/T{i + 1}.g.cs", GenerateQueryBuilder(i)); - AddSource($"QueryBuilder.QueryBuilder/T{i + 1}.g.cs", GenerateExtensions(Type.QueryBuilder, i)); - } - } - - private static string GenerateQueryBuilder(int i) - { - return $$""" - #nullable enable - - using static Flecs.NET.Bindings.flecs; - - namespace Flecs.NET.Core; - - /// - /// A type-safe wrapper around that takes {{i + 1}} type arguments. - /// - /// {{Generator.XmlTypeParameters[i]}} - public unsafe partial struct {{Generator.GetTypeName(Type.QueryBuilder, i)}} : IQueryBuilder<{{Generator.GetTypeName(Type.QueryBuilder, i)}}, {{Generator.GetTypeName(Type.Query, i)}}> - { - private QueryBuilder _queryBuilder; - - ref QueryBuilder IQueryBuilderBase.QueryBuilder => ref _queryBuilder; - - /// - public ref ecs_world_t* World => ref _queryBuilder.World; - - /// - public ref ecs_query_desc_t Desc => ref _queryBuilder.Desc; - - /// - public QueryBuilder(ecs_world_t* world) - { - {{Generator.GetTypeName(Type.TypeHelper, i)}}.AssertNoTags(); - _queryBuilder = new QueryBuilder(world){{Generator.WithChain[i]}}; - } - - /// - public QueryBuilder(ecs_world_t* world, ulong entity) - { - {{Generator.GetTypeName(Type.TypeHelper, i)}}.AssertNoTags(); - _queryBuilder = new QueryBuilder(world, entity){{Generator.WithChain[i]}}; - } - - /// - public QueryBuilder(ecs_world_t* world, string name) - { - {{Generator.GetTypeName(Type.TypeHelper, i)}}.AssertNoTags(); - _queryBuilder = new QueryBuilder(world, name){{Generator.WithChain[i]}}; - } - - /// - public {{Generator.GetTypeName(Type.Query, i)}} Build() - { - return new {{Generator.GetTypeName(Type.Query, i)}}(_queryBuilder.Build()); - } - - /// - public bool Equals({{Generator.GetTypeName(Type.QueryBuilder, i)}} other) - { - return _queryBuilder == other._queryBuilder; - } - - /// - public override bool Equals(object? obj) - { - return obj is {{Generator.GetTypeName(Type.QueryBuilder, i)}} other && Equals(other); - } - - /// - public override int GetHashCode() - { - return _queryBuilder.GetHashCode(); - } - - /// - public static bool operator ==({{Generator.GetTypeName(Type.QueryBuilder, i)}} left, {{Generator.GetTypeName(Type.QueryBuilder, i)}} right) - { - return left.Equals(right); - } - - /// - public static bool operator !=({{Generator.GetTypeName(Type.QueryBuilder, i)}} left, {{Generator.GetTypeName(Type.QueryBuilder, i)}} right) - { - return !(left == right); - } - } - """; - } - - public static string GenerateExtensions(Type type, int i = -1) - { - return $$""" - using System; - using static Flecs.NET.Bindings.flecs; - - namespace Flecs.NET.Core; - - public unsafe partial struct {{Generator.GetTypeName(type, i)}} - { - /// - public ref {{Generator.GetTypeName(type, i)}} Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref {{Generator.GetTypeName(type, i)}} OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - } - """; - } -} +using Flecs.NET.Codegen.Helpers; + +namespace Flecs.NET.Codegen.Generators; + +public class QueryBuilder : GeneratorBase +{ + public override void Generate() + { + for (int i = 0; i < Generator.GenericCount; i++) + { + AddSource($"QueryBuilder/T{i + 1}.g.cs", GenerateQueryBuilder(i)); + AddSource($"QueryBuilder.QueryBuilder/T{i + 1}.g.cs", GenerateExtensions(Type.QueryBuilder, i)); + } + } + + private static string GenerateQueryBuilder(int i) + { + return $$""" + #nullable enable + + using static Flecs.NET.Bindings.flecs; + + namespace Flecs.NET.Core; + + /// + /// A type-safe wrapper around that takes {{i + 1}} type arguments. + /// + /// {{Generator.XmlTypeParameters[i]}} + public unsafe partial struct {{Generator.GetTypeName(Type.QueryBuilder, i)}} : IQueryBuilder<{{Generator.GetTypeName(Type.QueryBuilder, i)}}, {{Generator.GetTypeName(Type.Query, i)}}> + { + private QueryBuilder _queryBuilder; + + ref QueryBuilder IQueryBuilderBase.QueryBuilder => ref _queryBuilder; + + /// + public ref ecs_world_t* World => ref _queryBuilder.World; + + /// + public ref ecs_query_desc_t Desc => ref _queryBuilder.Desc; + + /// + public QueryBuilder(ecs_world_t* world) + { + {{Generator.GetTypeName(Type.TypeHelper, i)}}.AssertNoTags(); + _queryBuilder = new QueryBuilder(world){{Generator.WithChain[i]}}; + } + + /// + public QueryBuilder(ecs_world_t* world, ulong entity) + { + {{Generator.GetTypeName(Type.TypeHelper, i)}}.AssertNoTags(); + _queryBuilder = new QueryBuilder(world, entity){{Generator.WithChain[i]}}; + } + + /// + public QueryBuilder(ecs_world_t* world, string name) + { + {{Generator.GetTypeName(Type.TypeHelper, i)}}.AssertNoTags(); + _queryBuilder = new QueryBuilder(world, name){{Generator.WithChain[i]}}; + } + + /// + public {{Generator.GetTypeName(Type.Query, i)}} Build() + { + return new {{Generator.GetTypeName(Type.Query, i)}}(_queryBuilder.Build()); + } + + /// + public bool Equals({{Generator.GetTypeName(Type.QueryBuilder, i)}} other) + { + return _queryBuilder == other._queryBuilder; + } + + /// + public override bool Equals(object? obj) + { + return obj is {{Generator.GetTypeName(Type.QueryBuilder, i)}} other && Equals(other); + } + + /// + public override int GetHashCode() + { + return _queryBuilder.GetHashCode(); + } + + /// + public static bool operator ==({{Generator.GetTypeName(Type.QueryBuilder, i)}} left, {{Generator.GetTypeName(Type.QueryBuilder, i)}} right) + { + return left.Equals(right); + } + + /// + public static bool operator !=({{Generator.GetTypeName(Type.QueryBuilder, i)}} left, {{Generator.GetTypeName(Type.QueryBuilder, i)}} right) + { + return !(left == right); + } + } + """; + } + + public static string GenerateExtensions(Type type, int i = -1) + { + return $$""" + using System; + using static Flecs.NET.Bindings.flecs; + + namespace Flecs.NET.Core; + + public unsafe partial struct {{Generator.GetTypeName(type, i)}} + { + /// + public ref {{Generator.GetTypeName(type, i)}} Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref {{Generator.GetTypeName(type, i)}} OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref {{Generator.GetTypeName(type, i)}} DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } + } + """; + } +} diff --git a/src/Flecs.NET.Examples/Queries/ChangeTracking.cs b/src/Flecs.NET.Examples/Queries/ChangeTracking.cs index 3d92498b..e0588705 100644 --- a/src/Flecs.NET.Examples/Queries/ChangeTracking.cs +++ b/src/Flecs.NET.Examples/Queries/ChangeTracking.cs @@ -1,140 +1,141 @@ -// Queries have a builtin mechanism for tracking changes per matched table. This -// is a cheap way of eliminating redundant work, as many entities can be skipped -// with a single check. -// -// This example shows how to use change tracking in combination with using -// prefabs to store a single dirty state for multiple entities. - -using Flecs.NET.Core; - -// Components -file record struct Position(float X, float Y); -file record struct Dirty(bool Value); - -public static class Queries_ChangeTracking -{ - public static void Main() - { - using World world = World.Create(); - - // Make Dirty inheritable so that queries can match it on prefabs. - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - // Create a query that just reads a component. We'll use this query for - // change tracking. Change tracking for a query is automatically enabled - // when Query.Changed() is called. - // Each query has its own private dirty state which is reset only when the - // query is iterated. - using Query qRead = world.QueryBuilder() - .Cached() - .With().In() - .Build(); - - // Create a query that writes the component based on a Dirty state. - using Query qWrite = world.QueryBuilder() - .TermAt(0).Up(Ecs.IsA).In() // Only match Dirty from prefab - .Build(); - - // Create two prefabs with a Dirty component. We can use this to share a - // single Dirty value for all entities in a table. - Entity p1 = world.Prefab("p1").Set(new Dirty(false)); - Entity p2 = world.Prefab("p2").Set(new Dirty(true)); - - // Create instances of p1 and p2. Because the entities have different - // prefabs, they end up in different tables. - world.Entity("e1").IsA(p1) - .Set(new Position(10, 20)); - - world.Entity("e2").IsA(p1) - .Set(new Position(30, 40)); - - world.Entity("e3").IsA(p2) - .Set(new Position(40, 50)); - - world.Entity("e4").IsA(p2) - .Set(new Position(60, 70)); - - // We can use the Changed() function on the query to check if any of the - // tables it is matched with has changed. Since this is the first time that - // we check this and the query is matched with the tables we just created, - // the function will return true. - Console.WriteLine($"qRead.Changed(): {qRead.Changed()}"); - - // The changed state will remain true until we have iterated each table. - qRead.Run((Iter it) => - { - while (it.Next()) - { - // With the it.Changed() function we can check if the table we're - // currently iterating has changed since last iteration. - // Because this is the first time the query is iterated, all tables - // will show up as changed. - Console.WriteLine($"it.Changed() for table [{it.Type()}]: {it.Changed()}"); - } - }); - - // Now that we have iterated all tables, the dirty state is reset. - Console.WriteLine($"qRead.Changed(): {qRead.Changed()}"); - Console.WriteLine(); - - // Iterate the write query. Because the Position term is InOut (default) - // iterating the query will write to the dirty state of iterated tables. - qWrite.Run((Iter it) => - { - while (it.Next()) - { - Field dirty = it.Field(0); - Field p = it.Field(1); - - Console.WriteLine($"Iterate table [{it.Type()}]"); - - // Because we enforced that Dirty is a shared component, we can check - // a single value for the entire table. - if (!dirty[0].Value) - { - // If the dirty flag is false, skip the table. This way the table's - // dirty state is not updated by the query. - it.Skip(); - - Console.WriteLine($"it.Skip() for table [{it.Type()}]"); - - // Cleanup iterator resources since iterator wasn't done yet. - it.Fini(); - break; - } - - // For all other tables the dirty state will be set. - foreach (int i in it) - { - p[i].X++; - p[i].Y++; - } - } - }); - - // One of the tables has changed, so q_read.changed() will return true - Console.WriteLine(); - Console.WriteLine($"qRead.Changed()): {qRead.Changed()}"); - - // When we iterate the read query, we'll see that one table has changed. - qRead.Run((Iter it) => - { - while (it.Next()) - Console.WriteLine($"it.Changed() for table [{it.Type()}]: {it.Changed()}"); - }); - } -} - -// Output: -// qRead.Changed(): True -// it.Changed() for table [Position, (Identifier,Name), (IsA,p1)]: True -// it.Changed() for table [Position, (Identifier,Name), (IsA,p2)]: True -// qRead.Changed(): False -// -// Iterate table [Position, (Identifier,Name), (IsA,p1)] -// it.Skip() for table [Position, (Identifier,Name), (IsA,p1)] -// Iterate table [Position, (Identifier,Name), (IsA,p2)] -// -// qRead.Changed()): True -// it.Changed() for table [Position, (Identifier,Name), (IsA,p1)]: False -// it.Changed() for table [Position, (Identifier,Name), (IsA,p2)]: True +// Queries have a builtin mechanism for tracking changes per matched table. This +// is a cheap way of eliminating redundant work, as many entities can be skipped +// with a single check. +// +// This example shows how to use change tracking in combination with using +// prefabs to store a single dirty state for multiple entities. + +using Flecs.NET.Core; + +// Components +file record struct Position(float X, float Y); +file record struct Dirty(bool Value); + +public static class Queries_ChangeTracking +{ + public static void Main() + { + using World world = World.Create(); + + // Make Dirty inheritable so that queries can match it on prefabs. + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + // Create a query that just reads a component. We'll use this query for + // change tracking. Change tracking for a query is automatically enabled + // when Query.Changed() is called. + // Each query has its own private dirty state which is reset only when the + // query is iterated. + using Query qRead = world.QueryBuilder() + .DetectChanges() + .Cached() + .With().In() + .Build(); + + // Create a query that writes the component based on a Dirty state. + using Query qWrite = world.QueryBuilder() + .TermAt(0).Up(Ecs.IsA).In() // Only match Dirty from prefab + .Build(); + + // Create two prefabs with a Dirty component. We can use this to share a + // single Dirty value for all entities in a table. + Entity p1 = world.Prefab("p1").Set(new Dirty(false)); + Entity p2 = world.Prefab("p2").Set(new Dirty(true)); + + // Create instances of p1 and p2. Because the entities have different + // prefabs, they end up in different tables. + world.Entity("e1").IsA(p1) + .Set(new Position(10, 20)); + + world.Entity("e2").IsA(p1) + .Set(new Position(30, 40)); + + world.Entity("e3").IsA(p2) + .Set(new Position(40, 50)); + + world.Entity("e4").IsA(p2) + .Set(new Position(60, 70)); + + // We can use the Changed() function on the query to check if any of the + // tables it is matched with has changed. Since this is the first time that + // we check this and the query is matched with the tables we just created, + // the function will return true. + Console.WriteLine($"qRead.Changed(): {qRead.Changed()}"); + + // The changed state will remain true until we have iterated each table. + qRead.Run((Iter it) => + { + while (it.Next()) + { + // With the it.Changed() function we can check if the table we're + // currently iterating has changed since last iteration. + // Because this is the first time the query is iterated, all tables + // will show up as changed. + Console.WriteLine($"it.Changed() for table [{it.Type()}]: {it.Changed()}"); + } + }); + + // Now that we have iterated all tables, the dirty state is reset. + Console.WriteLine($"qRead.Changed(): {qRead.Changed()}"); + Console.WriteLine(); + + // Iterate the write query. Because the Position term is InOut (default) + // iterating the query will write to the dirty state of iterated tables. + qWrite.Run((Iter it) => + { + while (it.Next()) + { + Field dirty = it.Field(0); + Field p = it.Field(1); + + Console.WriteLine($"Iterate table [{it.Type()}]"); + + // Because we enforced that Dirty is a shared component, we can check + // a single value for the entire table. + if (!dirty[0].Value) + { + // If the dirty flag is false, skip the table. This way the table's + // dirty state is not updated by the query. + it.Skip(); + + Console.WriteLine($"it.Skip() for table [{it.Type()}]"); + + // Cleanup iterator resources since iterator wasn't done yet. + it.Fini(); + break; + } + + // For all other tables the dirty state will be set. + foreach (int i in it) + { + p[i].X++; + p[i].Y++; + } + } + }); + + // One of the tables has changed, so q_read.changed() will return true + Console.WriteLine(); + Console.WriteLine($"qRead.Changed()): {qRead.Changed()}"); + + // When we iterate the read query, we'll see that one table has changed. + qRead.Run((Iter it) => + { + while (it.Next()) + Console.WriteLine($"it.Changed() for table [{it.Type()}]: {it.Changed()}"); + }); + } +} + +// Output: +// qRead.Changed(): True +// it.Changed() for table [Position, (Identifier,Name), (IsA,p1)]: True +// it.Changed() for table [Position, (Identifier,Name), (IsA,p2)]: True +// qRead.Changed(): False +// +// Iterate table [Position, (Identifier,Name), (IsA,p1)] +// it.Skip() for table [Position, (Identifier,Name), (IsA,p1)] +// Iterate table [Position, (Identifier,Name), (IsA,p2)] +// +// qRead.Changed()): True +// it.Changed() for table [Position, (Identifier,Name), (IsA,p1)]: False +// it.Changed() for table [Position, (Identifier,Name), (IsA,p2)]: True diff --git a/src/Flecs.NET.Examples/Relationships/Union.cs b/src/Flecs.NET.Examples/Relationships/Union.cs deleted file mode 100644 index b9c8e564..00000000 --- a/src/Flecs.NET.Examples/Relationships/Union.cs +++ /dev/null @@ -1,81 +0,0 @@ -// This example shows how to use union relationships. Union relationships behave -// much like exclusive relationships in that entities can have only one instance -// and that adding an instance removes the previous instance. -// -// What makes union relationships stand out is that changing the relationship -// target doesn't change the archetype of an entity. This allows for quick -// switching of tags, which can be useful when encoding state machines in ECS. -// -// There is a tradeoff, and that is that because a single archetype can contain -// entities with multiple targets, queries need to do a bit of extra work to -// only return the requested target. -// -// This code uses enumeration relationships. See the EnumRelations example for -// more details. - -using Flecs.NET.Core; - -// Enums -file enum Movement -{ - Walking, - Running -} - -file enum Direction -{ - Front, - Back, - Left, - Right -} - -public static class Relationships_Union -{ - public static void Main() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Union); - world.Component().Add(Ecs.Union); - - // Create a query that subscribes for all entities that have a Direction - // and that are walking - using Query q = world.QueryBuilder() - .With(Movement.Walking) - .With(Ecs.Wildcard) - .Build(); - - // Create a few entities with various state combinations - world.Entity("e1") - .Add(Movement.Walking) - .Add(Direction.Front); - - world.Entity("e2") - .Add(Movement.Running) - .Add(Direction.Left); - - Entity e3 = world.Entity("e3") - .Add(Movement.Running) - .Add(Direction.Back); - - // Add Walking to e3. This will remove the Running case - e3.Add(Movement.Walking); - - // Iterate the query - q.Each((Iter it, int i) => - { - // Movement will always be Walking, Direction can be any state - Console.Write(it.Entity(i).Name()); - Console.Write(": Movement: "); - Console.Write(it.Pair(0).Second().Name()); - Console.Write(", Direction: "); - Console.Write(it.Pair(1).Second().Name()); - Console.WriteLine(); - }); - } -} - -// Output: -// e3: Movement: Walking, Direction: Back -// e1: Movement: Walking, Direction: Front diff --git a/src/Flecs.NET.Native/build.zig b/src/Flecs.NET.Native/build.zig index adf6abca..2c0533c7 100644 --- a/src/Flecs.NET.Native/build.zig +++ b/src/Flecs.NET.Native/build.zig @@ -1,261 +1,272 @@ -const std = @import("std"); -const builtin = @import("builtin"); -const Build = std.Build; - -pub const LibraryType = enum { Shared, Static }; - -const BuildOptions = struct { - optimize: std.builtin.OptimizeMode, - target: Build.ResolvedTarget, - library_type: LibraryType, - compiler_rt_path: ?[]const u8, -}; - -const src_flags = [_][]const u8{ - "-std=c99", - "-fno-sanitize=undefined", -}; - -const src_files = [_][]const u8{ - "../../native/flecs_helpers.c", - - "../../native/flecs/src/bootstrap.c", - "../../native/flecs/src/each.c", - "../../native/flecs/src/entity_name.c", - "../../native/flecs/src/entity.c", - "../../native/flecs/src/id.c", - "../../native/flecs/src/iter.c", - "../../native/flecs/src/misc.c", - "../../native/flecs/src/observable.c", - "../../native/flecs/src/observer.c", - "../../native/flecs/src/os_api.c", - "../../native/flecs/src/poly.c", - "../../native/flecs/src/search.c", - "../../native/flecs/src/stage.c", - "../../native/flecs/src/value.c", - "../../native/flecs/src/world.c", - "../../native/flecs/src/addons/alerts.c", - "../../native/flecs/src/addons/app.c", - "../../native/flecs/src/addons/doc.c", - "../../native/flecs/src/addons/flecs_cpp.c", - "../../native/flecs/src/addons/http.c", - "../../native/flecs/src/addons/journal.c", - "../../native/flecs/src/addons/log.c", - "../../native/flecs/src/addons/metrics.c", - "../../native/flecs/src/addons/module.c", - "../../native/flecs/src/addons/rest.c", - "../../native/flecs/src/addons/timer.c", - "../../native/flecs/src/addons/units.c", - "../../native/flecs/src/addons/json/deserialize_value.c", - "../../native/flecs/src/addons/json/deserialize.c", - "../../native/flecs/src/addons/json/json.c", - "../../native/flecs/src/addons/json/serialize_entity.c", - "../../native/flecs/src/addons/json/serialize_field_info.c", - "../../native/flecs/src/addons/json/serialize_iter_result_query.c", - "../../native/flecs/src/addons/json/serialize_iter_result_table.c", - "../../native/flecs/src/addons/json/serialize_iter_result.c", - "../../native/flecs/src/addons/json/serialize_iter.c", - "../../native/flecs/src/addons/json/serialize_query_info.c", - "../../native/flecs/src/addons/json/serialize_type_info.c", - "../../native/flecs/src/addons/json/serialize_value.c", - "../../native/flecs/src/addons/json/serialize_world.c", - "../../native/flecs/src/addons/meta/api.c", - "../../native/flecs/src/addons/meta/c_utils.c", - "../../native/flecs/src/addons/meta/cursor.c", - "../../native/flecs/src/addons/meta/definitions.c", - "../../native/flecs/src/addons/meta/meta.c", - "../../native/flecs/src/addons/meta/rtt_lifecycle.c", - "../../native/flecs/src/addons/meta/serialized.c", - "../../native/flecs/src/addons/os_api_impl/os_api_impl.c", - "../../native/flecs/src/addons/parser/tokenizer.c", - "../../native/flecs/src/addons/pipeline/pipeline.c", - "../../native/flecs/src/addons/pipeline/worker.c", - "../../native/flecs/src/addons/query_dsl/parser.c", - "../../native/flecs/src/addons/script/ast.c", - "../../native/flecs/src/addons/script/function.c", - "../../native/flecs/src/addons/script/functions_builtin.c", - "../../native/flecs/src/addons/script/functions_math.c", - "../../native/flecs/src/addons/script/parser.c", - "../../native/flecs/src/addons/script/script.c", - "../../native/flecs/src/addons/script/serialize.c", - "../../native/flecs/src/addons/script/template.c", - "../../native/flecs/src/addons/script/vars.c", - "../../native/flecs/src/addons/script/visit_check.c", - "../../native/flecs/src/addons/script/visit_eval.c", - "../../native/flecs/src/addons/script/visit_free.c", - "../../native/flecs/src/addons/script/visit_to_str.c", - "../../native/flecs/src/addons/script/visit.c", - "../../native/flecs/src/addons/script/expr/ast.c", - "../../native/flecs/src/addons/script/expr/parser.c", - "../../native/flecs/src/addons/script/expr/stack.c", - "../../native/flecs/src/addons/script/expr/util.c", - "../../native/flecs/src/addons/script/expr/visit_eval.c", - "../../native/flecs/src/addons/script/expr/visit_fold.c", - "../../native/flecs/src/addons/script/expr/visit_free.c", - "../../native/flecs/src/addons/script/expr/visit_to_str.c", - "../../native/flecs/src/addons/script/expr/visit_type.c", - "../../native/flecs/src/addons/stats/monitor.c", - "../../native/flecs/src/addons/stats/pipeline_monitor.c", - "../../native/flecs/src/addons/stats/stats.c", - "../../native/flecs/src/addons/stats/system_monitor.c", - "../../native/flecs/src/addons/stats/world_monitor.c", - "../../native/flecs/src/addons/stats/world_summary.c", - "../../native/flecs/src/addons/system/system.c", - "../../native/flecs/src/datastructures/allocator.c", - "../../native/flecs/src/datastructures/bitset.c", - "../../native/flecs/src/datastructures/block_allocator.c", - "../../native/flecs/src/datastructures/hash.c", - "../../native/flecs/src/datastructures/hashmap.c", - "../../native/flecs/src/datastructures/map.c", - "../../native/flecs/src/datastructures/name_index.c", - "../../native/flecs/src/datastructures/sparse.c", - "../../native/flecs/src/datastructures/stack_allocator.c", - "../../native/flecs/src/datastructures/strbuf.c", - "../../native/flecs/src/datastructures/switch_list.c", - "../../native/flecs/src/datastructures/vec.c", - "../../native/flecs/src/query/api.c", - "../../native/flecs/src/query/util.c", - "../../native/flecs/src/query/validator.c", - "../../native/flecs/src/query/compiler/compiler_term.c", - "../../native/flecs/src/query/compiler/compiler.c", - "../../native/flecs/src/query/engine/cache_iter.c", - "../../native/flecs/src/query/engine/cache_order_by.c", - "../../native/flecs/src/query/engine/cache.c", - "../../native/flecs/src/query/engine/change_detection.c", - "../../native/flecs/src/query/engine/eval_iter.c", - "../../native/flecs/src/query/engine/eval_member.c", - "../../native/flecs/src/query/engine/eval_pred.c", - "../../native/flecs/src/query/engine/eval_toggle.c", - "../../native/flecs/src/query/engine/eval_trav.c", - "../../native/flecs/src/query/engine/eval_union.c", - "../../native/flecs/src/query/engine/eval_up.c", - "../../native/flecs/src/query/engine/eval_utils.c", - "../../native/flecs/src/query/engine/eval.c", - "../../native/flecs/src/query/engine/trav_cache.c", - "../../native/flecs/src/query/engine/trav_down_cache.c", - "../../native/flecs/src/query/engine/trav_up_cache.c", - "../../native/flecs/src/query/engine/trivial_iter.c", - "../../native/flecs/src/storage/entity_index.c", - "../../native/flecs/src/storage/id_index.c", - "../../native/flecs/src/storage/table_cache.c", - "../../native/flecs/src/storage/table_graph.c", - "../../native/flecs/src/storage/table.c", -}; - -pub fn compileFlecs(b: *Build, options: BuildOptions) void { - const lib = switch (options.library_type) { - .Shared => b.addSharedLibrary(.{ - .name = "flecs", - .target = options.target, - .optimize = options.optimize, - .strip = options.optimize != .Debug, - .link_libc = true, - }), - .Static => b.addStaticLibrary(.{ - .name = "flecs", - .target = options.target, - .optimize = options.optimize, - .strip = options.optimize != .Debug, - .link_libc = true, - .root_source_file = if (options.compiler_rt_path) |path| .{ .cwd_relative = path } else null, - }), - }; - - lib.defineCMacro(if (options.optimize == .Debug) "FLECS_DEBUG" else "FLECS_NDEBUG", null); - lib.defineCMacro(if (options.library_type == LibraryType.Shared) "flecs_EXPORTS" else "flecs_STATIC", null); - - lib.addIncludePath(b.path("../../native/flecs/include")); - - for (src_files) |file| { - lib.addCSourceFile(.{ .file = b.path(file), .flags = &src_flags }); - } - - switch (options.target.result.os.tag) { - .windows => { - lib.linkSystemLibrary("ws2_32"); - - // Temporary fix to get rid of undefined symbol errors when statically linking in Native AOT. - if (options.library_type == LibraryType.Static) { - lib.addCSourceFile(.{ .file = b.path("../../native/windows.c"), .flags = &src_flags }); - } - }, - .ios => { - if (b.sysroot == null) { - @panic("A --sysroot path to an IOS SDK needs to be provided when compiling for IOS."); - } - - lib.addSystemFrameworkPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/System/Library/Frameworks" }) }); - lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/include" }) }); - lib.addLibraryPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/lib" }) }); - }, - .emscripten => { - if (b.sysroot == null) { - @panic("Pass '--sysroot \"$EMSDK/upstream/emscripten\"'"); - } - - const cache_include = b.pathJoin(&.{ b.sysroot.?, "cache", "sysroot", "include" }); - var dir = std.fs.openDirAbsolute(cache_include, std.fs.Dir.OpenDirOptions{ .access_sub_paths = true, .no_follow = true }) catch @panic("No emscripten cache. Generate it!"); - dir.close(); - lib.addIncludePath(.{ .cwd_relative = cache_include }); - }, - .linux => { - if (options.target.result.abi == .android) { - if (b.sysroot == null) { - @panic("A --sysroot path to an Android NDK needs to be provided when compiling for Android."); - } - - const host_tuple = switch (builtin.target.os.tag) { - .linux => "linux-x86_64", - .windows => "windows-x86_64", - .macos => "darwin-x86_64", - else => @panic("unsupported host OS"), - }; - - const triple = switch (options.target.result.cpu.arch) { - .aarch64 => "aarch64-linux-android", - .x86_64 => "x86_64-linux-android", - else => @panic("Unsupported Android architecture"), - }; - const android_api_level: []const u8 = "21"; - - const android_sysroot = b.pathJoin(&.{ b.sysroot.?, "/toolchains/llvm/prebuilt/", host_tuple, "/sysroot" }); - const android_lib_path = b.pathJoin(&.{ android_sysroot, "/usr/lib/", triple, android_api_level }); - const android_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include" }); - const android_system_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include/", triple }); - - lib.addLibraryPath(.{ .cwd_relative = android_lib_path }); - - const libc_file_name = "android-libc.conf"; - var libc_content = std.ArrayList(u8).init(b.allocator); - errdefer libc_content.deinit(); - - const writer = libc_content.writer(); - const libc_installation = std.zig.LibCInstallation{ - .include_dir = android_include_path, - .sys_include_dir = android_system_include_path, - .crt_dir = android_lib_path, - }; - libc_installation.render(writer) catch @panic("Failed to render libc"); - const libc_path = b.addWriteFiles().add(libc_file_name, libc_content.items); - - lib.setLibCFile(libc_path); - lib.libc_file.?.addStepDependencies(&lib.step); - } - }, - else => {}, - } - - b.installArtifact(lib); -} - -pub fn build(b: *Build) void { - compileFlecs(b, .{ - .optimize = b.standardOptimizeOption(.{}), - .target = b.standardTargetOptions(.{}), - .library_type = b.option(LibraryType, "library-type", "Compile as a static or shared library.") orelse LibraryType.Shared, - // When building static libraries for Windows, zig's compiler-rt needs to be bundled. - // For some reason, setting "bundle_compiler_rt" to true doesn't produce a static library that works with NativeAOT. - // As a work-around, we manually build the compiler_rt.zig file alongside flecs. - .compiler_rt_path = b.option([]const u8, "compiler-rt-path", "Path to the compiler_rt file.") orelse null, - }); -} +const std = @import("std"); +const builtin = @import("builtin"); +const Build = std.Build; + +pub const LibraryType = enum { Shared, Static }; + +const BuildOptions = struct { + optimize: std.builtin.OptimizeMode, + target: Build.ResolvedTarget, + library_type: LibraryType, + compiler_rt_path: ?[]const u8, +}; + +const src_flags = [_][]const u8{ + "-std=c99", + "-fno-sanitize=undefined", +}; + +const src_files = [_][]const u8{ + "../../native/flecs_helpers.c", + + "../../native/flecs/src/bootstrap.c", + "../../native/flecs/src/commands.c", + "../../native/flecs/src/component_actions.c", + "../../native/flecs/src/each.c", + "../../native/flecs/src/entity_name.c", + "../../native/flecs/src/entity.c", + "../../native/flecs/src/id.c", + "../../native/flecs/src/instantiate.c", + "../../native/flecs/src/iter.c", + "../../native/flecs/src/misc.c", + "../../native/flecs/src/observable.c", + "../../native/flecs/src/observer.c", + "../../native/flecs/src/on_delete.c", + "../../native/flecs/src/os_api.c", + "../../native/flecs/src/poly.c", + "../../native/flecs/src/ref.c", + "../../native/flecs/src/search.c", + "../../native/flecs/src/stage.c", + "../../native/flecs/src/type_info.c", + "../../native/flecs/src/value.c", + "../../native/flecs/src/world.c", + "../../native/flecs/src/addons/alerts.c", + "../../native/flecs/src/addons/app.c", + "../../native/flecs/src/addons/doc.c", + "../../native/flecs/src/addons/flecs_cpp.c", + "../../native/flecs/src/addons/http.c", + "../../native/flecs/src/addons/journal.c", + "../../native/flecs/src/addons/log.c", + "../../native/flecs/src/addons/metrics.c", + "../../native/flecs/src/addons/module.c", + "../../native/flecs/src/addons/rest.c", + "../../native/flecs/src/addons/timer.c", + "../../native/flecs/src/addons/units.c", + "../../native/flecs/src/addons/json/deserialize_value.c", + "../../native/flecs/src/addons/json/deserialize.c", + "../../native/flecs/src/addons/json/json.c", + "../../native/flecs/src/addons/json/serialize_entity.c", + "../../native/flecs/src/addons/json/serialize_field_info.c", + "../../native/flecs/src/addons/json/serialize_iter_result_query.c", + "../../native/flecs/src/addons/json/serialize_iter_result_table.c", + "../../native/flecs/src/addons/json/serialize_iter_result.c", + "../../native/flecs/src/addons/json/serialize_iter.c", + "../../native/flecs/src/addons/json/serialize_query_info.c", + "../../native/flecs/src/addons/json/serialize_type_info.c", + "../../native/flecs/src/addons/json/serialize_value.c", + "../../native/flecs/src/addons/json/serialize_world.c", + "../../native/flecs/src/addons/meta/api.c", + "../../native/flecs/src/addons/meta/c_utils.c", + "../../native/flecs/src/addons/meta/cursor.c", + "../../native/flecs/src/addons/meta/definitions.c", + "../../native/flecs/src/addons/meta/meta.c", + "../../native/flecs/src/addons/meta/rtt_lifecycle.c", + "../../native/flecs/src/addons/meta/serialized.c", + "../../native/flecs/src/addons/os_api_impl/os_api_impl.c", + "../../native/flecs/src/addons/parser/tokenizer.c", + "../../native/flecs/src/addons/pipeline/frame.c", + "../../native/flecs/src/addons/pipeline/pipeline.c", + "../../native/flecs/src/addons/pipeline/worker.c", + "../../native/flecs/src/addons/query_dsl/parser.c", + "../../native/flecs/src/addons/script/ast.c", + "../../native/flecs/src/addons/script/function.c", + "../../native/flecs/src/addons/script/functions_builtin.c", + "../../native/flecs/src/addons/script/functions_math.c", + "../../native/flecs/src/addons/script/parser.c", + "../../native/flecs/src/addons/script/script.c", + "../../native/flecs/src/addons/script/serialize.c", + "../../native/flecs/src/addons/script/template.c", + "../../native/flecs/src/addons/script/vars.c", + "../../native/flecs/src/addons/script/visit_check.c", + "../../native/flecs/src/addons/script/visit_eval.c", + "../../native/flecs/src/addons/script/visit_free.c", + "../../native/flecs/src/addons/script/visit_to_str.c", + "../../native/flecs/src/addons/script/visit.c", + "../../native/flecs/src/addons/script/expr/ast.c", + "../../native/flecs/src/addons/script/expr/parser.c", + "../../native/flecs/src/addons/script/expr/stack.c", + "../../native/flecs/src/addons/script/expr/util.c", + "../../native/flecs/src/addons/script/expr/visit_eval.c", + "../../native/flecs/src/addons/script/expr/visit_fold.c", + "../../native/flecs/src/addons/script/expr/visit_free.c", + "../../native/flecs/src/addons/script/expr/visit_to_str.c", + "../../native/flecs/src/addons/script/expr/visit_type.c", + "../../native/flecs/src/addons/stats/monitor.c", + "../../native/flecs/src/addons/stats/pipeline_monitor.c", + "../../native/flecs/src/addons/stats/stats.c", + "../../native/flecs/src/addons/stats/system_monitor.c", + "../../native/flecs/src/addons/stats/world_monitor.c", + "../../native/flecs/src/addons/stats/world_summary.c", + "../../native/flecs/src/addons/system/system.c", + "../../native/flecs/src/datastructures/allocator.c", + "../../native/flecs/src/datastructures/bitset.c", + "../../native/flecs/src/datastructures/block_allocator.c", + "../../native/flecs/src/datastructures/hash.c", + "../../native/flecs/src/datastructures/hashmap.c", + "../../native/flecs/src/datastructures/map.c", + "../../native/flecs/src/datastructures/name_index.c", + "../../native/flecs/src/datastructures/sparse.c", + "../../native/flecs/src/datastructures/stack_allocator.c", + "../../native/flecs/src/datastructures/strbuf.c", + "../../native/flecs/src/datastructures/vec.c", + "../../native/flecs/src/query/api.c", + "../../native/flecs/src/query/util.c", + "../../native/flecs/src/query/validator.c", + "../../native/flecs/src/query/cache/cache.c", + "../../native/flecs/src/query/cache/cache_iter.c", + "../../native/flecs/src/query/cache/change_detection.c", + "../../native/flecs/src/query/cache/group.c", + "../../native/flecs/src/query/cache/match.c", + "../../native/flecs/src/query/cache/order_by.c", + "../../native/flecs/src/query/compiler/compiler_term.c", + "../../native/flecs/src/query/compiler/compiler.c", + "../../native/flecs/src/query/engine/eval_iter.c", + "../../native/flecs/src/query/engine/eval_member.c", + "../../native/flecs/src/query/engine/eval_pred.c", + "../../native/flecs/src/query/engine/eval_sparse.c", + "../../native/flecs/src/query/engine/eval_toggle.c", + "../../native/flecs/src/query/engine/eval_trav.c", + "../../native/flecs/src/query/engine/eval_up.c", + "../../native/flecs/src/query/engine/eval_utils.c", + "../../native/flecs/src/query/engine/eval.c", + "../../native/flecs/src/query/engine/trav_cache.c", + "../../native/flecs/src/query/engine/trav_down_cache.c", + "../../native/flecs/src/query/engine/trav_up_cache.c", + "../../native/flecs/src/query/engine/trivial_iter.c", + "../../native/flecs/src/storage/component_index.c", + "../../native/flecs/src/storage/entity_index.c", + "../../native/flecs/src/storage/ordered_children.c", + "../../native/flecs/src/storage/sparse_storage.c", + "../../native/flecs/src/storage/table_cache.c", + "../../native/flecs/src/storage/table_graph.c", + "../../native/flecs/src/storage/table.c", +}; + +pub fn compileFlecs(b: *Build, options: BuildOptions) void { + const lib = switch (options.library_type) { + .Shared => b.addSharedLibrary(.{ + .name = "flecs", + .target = options.target, + .optimize = options.optimize, + .strip = options.optimize != .Debug, + .link_libc = true, + }), + .Static => b.addStaticLibrary(.{ + .name = "flecs", + .target = options.target, + .optimize = options.optimize, + .strip = options.optimize != .Debug, + .link_libc = true, + .root_source_file = if (options.compiler_rt_path) |path| .{ .cwd_relative = path } else null, + }), + }; + + lib.defineCMacro(if (options.optimize == .Debug) "FLECS_DEBUG" else "FLECS_NDEBUG", null); + lib.defineCMacro(if (options.library_type == LibraryType.Shared) "flecs_EXPORTS" else "flecs_STATIC", null); + lib.defineCMacro("FLECS_SCRIPT_MATH", null); + + lib.addIncludePath(b.path("../../native/flecs/include")); + + for (src_files) |file| { + lib.addCSourceFile(.{ .file = b.path(file), .flags = &src_flags }); + } + + switch (options.target.result.os.tag) { + .windows => { + lib.linkSystemLibrary("ws2_32"); + + // Temporary fix to get rid of undefined symbol errors when statically linking in Native AOT. + if (options.library_type == LibraryType.Static) { + lib.addCSourceFile(.{ .file = b.path("../../native/windows.c"), .flags = &src_flags }); + } + }, + .ios => { + if (b.sysroot == null) { + @panic("A --sysroot path to an IOS SDK needs to be provided when compiling for IOS."); + } + + lib.addSystemFrameworkPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/System/Library/Frameworks" }) }); + lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/include" }) }); + lib.addLibraryPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/lib" }) }); + }, + .emscripten => { + if (b.sysroot == null) { + @panic("Pass '--sysroot \"$EMSDK/upstream/emscripten\"'"); + } + + const cache_include = b.pathJoin(&.{ b.sysroot.?, "cache", "sysroot", "include" }); + var dir = std.fs.openDirAbsolute(cache_include, std.fs.Dir.OpenDirOptions{ .access_sub_paths = true, .no_follow = true }) catch @panic("No emscripten cache. Generate it!"); + dir.close(); + lib.addIncludePath(.{ .cwd_relative = cache_include }); + }, + .linux => { + if (options.target.result.abi == .android) { + if (b.sysroot == null) { + @panic("A --sysroot path to an Android NDK needs to be provided when compiling for Android."); + } + + const host_tuple = switch (builtin.target.os.tag) { + .linux => "linux-x86_64", + .windows => "windows-x86_64", + .macos => "darwin-x86_64", + else => @panic("unsupported host OS"), + }; + + const triple = switch (options.target.result.cpu.arch) { + .aarch64 => "aarch64-linux-android", + .x86_64 => "x86_64-linux-android", + else => @panic("Unsupported Android architecture"), + }; + const android_api_level: []const u8 = "21"; + + const android_sysroot = b.pathJoin(&.{ b.sysroot.?, "/toolchains/llvm/prebuilt/", host_tuple, "/sysroot" }); + const android_lib_path = b.pathJoin(&.{ android_sysroot, "/usr/lib/", triple, android_api_level }); + const android_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include" }); + const android_system_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include/", triple }); + + lib.addLibraryPath(.{ .cwd_relative = android_lib_path }); + + const libc_file_name = "android-libc.conf"; + var libc_content = std.ArrayList(u8).init(b.allocator); + errdefer libc_content.deinit(); + + const writer = libc_content.writer(); + const libc_installation = std.zig.LibCInstallation{ + .include_dir = android_include_path, + .sys_include_dir = android_system_include_path, + .crt_dir = android_lib_path, + }; + libc_installation.render(writer) catch @panic("Failed to render libc"); + const libc_path = b.addWriteFiles().add(libc_file_name, libc_content.items); + + lib.setLibCFile(libc_path); + lib.libc_file.?.addStepDependencies(&lib.step); + } + }, + else => {}, + } + + b.installArtifact(lib); +} + +pub fn build(b: *Build) void { + compileFlecs(b, .{ + .optimize = b.standardOptimizeOption(.{}), + .target = b.standardTargetOptions(.{}), + .library_type = b.option(LibraryType, "library-type", "Compile as a static or shared library.") orelse LibraryType.Shared, + // When building static libraries for Windows, zig's compiler-rt needs to be bundled. + // For some reason, setting "bundle_compiler_rt" to true doesn't produce a static library that works with NativeAOT. + // As a work-around, we manually build the compiler_rt.zig file alongside flecs. + .compiler_rt_path = b.option([]const u8, "compiler-rt-path", "Path to the compiler_rt file.") orelse null, + }); +} diff --git a/src/Flecs.NET.Tests/CSharp/Core/ExampleTests.cs b/src/Flecs.NET.Tests/CSharp/Core/ExampleTests.cs index ac48211d..da9a2849 100644 --- a/src/Flecs.NET.Tests/CSharp/Core/ExampleTests.cs +++ b/src/Flecs.NET.Tests/CSharp/Core/ExampleTests.cs @@ -1,537 +1,531 @@ -using Xunit; - -namespace Flecs.NET.Tests.CSharp.Core; - -// Parallelization needs to be disabled for this test collection because Ecs.Log functions aren't thread safe. -[Collection(nameof(ExampleTests))] -[CollectionDefinition(nameof(ExampleTests), DisableParallelization = true)] -public class ExampleTests -{ - [Fact] - private void HelloWorld() - { - global::HelloWorld.Main(); - } - - [Fact] - private void SimpleModule() - { - global::SimpleModule.Main(); - } - - [Fact] - private void Entities_Basics() - { - global::Entities_Basics.Main(); - } - - [Fact] - private void Entities_Hierarchy() - { - global::Entities_Hierarchy.Main(); - } - - [Fact] - private void Entities_Hooks() - { - global::Entities_Hooks.Main(); - } - - [Fact] - private void Entities_IterateComponents() - { - global::Entities_IterateComponents.Main(); - } - - [Fact] - private void Entities_MultiSetGet() - { - global::Entities_MultiSetGet.Main(); - } - - [Fact] - private void Entities_Prefab() - { - global::Entities_Prefab.Main(); - } - - [Fact] - private void Entities_SettingComponents() - { - global::Entities_SettingComponents.Main(); - } - - [Fact] - private void GameMechanics_InventorySystem() - { - global::GameMechanics_InventorySystem.Main(); - } - - [Fact] - private void GameMechanics_SceneManagement() - { - global::GameMechanics_SceneManagement.Main(); - } - - [Fact] - private void Observers_Basics() - { - global::Observers_Basics.Main(); - } - - [Fact] - private void Observers_CustomEvent() - { - global::Observers_CustomEvent.Main(); - } - - [Fact] - private void Observers_EnqueueEntityEvent() - { - global::Observers_EnqueueEntityEvent.Main(); - } - - [Fact] - private void Observers_EnqueueEvent() - { - global::Observers_EnqueueEvent.Main(); - } - - [Fact] - private void Observers_EntityEvent() - { - global::Observers_EntityEvent.Main(); - } - - [Fact] - private void Observers_Monitor() - { - global::Observers_Monitor.Main(); - } - - [Fact] - private void Observers_Propagate() - { - global::Observers_Propagate.Main(); - } - - [Fact] - private void Observers_TwoComponents() - { - global::Observers_TwoComponents.Main(); - } - - [Fact] - private void Observers_YieldExisting() - { - global::Observers_YieldExisting.Main(); - } - - [Fact] - private void Prefabs_Basics() - { - global::Prefabs_Basics.Main(); - } - - [Fact] - private void Prefabs_Hierarchy() - { - global::Prefabs_Hierarchy.Main(); - } - - [Fact] - private void Prefabs_NestedPrefabs() - { - global::Prefabs_NestedPrefabs.Main(); - } - - [Fact] - private void Prefabs_Override() - { - global::Prefabs_Override.Main(); - } - - [Fact] - private void Prefabs_Slots() - { - global::Prefabs_Slots.Main(); - } - - [Fact] - private void Prefabs_TypedPrefabs() - { - global::Prefabs_TypedPrefabs.Main(); - } - - [Fact] - private void Prefabs_Variant() - { - global::Prefabs_Variant.Main(); - } - - [Fact] - private void Queries_BasicIteration() - { - global::Queries_BasicIteration.Main(); - } - - [Fact] - private void Queries_Basics() - { - global::Queries_Basics.Main(); - } - - [Fact] - private void Queries_ChangeTracking() - { - global::Queries_ChangeTracking.Main(); - } - - [Fact] - private void Queries_ComponentInheritance() - { - global::Queries_ComponentInheritance.Main(); - } - - [Fact] - private void Queries_CyclicVariables() - { - global::Queries_CyclicVariables.Main(); - } - - [Fact] - private void Queries_Facts() - { - global::Queries_Facts.Main(); - } - - [Fact] - private void Queries_FindEntity() - { - global::Queries_FindEntity.Main(); - } - - [Fact] - private void Queries_GroupBy() - { - global::Queries_GroupBy.Main(); - } - - [Fact] - private void Queries_GroupByCallbacks() - { - global::Queries_GroupByCallbacks.Main(); - } - - [Fact] - private void Queries_GroupByCustom() - { - global::Queries_GroupByCustom.Main(); - } - - [Fact] - private void Queries_GroupIter() - { - global::Queries_GroupIter.Main(); - } - - [Fact] - private void Queries_Hierarchy() - { - global::Queries_Hierarchy.Main(); - } - - [Fact] - private void Queries_Iter() - { - global::Queries_Iter.Main(); - } - - [Fact] - private void Queries_IterTargets() - { - global::Queries_IterTargets.Main(); - } - - [Fact] - private void Queries_SettingVariables() - { - global::Queries_SettingVariables.Main(); - } - - [Fact] - private void Queries_Singleton() - { - global::Queries_Singleton.Main(); - } - - [Fact] - private void Queries_Sorting() - { - global::Queries_Sorting.Main(); - } - - [Fact] - private void Queries_TransitiveQueries() - { - global::Queries_TransitiveQueries.Main(); - } - - [Fact] - private void Queries_Variables() - { - global::Queries_Variables.Main(); - } - - [Fact] - private void Queries_Wildcards() - { - global::Queries_Wildcards.Main(); - } - - [Fact] - private void Queries_With() - { - global::Queries_With.Main(); - } - - [Fact] - private void Queries_Without() - { - global::Queries_Without.Main(); - } - - [Fact] - private void Queries_WorldQuery() - { - global::Queries_WorldQuery.Main(); - } - - [Fact] - private void Reflection_Basics() - { - global::Reflection_Basics.Main(); - } - - [Fact] - private void Reflection_BasicsBitmask() - { - global::Reflection_BasicsBitmask.Main(); - } - - [Fact] - private void Reflection_BasicsDeserialize() - { - global::Reflection_BasicsDeserialize.Main(); - } - - [Fact] - private void Reflection_BasicsEnum() - { - global::Reflection_BasicsEnum.Main(); - } - - [Fact] - private void Reflection_BasicsJson() - { - global::Reflection_BasicsJson.Main(); - } - - [Fact] - private void Reflection_EntityType() - { - global::Reflection_EntityType.Main(); - } - - [Fact] - private void Reflection_MemberRanges() - { - global::Reflection_MemberRanges.Main(); - } - - [Fact] - private void Reflection_NestedSetMember() - { - global::Reflection_NestedSetMember.Main(); - } - - [Fact] - private void Reflection_NestedStruct() - { - global::Reflection_NestedStruct.Main(); - } - - [Fact] - private void Reflection_QueryToCustomJson() - { - global::Reflection_QueryToCustomJson.Main(); - } - - [Fact] - private void Reflection_QueryToJson() - { - global::Reflection_QueryToJson.Main(); - } - - [Fact] - private void Reflection_RuntimeComponent() - { - global::Reflection_RuntimeComponent.Main(); - } - - [Fact] - private void Reflection_RuntimeNestedComponent() - { - global::Reflection_RuntimeNestedComponent.Main(); - } - - [Fact] - private void Reflection_Units() - { - global::Reflection_Units.Main(); - } - - [Fact] - private void Reflection_WorldSerializeDeserialize() - { - global::Reflection_WorldSerializeDeserialize.Main(); - } - - [Fact] - private void Relationships_Basics() - { - global::Relationships_Basics.Main(); - } - - [Fact] - private void Relationships_EnumRelations() - { - global::Relationships_EnumRelations.Main(); - } - - [Fact] - private void Relationships_ExclusiveRelations() - { - global::Relationships_ExclusiveRelations.Main(); - } - - [Fact] - private void Relationships_RelationComponent() - { - global::Relationships_RelationComponent.Main(); - } - - [Fact] - private void Relationships_SymmetricRelations() - { - global::Relationships_SymmetricRelations.Main(); - } - - [Fact] - private void Relationships_Union() - { - global::Relationships_Union.Main(); - } - - [Fact] - private void Systems_Basics() - { - global::Systems_Basics.Main(); - } - - [Fact] - private void Systems_CustomPhases() - { - global::Systems_CustomPhases.Main(); - } - - [Fact] - private void Systems_CustomPhasesNoBuiltIn() - { - global::Systems_CustomPhasesNoBuiltIn.Main(); - } - - [Fact] - private void Systems_CustomPipeline() - { - global::Systems_CustomPipeline.Main(); - } - - [Fact] - private void Systems_CustomRunner() - { - global::Systems_CustomRunner.Main(); - } - - [Fact] - private void Systems_DeltaTime() - { - global::Systems_DeltaTime.Main(); - } - - [Fact] - private void Systems_Immediate() - { - global::Systems_Immediate.Main(); - } - - [Fact] - private void Systems_MutateEntity() - { - global::Systems_MutateEntity.Main(); - } - - [Fact] - private void Systems_MutateEntityHandle() - { - global::Systems_MutateEntityHandle.Main(); - } - - [Fact] - private void Systems_Pipeline() - { - global::Systems_Pipeline.Main(); - } - - [Fact] - private void Systems_RunWithCallback() - { - global::Systems_RunWithCallback.Main(); - } - - [Fact] - private void Systems_StartupSystem() - { - global::Systems_StartupSystem.Main(); - } - - [Fact] - private void Systems_SyncPoint() - { - global::Systems_SyncPoint.Main(); - } - - [Fact] - private void Systems_SyncPointDelete() - { - global::Systems_SyncPointDelete.Main(); - } - - [Fact] - private void Systems_SystemCtx() - { - global::Systems_SystemCtx.Main(); - } - - [Fact] - private void Systems_TargetFps() - { - global::Systems_TargetFps.Main(); - } - - [Fact] - private void Systems_TimeInterval() - { - global::Systems_TimeInterval.Main(); - } -} +using Xunit; + +namespace Flecs.NET.Tests.CSharp.Core; + +// Parallelization needs to be disabled for this test collection because Ecs.Log functions aren't thread safe. +[Collection(nameof(ExampleTests))] +[CollectionDefinition(nameof(ExampleTests), DisableParallelization = true)] +public class ExampleTests +{ + [Fact] + private void HelloWorld() + { + global::HelloWorld.Main(); + } + + [Fact] + private void SimpleModule() + { + global::SimpleModule.Main(); + } + + [Fact] + private void Entities_Basics() + { + global::Entities_Basics.Main(); + } + + [Fact] + private void Entities_Hierarchy() + { + global::Entities_Hierarchy.Main(); + } + + [Fact] + private void Entities_Hooks() + { + global::Entities_Hooks.Main(); + } + + [Fact] + private void Entities_IterateComponents() + { + global::Entities_IterateComponents.Main(); + } + + [Fact] + private void Entities_MultiSetGet() + { + global::Entities_MultiSetGet.Main(); + } + + [Fact] + private void Entities_Prefab() + { + global::Entities_Prefab.Main(); + } + + [Fact] + private void Entities_SettingComponents() + { + global::Entities_SettingComponents.Main(); + } + + [Fact] + private void GameMechanics_InventorySystem() + { + global::GameMechanics_InventorySystem.Main(); + } + + [Fact] + private void GameMechanics_SceneManagement() + { + global::GameMechanics_SceneManagement.Main(); + } + + [Fact] + private void Observers_Basics() + { + global::Observers_Basics.Main(); + } + + [Fact] + private void Observers_CustomEvent() + { + global::Observers_CustomEvent.Main(); + } + + [Fact] + private void Observers_EnqueueEntityEvent() + { + global::Observers_EnqueueEntityEvent.Main(); + } + + [Fact] + private void Observers_EnqueueEvent() + { + global::Observers_EnqueueEvent.Main(); + } + + [Fact] + private void Observers_EntityEvent() + { + global::Observers_EntityEvent.Main(); + } + + [Fact] + private void Observers_Monitor() + { + global::Observers_Monitor.Main(); + } + + [Fact] + private void Observers_Propagate() + { + global::Observers_Propagate.Main(); + } + + [Fact] + private void Observers_TwoComponents() + { + global::Observers_TwoComponents.Main(); + } + + [Fact] + private void Observers_YieldExisting() + { + global::Observers_YieldExisting.Main(); + } + + [Fact] + private void Prefabs_Basics() + { + global::Prefabs_Basics.Main(); + } + + [Fact] + private void Prefabs_Hierarchy() + { + global::Prefabs_Hierarchy.Main(); + } + + [Fact] + private void Prefabs_NestedPrefabs() + { + global::Prefabs_NestedPrefabs.Main(); + } + + [Fact] + private void Prefabs_Override() + { + global::Prefabs_Override.Main(); + } + + [Fact] + private void Prefabs_Slots() + { + global::Prefabs_Slots.Main(); + } + + [Fact] + private void Prefabs_TypedPrefabs() + { + global::Prefabs_TypedPrefabs.Main(); + } + + [Fact] + private void Prefabs_Variant() + { + global::Prefabs_Variant.Main(); + } + + [Fact] + private void Queries_BasicIteration() + { + global::Queries_BasicIteration.Main(); + } + + [Fact] + private void Queries_Basics() + { + global::Queries_Basics.Main(); + } + + [Fact] + private void Queries_ChangeTracking() + { + global::Queries_ChangeTracking.Main(); + } + + [Fact] + private void Queries_ComponentInheritance() + { + global::Queries_ComponentInheritance.Main(); + } + + [Fact] + private void Queries_CyclicVariables() + { + global::Queries_CyclicVariables.Main(); + } + + [Fact] + private void Queries_Facts() + { + global::Queries_Facts.Main(); + } + + [Fact] + private void Queries_FindEntity() + { + global::Queries_FindEntity.Main(); + } + + [Fact] + private void Queries_GroupBy() + { + global::Queries_GroupBy.Main(); + } + + [Fact] + private void Queries_GroupByCallbacks() + { + global::Queries_GroupByCallbacks.Main(); + } + + [Fact] + private void Queries_GroupByCustom() + { + global::Queries_GroupByCustom.Main(); + } + + [Fact] + private void Queries_GroupIter() + { + global::Queries_GroupIter.Main(); + } + + [Fact] + private void Queries_Hierarchy() + { + global::Queries_Hierarchy.Main(); + } + + [Fact] + private void Queries_Iter() + { + global::Queries_Iter.Main(); + } + + [Fact] + private void Queries_IterTargets() + { + global::Queries_IterTargets.Main(); + } + + [Fact] + private void Queries_SettingVariables() + { + global::Queries_SettingVariables.Main(); + } + + [Fact] + private void Queries_Singleton() + { + global::Queries_Singleton.Main(); + } + + [Fact] + private void Queries_Sorting() + { + global::Queries_Sorting.Main(); + } + + [Fact] + private void Queries_TransitiveQueries() + { + global::Queries_TransitiveQueries.Main(); + } + + [Fact] + private void Queries_Variables() + { + global::Queries_Variables.Main(); + } + + [Fact] + private void Queries_Wildcards() + { + global::Queries_Wildcards.Main(); + } + + [Fact] + private void Queries_With() + { + global::Queries_With.Main(); + } + + [Fact] + private void Queries_Without() + { + global::Queries_Without.Main(); + } + + [Fact] + private void Queries_WorldQuery() + { + global::Queries_WorldQuery.Main(); + } + + [Fact] + private void Reflection_Basics() + { + global::Reflection_Basics.Main(); + } + + [Fact] + private void Reflection_BasicsBitmask() + { + global::Reflection_BasicsBitmask.Main(); + } + + [Fact] + private void Reflection_BasicsDeserialize() + { + global::Reflection_BasicsDeserialize.Main(); + } + + [Fact] + private void Reflection_BasicsEnum() + { + global::Reflection_BasicsEnum.Main(); + } + + [Fact] + private void Reflection_BasicsJson() + { + global::Reflection_BasicsJson.Main(); + } + + [Fact] + private void Reflection_EntityType() + { + global::Reflection_EntityType.Main(); + } + + [Fact] + private void Reflection_MemberRanges() + { + global::Reflection_MemberRanges.Main(); + } + + [Fact] + private void Reflection_NestedSetMember() + { + global::Reflection_NestedSetMember.Main(); + } + + [Fact] + private void Reflection_NestedStruct() + { + global::Reflection_NestedStruct.Main(); + } + + [Fact] + private void Reflection_QueryToCustomJson() + { + global::Reflection_QueryToCustomJson.Main(); + } + + [Fact] + private void Reflection_QueryToJson() + { + global::Reflection_QueryToJson.Main(); + } + + [Fact] + private void Reflection_RuntimeComponent() + { + global::Reflection_RuntimeComponent.Main(); + } + + [Fact] + private void Reflection_RuntimeNestedComponent() + { + global::Reflection_RuntimeNestedComponent.Main(); + } + + [Fact] + private void Reflection_Units() + { + global::Reflection_Units.Main(); + } + + [Fact] + private void Reflection_WorldSerializeDeserialize() + { + global::Reflection_WorldSerializeDeserialize.Main(); + } + + [Fact] + private void Relationships_Basics() + { + global::Relationships_Basics.Main(); + } + + [Fact] + private void Relationships_EnumRelations() + { + global::Relationships_EnumRelations.Main(); + } + + [Fact] + private void Relationships_ExclusiveRelations() + { + global::Relationships_ExclusiveRelations.Main(); + } + + [Fact] + private void Relationships_RelationComponent() + { + global::Relationships_RelationComponent.Main(); + } + + [Fact] + private void Relationships_SymmetricRelations() + { + global::Relationships_SymmetricRelations.Main(); + } + + [Fact] + private void Systems_Basics() + { + global::Systems_Basics.Main(); + } + + [Fact] + private void Systems_CustomPhases() + { + global::Systems_CustomPhases.Main(); + } + + [Fact] + private void Systems_CustomPhasesNoBuiltIn() + { + global::Systems_CustomPhasesNoBuiltIn.Main(); + } + + [Fact] + private void Systems_CustomPipeline() + { + global::Systems_CustomPipeline.Main(); + } + + [Fact] + private void Systems_CustomRunner() + { + global::Systems_CustomRunner.Main(); + } + + [Fact] + private void Systems_DeltaTime() + { + global::Systems_DeltaTime.Main(); + } + + [Fact] + private void Systems_Immediate() + { + global::Systems_Immediate.Main(); + } + + [Fact] + private void Systems_MutateEntity() + { + global::Systems_MutateEntity.Main(); + } + + [Fact] + private void Systems_MutateEntityHandle() + { + global::Systems_MutateEntityHandle.Main(); + } + + [Fact] + private void Systems_Pipeline() + { + global::Systems_Pipeline.Main(); + } + + [Fact] + private void Systems_RunWithCallback() + { + global::Systems_RunWithCallback.Main(); + } + + [Fact] + private void Systems_StartupSystem() + { + global::Systems_StartupSystem.Main(); + } + + [Fact] + private void Systems_SyncPoint() + { + global::Systems_SyncPoint.Main(); + } + + [Fact] + private void Systems_SyncPointDelete() + { + global::Systems_SyncPointDelete.Main(); + } + + [Fact] + private void Systems_SystemCtx() + { + global::Systems_SystemCtx.Main(); + } + + [Fact] + private void Systems_TargetFps() + { + global::Systems_TargetFps.Main(); + } + + [Fact] + private void Systems_TimeInterval() + { + global::Systems_TimeInterval.Main(); + } +} diff --git a/src/Flecs.NET.Tests/Cpp/EntityTests.cs b/src/Flecs.NET.Tests/Cpp/EntityTests.cs index 0d799403..b752095c 100644 --- a/src/Flecs.NET.Tests/Cpp/EntityTests.cs +++ b/src/Flecs.NET.Tests/Cpp/EntityTests.cs @@ -1,4757 +1,4757 @@ -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using Flecs.NET.Core; -using Xunit; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Tests.Cpp; - -[SuppressMessage("ReSharper", "UnusedParameter.Local")] -[SuppressMessage("ReSharper", "ParameterOnlyUsedForPreconditionCheck.Local")] -[SuppressMessage("ReSharper", "AccessToDisposedClosure")] -public unsafe class EntityTests -{ - [Fact] - public void New() - { - using World world = World.Create(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - } - - [Fact] - public void NewNamed() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo"); - Assert.True(entity != 0); - Assert.Equal("Foo", entity.Name()); - } - - [Fact] - public void NewNamedFromScope() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo"); - Assert.True(entity != 0); - Assert.Equal("Foo", entity.Name()); - - Entity prev = world.SetScope(entity); - - Entity child = world.Entity("Bar"); - Assert.True(child != 0); - - world.SetScope(prev); - - Assert.Equal("Bar", child.Name()); - Assert.Equal(".Foo.Bar", child.Path()); - } - - [Fact] - private void NewNestedNamedFromFromScope() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo"); - Assert.True(entity != 0); - Assert.Equal("Foo", entity.Name()); - - Entity prev = world.SetScope(entity); - - Entity child = world.Entity("Bar.Hello"); - Assert.True(child != 0); - - world.SetScope(prev); - - Assert.Equal("Hello", child.Name()); - Assert.Equal(".Foo.Bar.Hello", child.Path()); - } - - [Fact] - private void NewNestedNamedFromNestedScope() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo.Bar"); - Assert.True(entity != 0); - Assert.Equal("Bar", entity.Name()); - Assert.Equal(".Foo.Bar", entity.Path()); - - Entity prev = world.SetScope(entity); - - Entity child = world.Entity("Hello.World"); - Assert.True(child != 0); - - world.SetScope(prev); - - Assert.Equal("World", child.Name()); - Assert.Equal(".Foo.Bar.Hello.World", child.Path()); - } - - [Fact] - private void NewAdd() - { - using World world = World.Create(); - - world.Component(); - - Entity entity = world.Entity() - .Add(); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - } - - [Fact] - private void NewAdd2() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Add() - .Add(); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - Assert.True(entity.Has()); - } - - [Fact] - private void NewSet() - { - using World world = World.Create(); - - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - Position* p = entity.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void NewSet2() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - Assert.True(entity.Has()); - - Position* p = entity.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Velocity* v = entity.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void Add() - { - using World world = World.Create(); - - world.Component(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(); - Assert.True(entity.Has()); - } - - [Fact] - private void Remove() - { - using World world = World.Create(); - - world.Component(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(); - Assert.True(entity.Has()); - - entity.Remove(); - Assert.True(!entity.Has()); - } - - [Fact] - private void Set() - { - using World world = World.Create(); - - world.Component(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Set(new Position(10, 20)); - Assert.True(entity.Has()); - - Position* p = entity.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void Add2() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add() - .Add(); - - Assert.True(entity.Has()); - Assert.True(entity.Has()); - } - - [Fact] - private void AddEntity() - { - using World world = World.Create(); - - Entity tag = world.Entity(); - Assert.True(tag != 0); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(tag); - Assert.True(entity.Has(tag)); - } - - [Fact] - private void AddChildOf() - { - using World world = World.Create(); - - Entity parent = world.Entity(); - Assert.True(parent != 0); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(EcsChildOf, parent); - Assert.True(entity.Has(EcsChildOf, parent)); - } - - [Fact] - private void AddInstanceOf() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - Assert.True(@base != 0); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(EcsIsA, @base); - Assert.True(entity.Has(EcsIsA, @base)); - } - - [Fact] - private void Remove2() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add() - .Add(); - - Assert.True(entity.Has()); - Assert.True(entity.Has()); - - entity.Remove() - .Remove(); - - Assert.True(!entity.Has()); - Assert.True(!entity.Has()); - } - - [Fact] - private void Set2() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - Assert.True(entity.Has()); - Assert.True(entity.Has()); - - Position* p = entity.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Velocity* v = entity.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void RemoveEntity() - { - using World world = World.Create(); - - Entity tag = world.Entity(); - Assert.True(tag != 0); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(tag); - Assert.True(entity.Has(tag)); - - entity.Remove(tag); - Assert.True(!entity.Has(tag)); - } - - [Fact] - private void RemoveChildOf() - { - using World world = World.Create(); - - Entity parent = world.Entity(); - Assert.True(parent != 0); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(EcsChildOf, parent); - Assert.True(entity.Has(EcsChildOf, parent)); - - entity.Remove(EcsChildOf, parent); - Assert.True(!entity.Has(EcsChildOf, parent)); - } - - [Fact] - private void RemoveInstanceOf() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - Assert.True(@base != 0); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - entity.Add(EcsIsA, @base); - Assert.True(entity.Has(EcsIsA, @base)); - - entity.Remove(EcsIsA, @base); - Assert.True(!entity.Has(EcsIsA, @base)); - } - - [Fact] - private void GetGeneric() - { - using World world = World.Create(); - - Component position = world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - void* voidPointer = entity.GetPtr(position); - Assert.True(voidPointer != null); - - Position* p = (Position*)voidPointer; - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - - [Fact] - private void EnsureGeneric() - { - using World world = World.Create(); - - Component position = world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - bool invoked = false; - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Position p) => { invoked = true; }); - - void* voidPointer = entity.EnsurePtr(position); - Assert.True(voidPointer != null); - - Position* p = (Position*)voidPointer; - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - entity.Modified(position); - Assert.True(invoked); - } - - [Fact] - private void GetGenericWithId() - { - using World world = World.Create(); - - Component position = world.Component(); - Id id = position; - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - void* voidPointer = entity.GetPtr(id); - Assert.True(voidPointer != null); - - Position* p = (Position*)voidPointer; - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void GetGenericWithUlong() - { - using World world = World.Create(); - - Component position = world.Component(); - ulong id = position; - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - void* voidPointer = entity.GetPtr(id); - Assert.True(voidPointer != null); - - Position* p = (Position*)voidPointer; - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - - [Fact] - private void EnsureGenericWithId() - { - using World world = World.Create(); - - Component position = world.Component(); - Id id = position; - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - bool invoked = false; - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Position p) => { invoked = true; }); - - void* voidPointer = entity.GetPtr(id); - Assert.True(voidPointer != null); - - Position* p = (Position*)voidPointer; - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - entity.Modified(id); - Assert.True(invoked); - } - - [Fact] - private void EnsureGenericWithUlong() - { - using World world = World.Create(); - - Component position = world.Component(); - ulong id = position; - - Entity entity = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(entity != 0); - Assert.True(entity.Has()); - - bool invoked = false; - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Position p) => { invoked = true; }); - - void* voidPointer = entity.EnsurePtr(id); - Assert.True(voidPointer != null); - - Position* p = (Position*)voidPointer; - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - entity.Modified(id); - Assert.True(invoked); - } - - [Fact] - private void GetMutWithId() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - Position* p = (Position*)e.GetMutPtr(world.Id()); - Assert.True(p == null); - - e.Set(new Position(10, 20)); - - p = (Position*)e.GetMutPtr(world.Id()); - Assert.True(p != null); - - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void GetMutT() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - Position* p = e.GetMutPtr(); - Assert.True(p == null); - - e.Set(new Position(10, 20)); - - p = e.GetMutPtr(); - Assert.True(p != null); - - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void GetMutrt() - { - using World world = World.Create(); - - Entity tgt = world.Entity(); - Entity e = world.Entity(); - - Position* p = (Position*)e.GetMutPtr(world.Id(), tgt); - Assert.True(p == null); - - e.Set(tgt, new Position(10, 20)); - - p = (Position*)e.GetMutPtr(world.Id(), tgt); - Assert.True(p != null); - - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void GetMutRt() - { - using World world = World.Create(); - - Entity tgt = world.Entity(); - Entity e = world.Entity(); - - Position* p = e.GetMutPtr(tgt); - Assert.True(p == null); - - e.Set(tgt, new Position(10, 20)); - - p = e.GetMutPtr(tgt); - Assert.True(p != null); - - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void GetMutRT() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - Position* p = e.GetMutFirstPtr(); - Assert.True(p == null); - - e.Set(new Position(10, 20)); - - p = e.GetMutFirstPtr(); - Assert.True(p != null); - - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void GetMutrT() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity e = world.Entity(); - - Position* p = e.GetMutSecondPtr(rel); - Assert.True(p == null); - - e.SetSecond(rel, new Position(10, 20)); - - p = e.GetMutSecondPtr(rel); - Assert.True(p != null); - - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void SetGeneric() - { - using World world = World.Create(); - - Component position = world.Component(); - - Position p = new Position(10, 20); - - Entity e = world.Entity() - .SetUntyped(position, sizeof(Position), &p); - - Assert.True(e.Has()); - Assert.True(e.Has(position)); - - Position* ptr = e.GetPtr(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void SetGenericWithId() - { - using World world = World.Create(); - - Component position = world.Component(); - Id id = position; - - Position p = new Position(10, 20); - - Entity e = world.Entity() - .SetUntyped(id, sizeof(Position), &p); - - Assert.True(e.Has()); - Assert.True(e.Has(id)); - - Position* ptr = e.GetPtr(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void SetGenericWithUlong() - { - using World world = World.Create(); - - Component position = world.Component(); - ulong id = position; - - Position p = new Position(10, 20); - - Entity e = world.Entity() - .SetUntyped(id, sizeof(Position), &p); - - Assert.True(e.Has()); - Assert.True(e.Has(id)); - - Position* ptr = e.GetPtr(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void SetGenericNoSize() - { - using World world = World.Create(); - - Component position = world.Component(); - - Position p = new Position(10, 20); - - Entity e = world.Entity() - .SetUntyped(position, &p); - - Assert.True(e.Has()); - Assert.True(e.Has(position)); - - Position* ptr = e.GetPtr(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void SetGenericNoSizeWithId() - { - using World world = World.Create(); - - Component position = world.Component(); - Id id = position; - - Position p = new Position(10, 20); - - Entity e = world.Entity() - .SetUntyped(id, &p); - - Assert.True(e.Has()); - Assert.True(e.Has(id)); - - Position* ptr = e.GetPtr(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void SetGenericNoSizeWithUlong() - { - using World world = World.Create(); - - Component position = world.Component(); - ulong id = position; - - Position p = new Position(10, 20); - - Entity e = world.Entity() - .SetUntyped(id, &p); - - Assert.True(e.Has()); - Assert.True(e.Has(id)); - - Position* ptr = e.GetPtr(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void AddRole() - { - using World world = World.Create(); - - Entity entity = world.Entity(); - - entity = entity.AddFlags(ECS_PAIR); - - Assert.True((entity & ECS_PAIR) != 0); - } - - [Fact] - private void RemoveRole() - { - using World world = World.Create(); - - Entity entity = world.Entity(); - - ulong id = entity; - - entity = entity.AddFlags(ECS_PAIR); - - Assert.True((entity & ECS_PAIR) != 0); - - entity = entity.RemoveFlags(); - - Assert.True(entity == id); - } - - [Fact] - private void HasRole() - { - using World world = World.Create(); - - Entity entity = world.Entity(); - - entity = entity.AddFlags(ECS_PAIR); - - Assert.True(entity.HasFlags(ECS_PAIR)); - - entity = entity.RemoveFlags(); - - Assert.True(!entity.HasFlags(ECS_PAIR)); - } - - [Fact] - private void PairRole() - { - using World world = World.Create(); - - Entity a = world.Entity(); - Entity b = world.Entity(); - - Id pair = new Id(a, b); - pair = pair.AddFlags(ECS_PAIR); - - Assert.True(pair.HasFlags(ECS_PAIR)); - - Entity rel = pair.First(); - Entity obj = pair.Second(); - - Assert.True(rel == a); - Assert.True(obj == b); - } - - [Fact] - private void EqualsTrue() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity(); - - Entity e12 = world.Entity(e1); - Entity e22 = world.Entity(e2); - - Assert.True(e1 == e12); - Assert.True(e2 == e22); - Assert.True(e1 >= e12); - Assert.True(e1 <= e12); - Assert.True(e2 >= e22); - Assert.True(e2 <= e22); - Assert.True(e1 != e2); - - Assert.True(!(e2 == e12)); - Assert.True(!(e1 == e22)); - Assert.True(!(e2 <= e12)); - Assert.True(!(e1 >= e22)); - } - - [Fact] - private void Compare0() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity e0 = world.Entity(0); - Entity e02 = world.Entity(0); - - Assert.True(e != e0); - Assert.True(e > e0); - Assert.True(e >= e0); - Assert.True(e0 < e); - Assert.True(e0 <= e); - - Assert.True(e0 == e02); - Assert.True(e0 >= e02); - Assert.True(e0 <= e02); - } - - [Fact] - private void CompareUlong() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity(); - - ulong id1 = e1; - ulong id2 = e2; - - Assert.True(e1 == id1); - Assert.True(e2 == id2); - - Assert.True(e1 != id2); - Assert.True(e2 != id1); - - Assert.True(e1 >= id1); - Assert.True(e2 >= id2); - - Assert.True(e1 <= id1); - Assert.True(e2 <= id2); - - Assert.True(e1 <= id2); - Assert.True(e2 >= id1); - - Assert.True(e1 < id2); - Assert.True(e2 > id1); - - - Assert.True(e2 != id1); - Assert.True(e1 != id2); - - Assert.True(e2 == id2); - Assert.True(e1 == id1); - - Assert.True(!(e1 >= id2)); - Assert.True(!(e2 <= id1)); - - Assert.True(!(e2 < id2)); - Assert.True(!(e1 > id1)); - } - - [Fact] - private void CompareId() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity(); - - Id id1 = e1; - Id id2 = e2; - - Assert.True(e1 == id1); - Assert.True(e2 == id2); - - Assert.True(e1 != id2); - Assert.True(e2 != id1); - - Assert.True(e1 >= id1); - Assert.True(e2 >= id2); - - Assert.True(e1 <= id1); - Assert.True(e2 <= id2); - - Assert.True(e1 <= id2); - Assert.True(e2 >= id1); - - Assert.True(e1 < id2); - Assert.True(e2 > id1); - - - Assert.True(e2 != id1); - Assert.True(e1 != id2); - - Assert.True(e2 == id2); - Assert.True(e1 == id1); - - Assert.True(!(e1 >= id2)); - Assert.True(!(e2 <= id1)); - - Assert.True(!(e2 < id2)); - Assert.True(!(e1 > id1)); - } - - [Fact] - private void CompareLiteral() - { - using World world = World.Create(); - - Entity e1 = world.Entity(500); - Entity e2 = world.Entity(600); - - Assert.True(e1 == 500); - Assert.True(e2 == 600); - - Assert.True(e1 != 600); - Assert.True(e2 != 500); - - Assert.True(e1 >= 500); - Assert.True(e2 >= 600); - - Assert.True(e1 <= 500); - Assert.True(e2 <= 600); - - Assert.True(e1 <= 600); - Assert.True(e2 >= 500); - - Assert.True(e1 < 600); - Assert.True(e2 > 500); - - - Assert.True(e2 != 500); - Assert.True(e1 != 600); - - Assert.True(e2 == 600); - Assert.True(e1 == 500); - - Assert.True(!(e1 >= 600)); - Assert.True(!(e2 <= 500)); - - Assert.True(!(e2 < 600)); - Assert.True(!(e1 > 500)); - } - - [Fact] - private void GreaterThan() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity(); - - Assert.True(e2 > e1); - Assert.True(e2 >= e1); - } - - [Fact] - private void LessThan() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity(); - - Assert.True(e1 < e2); - Assert.True(e1 <= e2); - } - - [Fact] - private void Not0Or1() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - ulong id = e; - - Assert.True(id != 0); - Assert.True(id != 1); - } - - [Fact] - private void HasChildOf() - { - using World world = World.Create(); - - Entity parent = world.Entity(); - - Entity e = world.Entity() - .Add(EcsChildOf, parent); - - Assert.True(e.Has(EcsChildOf, parent)); - } - - [Fact] - private void HasInstanceOf() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has(EcsIsA, @base)); - } - - [Fact] - private void HasInstanceOfIndirect() - { - using World world = World.Create(); - - Entity baseOfBase = world.Entity(); - - Entity @base = world.Entity() - .Add(EcsIsA, baseOfBase); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has(EcsIsA, baseOfBase)); - } - - [Fact] - private void NullString() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - Assert.Equal("", e.Name()); - } - - [Fact] - private void SetName() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Assert.Equal("", e.Name()); - - e.SetName("Foo"); - Assert.Equal("Foo", e.Name()); - } - - [Fact] - private void ChangeName() - { - using World world = World.Create(); - - Entity e = world.Entity("Bar"); - Assert.Equal("Bar", e.Name()); - - e.SetName("Foo"); - Assert.Equal("Foo", e.Name()); - } - - [Fact] - private void Delete() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Add() - .Add(); - - e.Destruct(); - - Assert.True(!e.IsAlive()); - - Entity e2 = world.Entity(); - Assert.True((uint)e2 == (uint)e); - Assert.True(e2 != e); - } - - [Fact] - private void Clear() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Add() - .Add(); - - e.Clear(); - - Assert.True(!e.Has()); - Assert.True(!e.Has()); - - Entity e2 = world.Entity(); - Assert.True(e2 > e); - } - - [Fact] - private void ForceOwned() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity prefab = world.Prefab() - .Add() - .Add() - .AutoOverride(); - - Entity e = world.Entity() - .Add(EcsIsA, prefab); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - Assert.True(e.Has()); - Assert.True(!e.Owns()); - } - - [Fact] - private void ForceOwned2() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity prefab = world.Prefab() - .Add() - .Add() - .AutoOverride() - .AutoOverride(); - - Entity e = world.Entity() - .Add(EcsIsA, prefab); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - Assert.True(e.Has()); - Assert.True(e.Owns()); - } - - [Fact] - private void ForceOwnedNested() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity prefab = world.Prefab() - .Add() - .Add() - .AutoOverride(); - - Entity prefab2 = world.Prefab() - .Add(EcsIsA, prefab); - - Entity e = world.Entity() - .Add(EcsIsA, prefab2); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - Assert.True(e.Has()); - Assert.True(!e.Owns()); - } - - [Fact] - private void TagHasSizeZero() - { - using World world = World.Create(); - - Component comp = world.Component(); - - EcsComponent* ptr = comp.GetPtr(); - Assert.Equal(0, ptr->size); - Assert.Equal(0, ptr->alignment); - } - - - [Fact] - private void GetTarget() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - - Entity obj1 = world.Entity() - .Add(); - - Entity obj2 = world.Entity() - .Add(); - - Entity obj3 = world.Entity() - .Add(); - - Entity child = world.Entity() - .Add(rel, obj1) - .Add(rel, obj2) - .Add(rel, obj3); - - Entity p = child.Target(rel); - Assert.True(p != 0); - Assert.True(p == obj1); - - p = child.Target(rel); - Assert.True(p != 0); - Assert.True(p == obj1); - - p = child.Target(rel, 1); - Assert.True(p != 0); - Assert.True(p == obj2); - - p = child.Target(rel, 2); - Assert.True(p != 0); - Assert.True(p == obj3); - - p = child.Target(rel, 3); - Assert.True(p == 0); - } - - [Fact] - private void GetParent() - { - using World world = World.Create(); - - Entity parent = world.Entity(); - Entity child = world.Entity().ChildOf(parent); - - Assert.True(child.Target(EcsChildOf) == parent); - Assert.True(child.Parent() == parent); - } - - [Fact] - private void IsComponentEnabled() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity e = world.Entity() - .Add(); - - Assert.True(e.Enabled()); - Assert.True(!e.Enabled()); - } - - [Fact] - private void IsEnabledComponentEnabled() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity e = world.Entity() - .Add() - .Enable(); - - Assert.True(e.Enabled()); - } - - [Fact] - private void IsDisabledComponentEnabled() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity e = world.Entity() - .Add() - .Disable(); - - Assert.True(!e.Enabled()); - } - - [Fact] - private void IsPairEnabled() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity e = world.Entity() - .Add(); - - Assert.True(e.Enabled()); - Assert.True(!e.Enabled()); - } - - [Fact] - private void IsEnabledPairEnabled() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity e = world.Entity() - .Add() - .Enable(); - - Assert.True(e.Enabled()); - } - - [Fact] - private void IsDisabledPairEnabled() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity e = world.Entity() - .Add() - .Disable(); - - Assert.True(!e.Enabled()); - } - - [Fact] - private void IsPairEnabledWithIds() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity rel = world.Entity(); - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - Entity e = world.Entity() - .Add(rel, tgtA); - - Assert.True(e.Enabled(rel, tgtA)); - Assert.True(!e.Enabled(rel, tgtB)); - } - - [Fact] - private void IsEnabledPairEnabledWithIds() - { - using World world = World.Create(); - - Entity rel = world.Entity().Add(Ecs.CanToggle); - Entity tgt = world.Entity(); - - Entity e = world.Entity() - .Add(rel, tgt) - .Enable(rel, tgt); - - Assert.True(e.Enabled(rel, tgt)); - } - - [Fact] - private void IsDisabledPairEnabledWithIds() - { - using World world = World.Create(); - - Entity rel = world.Entity().Add(Ecs.CanToggle); - Entity tgt = world.Entity(); - - Entity e = world.Entity() - .Add(rel, tgt) - .Disable(rel, tgt); - - Assert.True(!e.Enabled(rel, tgt)); - } - - [Fact] - private void IsPairEnabledWithTargetId() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - Entity e = world.Entity() - .Add(tgtA); - - Assert.True(e.Enabled(tgtA)); - Assert.True(!e.Enabled(tgtB)); - } - - [Fact] - private void IsEnabledPairEnabledWithTargetId() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity tgt = world.Entity(); - - Entity e = world.Entity() - .Add(tgt) - .Enable(tgt); - - Assert.True(e.Enabled(tgt)); - } - - [Fact] - private void IsDisabledPairEnabledWithTargetId() - { - using World world = World.Create(); - - world.Component().Add(Ecs.CanToggle); - - Entity tgt = world.Entity(); - - Entity e = world.Entity() - .Add(tgt) - .Disable(tgt); - - Assert.True(!e.Enabled(tgt)); - } - - [Fact] - private void GetTypes() - { - using World world = World.Create(); - - Entity entity = world.Entity(); - Assert.True(entity != 0); - - FlecsType type1 = entity.Type(); - Assert.Equal(0, type1.Count()); - - FlecsType type2 = entity.Type(); - Assert.Equal(0, type2.Count()); - } - - [Fact] - private void GetNonEmptyType() - { - using World world = World.Create(); - - Entity entity = world.Entity() - .Add(); - Assert.True(entity != 0); - - FlecsType type1 = entity.Type(); - Assert.Equal(1, type1.Count()); - Assert.Equal(type1.Get(0), world.Id()); - - FlecsType type2 = entity.Type(); - Assert.Equal(1, type2.Count()); - Assert.Equal(type2.Get(0), world.Id()); - } - - [Fact] - private void SetDeduced() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Position(10, 20)); - - Assert.True(e.Has()); - - Position* p = e.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void Override() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .AutoOverride(); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - } - - [Fact] - private void OverrideId() - { - using World world = World.Create(); - - Entity tagA = world.Entity().Add(Ecs.OnInstantiate, Ecs.Inherit); - Entity tagB = world.Entity().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .AutoOverride(tagA) - .Add(tagB); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has(tagA)); - Assert.True(e.Owns(tagA)); - - Assert.True(e.Has(tagB)); - Assert.True(!e.Owns(tagB)); - } - - [Fact] - private void OverridePairWithTargetId() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - Entity @base = world.Entity() - .AutoOverride(tgtA) - .Add(tgtB); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has(tgtA)); - Assert.True(e.Owns(tgtA)); - - Assert.True(e.Has(tgtB)); - Assert.True(!e.Owns(tgtB)); - } - - [Fact] - private void OverridePairWithIds() - { - using World world = World.Create(); - - Entity rel = world.Entity().Add(Ecs.OnInstantiate, Ecs.Inherit); - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - Entity @base = world.Entity() - .AutoOverride(rel, tgtA) - .Add(rel, tgtB); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has(rel, tgtA)); - Assert.True(e.Owns(rel, tgtA)); - - Assert.True(e.Has(rel, tgtB)); - Assert.True(!e.Owns(rel, tgtB)); - } - - [Fact] - private void OverridePair() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .AutoOverride() - .Add(); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Assert.True(e.Has()); - Assert.True(!e.Owns()); - } - - [Fact] - private void SetOverride() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .SetAutoOverride(new Position(10, 20)); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Position* p = e.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Position* pBase = @base.GetPtr(); - Assert.True(p != pBase); - Assert.Equal(10, pBase->X); - Assert.Equal(20, pBase->Y); - } - - [Fact] - private void SetOverrideLValue() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Position plvalue = new Position(10, 20); - - Entity @base = world.Entity() - .SetAutoOverride(plvalue); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Position* p = e.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Position* pBase = @base.GetPtr(); - Assert.True(p != pBase); - Assert.Equal(10, pBase->X); - Assert.Equal(20, pBase->Y); - } - - [Fact] - private void SetOverridePair() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .SetAutoOverride(new Position(10, 20)); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Position* p = e.GetFirstPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Position* pBase = @base.GetFirstPtr(); - Assert.True(p != pBase); - Assert.Equal(10, pBase->X); - Assert.Equal(20, pBase->Y); - } - - [Fact] - private void SetOverridePairWithTargetId() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity tgt = world.Entity(); - - Entity @base = world.Entity() - .SetAutoOverride(tgt, new Position(10, 20)); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has(tgt)); - Assert.True(e.Owns(tgt)); - - Position* p = e.GetPtr(tgt); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Position* pBase = @base.GetPtr(tgt); - Assert.True(p != pBase); - Assert.Equal(10, pBase->X); - Assert.Equal(20, pBase->Y); - } - - [Fact] - private void SetOverridePairWithRelTag() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .SetAutoOverride(new Position(10, 20)); - - Entity e = world.Entity() - .Add(EcsIsA, @base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Position* p = e.GetSecondPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Position* pBase = @base.GetSecondPtr(); - Assert.True(p != pBase); - Assert.Equal(10, pBase->X); - Assert.Equal(20, pBase->Y); - } - - [Fact] - private void ImplicitNameToChar() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo"); - Assert.True(entity != 0); - Assert.Equal("Foo", entity.Name()); - - Assert.Equal("Foo", entity.Name()); - } - - [Fact] - private void Path() - { - using World world = World.Create(); - Entity parent = world.Entity("parent"); - - using ScopedWorld scope = world.Scope(parent); - Entity child = world.Entity("child"); - Assert.Equal(".parent.child", child.Path()); - } - - [Fact] - private void PathFrom() - { - using World world = World.Create(); - - Entity parent = world.Entity("parent"); - - using ScopedWorld parentScope = world.Scope(parent); - Entity child = world.Entity("child"); - - using ScopedWorld childScope = world.Scope(child); - Entity grandchild = world.Entity("grandchild"); - - Assert.Equal(".parent.child.grandchild", grandchild.Path()); - Assert.Equal("child.grandchild", grandchild.PathFrom(parent)); - } - - [Fact] - private void PathFromType() - { - using World world = World.Create(); - Entity parent = world.Entity(); - - using ScopedWorld parentScope = world.Scope(parent); - Entity child = world.Entity("child"); - - using ScopedWorld childScope = world.Scope(child); - Entity grandchild = world.Entity("grandchild"); - - Assert.Equal(".Parent.child.grandchild", grandchild.Path()); - Assert.Equal("child.grandchild", grandchild.PathFrom()); - } - - [Fact] - private void PathCustomSep() - { - using World world = World.Create(); - Entity parent = world.Entity("parent"); - - using ScopedWorld parentScope = world.Scope(parent); - Entity child = world.Entity("child"); - - Assert.Equal("parent_child", child.Path("_", "")); - } - - [Fact] - private void PathFromCustomSep() - { - using World world = World.Create(); - Entity parent = world.Entity("parent"); - - using ScopedWorld parentScope = world.Scope(parent); - Entity child = world.Entity("child"); - - using ScopedWorld childScope = world.Scope(child); - Entity grandchild = world.Entity("grandchild"); - - Assert.Equal(".parent.child.grandchild", grandchild.Path()); - Assert.Equal("child_grandchild", grandchild.PathFrom(parent, "_")); - } - - [Fact] - private void PathFromTypeCustomSep() - { - using World world = World.Create(); - Entity parent = world.Entity(); - - using ScopedWorld parentScope = world.Scope(parent); - Entity child = world.Entity("child"); - - using ScopedWorld childScope = world.Scope(child); - Entity grandchild = world.Entity("grandchild"); - - Assert.Equal(".Parent.child.grandchild", grandchild.Path()); - Assert.Equal("child_grandchild", grandchild.PathFrom("_")); - } - - [Fact] - private void ImplicitPathToChar() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo.Bar"); - Assert.True(entity != 0); - Assert.Equal("Bar", entity.Name()); - - Assert.Equal(".Foo.Bar", entity.Path()); - } - - [Fact] - private void ImplicitTypeStringToChar() - { - using World world = World.Create(); - - Entity entity = new Entity(world, "Foo"); - Assert.True(entity != 0); - - Assert.Equal("(Identifier,Name)", entity.Type().Str()); - } - - [Fact] - private void SetTemplate() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Template { X = 10, Y = 20 }); - - Template* ptr = e.GetPtr>(); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void Get1ComponentWithCallback() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(11, 22)); - - Entity e3 = world.Entity() - .Set(new Velocity(1, 2)); - - Assert.True(e1.Read((ref readonly Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - })); - - Assert.True(e2.Read((ref readonly Position p) => - { - Assert.Equal(11, p.X); - Assert.Equal(22, p.Y); - })); - - Assert.False(e3.Read((ref readonly Position p) => { })); - } - - [Fact] - private void Get2ComponentWithCallback() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(11, 22)); - - Entity e3 = world.Entity() - .Set(new Velocity(1, 2)); - - Assert.True(e1.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - })); - - Assert.False(e2.Read((ref readonly Position p, ref readonly Velocity v) => { })); - - Assert.False(e3.Read((ref readonly Position p, ref readonly Velocity v) => { })); - } - - [Fact] - private void Ensure1ComponentWithCallback() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(11, 22)); - - Entity e3 = world.Entity() - .Set(new Velocity(1, 2)); - - Assert.True(e1.Write((ref Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - p.X++; - p.Y += 2; - })); - - Assert.True(e2.Write((ref Position p) => - { - Assert.Equal(11, p.X); - Assert.Equal(22, p.Y); - p.X++; - p.Y += 2; - })); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(12, p->X); - Assert.Equal(24, p->Y); - - Assert.False(e3.Read((ref readonly Position _) => { })); - } - - [Fact] - private void Ensure2ComponentWithCallback() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(11, 22)); - - Entity e3 = world.Entity() - .Set(new Velocity(1, 2)); - - Assert.True(e1.Write((ref Position p, ref Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - - p.X++; - p.Y += 2; - v.X += 3; - v.Y += 4; - })); - - Assert.False(e2.Read((ref readonly Position p, ref readonly Velocity v) => { })); - - Assert.False(e3.Read((ref readonly Position p, ref readonly Velocity v) => { })); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - Velocity* v = e1.GetPtr(); - Assert.Equal(4, v->X); - Assert.Equal(6, v->Y); - } - - [Fact] - private void GetComponentWithCallbackNested() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Assert.True(e.Read((ref readonly Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.True(e.Read((ref readonly Velocity v) => - { - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - })); - })); - } - - [Fact] - private void Set1ComponentWithCallback() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Insert((ref Position p) => - { - p.X = 10; - p.Y = 20; - }); - - Assert.True(e.Has()); - - Position* p = e.GetPtr(); - Assert.True(p != null); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void Set2ComponentsWithCallback() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }); - - Assert.True(e.Has()); - - Position* p = e.GetPtr(); - Assert.True(p != null); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Velocity* v = e.GetPtr(); - Assert.True(v != null); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void Set3ComponentsWithCallback() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v, ref Mass m) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - m = new Mass(50); - }); - - Assert.True(e.Has()); - - Position* p = e.GetPtr(); - Assert.True(p != null); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Velocity* v = e.GetPtr(); - Assert.True(v != null); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - - Mass* m = e.GetPtr(); - Assert.True(m != null); - Assert.Equal(50, m->Value); - } - - [Fact] - private void DeferSet1Component() - { - using World world = World.Create(); - - world.DeferBegin(); - - Entity e = world.Entity() - .Insert((ref Position p) => - { - p.X = 10; - p.Y = 20; - }); - - Assert.True(!e.Has()); - - world.DeferEnd(); - - Assert.True(e.Has()); - - e.Read((ref readonly Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - }); - } - - [Fact] - private void DeferSet2Components() - { - using World world = World.Create(); - - world.DeferBegin(); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }); - - Assert.True(!e.Has()); - Assert.True(!e.Has()); - - world.DeferEnd(); - - Assert.True(e.Has()); - Assert.True(e.Has()); - - e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - }); - } - - [Fact] - private void DeferSet3Components() - { - using World world = World.Create(); - - world.DeferBegin(); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v, ref Mass m) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - m = new Mass(50); - }); - - Assert.True(!e.Has()); - Assert.True(!e.Has()); - Assert.True(!e.Has()); - - world.DeferEnd(); - - Assert.True(e.Has()); - Assert.True(e.Has()); - Assert.True(e.Has()); - - e.Read((ref readonly Position p, ref readonly Velocity v, ref readonly Mass m) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - - Assert.Equal(50, m.Value); - }); - } - - [Fact] - private void Set2WithOnSet() - { - using World world = World.Create(); - - int positionSet = 0; - int velocitySet = 0; - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Position p) => - { - positionSet++; - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - }); - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Velocity v) => - { - velocitySet++; - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - }); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }); - - Assert.Equal(1, positionSet); - Assert.Equal(1, velocitySet); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - })); - } - - [Fact] - private void DeferSet2WithOnSet() - { - using World world = World.Create(); - - int positionSet = 0; - int velocitySet = 0; - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Position p) => - { - positionSet++; - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - }); - - world.Observer() - .Event(Ecs.OnSet) - .Each((Entity e, ref Velocity v) => - { - velocitySet++; - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - }); - - world.DeferBegin(); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }); - - Assert.Equal(0, positionSet); - Assert.Equal(0, velocitySet); - - world.DeferEnd(); - - Assert.Equal(1, positionSet); - Assert.Equal(1, velocitySet); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - })); - } - - [Fact] - private void Set2AfterFluent() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Mass(50)) - .Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }); - - Assert.True(e.Has()); - Assert.True(e.Has()); - Assert.True(e.Has()); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v, ref readonly Mass m) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - - Assert.Equal(50, m.Value); - })); - } - - [Fact] - private void Set2BeforeFluent() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }) - .Set(new Mass(50)); - - Assert.True(e.Has()); - Assert.True(e.Has()); - Assert.True(e.Has()); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v, ref readonly Mass m) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - - Assert.Equal(50, m.Value); - })); - } - - [Fact] - private void Set2AfterSet1() - { - using World world = World.Create(); - - int called = 0; - - Entity e = world.Entity().Set(new Position(5, 10)); - Assert.True(e.Has()); - - Assert.True(e.Read((ref readonly Position p) => - { - Assert.Equal(5, p.X); - Assert.Equal(10, p.Y); - })); - - e.Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(1, 2); - }); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - - called++; - })); - - Assert.Equal(1, called); - } - - [Fact] - private void Set2AfterSet2() - { - using World world = World.Create(); - - int called = 0; - - Entity e = world.Entity() - .Set(new Position(5, 10)) - .Set(new Velocity(1, 2)); - Assert.True(e.Has()); - Assert.True(e.Has()); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(5, p.X); - Assert.Equal(10, p.Y); - - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - - called++; - })); - - Assert.Equal(1, called); - - e.Insert((ref Position p, ref Velocity v) => - { - p = new Position(10, 20); - v = new Velocity(3, 4); - }); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(3, v.X); - Assert.Equal(4, v.Y); - - called++; - })); - - Assert.Equal(2, called); - } - - [Fact] - private void WithSelf() - { - using World world = World.Create(); - - Entity tag = world.Entity().With(() => - { - Entity e1 = world.Entity(); - e1.Set(new Self { Value = e1 }); - Entity e2 = world.Entity(); - e2.Set(new Self { Value = e2 }); - Entity e3 = world.Entity(); - e3.Set(new Self { Value = e3 }); - }); - - Component self = world.Component(); - Assert.True(!self.Has(tag)); - - int count = 0; - using Query query = world.QueryBuilder() - .With(tag) - .Build(); - - query.Each((Entity e) => - { - Assert.True(e.Has(tag)); - - Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); - - count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void WithRelationTypeSelf() - { - using World world = World.Create(); - - Entity bob = world.Entity().With(() => - { - Entity e1 = world.Entity(); - e1.Set(new Self(e1)); - Entity e2 = world.Entity(); - e2.Set(new Self(e2)); - Entity e3 = world.Entity(); - e3.Set(new Self(e3)); - }); - - Component self = world.Component(); - Assert.True(!self.Has(bob)); - - int count = 0; - using Query q = world.QueryBuilder() - .With(bob) - .Build(); - - q.Each((Entity e) => - { - Assert.True(e.Has(bob)); - - Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); - - count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void WithRelationSelf() - { - using World world = World.Create(); - - Entity likes = world.Entity(); - - Entity bob = world.Entity().With(likes, () => - { - Entity e1 = world.Entity(); - e1.Set(new Self(e1)); - Entity e2 = world.Entity(); - e2.Set(new Self(e2)); - Entity e3 = world.Entity(); - e3.Set(new Self(e3)); - }); - - Component self = world.Component(); - Assert.True(!self.Has(likes, bob)); - - int count = 0; - using Query q = world.QueryBuilder() - .With(likes, bob) - .Build(); - - q.Each((Entity e) => - { - Assert.True(e.Has(likes, bob)); - - Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); - - count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void WithSelfWithName() - { - using World world = World.Create(); - - Entity tier1 = world.Entity("Tier1").With(() => - { - Entity tier2 = world.Entity("Tier2"); - tier2.Set(new Self(tier2)); - }); - - Entity tier2 = world.Lookup("Tier2"); - Assert.True(tier2 != 0); - - Assert.True(tier2.Has(tier1)); - } - - [Fact] - private void WithSelfNested() - { - using World world = World.Create(); - - Entity tier1 = world.Entity("Tier1").With(() => - { - world.Entity("Tier2").With(() => { world.Entity("Tier3"); }); - }); - - Entity tier2 = world.Lookup("Tier2"); - Assert.True(tier2 != 0); - - Entity tier3 = world.Lookup("Tier3"); - Assert.True(tier3 != 0); - - Assert.True(tier2.Has(tier1)); - Assert.True(tier3.Has(tier2)); - } - - [Fact] - private void WithScope() - { - using World world = World.Create(); - - Entity parent = world.Entity("P").Scope(() => - { - Entity e1 = world.Entity("C1"); - e1.Set(new Self(e1)); - Entity e2 = world.Entity("C2"); - e2.Set(new Self(e2)); - Entity e3 = world.Entity("C3"); - e3.Set(new Self(e3)); - - Assert.True(world.Lookup("C1") == e1); - Assert.True(world.Lookup("C2") == e2); - Assert.True(world.Lookup("C3") == e3); - - Assert.True(world.Lookup(".P.C1") == e1); - Assert.True(world.Lookup(".P.C2") == e2); - Assert.True(world.Lookup(".P.C3") == e3); - }); - - Assert.True(world.Lookup("C1") == 0); - Assert.True(world.Lookup("C2") == 0); - Assert.True(world.Lookup("C3") == 0); - - Assert.True(parent.Lookup("C1") != 0); - Assert.True(parent.Lookup("C2") != 0); - Assert.True(parent.Lookup("C3") != 0); - - Assert.True(world.Lookup("P.C1") == parent.Lookup("C1")); - Assert.True(world.Lookup("P.C2") == parent.Lookup("C2")); - Assert.True(world.Lookup("P.C3") == parent.Lookup("C3")); - - Component self = world.Component(); - Assert.True(!self.Has(Ecs.ChildOf, parent)); - - int count = 0; - using Query q = world.QueryBuilder() - .With(Ecs.ChildOf, parent) - .Build(); - - q.Each((Entity e) => - { - Assert.True(e.Has(Ecs.ChildOf, parent)); - - Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); - - count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void WithScopeNested() - { - using World world = World.Create(); - - Entity parent = world.Entity("P").Scope(() => - { - Entity child = world.Entity("C").Scope(() => - { - Entity gchild = world.Entity("GC"); - Assert.True(gchild == world.Lookup("GC")); - Assert.True(gchild == world.Lookup(".P.C.GC")); - }); - - Assert.True(world.Lookup("C") == child); - Assert.True(world.Lookup(".P.C") == child); - Assert.True(world.Lookup(".P.C.GC") != 0); - }); - - Assert.True(0 == world.Lookup("C")); - Assert.True(0 == world.Lookup("GC")); - Assert.True(0 == world.Lookup("C.GC")); - - Entity child = world.Lookup("P.C"); - Assert.True(0 != child); - Assert.True(child.Has(Ecs.ChildOf, parent)); - - Entity gchild = world.Lookup("P.C.GC"); - Assert.True(0 != gchild); - Assert.True(gchild.Has(Ecs.ChildOf, child)); - } - - [Fact] - private void WithScopeNestedSameNameAsParent() - { - using World world = World.Create(); - - Entity parent = world.Entity("P").Scope(() => - { - Entity child = world.Entity("C").Scope(() => - { - Entity gchild = world.Entity("C"); - Assert.True(gchild == world.Lookup("C")); - Assert.True(gchild == world.Lookup(".P.C.C")); - }); - - Assert.True(world.Lookup("C") == child); - Assert.True(world.Lookup(".P.C") == child); - Assert.True(world.Lookup(".P.C.C") != 0); - }); - - Assert.True(0 == world.Lookup("C")); - Assert.True(0 == world.Lookup("C")); - Assert.True(0 == world.Lookup("C.C")); - - Entity child = world.Lookup("P.C"); - Assert.True(0 != child); - Assert.True(child.Has(Ecs.ChildOf, parent)); - - Entity gchild = world.Lookup("P.C.C"); - Assert.True(0 != gchild); - Assert.True(gchild.Has(Ecs.ChildOf, child)); - } - - [Fact] - private void NoRecursiveLookup() - { - using World world = World.Create(); - - Entity p = world.Entity("P"); - Entity c = world.Entity("C").ChildOf(p); - Entity gc = world.Entity("GC").ChildOf(c); - - Assert.True(c.Lookup("GC") == gc); - Assert.True(c.Lookup("C") == 0); - Assert.True(c.Lookup("P") == 0); - } - - [Fact] - private void DeferNewWithName() - { - using World world = World.Create(); - - Entity e = default; - - world.Defer(() => - { - e = world.Entity("Foo"); - Assert.True(e != 0); - }); - - Assert.True(e.Has(EcsName)); - Assert.Equal("Foo", e.Name()); - } - - [Fact] - private void DeferNewWithNestedName() - { - using World world = World.Create(); - - Entity e = default; - - world.Defer(() => - { - e = world.Entity("Foo.Bar"); - Assert.True(e != 0); - }); - - Assert.True(e.Has(EcsName)); - Assert.Equal("Bar", e.Name()); - Assert.Equal(".Foo.Bar", e.Path()); - } - - - [Fact] - private void DeferNewWithScopeName() - { - using World world = World.Create(); - - Entity e = default; - Entity parent = world.Entity("Parent"); - - world.Defer(() => - { - parent.Scope(() => - { - e = world.Entity("Foo"); - Assert.True(e != 0); - }); - }); - - Assert.True(e.Has(EcsName)); - Assert.Equal("Foo", e.Name()); - Assert.Equal(".Parent.Foo", e.Path()); - } - - [Fact] - private void DeferNewWithScopeNestedName() - { - using World world = World.Create(); - - Entity e = default; - Entity parent = world.Entity("Parent"); - - world.Defer(() => - { - parent.Scope(() => - { - e = world.Entity("Foo.Bar"); - Assert.True(e != 0); - }); - }); - - Assert.True(e.Has(EcsName)); - Assert.Equal("Bar", e.Name()); - Assert.Equal(".Parent.Foo.Bar", e.Path()); - } - - [Fact] - private void DeferNewWithDeferredScopeNestedName() - { - using World world = World.Create(); - - Entity e = default; - Entity parent = default; - - world.Defer(() => - { - parent = world.Entity("Parent").Scope(() => - { - e = world.Entity("Foo.Bar"); - Assert.True(e != 0); - }); - }); - - Assert.True(parent.Has(EcsName)); - Assert.Equal("Parent", parent.Name()); - Assert.Equal(".Parent", parent.Path()); - - Assert.True(e.Has(EcsName)); - Assert.Equal("Bar", e.Name()); - Assert.Equal(".Parent.Foo.Bar", e.Path()); - } - - [Fact] - private void DeferNewWithScope() - { - using World world = World.Create(); - - Entity e = default; - Entity parent = world.Entity(); - - world.Defer(() => - { - parent.Scope(() => - { - e = world.Entity(); - Assert.True(e != 0); - }); - }); - - Assert.True(e.Has(EcsChildOf, parent)); - } - - [Fact] - private void DeferNewWithWith() - { - using World world = World.Create(); - - Entity e = default; - Entity tag = world.Entity(); - - world.Defer(() => - { - tag.With(() => - { - e = world.Entity(); - Assert.True(e != 0); - Assert.True(!e.Has(tag)); - }); - }); - - Assert.True(e.Has(tag)); - } - - [Fact] - private void DeferNewWithNameScopeWith() - { - using World world = World.Create(); - - Entity e = default; - Entity tag = world.Entity(); - Entity parent = world.Entity("Parent"); - - world.Defer(() => - { - tag.With(() => - { - parent.Scope(() => - { - e = world.Entity("Foo"); - Assert.True(e != 0); - Assert.True(!e.Has(tag)); - }); - Assert.True(!e.Has(tag)); - }); - Assert.True(!e.Has(tag)); - }); - - Assert.True(e.Has(tag)); - Assert.True(e.Has(EcsName)); - Assert.Equal("Foo", e.Name()); - Assert.Equal(".Parent.Foo", e.Path()); - } - - [Fact] - private void DeferNewWithNestedNameScopeWith() - { - using World world = World.Create(); - - Entity e = default; - Entity tag = world.Entity(); - Entity parent = world.Entity("Parent"); - - world.Defer(() => - { - tag.With(() => - { - parent.Scope(() => - { - e = world.Entity("Foo.Bar"); - Assert.True(e != 0); - Assert.True(!e.Has(tag)); - }); - Assert.True(!e.Has(tag)); - }); - Assert.True(!e.Has(tag)); - }); - - Assert.True(e.Has(tag)); - Assert.True(e.Has(EcsName)); - Assert.Equal("Bar", e.Name()); - Assert.Equal(".Parent.Foo.Bar", e.Path()); - } - - [Fact] - private void DeferWithWithImplicitComponent() - { - using World world = World.Create(); - - Entity e = default; - - world.Defer(() => - { - world.With(() => - { - e = world.Entity(); - Assert.True(!e.Has()); - }); - Assert.True(!e.Has()); - }); - - Assert.True(e.Has()); - } - - [Fact] - private void DeferSuspendResume() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - world.Defer(() => - { - e.Add(); - Assert.True(!e.Has()); - - world.DeferSuspend(); - e.Add(); - Assert.True(!e.Has()); - Assert.True(e.Has()); - world.DeferResume(); - - Assert.True(!e.Has()); - Assert.True(e.Has()); - }); - - Assert.True(e.Has()); - Assert.True(e.Has()); - } - - [Fact] - private void DeferEnsure() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - world.DeferBegin(); - Position* p = e.EnsurePtr(); - p->X = 10; - p->Y = 20; - world.DeferEnd(); - - p = e.GetMutPtr(); - Assert.True(p != null); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - } - - [Fact] - private void WithAfterBuilderMethod() - { - using World world = World.Create(); - - Entity a = world.Entity() - .Set(new Position(10, 20)) - .With(() => { world.Entity("X"); }); - - Entity b = world.Entity().Set(new Position(30, 40)) - .With(() => { world.Entity("Y"); }); - - Entity c = world.Entity().Set(new Position(50, 60)) - .With(EcsIsA, () => { world.Entity("Z"); }); - - Assert.True(a.Read((ref readonly Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - })); - - Assert.True(b.Read((ref readonly Position p) => - { - Assert.Equal(30, p.X); - Assert.Equal(40, p.Y); - })); - - Assert.True(c.Read((ref readonly Position p) => - { - Assert.Equal(50, p.X); - Assert.Equal(60, p.Y); - })); - - Entity x = world.Lookup("X"); - Assert.True(x != 0); - Assert.True(x.Has(a)); - - Entity y = world.Lookup("Y"); - Assert.True(y != 0); - Assert.True(y.Has(b)); - - Entity z = world.Lookup("Z"); - Assert.True(z != 0); - Assert.True(z.Has(EcsIsA, c)); - } - - [Fact] - private void WithBeforeBuilderMethod() - { - using World world = World.Create(); - - Entity a = world.Entity() - .With(() => { world.Entity("X"); }) - .Set(new Position(10, 20)); - - Entity b = world.Entity() - .With(() => { world.Entity("Y"); }) - .Set(new Position(30, 40)); - - Entity c = world.Entity() - .With(EcsIsA, () => { world.Entity("Z"); }) - .Set(new Position(50, 60)); - - Assert.True(a.Read((ref readonly Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - })); - - Assert.True(b.Read((ref readonly Position p) => - { - Assert.Equal(30, p.X); - Assert.Equal(40, p.Y); - })); - - Assert.True(c.Read((ref readonly Position p) => - { - Assert.Equal(50, p.X); - Assert.Equal(60, p.Y); - })); - - Entity x = world.Lookup("X"); - Assert.True(x != 0); - Assert.True(x.Has(a)); - - Entity y = world.Lookup("Y"); - Assert.True(y != 0); - Assert.True(y.Has(b)); - - Entity z = world.Lookup("Z"); - Assert.True(z != 0); - Assert.True(z.Has(EcsIsA, c)); - } - - [Fact] - private void ScopeAfterBuilderMethod() - { - using World world = World.Create(); - - world.Entity("P") - .Set(new Position(10, 20)) - .Scope(() => { world.Entity("C"); }); - - Entity c = world.Lookup("P.C"); - Assert.True(c != 0); - } - - [Fact] - private void ScopeBeforeBuilderMethod() - { - using World world = World.Create(); - - world.Entity("P") - .Scope(() => { world.Entity("C"); }) - .Set(new Position(10, 20)); - - Entity c = world.Lookup("P.C"); - Assert.True(c != 0); - } - - - [Fact] - private void EntityIdStr() - { - using World world = World.Create(); - - Id id = world.Entity("Foo"); - - Assert.Equal("Foo", id.Str()); - } - - [Fact] - private void PairIdStr() - { - using World world = World.Create(); - - Id id = world.Pair(world.Entity("Rel"), world.Entity("Obj")); - - Assert.Equal("(Rel,Obj)", id.Str()); - } - - [Fact] - private void RoleIdStr() - { - using World world = World.Create(); - - Id id = new Id(world, ECS_AUTO_OVERRIDE | world.Entity("Foo")); - - Assert.Equal("AUTO_OVERRIDE|Foo", id.Str()); - } - - [Fact] - private void IdStrFromEntity() - { - using World world = World.Create(); - - Entity id = world.Entity("Foo"); - - Assert.Equal("Foo", id.Str()); - } - - [Fact] - private void NullEntity() - { - Entity e = Entity.Null(); - Assert.True(e.Id == 0); - } - - [Fact] - private void NullEntityWithWorld() - { - using World world = World.Create(); - - Entity e = Entity.Null(world); - Assert.True(e.Id == 0); - Assert.True(e.World == world); - } - - [Fact] - private void NullEntityWith0() - { - Entity e = new Entity(0); - Assert.True(e.Id == 0); - Assert.True(e.World == null); - } - - [Fact] - private void NullENtityWithWorldWith0() - { - using World world = World.Create(); - - Entity e = Entity.Null(world); - Assert.True(e.Id == 0); - Assert.True(e.World == world); - } - - [Fact] - private void IsWildcard() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity(); - - Entity p0 = e1; - Id p1 = world.Pair(e1, e2); - Id p2 = world.Pair(e1, Ecs.Wildcard); - Id p3 = world.Pair(Ecs.Wildcard, e2); - Id p4 = world.Pair(Ecs.Wildcard, Ecs.Wildcard); - - Assert.False(e1.IsWildCard()); - Assert.False(e2.IsWildCard()); - Assert.False(p0.IsWildCard()); - Assert.False(p1.IsWildCard()); - Assert.True(p2.IsWildCard()); - Assert.True(p3.IsWildCard()); - Assert.True(p4.IsWildCard()); - } - - [Fact] - private void HasUlong() - { - using World world = World.Create(); - - ulong id1 = world.Entity(); - Assert.True(id1 != 0); - - ulong id2 = world.Entity(); - Assert.True(id2 != 0); - - Entity e = world.Entity() - .Add(id1); - - Assert.True(e != 0); - Assert.True(e.Has(id1)); - Assert.False(e.Has(id2)); - } - - [Fact] - private void HasPairUlong() - { - using World world = World.Create(); - - ulong id1 = world.Entity(); - Assert.True(id1 != 0); - - ulong id2 = world.Entity(); - Assert.True(id2 != 0); - - ulong id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id1, id2); - - Assert.True(e != 0); - Assert.True(e.Has(id1, id2)); - Assert.False(e.Has(id1, id3)); - } - - [Fact] - private void HasPairUlongWithType() - { - using World world = World.Create(); - - ulong id2 = world.Entity(); - Assert.True(id2 != 0); - - ulong id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id2); - - Assert.True(e != 0); - Assert.True(e.Has(id2)); - Assert.False(e.Has(id3)); - } - - [Fact] - private void HasId() - { - using World world = World.Create(); - - Id id1 = world.Entity(); - Assert.True(id1 != 0); - - Id id2 = world.Entity(); - Assert.True(id2 != 0); - - Entity e = world.Entity() - .Add(id1); - - Assert.True(e != 0); - Assert.True(e.Has(id1)); - Assert.False(e.Has(id2)); - } - - [Fact] - private void HasPairId() - { - using World world = World.Create(); - - Id id1 = world.Entity(); - Assert.True(id1 != 0); - - Id id2 = world.Entity(); - Assert.True(id2 != 0); - - Id id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id1, id2); - - Assert.True(e != 0); - Assert.True(e.Has(id1, id2)); - Assert.False(e.Has(id1, id3)); - } - - [Fact] - private void HasPairIdWithType() - { - using World world = World.Create(); - - Id id2 = world.Entity(); - Assert.True(id2 != 0); - - Id id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id2); - - Assert.True(e != 0); - Assert.True(e.Has(id2)); - Assert.False(e.Has(id3)); - } - - [Fact] - private void HasWildCardId() - { - using World world = World.Create(); - - Id id = world.Entity(); - Assert.True(id != 0); - - Entity e1 = world.Entity().Add(id); - Entity e2 = world.Entity(); - - Assert.True(e1 != 0); - Assert.True(e2 != 0); - - Assert.True(e1.Has(Ecs.Wildcard)); - Assert.False(e2.Has(Ecs.Wildcard)); - } - - [Fact] - private void HasWildCardPairId() - { - using World world = World.Create(); - - Id rel = world.Entity(); - Assert.True(rel != 0); - - Id obj = world.Entity(); - Assert.True(obj != 0); - - Id obj2 = world.Entity(); - Assert.True(obj2 != 0); - - Id w1 = world.Id(rel, Ecs.Wildcard); - Id w2 = world.Id(Ecs.Wildcard, obj); - - Entity e1 = world.Entity().Add(rel, obj); - Entity e2 = world.Entity().Add(rel, obj2); - - Assert.True(e1 != 0); - Assert.True(e2 != 0); - - Assert.True(e1.Has(w1)); - Assert.True(e1.Has(w2)); - - Assert.True(e2.Has(w1)); - Assert.False(e2.Has(w2)); - } - - [Fact] - private void OwnsUlong() - { - using World world = World.Create(); - - ulong id1 = world.Entity(); - Assert.True(id1 != 0); - - ulong id2 = world.Entity(); - Assert.True(id2 != 0); - - Entity e = world.Entity() - .Add(id1); - - Assert.True(e != 0); - Assert.True(e.Owns(id1)); - Assert.False(e.Owns(id2)); - } - - [Fact] - private void OwnsPairUlong() - { - using World world = World.Create(); - - ulong id1 = world.Entity(); - Assert.True(id1 != 0); - - ulong id2 = world.Entity(); - Assert.True(id2 != 0); - - ulong id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id1, id2); - - Assert.True(e != 0); - Assert.True(e.Owns(id1, id2)); - Assert.False(e.Owns(id1, id3)); - } - - [Fact] - private void OwnsPairUlongWithType() - { - using World world = World.Create(); - - ulong id2 = world.Entity(); - Assert.True(id2 != 0); - - ulong id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id2); - - Assert.True(e != 0); - Assert.True(e.Owns(id2)); - Assert.False(e.Owns(id3)); - } - - [Fact] - private void OwnsId() - { - using World world = World.Create(); - - Id id1 = world.Entity(); - Assert.True(id1 != 0); - - Id id2 = world.Entity(); - Assert.True(id2 != 0); - - Entity e = world.Entity() - .Add(id1); - - Assert.True(e != 0); - Assert.True(e.Owns(id1)); - Assert.False(e.Owns(id2)); - } - - [Fact] - private void OwnsPairId() - { - using World world = World.Create(); - - Id id1 = world.Entity(); - Assert.True(id1 != 0); - - Id id2 = world.Entity(); - Assert.True(id2 != 0); - - Id id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id1, id2); - - Assert.True(e != 0); - Assert.True(e.Owns(id1, id2)); - Assert.False(e.Owns(id1, id3)); - } - - [Fact] - private void OwnsWildCardId() - { - using World world = World.Create(); - - Id id = world.Entity(); - Assert.True(id != 0); - - Entity e1 = world.Entity().Add(id); - Entity e2 = world.Entity(); - - Assert.True(e1 != 0); - Assert.True(e2 != 0); - - Assert.True(e1.Owns(Ecs.Wildcard)); - Assert.False(e2.Owns(Ecs.Wildcard)); - } - - [Fact] - private void OwnsWildcardPair() - { - using World world = World.Create(); - - Id rel = world.Entity(); - Assert.True(rel != 0); - - Id obj = world.Entity(); - Assert.True(obj != 0); - - Id obj2 = world.Entity(); - Assert.True(obj2 != 0); - - Id w1 = world.Id(rel, Ecs.Wildcard); - Id w2 = world.Id(Ecs.Wildcard, obj); - - Entity e1 = world.Entity().Add(rel, obj); - Entity e2 = world.Entity().Add(rel, obj2); - - Assert.True(e1 != 0); - Assert.True(e2 != 0); - - Assert.True(e1.Owns(w1)); - Assert.True(e1.Owns(w2)); - - Assert.True(e2.Owns(w1)); - Assert.False(e2.Owns(w2)); - } - - [Fact] - private void OwnsPairIdWithType() - { - using World world = World.Create(); - - Id id2 = world.Entity(); - Assert.True(id2 != 0); - - Id id3 = world.Entity(); - Assert.True(id3 != 0); - - Entity e = world.Entity() - .Add(id2); - - Assert.True(e != 0); - Assert.True(e.Owns(id2)); - Assert.False(e.Owns(id3)); - } - - [Fact] - private void IdFromWorld() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Assert.True(e != 0); - - Id id1 = world.Id(e); - Assert.True(id1 != 0); - Assert.True(id1 == e); - Assert.True(id1.World == world); - Assert.False(id1.IsPair()); - Assert.False(id1.IsWildCard()); - - Id id2 = world.Id(Ecs.Wildcard); - Assert.True(id2 != 0); - Assert.True(id2 == Ecs.Wildcard); - Assert.True(id2.World == world); - Assert.False(id2.IsPair()); - Assert.True(id2.IsWildCard()); - } - - [Fact] - private void IdPairFromWorld() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Assert.True(rel != 0); - - Entity obj = world.Entity(); - Assert.True(obj != 0); - - Id id1 = world.Id(rel, obj); - Assert.True(id1 != 0); - Assert.True(id1.First() == rel); - Assert.True(id1.Second() == obj); - Assert.True(id1.World == world); - Assert.True(id1.IsPair()); - Assert.False(id1.IsWildCard()); - - Id id2 = world.Id(rel, Ecs.Wildcard); - Assert.True(id2 != 0); - Assert.True(id2.First() == rel); - Assert.True(id2.Second() == Ecs.Wildcard); - Assert.True(id2.World == world); - Assert.True(id2.IsPair()); - Assert.True(id2.IsWildCard()); - } - - [Fact] - private void IdDefaultFromWorld() - { - using World world = World.Create(); - - Id idDefault = world.Id(); - Assert.True(idDefault == 0); - } - - [Fact] - private void IsA() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - - Entity e = world.Entity().IsA(@base); - - Assert.True(e.Has(EcsIsA, @base)); - } - - [Fact] - private void IsAWithType() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - - Entity e = world.Entity().IsA(); - - Assert.True(e.Has(Ecs.IsA, @base)); - Assert.True(e.HasSecond(Ecs.IsA)); - } - - [Fact] - private void ChildOf() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - - Entity e = world.Entity().ChildOf(@base); - - Assert.True(e.Has(Ecs.ChildOf, @base)); - } - - [Fact] - private void ChildOfWithType() - { - using World world = World.Create(); - - Entity @base = world.Entity(); - - Entity e = world.Entity().ChildOf(); - - Assert.True(e.Has(EcsChildOf, @base)); - Assert.True(e.HasSecond(EcsChildOf)); - } - - [Fact] - private void SlotOf() - { - using World world = World.Create(); - - Entity @base = world.Prefab(); - Entity baseChild = world.Prefab() - .ChildOf(@base) - .SlotOf(@base); - - Assert.True(baseChild.Has(Ecs.SlotOf, @base)); - - Entity inst = world.Entity().IsA(@base); - Assert.True(inst.Has(baseChild, Ecs.Wildcard)); - } - - [Fact] - private void SlotOfWithType() - { - using World world = World.Create(); - - Entity @base = world.Prefab(); - Entity baseChild = world.Prefab() - .ChildOf(@base) - .SlotOf(); - - Assert.True(baseChild.Has(Ecs.SlotOf, @base)); - - Entity inst = world.Entity().IsA(@base); - Assert.True(inst.Has(baseChild, Ecs.Wildcard)); - } - - [Fact] - private void Slot() - { - using World world = World.Create(); - - Entity @base = world.Prefab(); - Entity baseChild = world.Prefab() - .ChildOf(@base).Slot(); - - Assert.True(baseChild.Has(Ecs.SlotOf, @base)); - - Entity inst = world.Entity().IsA(@base); - Assert.True(inst.Has(baseChild, Ecs.Wildcard)); - } - - [Fact] - private void IdGetEntity() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - Id id = world.Id(e); - - Assert.True(id.ToEntity() == e); - } - - [Fact] - private void EachInStage() - { - using World world = World.Create(); - - Entity e = world.Entity().Add(); - Assert.True(e.Has()); - - world.ReadonlyBegin(); - - World s = world.GetStage(0); - Entity em = e.Mut(s); - Assert.True(em.Has()); - - int count = 0; - - em.Each((Entity obj) => - { - count++; - Assert.True(obj == world.Id()); - }); - - Assert.Equal(1, count); - - world.ReadonlyEnd(); - } - - [Fact] - private void IterRecycledParent() - { - using World world = World.Create(); - - Entity e = world.Entity(); - e.Destruct(); - - Entity e2 = world.Entity(); - Assert.True(e != e2); - Assert.True((uint)e.Id == (uint)e2.Id); - - Entity eChild = world.Entity().ChildOf(e2); - int count = 0; - - e2.Children((Entity child) => - { - count++; - Assert.True(child == eChild); - }); - - Assert.Equal(1, count); - } - - [Fact] - private void GetLambdaFromStage() - { - using World world = World.Create(); - - Entity e = world.Entity().Set(new Position(10, 20)); - - world.ReadonlyBegin(); - - World stage = world.GetStage(0); - - bool invoked = false; - e.Mut(stage).Read((ref readonly Position p) => - { - invoked = true; - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - }); - Assert.True(invoked); - - world.ReadonlyEnd(); - } - - - [Fact] - private void GetObjByTemplate() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity o1 = world.Entity(); - Entity o2 = world.Entity(); - - e1.Add(o1); - e1.Add(o2); - - Assert.True(o1 == e1.Target()); - Assert.True(o1 == e1.Target(0)); - Assert.True(o2 == e1.Target(1)); - } - - [Fact] - private void CreateNamedTwiceDeferred() - { - using World world = World.Create(); - - world.DeferBegin(); - - Entity e1 = world.Entity("e"); - Entity e2 = world.Entity("e"); - - Entity f1 = world.Entity("p.f"); - Entity f2 = world.Entity("p.f"); - - Entity g1 = default; - Entity g2 = default; - - world.Scope(world.Entity("q"), () => { g1 = world.Entity("g"); }); - - world.Scope(world.Entity("q"), () => { g2 = world.Entity("g"); }); - - world.DeferEnd(); - - Assert.Equal(".e", e1.Path()); - Assert.Equal(".p.f", f1.Path()); - Assert.Equal(".q.g", g1.Path()); - - Assert.True(e1 == e2); - Assert.True(f1 == f2); - Assert.True(g1 == g2); - } - - [Fact] - private void Clone() - { - using World world = World.Create(); - - PositionInitialized v = new PositionInitialized(10, 20); - - Entity src = world.Entity().Add().Set(v); - Entity dst = src.Clone(false); - Assert.True(dst.Has()); - Assert.True(dst.Has()); - - PositionInitialized* ptr = dst.GetPtr(); - Assert.True(ptr != null); - Assert.NotEqual(10, ptr->X); - Assert.NotEqual(20, ptr->Y); - } - - [Fact] - private void CloneWithValue() - { - using World world = World.Create(); - - PositionInitialized v = new PositionInitialized(10, 20); - - Entity src = world.Entity().Add().Set(v); - Entity dst = src.Clone(); - Assert.True(dst.Has()); - Assert.True(dst.Has()); - - PositionInitialized* ptr = dst.GetPtr(); - Assert.True(ptr != null); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void CloneToExisting() - { - using World world = World.Create(); - - PositionInitialized v = new PositionInitialized(10, 20); - - Entity src = world.Entity().Add().Set(v); - Entity dst = world.Entity(); - Entity result = src.Clone(true, dst); - Assert.True(result == dst); - - Assert.True(dst.Has()); - Assert.True(dst.Has()); - - PositionInitialized* ptr = dst.GetPtr(); - Assert.True(ptr != null); - Assert.Equal(10, ptr->X); - Assert.Equal(20, ptr->Y); - } - - [Fact] - private void SetDocName() - { - using World world = World.Create(); - - Entity e = world.Entity("foo_bar") - .SetDocName("Foo Bar"); - - Assert.Equal("foo_bar", e.Name()); - Assert.Equal("Foo Bar", e.DocName()); - } - - [Fact] - private void SetDocBrief() - { - using World world = World.Create(); - - Entity e = world.Entity("foo_bar") - .SetDocBrief("Foo Bar"); - - Assert.Equal("foo_bar", e.Name()); - Assert.Equal("Foo Bar", e.DocBrief()); - } - - [Fact] - private void SetDocDetail() - { - using World world = World.Create(); - - Entity e = world.Entity("foo_bar") - .SetDocDetail("Foo Bar"); - - Assert.Equal("foo_bar", e.Name()); - Assert.Equal("Foo Bar", e.DocDetail()); - } - - [Fact] - private void SetDocLink() - { - using World world = World.Create(); - - Entity e = world.Entity("foo_bar") - .SetDocLink("Foo Bar"); - - Assert.Equal("foo_bar", e.Name()); - Assert.Equal("Foo Bar", e.DocLink()); - } - - [Fact] - private void EntityWithRootName() - { - using World world = World.Create(); - - Entity e = world.Entity(".foo"); - Assert.Equal("foo", e.Name()); - Assert.Equal(".foo", e.Path()); - } - - [Fact] - private void EntityWithRootNameFromScope() - { - using World world = World.Create(); - - Entity p = world.Entity("parent"); - world.SetScope(p); - Entity e = world.Entity(".foo"); - world.SetScope(0); - - Assert.Equal("foo", e.Name()); - Assert.Equal(".foo", e.Path()); - } - - [Fact] - private void EntityWithType() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - Assert.Equal("EntityType", e.Name()); - Assert.Equal(".EntityType", e.Path()); - - Entity e2 = world.Entity(); - Assert.True(e == e2); - } - - [Fact] - private void PrefabWithType() - { - using World world = World.Create(); - - Entity e = world.Prefab(); - - Assert.Equal("EntityType", e.Name()); - Assert.Equal(".EntityType", e.Path()); - Assert.True(e.Has()); - Assert.True(e.Has(Ecs.Prefab)); - - Entity e2 = world.Entity(); - Assert.True(e == e2); - } - - [Fact] - private void PrefabHierarchyWithTypes() - { - using World world = World.Create(); - - Entity turret = world.Prefab(); - Entity turretBase = world.Prefab(); - - Assert.True(turret != 0); - Assert.True(turretBase != 0); - Assert.True(turretBase.Has(EcsChildOf, turret)); - - Assert.Equal(".Turret", turret.Path()); - Assert.Equal(".Turret.Base", turretBase.Path()); - - Assert.Equal("Turret", turret.Symbol()); - Assert.Equal("Turret.Base", turretBase.Symbol()); - - Entity railgun = world.Prefab().IsA(); - Entity railgunBase = railgun.Lookup("Base"); - Entity railgunHead = world.Prefab(); - Entity railgunBeam = world.Prefab(); - - Assert.True(railgun != 0); - Assert.True(railgunBase != 0); - Assert.True(railgunHead != 0); - Assert.True(railgunBeam != 0); - Assert.True(railgunBase.Has(EcsChildOf, railgun)); - Assert.True(railgunHead.Has(EcsChildOf, railgun)); - Assert.True(railgunBeam.Has(EcsChildOf, railgun)); - - Assert.Equal(".Railgun", railgun.Path()); - Assert.Equal(".Railgun.Base", railgunBase.Path()); - Assert.Equal(".Railgun.Head", railgunHead.Path()); - Assert.Equal(".Railgun.Beam", railgunBeam.Path()); - - Assert.Equal("Railgun", railgun.Symbol()); - Assert.Equal("Railgun.Head", railgunHead.Symbol()); - Assert.Equal("Railgun.Beam", railgunBeam.Symbol()); - } - - [Fact] - private void PrefabHierarchyWithRootTypes() - { - using World world = World.Create(); - - Entity turret = world.Prefab(); - Entity turretBase = world.Prefab().ChildOf(); - - Assert.True(turret != 0); - Assert.True(turretBase != 0); - Assert.True(turretBase.Has(EcsChildOf, turret)); - - Assert.Equal(".Turret", turret.Path()); - Assert.Equal(".Turret.Base", turretBase.Path()); - - Assert.Equal("Turret", turret.Symbol()); - Assert.Equal("Base", turretBase.Symbol()); - - Entity inst = world.Entity().IsA(); - Assert.True(inst != 0); - - Entity instBase = inst.Lookup("Base"); - Assert.True(instBase != 0); - } - - [Fact] - private void PrefabHierarchyWithChildOverride() - { - using World world = World.Create(); - - Entity t = world.Prefab(); - Entity tb = world.Prefab().Add(); - Assert.True(t != 0); - Assert.True(tb != 0); - - Entity r = world.Prefab().IsA(); - Entity rb = world.Prefab().Add(); - Assert.True(r != 0); - Assert.True(rb != 0); - - Entity i = world.Entity().IsA(); - Assert.True(i != 0); - Entity ib = i.Lookup("Base"); - Assert.True(ib != 0); - Assert.True(ib.Has()); - Assert.True(ib.Has()); - } - - [Fact] - private void EntityWithNestedType() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity p = world.Entity(); - - Assert.Equal("EntityType", e.Name()); - Assert.Equal(".Parent.EntityType", e.Path()); - Assert.True(e.Has(EcsChildOf, p)); - - Entity e2 = world.Entity(); - Assert.True(e == e2); - } - - [Fact] - private void EntityWithTypeDefer() - { - using World world = World.Create(); - - world.DeferBegin(); - Entity e = world.Entity(); - world.DeferEnd(); - - Assert.Equal("Tag", e.Name()); - Assert.Equal("Tag", e.Symbol()); - Assert.True(world.Id() == e); - } - - [Fact] - private void AddIfTrueT() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - e.AddIf(true); - Assert.True(e.Has()); - } - - [Fact] - private void AddIfFalseT() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - e.AddIf(false); - Assert.True(!e.Has()); - - e.Add(); - Assert.True(e.Has()); - e.AddIf(false); - Assert.True(!e.Has()); - } - - [Fact] - private void AddIfTrueId() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity t = world.Entity(); - - e.AddIf(true, t); - Assert.True(e.Has(t)); - } - - [Fact] - private void AddIfFalseId() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity t = world.Entity(); - - e.AddIf(false, t); - Assert.True(!e.Has(t)); - e.Add(t); - Assert.True(e.Has(t)); - e.AddIf(false, t); - Assert.True(!e.Has(t)); - } - - [Fact] - private void AddIfTrueRO() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - e.AddIf(true); - Assert.True(e.Has()); - } - - [Fact] - private void AddIfFalseRO() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - e.AddIf(false); - Assert.True(!e.Has()); - e.Add(); - Assert.True(e.Has()); - e.AddIf(false); - Assert.True(!e.Has()); - } - - [Fact] - private void AddIfTrueRo() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity o = world.Entity(); - - e.AddIf(true, o); - Assert.True(e.Has(o)); - } - - [Fact] - private void AddIfFalseRo() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity o = world.Entity(); - - e.AddIf(false, o); - Assert.True(!e.Has(o)); - e.Add(o); - Assert.True(e.Has(o)); - e.AddIf(false, o); - Assert.True(!e.Has(o)); - } - - [Fact] - private void AddIfTruero() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity r = world.Entity(); - Entity o = world.Entity(); - - e.AddIf(true, r, o); - Assert.True(e.Has(r, o)); - } - - [Fact] - private void AddIfFalsero() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity r = world.Entity(); - Entity o = world.Entity(); - - e.AddIf(false, r, o); - Assert.True(!e.Has(r, o)); - e.Add(r, o); - Assert.True(e.Has(r, o)); - e.AddIf(false, r, o); - Assert.True(!e.Has(r, o)); - } - - [Fact] - private void AddIfExclusivero() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity r = world.Entity().Add(Ecs.Exclusive); - Entity o1 = world.Entity(); - Entity o2 = world.Entity(); - - e.Add(r, o1); - Assert.True(e.Has(r, o1)); - - e.AddIf(true, r, o2); - Assert.True(!e.Has(r, o1)); - Assert.True(e.Has(r, o2)); - - e.AddIf(false, r, o1); - Assert.True(!e.Has(r, o1)); - Assert.True(!e.Has(r, o2)); - } - - [Fact] - private void AddIfExclusiveRo() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Exclusive); - - Entity e = world.Entity(); - Entity o1 = world.Entity(); - Entity o2 = world.Entity(); - - e.Add(o1); - Assert.True(e.Has(o1)); - - e.AddIf(true, o2); - Assert.True(!e.Has(o1)); - Assert.True(e.Has(o2)); - - e.AddIf(false, o1); - Assert.True(!e.Has(o1)); - Assert.True(!e.Has(o2)); - } - - [Fact] - private void AddIfExclusiveRO() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Exclusive); - - Entity e = world.Entity(); - - e.Add(); - Assert.True(e.Has()); - - e.AddIf(true); - Assert.True(!e.Has()); - Assert.True(e.Has()); - - e.AddIf(false); - Assert.True(!e.Has()); - Assert.True(!e.Has()); - } - - [Fact] - private void AddIfPairWith0Object() - { - using World world = World.Create(); - - Entity e = world.Entity(); - Entity r = world.Entity(); - Entity o1 = world.Entity(); - - e.Add(r, o1); - Assert.True(e.Has(r, o1)); - - e.AddIf(false, r, 0); - Assert.True(!e.Has(r, o1)); - Assert.True(!e.Has(r, Ecs.Wildcard)); - } - - [Fact] - private void ChildrenWithCustomRelation() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - - Entity parent = world.Entity(); - Entity child1 = world.Entity().Add(rel, parent); - Entity child2 = world.Entity().Add(rel, parent); - world.Entity().ChildOf(parent); - - bool child1Found = false; - bool child2Found = false; - int count = 0; - - parent.Children(rel, (Entity child) => - { - if (child == child1) - child1Found = true; - else if (child == child2) child2Found = true; - count++; - }); - - Assert.Equal(2, count); - Assert.True(child1Found); - Assert.True(child2Found); - } - - [Fact] - private void ChildrenWithCustomRelationType() - { - using World world = World.Create(); - - Entity parent = world.Entity(); - Entity child1 = world.Entity().Add(parent); - Entity child2 = world.Entity().Add(parent); - world.Entity().ChildOf(parent); - - bool child1Found = false; - bool child2Found = false; - int count = 0; - - parent.Children((Entity child) => - { - if (child == child1) - child1Found = true; - else if (child == child2) child2Found = true; - count++; - }); - - Assert.Equal(2, count); - Assert.True(child1Found); - Assert.True(child2Found); - } - - [Fact] - private void ChildrenWithThis() - { - using World world = World.Create(); - - int count = 0; - world.Entity(Ecs.This).Children((Entity e) => { count++; }); - Assert.True(count == 0); - } - - [Fact] - private void ChildrenWithWildcard() - { - using World world = World.Create(); - - int count = 0; - world.Entity(Ecs.Wildcard).Children((Entity e) => { count++; }); - Assert.True(count == 0); - } - - [Fact] - private void ChildrenWithAny() - { - using World world = World.Create(); - - int count = 0; - world.Entity(Ecs.Any).Children((Entity e) => { count++; }); - Assert.True(count == 0); - } - - [Fact] - private void GetDepth() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity().ChildOf(e1); - Entity e3 = world.Entity().ChildOf(e2); - Entity e4 = world.Entity().ChildOf(e3); - - Assert.Equal(0, e1.Depth(EcsChildOf)); - Assert.Equal(1, e2.Depth(EcsChildOf)); - Assert.Equal(2, e3.Depth(EcsChildOf)); - Assert.Equal(3, e4.Depth(EcsChildOf)); - } - - [Fact] - private void GetDepthWithType() - { - using World world = World.Create(); - - world.Component().Add(EcsTraversable); - - Entity e1 = world.Entity(); - Entity e2 = world.Entity().Add(e1); - Entity e3 = world.Entity().Add(e2); - Entity e4 = world.Entity().Add(e3); - - Assert.Equal(0, e1.Depth()); - Assert.Equal(1, e2.Depth()); - Assert.Equal(2, e3.Depth()); - Assert.Equal(3, e4.Depth()); - } - - [Fact] - private void SetAlias() - { - using World world = World.Create(); - - Entity e = world.Entity("parent.child"); - e.SetAlias("parent_child"); - - Assert.True(e == world.Lookup("parent.child")); - Assert.True(e == world.Lookup("parent_child")); - } - - [Fact] - private void EntityLookupNotRecursive() - { - using World world = World.Create(); - - Entity child = default; - Entity foo = default; - - world.Entity("parent").Scope(() => - { - child = world.Entity("child"); - foo = world.Entity("foo"); - }); - - Assert.True(child.Lookup("foo") == 0); - Assert.True(child.Lookup("foo", true) == foo); - } - - [Fact] - private void WorldLookupNotRecursive() - { - using World world = World.Create(); - - Entity child = default; - Entity foo = default; - - world.Entity("parent").Scope(() => - { - child = world.Entity("child"); - foo = world.Entity("foo"); - }); - - child.Scope(() => - { - Assert.True(world.Lookup("foo") == foo); - Assert.True(world.Lookup("foo", ".", ".", false) == 0); - }); - } - - [Fact] - private void WorldLookupCustomSep() - { - using World world = World.Create(); - - Entity parent = world.Entity("parent"); - Entity child = default; - Entity foo = default; - - parent.Scope(() => - { - child = world.Entity("child"); - foo = world.Entity("foo"); - }); - - Assert.True(world.Lookup("parent::child", "::") == child); - Assert.True(world.Lookup("parent::foo", "::") == foo); - } - - [Fact] - private void WorldLookupCustomRootSep() - { - using World world = World.Create(); - - Entity parent = world.Entity("parent"); - Entity child = default; - Entity foo = default; - - parent.Scope(() => - { - child = world.Entity("child"); - foo = world.Entity("foo"); - }); - - Assert.True(world.Lookup("::parent::child", "::", "::") == child); - Assert.True(world.Lookup("::parent::foo", "::", "::") == foo); - } - - [Fact] - private void DependsOn() - { - using World world = World.Create(); - - Entity a = world.Entity(); - Entity b = world.Entity().DependsOn(a); - Assert.True(b.Has(Ecs.DependsOn, a)); - } - - [Fact] - private void DependsOnType() - { - using World world = World.Create(); - - Entity b = world.Entity().DependsOn(); - Assert.True(b.Has(Ecs.DependsOn, world.Id())); - } - - [Fact] - private void SetSparse() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - - Entity e = world.Entity().Set(new Velocity(1, 2)); - - Assert.True(e.Has()); - - Velocity* v = e.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void Insert1Sparse() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - - Entity e = world.Entity().Insert((ref Velocity v) => - { - v.X = 1; - v.Y = 2; - }); - - Assert.True(e.Has()); - - Velocity* v = e.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void Insert2With1Sparse() - { - using World world = World.Create(); - - world.Component(); - world.Component().Add(Ecs.Sparse); - - Entity e = world.Entity().Insert((ref Position p, ref Velocity v) => - { - p.X = 10; - p.Y = 20; - v.X = 1; - v.Y = 2; - }); - - Assert.True(e.Has()); - Assert.True(e.Has()); - - Position* p = e.GetPtr(); - Assert.Equal(10, p->X); - Assert.Equal(20, p->Y); - - Velocity* v = e.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void OverrideSparse() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - - Entity @base = world.Entity().Set(new Velocity(1, 2)); - - Entity e = world.Entity().IsA(@base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Velocity* v = e.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - } - - [Fact] - private void DeleteWithOverrideSparse() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - - Entity @base = world.Entity().Set(new Velocity(1, 2)); - - Entity e = world.Entity().IsA(@base); - - Assert.True(e.Has()); - Assert.True(e.Owns()); - - Velocity* v = e.GetPtr(); - Assert.Equal(1, v->X); - Assert.Equal(2, v->Y); - - e.Destruct(); - } - - [Fact] - private void IterType() - { - using World world = World.Create(); - - Entity e = world.Entity().Add().Add(); - - int count = 0; - bool posFound = false; - bool velocityFound = false; - - foreach (Id id in e.Type()) - { - count++; - - if (id == world.Id()) - posFound = true; - - if (id == world.Id()) - velocityFound = true; - } - - Assert.Equal(2, count); - Assert.True(posFound); - Assert.True(velocityFound); - } - - [Fact] - private void IterEmptyType() - { - using World world = World.Create(); - - Entity e = world.Entity(); - - int count = 0; - - foreach (Id id in e.Type()) - { - Assert.True(id != 0); - count++; - } - - Assert.Equal(0, count); - } -} +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using Flecs.NET.Core; +using Xunit; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Tests.Cpp; + +[SuppressMessage("ReSharper", "UnusedParameter.Local")] +[SuppressMessage("ReSharper", "ParameterOnlyUsedForPreconditionCheck.Local")] +[SuppressMessage("ReSharper", "AccessToDisposedClosure")] +public unsafe class EntityTests +{ + [Fact] + public void New() + { + using World world = World.Create(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + } + + [Fact] + public void NewNamed() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo"); + Assert.True(entity != 0); + Assert.Equal("Foo", entity.Name()); + } + + [Fact] + public void NewNamedFromScope() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo"); + Assert.True(entity != 0); + Assert.Equal("Foo", entity.Name()); + + Entity prev = world.SetScope(entity); + + Entity child = world.Entity("Bar"); + Assert.True(child != 0); + + world.SetScope(prev); + + Assert.Equal("Bar", child.Name()); + Assert.Equal(".Foo.Bar", child.Path()); + } + + [Fact] + private void NewNestedNamedFromFromScope() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo"); + Assert.True(entity != 0); + Assert.Equal("Foo", entity.Name()); + + Entity prev = world.SetScope(entity); + + Entity child = world.Entity("Bar.Hello"); + Assert.True(child != 0); + + world.SetScope(prev); + + Assert.Equal("Hello", child.Name()); + Assert.Equal(".Foo.Bar.Hello", child.Path()); + } + + [Fact] + private void NewNestedNamedFromNestedScope() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo.Bar"); + Assert.True(entity != 0); + Assert.Equal("Bar", entity.Name()); + Assert.Equal(".Foo.Bar", entity.Path()); + + Entity prev = world.SetScope(entity); + + Entity child = world.Entity("Hello.World"); + Assert.True(child != 0); + + world.SetScope(prev); + + Assert.Equal("World", child.Name()); + Assert.Equal(".Foo.Bar.Hello.World", child.Path()); + } + + [Fact] + private void NewAdd() + { + using World world = World.Create(); + + world.Component(); + + Entity entity = world.Entity() + .Add(); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + } + + [Fact] + private void NewAdd2() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Add() + .Add(); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + Assert.True(entity.Has()); + } + + [Fact] + private void NewSet() + { + using World world = World.Create(); + + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + Position* p = entity.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void NewSet2() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + Assert.True(entity.Has()); + + Position* p = entity.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Velocity* v = entity.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void Add() + { + using World world = World.Create(); + + world.Component(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(); + Assert.True(entity.Has()); + } + + [Fact] + private void Remove() + { + using World world = World.Create(); + + world.Component(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(); + Assert.True(entity.Has()); + + entity.Remove(); + Assert.True(!entity.Has()); + } + + [Fact] + private void Set() + { + using World world = World.Create(); + + world.Component(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Set(new Position(10, 20)); + Assert.True(entity.Has()); + + Position* p = entity.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void Add2() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add() + .Add(); + + Assert.True(entity.Has()); + Assert.True(entity.Has()); + } + + [Fact] + private void AddEntity() + { + using World world = World.Create(); + + Entity tag = world.Entity(); + Assert.True(tag != 0); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(tag); + Assert.True(entity.Has(tag)); + } + + [Fact] + private void AddChildOf() + { + using World world = World.Create(); + + Entity parent = world.Entity(); + Assert.True(parent != 0); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(EcsChildOf, parent); + Assert.True(entity.Has(EcsChildOf, parent)); + } + + [Fact] + private void AddInstanceOf() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + Assert.True(@base != 0); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(EcsIsA, @base); + Assert.True(entity.Has(EcsIsA, @base)); + } + + [Fact] + private void Remove2() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add() + .Add(); + + Assert.True(entity.Has()); + Assert.True(entity.Has()); + + entity.Remove() + .Remove(); + + Assert.True(!entity.Has()); + Assert.True(!entity.Has()); + } + + [Fact] + private void Set2() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + Assert.True(entity.Has()); + Assert.True(entity.Has()); + + Position* p = entity.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Velocity* v = entity.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void RemoveEntity() + { + using World world = World.Create(); + + Entity tag = world.Entity(); + Assert.True(tag != 0); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(tag); + Assert.True(entity.Has(tag)); + + entity.Remove(tag); + Assert.True(!entity.Has(tag)); + } + + [Fact] + private void RemoveChildOf() + { + using World world = World.Create(); + + Entity parent = world.Entity(); + Assert.True(parent != 0); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(EcsChildOf, parent); + Assert.True(entity.Has(EcsChildOf, parent)); + + entity.Remove(EcsChildOf, parent); + Assert.True(!entity.Has(EcsChildOf, parent)); + } + + [Fact] + private void RemoveInstanceOf() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + Assert.True(@base != 0); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + entity.Add(EcsIsA, @base); + Assert.True(entity.Has(EcsIsA, @base)); + + entity.Remove(EcsIsA, @base); + Assert.True(!entity.Has(EcsIsA, @base)); + } + + [Fact] + private void GetGeneric() + { + using World world = World.Create(); + + Component position = world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + void* voidPointer = entity.GetPtr(position); + Assert.True(voidPointer != null); + + Position* p = (Position*)voidPointer; + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + + [Fact] + private void EnsureGeneric() + { + using World world = World.Create(); + + Component position = world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + bool invoked = false; + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Position p) => { invoked = true; }); + + void* voidPointer = entity.EnsurePtr(position); + Assert.True(voidPointer != null); + + Position* p = (Position*)voidPointer; + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + entity.Modified(position); + Assert.True(invoked); + } + + [Fact] + private void GetGenericWithId() + { + using World world = World.Create(); + + Component position = world.Component(); + Id id = position; + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + void* voidPointer = entity.GetPtr(id); + Assert.True(voidPointer != null); + + Position* p = (Position*)voidPointer; + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void GetGenericWithUlong() + { + using World world = World.Create(); + + Component position = world.Component(); + ulong id = position; + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + void* voidPointer = entity.GetPtr(id); + Assert.True(voidPointer != null); + + Position* p = (Position*)voidPointer; + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + + [Fact] + private void EnsureGenericWithId() + { + using World world = World.Create(); + + Component position = world.Component(); + Id id = position; + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + bool invoked = false; + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Position p) => { invoked = true; }); + + void* voidPointer = entity.GetPtr(id); + Assert.True(voidPointer != null); + + Position* p = (Position*)voidPointer; + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + entity.Modified(id); + Assert.True(invoked); + } + + [Fact] + private void EnsureGenericWithUlong() + { + using World world = World.Create(); + + Component position = world.Component(); + ulong id = position; + + Entity entity = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(entity != 0); + Assert.True(entity.Has()); + + bool invoked = false; + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Position p) => { invoked = true; }); + + void* voidPointer = entity.EnsurePtr(id); + Assert.True(voidPointer != null); + + Position* p = (Position*)voidPointer; + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + entity.Modified(id); + Assert.True(invoked); + } + + [Fact] + private void GetMutWithId() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + Position* p = (Position*)e.GetMutPtr(world.Id()); + Assert.True(p == null); + + e.Set(new Position(10, 20)); + + p = (Position*)e.GetMutPtr(world.Id()); + Assert.True(p != null); + + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void GetMutT() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + Position* p = e.GetMutPtr(); + Assert.True(p == null); + + e.Set(new Position(10, 20)); + + p = e.GetMutPtr(); + Assert.True(p != null); + + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void GetMutrt() + { + using World world = World.Create(); + + Entity tgt = world.Entity(); + Entity e = world.Entity(); + + Position* p = (Position*)e.GetMutPtr(world.Id(), tgt); + Assert.True(p == null); + + e.Set(tgt, new Position(10, 20)); + + p = (Position*)e.GetMutPtr(world.Id(), tgt); + Assert.True(p != null); + + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void GetMutRt() + { + using World world = World.Create(); + + Entity tgt = world.Entity(); + Entity e = world.Entity(); + + Position* p = e.GetMutPtr(tgt); + Assert.True(p == null); + + e.Set(tgt, new Position(10, 20)); + + p = e.GetMutPtr(tgt); + Assert.True(p != null); + + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void GetMutRT() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + Position* p = e.GetMutFirstPtr(); + Assert.True(p == null); + + e.Set(new Position(10, 20)); + + p = e.GetMutFirstPtr(); + Assert.True(p != null); + + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void GetMutrT() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity e = world.Entity(); + + Position* p = e.GetMutSecondPtr(rel); + Assert.True(p == null); + + e.SetSecond(rel, new Position(10, 20)); + + p = e.GetMutSecondPtr(rel); + Assert.True(p != null); + + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void SetGeneric() + { + using World world = World.Create(); + + Component position = world.Component(); + + Position p = new Position(10, 20); + + Entity e = world.Entity() + .SetUntyped(position, sizeof(Position), &p); + + Assert.True(e.Has()); + Assert.True(e.Has(position)); + + Position* ptr = e.GetPtr(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void SetGenericWithId() + { + using World world = World.Create(); + + Component position = world.Component(); + Id id = position; + + Position p = new Position(10, 20); + + Entity e = world.Entity() + .SetUntyped(id, sizeof(Position), &p); + + Assert.True(e.Has()); + Assert.True(e.Has(id)); + + Position* ptr = e.GetPtr(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void SetGenericWithUlong() + { + using World world = World.Create(); + + Component position = world.Component(); + ulong id = position; + + Position p = new Position(10, 20); + + Entity e = world.Entity() + .SetUntyped(id, sizeof(Position), &p); + + Assert.True(e.Has()); + Assert.True(e.Has(id)); + + Position* ptr = e.GetPtr(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void SetGenericNoSize() + { + using World world = World.Create(); + + Component position = world.Component(); + + Position p = new Position(10, 20); + + Entity e = world.Entity() + .SetUntyped(position, &p); + + Assert.True(e.Has()); + Assert.True(e.Has(position)); + + Position* ptr = e.GetPtr(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void SetGenericNoSizeWithId() + { + using World world = World.Create(); + + Component position = world.Component(); + Id id = position; + + Position p = new Position(10, 20); + + Entity e = world.Entity() + .SetUntyped(id, &p); + + Assert.True(e.Has()); + Assert.True(e.Has(id)); + + Position* ptr = e.GetPtr(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void SetGenericNoSizeWithUlong() + { + using World world = World.Create(); + + Component position = world.Component(); + ulong id = position; + + Position p = new Position(10, 20); + + Entity e = world.Entity() + .SetUntyped(id, &p); + + Assert.True(e.Has()); + Assert.True(e.Has(id)); + + Position* ptr = e.GetPtr(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void AddRole() + { + using World world = World.Create(); + + Entity entity = world.Entity(); + + entity = entity.AddFlags(ECS_PAIR); + + Assert.True((entity & ECS_PAIR) != 0); + } + + [Fact] + private void RemoveRole() + { + using World world = World.Create(); + + Entity entity = world.Entity(); + + ulong id = entity; + + entity = entity.AddFlags(ECS_PAIR); + + Assert.True((entity & ECS_PAIR) != 0); + + entity = entity.RemoveFlags(); + + Assert.True(entity == id); + } + + [Fact] + private void HasRole() + { + using World world = World.Create(); + + Entity entity = world.Entity(); + + entity = entity.AddFlags(ECS_PAIR); + + Assert.True(entity.HasFlags(ECS_PAIR)); + + entity = entity.RemoveFlags(); + + Assert.True(!entity.HasFlags(ECS_PAIR)); + } + + [Fact] + private void PairRole() + { + using World world = World.Create(); + + Entity a = world.Entity(); + Entity b = world.Entity(); + + Id pair = new Id(a, b); + pair = pair.AddFlags(ECS_PAIR); + + Assert.True(pair.HasFlags(ECS_PAIR)); + + Entity rel = pair.First(); + Entity obj = pair.Second(); + + Assert.True(rel == a); + Assert.True(obj == b); + } + + [Fact] + private void EqualsTrue() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity(); + + Entity e12 = world.Entity(e1); + Entity e22 = world.Entity(e2); + + Assert.True(e1 == e12); + Assert.True(e2 == e22); + Assert.True(e1 >= e12); + Assert.True(e1 <= e12); + Assert.True(e2 >= e22); + Assert.True(e2 <= e22); + Assert.True(e1 != e2); + + Assert.True(!(e2 == e12)); + Assert.True(!(e1 == e22)); + Assert.True(!(e2 <= e12)); + Assert.True(!(e1 >= e22)); + } + + [Fact] + private void Compare0() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity e0 = world.Entity(0); + Entity e02 = world.Entity(0); + + Assert.True(e != e0); + Assert.True(e > e0); + Assert.True(e >= e0); + Assert.True(e0 < e); + Assert.True(e0 <= e); + + Assert.True(e0 == e02); + Assert.True(e0 >= e02); + Assert.True(e0 <= e02); + } + + [Fact] + private void CompareUlong() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity(); + + ulong id1 = e1; + ulong id2 = e2; + + Assert.True(e1 == id1); + Assert.True(e2 == id2); + + Assert.True(e1 != id2); + Assert.True(e2 != id1); + + Assert.True(e1 >= id1); + Assert.True(e2 >= id2); + + Assert.True(e1 <= id1); + Assert.True(e2 <= id2); + + Assert.True(e1 <= id2); + Assert.True(e2 >= id1); + + Assert.True(e1 < id2); + Assert.True(e2 > id1); + + + Assert.True(e2 != id1); + Assert.True(e1 != id2); + + Assert.True(e2 == id2); + Assert.True(e1 == id1); + + Assert.True(!(e1 >= id2)); + Assert.True(!(e2 <= id1)); + + Assert.True(!(e2 < id2)); + Assert.True(!(e1 > id1)); + } + + [Fact] + private void CompareId() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity(); + + Id id1 = e1; + Id id2 = e2; + + Assert.True(e1 == id1); + Assert.True(e2 == id2); + + Assert.True(e1 != id2); + Assert.True(e2 != id1); + + Assert.True(e1 >= id1); + Assert.True(e2 >= id2); + + Assert.True(e1 <= id1); + Assert.True(e2 <= id2); + + Assert.True(e1 <= id2); + Assert.True(e2 >= id1); + + Assert.True(e1 < id2); + Assert.True(e2 > id1); + + + Assert.True(e2 != id1); + Assert.True(e1 != id2); + + Assert.True(e2 == id2); + Assert.True(e1 == id1); + + Assert.True(!(e1 >= id2)); + Assert.True(!(e2 <= id1)); + + Assert.True(!(e2 < id2)); + Assert.True(!(e1 > id1)); + } + + [Fact] + private void CompareLiteral() + { + using World world = World.Create(); + + Entity e1 = world.Entity(500); + Entity e2 = world.Entity(600); + + Assert.True(e1 == 500); + Assert.True(e2 == 600); + + Assert.True(e1 != 600); + Assert.True(e2 != 500); + + Assert.True(e1 >= 500); + Assert.True(e2 >= 600); + + Assert.True(e1 <= 500); + Assert.True(e2 <= 600); + + Assert.True(e1 <= 600); + Assert.True(e2 >= 500); + + Assert.True(e1 < 600); + Assert.True(e2 > 500); + + + Assert.True(e2 != 500); + Assert.True(e1 != 600); + + Assert.True(e2 == 600); + Assert.True(e1 == 500); + + Assert.True(!(e1 >= 600)); + Assert.True(!(e2 <= 500)); + + Assert.True(!(e2 < 600)); + Assert.True(!(e1 > 500)); + } + + [Fact] + private void GreaterThan() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity(); + + Assert.True(e2 > e1); + Assert.True(e2 >= e1); + } + + [Fact] + private void LessThan() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity(); + + Assert.True(e1 < e2); + Assert.True(e1 <= e2); + } + + [Fact] + private void Not0Or1() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + ulong id = e; + + Assert.True(id != 0); + Assert.True(id != 1); + } + + [Fact] + private void HasChildOf() + { + using World world = World.Create(); + + Entity parent = world.Entity(); + + Entity e = world.Entity() + .Add(EcsChildOf, parent); + + Assert.True(e.Has(EcsChildOf, parent)); + } + + [Fact] + private void HasInstanceOf() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has(EcsIsA, @base)); + } + + [Fact] + private void HasInstanceOfIndirect() + { + using World world = World.Create(); + + Entity baseOfBase = world.Entity(); + + Entity @base = world.Entity() + .Add(EcsIsA, baseOfBase); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has(EcsIsA, baseOfBase)); + } + + [Fact] + private void NullString() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + Assert.Equal("", e.Name()); + } + + [Fact] + private void SetName() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Assert.Equal("", e.Name()); + + e.SetName("Foo"); + Assert.Equal("Foo", e.Name()); + } + + [Fact] + private void ChangeName() + { + using World world = World.Create(); + + Entity e = world.Entity("Bar"); + Assert.Equal("Bar", e.Name()); + + e.SetName("Foo"); + Assert.Equal("Foo", e.Name()); + } + + [Fact] + private void Delete() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Add() + .Add(); + + e.Destruct(); + + Assert.True(!e.IsAlive()); + + Entity e2 = world.Entity(); + Assert.True((uint)e2 == (uint)e); + Assert.True(e2 != e); + } + + [Fact] + private void Clear() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Add() + .Add(); + + e.Clear(); + + Assert.True(!e.Has()); + Assert.True(!e.Has()); + + Entity e2 = world.Entity(); + Assert.True(e2 > e); + } + + [Fact] + private void ForceOwned() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity prefab = world.Prefab() + .Add() + .Add() + .AutoOverride(); + + Entity e = world.Entity() + .Add(EcsIsA, prefab); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + Assert.True(e.Has()); + Assert.True(!e.Owns()); + } + + [Fact] + private void ForceOwned2() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity prefab = world.Prefab() + .Add() + .Add() + .AutoOverride() + .AutoOverride(); + + Entity e = world.Entity() + .Add(EcsIsA, prefab); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + Assert.True(e.Has()); + Assert.True(e.Owns()); + } + + [Fact] + private void ForceOwnedNested() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity prefab = world.Prefab() + .Add() + .Add() + .AutoOverride(); + + Entity prefab2 = world.Prefab() + .Add(EcsIsA, prefab); + + Entity e = world.Entity() + .Add(EcsIsA, prefab2); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + Assert.True(e.Has()); + Assert.True(!e.Owns()); + } + + [Fact] + private void TagHasSizeZero() + { + using World world = World.Create(); + + Component comp = world.Component(); + + EcsComponent* ptr = comp.GetPtr(); + Assert.Equal(0, ptr->size); + Assert.Equal(0, ptr->alignment); + } + + + [Fact] + private void GetTarget() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + + Entity obj1 = world.Entity() + .Add(); + + Entity obj2 = world.Entity() + .Add(); + + Entity obj3 = world.Entity() + .Add(); + + Entity child = world.Entity() + .Add(rel, obj1) + .Add(rel, obj2) + .Add(rel, obj3); + + Entity p = child.Target(rel); + Assert.True(p != 0); + Assert.True(p == obj1); + + p = child.Target(rel); + Assert.True(p != 0); + Assert.True(p == obj1); + + p = child.Target(rel, 1); + Assert.True(p != 0); + Assert.True(p == obj2); + + p = child.Target(rel, 2); + Assert.True(p != 0); + Assert.True(p == obj3); + + p = child.Target(rel, 3); + Assert.True(p == 0); + } + + [Fact] + private void GetParent() + { + using World world = World.Create(); + + Entity parent = world.Entity(); + Entity child = world.Entity().ChildOf(parent); + + Assert.True(child.Target(EcsChildOf) == parent); + Assert.True(child.Parent() == parent); + } + + [Fact] + private void IsComponentEnabled() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity e = world.Entity() + .Add(); + + Assert.True(e.Enabled()); + Assert.True(!e.Enabled()); + } + + [Fact] + private void IsEnabledComponentEnabled() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity e = world.Entity() + .Add() + .Enable(); + + Assert.True(e.Enabled()); + } + + [Fact] + private void IsDisabledComponentEnabled() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity e = world.Entity() + .Add() + .Disable(); + + Assert.True(!e.Enabled()); + } + + [Fact] + private void IsPairEnabled() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity e = world.Entity() + .Add(); + + Assert.True(e.Enabled()); + Assert.True(!e.Enabled()); + } + + [Fact] + private void IsEnabledPairEnabled() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity e = world.Entity() + .Add() + .Enable(); + + Assert.True(e.Enabled()); + } + + [Fact] + private void IsDisabledPairEnabled() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity e = world.Entity() + .Add() + .Disable(); + + Assert.True(!e.Enabled()); + } + + [Fact] + private void IsPairEnabledWithIds() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity rel = world.Entity(); + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + Entity e = world.Entity() + .Add(rel, tgtA); + + Assert.True(e.Enabled(rel, tgtA)); + Assert.True(!e.Enabled(rel, tgtB)); + } + + [Fact] + private void IsEnabledPairEnabledWithIds() + { + using World world = World.Create(); + + Entity rel = world.Entity().Add(Ecs.CanToggle); + Entity tgt = world.Entity(); + + Entity e = world.Entity() + .Add(rel, tgt) + .Enable(rel, tgt); + + Assert.True(e.Enabled(rel, tgt)); + } + + [Fact] + private void IsDisabledPairEnabledWithIds() + { + using World world = World.Create(); + + Entity rel = world.Entity().Add(Ecs.CanToggle); + Entity tgt = world.Entity(); + + Entity e = world.Entity() + .Add(rel, tgt) + .Disable(rel, tgt); + + Assert.True(!e.Enabled(rel, tgt)); + } + + [Fact] + private void IsPairEnabledWithTargetId() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + Entity e = world.Entity() + .Add(tgtA); + + Assert.True(e.Enabled(tgtA)); + Assert.True(!e.Enabled(tgtB)); + } + + [Fact] + private void IsEnabledPairEnabledWithTargetId() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity tgt = world.Entity(); + + Entity e = world.Entity() + .Add(tgt) + .Enable(tgt); + + Assert.True(e.Enabled(tgt)); + } + + [Fact] + private void IsDisabledPairEnabledWithTargetId() + { + using World world = World.Create(); + + world.Component().Add(Ecs.CanToggle); + + Entity tgt = world.Entity(); + + Entity e = world.Entity() + .Add(tgt) + .Disable(tgt); + + Assert.True(!e.Enabled(tgt)); + } + + [Fact] + private void GetTypes() + { + using World world = World.Create(); + + Entity entity = world.Entity(); + Assert.True(entity != 0); + + FlecsType type1 = entity.Type(); + Assert.Equal(0, type1.Count()); + + FlecsType type2 = entity.Type(); + Assert.Equal(0, type2.Count()); + } + + [Fact] + private void GetNonEmptyType() + { + using World world = World.Create(); + + Entity entity = world.Entity() + .Add(); + Assert.True(entity != 0); + + FlecsType type1 = entity.Type(); + Assert.Equal(1, type1.Count()); + Assert.Equal(type1.Get(0), world.Id()); + + FlecsType type2 = entity.Type(); + Assert.Equal(1, type2.Count()); + Assert.Equal(type2.Get(0), world.Id()); + } + + [Fact] + private void SetDeduced() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Position(10, 20)); + + Assert.True(e.Has()); + + Position* p = e.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void Override() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .AutoOverride(); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + } + + [Fact] + private void OverrideId() + { + using World world = World.Create(); + + Entity tagA = world.Entity().Add(Ecs.OnInstantiate, Ecs.Inherit); + Entity tagB = world.Entity().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .AutoOverride(tagA) + .Add(tagB); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has(tagA)); + Assert.True(e.Owns(tagA)); + + Assert.True(e.Has(tagB)); + Assert.True(!e.Owns(tagB)); + } + + [Fact] + private void OverridePairWithTargetId() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + Entity @base = world.Entity() + .AutoOverride(tgtA) + .Add(tgtB); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has(tgtA)); + Assert.True(e.Owns(tgtA)); + + Assert.True(e.Has(tgtB)); + Assert.True(!e.Owns(tgtB)); + } + + [Fact] + private void OverridePairWithIds() + { + using World world = World.Create(); + + Entity rel = world.Entity().Add(Ecs.OnInstantiate, Ecs.Inherit); + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + Entity @base = world.Entity() + .AutoOverride(rel, tgtA) + .Add(rel, tgtB); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has(rel, tgtA)); + Assert.True(e.Owns(rel, tgtA)); + + Assert.True(e.Has(rel, tgtB)); + Assert.True(!e.Owns(rel, tgtB)); + } + + [Fact] + private void OverridePair() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .AutoOverride() + .Add(); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Assert.True(e.Has()); + Assert.True(!e.Owns()); + } + + [Fact] + private void SetOverride() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .SetAutoOverride(new Position(10, 20)); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Position* p = e.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Position* pBase = @base.GetPtr(); + Assert.True(p != pBase); + Assert.Equal(10, pBase->X); + Assert.Equal(20, pBase->Y); + } + + [Fact] + private void SetOverrideLValue() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Position plvalue = new Position(10, 20); + + Entity @base = world.Entity() + .SetAutoOverride(plvalue); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Position* p = e.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Position* pBase = @base.GetPtr(); + Assert.True(p != pBase); + Assert.Equal(10, pBase->X); + Assert.Equal(20, pBase->Y); + } + + [Fact] + private void SetOverridePair() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .SetAutoOverride(new Position(10, 20)); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Position* p = e.GetFirstPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Position* pBase = @base.GetFirstPtr(); + Assert.True(p != pBase); + Assert.Equal(10, pBase->X); + Assert.Equal(20, pBase->Y); + } + + [Fact] + private void SetOverridePairWithTargetId() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity tgt = world.Entity(); + + Entity @base = world.Entity() + .SetAutoOverride(tgt, new Position(10, 20)); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has(tgt)); + Assert.True(e.Owns(tgt)); + + Position* p = e.GetPtr(tgt); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Position* pBase = @base.GetPtr(tgt); + Assert.True(p != pBase); + Assert.Equal(10, pBase->X); + Assert.Equal(20, pBase->Y); + } + + [Fact] + private void SetOverridePairWithRelTag() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .SetAutoOverride(new Position(10, 20)); + + Entity e = world.Entity() + .Add(EcsIsA, @base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Position* p = e.GetSecondPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Position* pBase = @base.GetSecondPtr(); + Assert.True(p != pBase); + Assert.Equal(10, pBase->X); + Assert.Equal(20, pBase->Y); + } + + [Fact] + private void ImplicitNameToChar() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo"); + Assert.True(entity != 0); + Assert.Equal("Foo", entity.Name()); + + Assert.Equal("Foo", entity.Name()); + } + + [Fact] + private void Path() + { + using World world = World.Create(); + Entity parent = world.Entity("parent"); + + using ScopedWorld scope = world.Scope(parent); + Entity child = world.Entity("child"); + Assert.Equal(".parent.child", child.Path()); + } + + [Fact] + private void PathFrom() + { + using World world = World.Create(); + + Entity parent = world.Entity("parent"); + + using ScopedWorld parentScope = world.Scope(parent); + Entity child = world.Entity("child"); + + using ScopedWorld childScope = world.Scope(child); + Entity grandchild = world.Entity("grandchild"); + + Assert.Equal(".parent.child.grandchild", grandchild.Path()); + Assert.Equal("child.grandchild", grandchild.PathFrom(parent)); + } + + [Fact] + private void PathFromType() + { + using World world = World.Create(); + Entity parent = world.Entity(); + + using ScopedWorld parentScope = world.Scope(parent); + Entity child = world.Entity("child"); + + using ScopedWorld childScope = world.Scope(child); + Entity grandchild = world.Entity("grandchild"); + + Assert.Equal(".Parent.child.grandchild", grandchild.Path()); + Assert.Equal("child.grandchild", grandchild.PathFrom()); + } + + [Fact] + private void PathCustomSep() + { + using World world = World.Create(); + Entity parent = world.Entity("parent"); + + using ScopedWorld parentScope = world.Scope(parent); + Entity child = world.Entity("child"); + + Assert.Equal("parent_child", child.Path("_", "")); + } + + [Fact] + private void PathFromCustomSep() + { + using World world = World.Create(); + Entity parent = world.Entity("parent"); + + using ScopedWorld parentScope = world.Scope(parent); + Entity child = world.Entity("child"); + + using ScopedWorld childScope = world.Scope(child); + Entity grandchild = world.Entity("grandchild"); + + Assert.Equal(".parent.child.grandchild", grandchild.Path()); + Assert.Equal("child_grandchild", grandchild.PathFrom(parent, "_")); + } + + [Fact] + private void PathFromTypeCustomSep() + { + using World world = World.Create(); + Entity parent = world.Entity(); + + using ScopedWorld parentScope = world.Scope(parent); + Entity child = world.Entity("child"); + + using ScopedWorld childScope = world.Scope(child); + Entity grandchild = world.Entity("grandchild"); + + Assert.Equal(".Parent.child.grandchild", grandchild.Path()); + Assert.Equal("child_grandchild", grandchild.PathFrom("_")); + } + + [Fact] + private void ImplicitPathToChar() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo.Bar"); + Assert.True(entity != 0); + Assert.Equal("Bar", entity.Name()); + + Assert.Equal(".Foo.Bar", entity.Path()); + } + + [Fact] + private void ImplicitTypeStringToChar() + { + using World world = World.Create(); + + Entity entity = new Entity(world, "Foo"); + Assert.True(entity != 0); + + Assert.Equal("(Identifier,Name)", entity.Type().Str()); + } + + [Fact] + private void SetTemplate() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Template { X = 10, Y = 20 }); + + Template* ptr = e.GetPtr>(); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void Get1ComponentWithCallback() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(11, 22)); + + Entity e3 = world.Entity() + .Set(new Velocity(1, 2)); + + Assert.True(e1.Read((ref readonly Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + })); + + Assert.True(e2.Read((ref readonly Position p) => + { + Assert.Equal(11, p.X); + Assert.Equal(22, p.Y); + })); + + Assert.False(e3.Read((ref readonly Position p) => { })); + } + + [Fact] + private void Get2ComponentWithCallback() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(11, 22)); + + Entity e3 = world.Entity() + .Set(new Velocity(1, 2)); + + Assert.True(e1.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + })); + + Assert.False(e2.Read((ref readonly Position p, ref readonly Velocity v) => { })); + + Assert.False(e3.Read((ref readonly Position p, ref readonly Velocity v) => { })); + } + + [Fact] + private void Ensure1ComponentWithCallback() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(11, 22)); + + Entity e3 = world.Entity() + .Set(new Velocity(1, 2)); + + Assert.True(e1.Write((ref Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + p.X++; + p.Y += 2; + })); + + Assert.True(e2.Write((ref Position p) => + { + Assert.Equal(11, p.X); + Assert.Equal(22, p.Y); + p.X++; + p.Y += 2; + })); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(12, p->X); + Assert.Equal(24, p->Y); + + Assert.False(e3.Read((ref readonly Position _) => { })); + } + + [Fact] + private void Ensure2ComponentWithCallback() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(11, 22)); + + Entity e3 = world.Entity() + .Set(new Velocity(1, 2)); + + Assert.True(e1.Write((ref Position p, ref Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + + p.X++; + p.Y += 2; + v.X += 3; + v.Y += 4; + })); + + Assert.False(e2.Read((ref readonly Position p, ref readonly Velocity v) => { })); + + Assert.False(e3.Read((ref readonly Position p, ref readonly Velocity v) => { })); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + Velocity* v = e1.GetPtr(); + Assert.Equal(4, v->X); + Assert.Equal(6, v->Y); + } + + [Fact] + private void GetComponentWithCallbackNested() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Assert.True(e.Read((ref readonly Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.True(e.Read((ref readonly Velocity v) => + { + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + })); + })); + } + + [Fact] + private void Set1ComponentWithCallback() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Insert((ref Position p) => + { + p.X = 10; + p.Y = 20; + }); + + Assert.True(e.Has()); + + Position* p = e.GetPtr(); + Assert.True(p != null); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void Set2ComponentsWithCallback() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }); + + Assert.True(e.Has()); + + Position* p = e.GetPtr(); + Assert.True(p != null); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Velocity* v = e.GetPtr(); + Assert.True(v != null); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void Set3ComponentsWithCallback() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v, ref Mass m) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + m = new Mass(50); + }); + + Assert.True(e.Has()); + + Position* p = e.GetPtr(); + Assert.True(p != null); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Velocity* v = e.GetPtr(); + Assert.True(v != null); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + + Mass* m = e.GetPtr(); + Assert.True(m != null); + Assert.Equal(50, m->Value); + } + + [Fact] + private void DeferSet1Component() + { + using World world = World.Create(); + + world.DeferBegin(); + + Entity e = world.Entity() + .Insert((ref Position p) => + { + p.X = 10; + p.Y = 20; + }); + + Assert.True(!e.Has()); + + world.DeferEnd(); + + Assert.True(e.Has()); + + e.Read((ref readonly Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + }); + } + + [Fact] + private void DeferSet2Components() + { + using World world = World.Create(); + + world.DeferBegin(); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }); + + Assert.True(!e.Has()); + Assert.True(!e.Has()); + + world.DeferEnd(); + + Assert.True(e.Has()); + Assert.True(e.Has()); + + e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + }); + } + + [Fact] + private void DeferSet3Components() + { + using World world = World.Create(); + + world.DeferBegin(); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v, ref Mass m) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + m = new Mass(50); + }); + + Assert.True(!e.Has()); + Assert.True(!e.Has()); + Assert.True(!e.Has()); + + world.DeferEnd(); + + Assert.True(e.Has()); + Assert.True(e.Has()); + Assert.True(e.Has()); + + e.Read((ref readonly Position p, ref readonly Velocity v, ref readonly Mass m) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + + Assert.Equal(50, m.Value); + }); + } + + [Fact] + private void Set2WithOnSet() + { + using World world = World.Create(); + + int positionSet = 0; + int velocitySet = 0; + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Position p) => + { + positionSet++; + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + }); + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Velocity v) => + { + velocitySet++; + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + }); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }); + + Assert.Equal(1, positionSet); + Assert.Equal(1, velocitySet); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + })); + } + + [Fact] + private void DeferSet2WithOnSet() + { + using World world = World.Create(); + + int positionSet = 0; + int velocitySet = 0; + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Position p) => + { + positionSet++; + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + }); + + world.Observer() + .Event(Ecs.OnSet) + .Each((Entity e, ref Velocity v) => + { + velocitySet++; + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + }); + + world.DeferBegin(); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }); + + Assert.Equal(0, positionSet); + Assert.Equal(0, velocitySet); + + world.DeferEnd(); + + Assert.Equal(1, positionSet); + Assert.Equal(1, velocitySet); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + })); + } + + [Fact] + private void Set2AfterFluent() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Mass(50)) + .Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }); + + Assert.True(e.Has()); + Assert.True(e.Has()); + Assert.True(e.Has()); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v, ref readonly Mass m) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + + Assert.Equal(50, m.Value); + })); + } + + [Fact] + private void Set2BeforeFluent() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }) + .Set(new Mass(50)); + + Assert.True(e.Has()); + Assert.True(e.Has()); + Assert.True(e.Has()); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v, ref readonly Mass m) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + + Assert.Equal(50, m.Value); + })); + } + + [Fact] + private void Set2AfterSet1() + { + using World world = World.Create(); + + int called = 0; + + Entity e = world.Entity().Set(new Position(5, 10)); + Assert.True(e.Has()); + + Assert.True(e.Read((ref readonly Position p) => + { + Assert.Equal(5, p.X); + Assert.Equal(10, p.Y); + })); + + e.Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(1, 2); + }); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + + called++; + })); + + Assert.Equal(1, called); + } + + [Fact] + private void Set2AfterSet2() + { + using World world = World.Create(); + + int called = 0; + + Entity e = world.Entity() + .Set(new Position(5, 10)) + .Set(new Velocity(1, 2)); + Assert.True(e.Has()); + Assert.True(e.Has()); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(5, p.X); + Assert.Equal(10, p.Y); + + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + + called++; + })); + + Assert.Equal(1, called); + + e.Insert((ref Position p, ref Velocity v) => + { + p = new Position(10, 20); + v = new Velocity(3, 4); + }); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(3, v.X); + Assert.Equal(4, v.Y); + + called++; + })); + + Assert.Equal(2, called); + } + + [Fact] + private void WithSelf() + { + using World world = World.Create(); + + Entity tag = world.Entity().With(() => + { + Entity e1 = world.Entity(); + e1.Set(new Self { Value = e1 }); + Entity e2 = world.Entity(); + e2.Set(new Self { Value = e2 }); + Entity e3 = world.Entity(); + e3.Set(new Self { Value = e3 }); + }); + + Component self = world.Component(); + Assert.True(!self.Has(tag)); + + int count = 0; + using Query query = world.QueryBuilder() + .With(tag) + .Build(); + + query.Each((Entity e) => + { + Assert.True(e.Has(tag)); + + Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); + + count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void WithRelationTypeSelf() + { + using World world = World.Create(); + + Entity bob = world.Entity().With(() => + { + Entity e1 = world.Entity(); + e1.Set(new Self(e1)); + Entity e2 = world.Entity(); + e2.Set(new Self(e2)); + Entity e3 = world.Entity(); + e3.Set(new Self(e3)); + }); + + Component self = world.Component(); + Assert.True(!self.Has(bob)); + + int count = 0; + using Query q = world.QueryBuilder() + .With(bob) + .Build(); + + q.Each((Entity e) => + { + Assert.True(e.Has(bob)); + + Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); + + count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void WithRelationSelf() + { + using World world = World.Create(); + + Entity likes = world.Entity(); + + Entity bob = world.Entity().With(likes, () => + { + Entity e1 = world.Entity(); + e1.Set(new Self(e1)); + Entity e2 = world.Entity(); + e2.Set(new Self(e2)); + Entity e3 = world.Entity(); + e3.Set(new Self(e3)); + }); + + Component self = world.Component(); + Assert.True(!self.Has(likes, bob)); + + int count = 0; + using Query q = world.QueryBuilder() + .With(likes, bob) + .Build(); + + q.Each((Entity e) => + { + Assert.True(e.Has(likes, bob)); + + Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); + + count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void WithSelfWithName() + { + using World world = World.Create(); + + Entity tier1 = world.Entity("Tier1").With(() => + { + Entity tier2 = world.Entity("Tier2"); + tier2.Set(new Self(tier2)); + }); + + Entity tier2 = world.Lookup("Tier2"); + Assert.True(tier2 != 0); + + Assert.True(tier2.Has(tier1)); + } + + [Fact] + private void WithSelfNested() + { + using World world = World.Create(); + + Entity tier1 = world.Entity("Tier1").With(() => + { + world.Entity("Tier2").With(() => { world.Entity("Tier3"); }); + }); + + Entity tier2 = world.Lookup("Tier2"); + Assert.True(tier2 != 0); + + Entity tier3 = world.Lookup("Tier3"); + Assert.True(tier3 != 0); + + Assert.True(tier2.Has(tier1)); + Assert.True(tier3.Has(tier2)); + } + + [Fact] + private void WithScope() + { + using World world = World.Create(); + + Entity parent = world.Entity("P").Scope(() => + { + Entity e1 = world.Entity("C1"); + e1.Set(new Self(e1)); + Entity e2 = world.Entity("C2"); + e2.Set(new Self(e2)); + Entity e3 = world.Entity("C3"); + e3.Set(new Self(e3)); + + Assert.True(world.Lookup("C1") == e1); + Assert.True(world.Lookup("C2") == e2); + Assert.True(world.Lookup("C3") == e3); + + Assert.True(world.Lookup(".P.C1") == e1); + Assert.True(world.Lookup(".P.C2") == e2); + Assert.True(world.Lookup(".P.C3") == e3); + }); + + Assert.True(world.Lookup("C1") == 0); + Assert.True(world.Lookup("C2") == 0); + Assert.True(world.Lookup("C3") == 0); + + Assert.True(parent.Lookup("C1") != 0); + Assert.True(parent.Lookup("C2") != 0); + Assert.True(parent.Lookup("C3") != 0); + + Assert.True(world.Lookup("P.C1") == parent.Lookup("C1")); + Assert.True(world.Lookup("P.C2") == parent.Lookup("C2")); + Assert.True(world.Lookup("P.C3") == parent.Lookup("C3")); + + Component self = world.Component(); + Assert.True(!self.Has(Ecs.ChildOf, parent)); + + int count = 0; + using Query q = world.QueryBuilder() + .With(Ecs.ChildOf, parent) + .Build(); + + q.Each((Entity e) => + { + Assert.True(e.Has(Ecs.ChildOf, parent)); + + Assert.True(e.Read((ref readonly Self s) => { Assert.True(s.Value == e); })); + + count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void WithScopeNested() + { + using World world = World.Create(); + + Entity parent = world.Entity("P").Scope(() => + { + Entity child = world.Entity("C").Scope(() => + { + Entity gchild = world.Entity("GC"); + Assert.True(gchild == world.Lookup("GC")); + Assert.True(gchild == world.Lookup(".P.C.GC")); + }); + + Assert.True(world.Lookup("C") == child); + Assert.True(world.Lookup(".P.C") == child); + Assert.True(world.Lookup(".P.C.GC") != 0); + }); + + Assert.True(0 == world.Lookup("C")); + Assert.True(0 == world.Lookup("GC")); + Assert.True(0 == world.Lookup("C.GC")); + + Entity child = world.Lookup("P.C"); + Assert.True(0 != child); + Assert.True(child.Has(Ecs.ChildOf, parent)); + + Entity gchild = world.Lookup("P.C.GC"); + Assert.True(0 != gchild); + Assert.True(gchild.Has(Ecs.ChildOf, child)); + } + + [Fact] + private void WithScopeNestedSameNameAsParent() + { + using World world = World.Create(); + + Entity parent = world.Entity("P").Scope(() => + { + Entity child = world.Entity("C").Scope(() => + { + Entity gchild = world.Entity("C"); + Assert.True(gchild == world.Lookup("C")); + Assert.True(gchild == world.Lookup(".P.C.C")); + }); + + Assert.True(world.Lookup("C") == child); + Assert.True(world.Lookup(".P.C") == child); + Assert.True(world.Lookup(".P.C.C") != 0); + }); + + Assert.True(0 == world.Lookup("C")); + Assert.True(0 == world.Lookup("C")); + Assert.True(0 == world.Lookup("C.C")); + + Entity child = world.Lookup("P.C"); + Assert.True(0 != child); + Assert.True(child.Has(Ecs.ChildOf, parent)); + + Entity gchild = world.Lookup("P.C.C"); + Assert.True(0 != gchild); + Assert.True(gchild.Has(Ecs.ChildOf, child)); + } + + [Fact] + private void NoRecursiveLookup() + { + using World world = World.Create(); + + Entity p = world.Entity("P"); + Entity c = world.Entity("C").ChildOf(p); + Entity gc = world.Entity("GC").ChildOf(c); + + Assert.True(c.Lookup("GC") == gc); + Assert.True(c.Lookup("C") == 0); + Assert.True(c.Lookup("P") == 0); + } + + [Fact] + private void DeferNewWithName() + { + using World world = World.Create(); + + Entity e = default; + + world.Defer(() => + { + e = world.Entity("Foo"); + Assert.True(e != 0); + }); + + Assert.True(e.Has(EcsName)); + Assert.Equal("Foo", e.Name()); + } + + [Fact] + private void DeferNewWithNestedName() + { + using World world = World.Create(); + + Entity e = default; + + world.Defer(() => + { + e = world.Entity("Foo.Bar"); + Assert.True(e != 0); + }); + + Assert.True(e.Has(EcsName)); + Assert.Equal("Bar", e.Name()); + Assert.Equal(".Foo.Bar", e.Path()); + } + + + [Fact] + private void DeferNewWithScopeName() + { + using World world = World.Create(); + + Entity e = default; + Entity parent = world.Entity("Parent"); + + world.Defer(() => + { + parent.Scope(() => + { + e = world.Entity("Foo"); + Assert.True(e != 0); + }); + }); + + Assert.True(e.Has(EcsName)); + Assert.Equal("Foo", e.Name()); + Assert.Equal(".Parent.Foo", e.Path()); + } + + [Fact] + private void DeferNewWithScopeNestedName() + { + using World world = World.Create(); + + Entity e = default; + Entity parent = world.Entity("Parent"); + + world.Defer(() => + { + parent.Scope(() => + { + e = world.Entity("Foo.Bar"); + Assert.True(e != 0); + }); + }); + + Assert.True(e.Has(EcsName)); + Assert.Equal("Bar", e.Name()); + Assert.Equal(".Parent.Foo.Bar", e.Path()); + } + + [Fact] + private void DeferNewWithDeferredScopeNestedName() + { + using World world = World.Create(); + + Entity e = default; + Entity parent = default; + + world.Defer(() => + { + parent = world.Entity("Parent").Scope(() => + { + e = world.Entity("Foo.Bar"); + Assert.True(e != 0); + }); + }); + + Assert.True(parent.Has(EcsName)); + Assert.Equal("Parent", parent.Name()); + Assert.Equal(".Parent", parent.Path()); + + Assert.True(e.Has(EcsName)); + Assert.Equal("Bar", e.Name()); + Assert.Equal(".Parent.Foo.Bar", e.Path()); + } + + [Fact] + private void DeferNewWithScope() + { + using World world = World.Create(); + + Entity e = default; + Entity parent = world.Entity(); + + world.Defer(() => + { + parent.Scope(() => + { + e = world.Entity(); + Assert.True(e != 0); + }); + }); + + Assert.True(e.Has(EcsChildOf, parent)); + } + + [Fact] + private void DeferNewWithWith() + { + using World world = World.Create(); + + Entity e = default; + Entity tag = world.Entity(); + + world.Defer(() => + { + tag.With(() => + { + e = world.Entity(); + Assert.True(e != 0); + Assert.True(!e.Has(tag)); + }); + }); + + Assert.True(e.Has(tag)); + } + + [Fact] + private void DeferNewWithNameScopeWith() + { + using World world = World.Create(); + + Entity e = default; + Entity tag = world.Entity(); + Entity parent = world.Entity("Parent"); + + world.Defer(() => + { + tag.With(() => + { + parent.Scope(() => + { + e = world.Entity("Foo"); + Assert.True(e != 0); + Assert.True(!e.Has(tag)); + }); + Assert.True(!e.Has(tag)); + }); + Assert.True(!e.Has(tag)); + }); + + Assert.True(e.Has(tag)); + Assert.True(e.Has(EcsName)); + Assert.Equal("Foo", e.Name()); + Assert.Equal(".Parent.Foo", e.Path()); + } + + [Fact] + private void DeferNewWithNestedNameScopeWith() + { + using World world = World.Create(); + + Entity e = default; + Entity tag = world.Entity(); + Entity parent = world.Entity("Parent"); + + world.Defer(() => + { + tag.With(() => + { + parent.Scope(() => + { + e = world.Entity("Foo.Bar"); + Assert.True(e != 0); + Assert.True(!e.Has(tag)); + }); + Assert.True(!e.Has(tag)); + }); + Assert.True(!e.Has(tag)); + }); + + Assert.True(e.Has(tag)); + Assert.True(e.Has(EcsName)); + Assert.Equal("Bar", e.Name()); + Assert.Equal(".Parent.Foo.Bar", e.Path()); + } + + [Fact] + private void DeferWithWithImplicitComponent() + { + using World world = World.Create(); + + Entity e = default; + + world.Defer(() => + { + world.With(() => + { + e = world.Entity(); + Assert.True(!e.Has()); + }); + Assert.True(!e.Has()); + }); + + Assert.True(e.Has()); + } + + [Fact] + private void DeferSuspendResume() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + world.Defer(() => + { + e.Add(); + Assert.True(!e.Has()); + + world.DeferSuspend(); + e.Add(); + Assert.True(!e.Has()); + Assert.True(e.Has()); + world.DeferResume(); + + Assert.True(!e.Has()); + Assert.True(e.Has()); + }); + + Assert.True(e.Has()); + Assert.True(e.Has()); + } + + [Fact] + private void DeferEnsure() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + world.DeferBegin(); + Position* p = e.EnsurePtr(); + p->X = 10; + p->Y = 20; + world.DeferEnd(); + + p = e.GetMutPtr(); + Assert.True(p != null); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + } + + [Fact] + private void WithAfterBuilderMethod() + { + using World world = World.Create(); + + Entity a = world.Entity() + .Set(new Position(10, 20)) + .With(() => { world.Entity("X"); }); + + Entity b = world.Entity().Set(new Position(30, 40)) + .With(() => { world.Entity("Y"); }); + + Entity c = world.Entity().Set(new Position(50, 60)) + .With(EcsIsA, () => { world.Entity("Z"); }); + + Assert.True(a.Read((ref readonly Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + })); + + Assert.True(b.Read((ref readonly Position p) => + { + Assert.Equal(30, p.X); + Assert.Equal(40, p.Y); + })); + + Assert.True(c.Read((ref readonly Position p) => + { + Assert.Equal(50, p.X); + Assert.Equal(60, p.Y); + })); + + Entity x = world.Lookup("X"); + Assert.True(x != 0); + Assert.True(x.Has(a)); + + Entity y = world.Lookup("Y"); + Assert.True(y != 0); + Assert.True(y.Has(b)); + + Entity z = world.Lookup("Z"); + Assert.True(z != 0); + Assert.True(z.Has(EcsIsA, c)); + } + + [Fact] + private void WithBeforeBuilderMethod() + { + using World world = World.Create(); + + Entity a = world.Entity() + .With(() => { world.Entity("X"); }) + .Set(new Position(10, 20)); + + Entity b = world.Entity() + .With(() => { world.Entity("Y"); }) + .Set(new Position(30, 40)); + + Entity c = world.Entity() + .With(EcsIsA, () => { world.Entity("Z"); }) + .Set(new Position(50, 60)); + + Assert.True(a.Read((ref readonly Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + })); + + Assert.True(b.Read((ref readonly Position p) => + { + Assert.Equal(30, p.X); + Assert.Equal(40, p.Y); + })); + + Assert.True(c.Read((ref readonly Position p) => + { + Assert.Equal(50, p.X); + Assert.Equal(60, p.Y); + })); + + Entity x = world.Lookup("X"); + Assert.True(x != 0); + Assert.True(x.Has(a)); + + Entity y = world.Lookup("Y"); + Assert.True(y != 0); + Assert.True(y.Has(b)); + + Entity z = world.Lookup("Z"); + Assert.True(z != 0); + Assert.True(z.Has(EcsIsA, c)); + } + + [Fact] + private void ScopeAfterBuilderMethod() + { + using World world = World.Create(); + + world.Entity("P") + .Set(new Position(10, 20)) + .Scope(() => { world.Entity("C"); }); + + Entity c = world.Lookup("P.C"); + Assert.True(c != 0); + } + + [Fact] + private void ScopeBeforeBuilderMethod() + { + using World world = World.Create(); + + world.Entity("P") + .Scope(() => { world.Entity("C"); }) + .Set(new Position(10, 20)); + + Entity c = world.Lookup("P.C"); + Assert.True(c != 0); + } + + + [Fact] + private void EntityIdStr() + { + using World world = World.Create(); + + Id id = world.Entity("Foo"); + + Assert.Equal("Foo", id.Str()); + } + + [Fact] + private void PairIdStr() + { + using World world = World.Create(); + + Id id = world.Pair(world.Entity("Rel"), world.Entity("Obj")); + + Assert.Equal("(Rel,Obj)", id.Str()); + } + + [Fact] + private void RoleIdStr() + { + using World world = World.Create(); + + Id id = new Id(world, ECS_AUTO_OVERRIDE | world.Entity("Foo")); + + Assert.Equal("AUTO_OVERRIDE|Foo", id.Str()); + } + + [Fact] + private void IdStrFromEntity() + { + using World world = World.Create(); + + Entity id = world.Entity("Foo"); + + Assert.Equal("Foo", id.Str()); + } + + [Fact] + private void NullEntity() + { + Entity e = Entity.Null(); + Assert.True(e.Id == 0); + } + + [Fact] + private void NullEntityWithWorld() + { + using World world = World.Create(); + + Entity e = Entity.Null(world); + Assert.True(e.Id == 0); + Assert.True(e.World == world); + } + + [Fact] + private void NullEntityWith0() + { + Entity e = new Entity(0); + Assert.True(e.Id == 0); + Assert.True(e.World == null); + } + + [Fact] + private void NullENtityWithWorldWith0() + { + using World world = World.Create(); + + Entity e = Entity.Null(world); + Assert.True(e.Id == 0); + Assert.True(e.World == world); + } + + [Fact] + private void IsWildcard() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity(); + + Entity p0 = e1; + Id p1 = world.Pair(e1, e2); + Id p2 = world.Pair(e1, Ecs.Wildcard); + Id p3 = world.Pair(Ecs.Wildcard, e2); + Id p4 = world.Pair(Ecs.Wildcard, Ecs.Wildcard); + + Assert.False(e1.IsWildCard()); + Assert.False(e2.IsWildCard()); + Assert.False(p0.IsWildCard()); + Assert.False(p1.IsWildCard()); + Assert.True(p2.IsWildCard()); + Assert.True(p3.IsWildCard()); + Assert.True(p4.IsWildCard()); + } + + [Fact] + private void HasUlong() + { + using World world = World.Create(); + + ulong id1 = world.Entity(); + Assert.True(id1 != 0); + + ulong id2 = world.Entity(); + Assert.True(id2 != 0); + + Entity e = world.Entity() + .Add(id1); + + Assert.True(e != 0); + Assert.True(e.Has(id1)); + Assert.False(e.Has(id2)); + } + + [Fact] + private void HasPairUlong() + { + using World world = World.Create(); + + ulong id1 = world.Entity(); + Assert.True(id1 != 0); + + ulong id2 = world.Entity(); + Assert.True(id2 != 0); + + ulong id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id1, id2); + + Assert.True(e != 0); + Assert.True(e.Has(id1, id2)); + Assert.False(e.Has(id1, id3)); + } + + [Fact] + private void HasPairUlongWithType() + { + using World world = World.Create(); + + ulong id2 = world.Entity(); + Assert.True(id2 != 0); + + ulong id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id2); + + Assert.True(e != 0); + Assert.True(e.Has(id2)); + Assert.False(e.Has(id3)); + } + + [Fact] + private void HasId() + { + using World world = World.Create(); + + Id id1 = world.Entity(); + Assert.True(id1 != 0); + + Id id2 = world.Entity(); + Assert.True(id2 != 0); + + Entity e = world.Entity() + .Add(id1); + + Assert.True(e != 0); + Assert.True(e.Has(id1)); + Assert.False(e.Has(id2)); + } + + [Fact] + private void HasPairId() + { + using World world = World.Create(); + + Id id1 = world.Entity(); + Assert.True(id1 != 0); + + Id id2 = world.Entity(); + Assert.True(id2 != 0); + + Id id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id1, id2); + + Assert.True(e != 0); + Assert.True(e.Has(id1, id2)); + Assert.False(e.Has(id1, id3)); + } + + [Fact] + private void HasPairIdWithType() + { + using World world = World.Create(); + + Id id2 = world.Entity(); + Assert.True(id2 != 0); + + Id id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id2); + + Assert.True(e != 0); + Assert.True(e.Has(id2)); + Assert.False(e.Has(id3)); + } + + [Fact] + private void HasWildCardId() + { + using World world = World.Create(); + + Id id = world.Entity(); + Assert.True(id != 0); + + Entity e1 = world.Entity().Add(id); + Entity e2 = world.Entity(); + + Assert.True(e1 != 0); + Assert.True(e2 != 0); + + Assert.True(e1.Has(Ecs.Wildcard)); + Assert.False(e2.Has(Ecs.Wildcard)); + } + + [Fact] + private void HasWildCardPairId() + { + using World world = World.Create(); + + Id rel = world.Entity(); + Assert.True(rel != 0); + + Id obj = world.Entity(); + Assert.True(obj != 0); + + Id obj2 = world.Entity(); + Assert.True(obj2 != 0); + + Id w1 = world.Id(rel, Ecs.Wildcard); + Id w2 = world.Id(Ecs.Wildcard, obj); + + Entity e1 = world.Entity().Add(rel, obj); + Entity e2 = world.Entity().Add(rel, obj2); + + Assert.True(e1 != 0); + Assert.True(e2 != 0); + + Assert.True(e1.Has(w1)); + Assert.True(e1.Has(w2)); + + Assert.True(e2.Has(w1)); + Assert.False(e2.Has(w2)); + } + + [Fact] + private void OwnsUlong() + { + using World world = World.Create(); + + ulong id1 = world.Entity(); + Assert.True(id1 != 0); + + ulong id2 = world.Entity(); + Assert.True(id2 != 0); + + Entity e = world.Entity() + .Add(id1); + + Assert.True(e != 0); + Assert.True(e.Owns(id1)); + Assert.False(e.Owns(id2)); + } + + [Fact] + private void OwnsPairUlong() + { + using World world = World.Create(); + + ulong id1 = world.Entity(); + Assert.True(id1 != 0); + + ulong id2 = world.Entity(); + Assert.True(id2 != 0); + + ulong id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id1, id2); + + Assert.True(e != 0); + Assert.True(e.Owns(id1, id2)); + Assert.False(e.Owns(id1, id3)); + } + + [Fact] + private void OwnsPairUlongWithType() + { + using World world = World.Create(); + + ulong id2 = world.Entity(); + Assert.True(id2 != 0); + + ulong id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id2); + + Assert.True(e != 0); + Assert.True(e.Owns(id2)); + Assert.False(e.Owns(id3)); + } + + [Fact] + private void OwnsId() + { + using World world = World.Create(); + + Id id1 = world.Entity(); + Assert.True(id1 != 0); + + Id id2 = world.Entity(); + Assert.True(id2 != 0); + + Entity e = world.Entity() + .Add(id1); + + Assert.True(e != 0); + Assert.True(e.Owns(id1)); + Assert.False(e.Owns(id2)); + } + + [Fact] + private void OwnsPairId() + { + using World world = World.Create(); + + Id id1 = world.Entity(); + Assert.True(id1 != 0); + + Id id2 = world.Entity(); + Assert.True(id2 != 0); + + Id id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id1, id2); + + Assert.True(e != 0); + Assert.True(e.Owns(id1, id2)); + Assert.False(e.Owns(id1, id3)); + } + + [Fact] + private void OwnsWildCardId() + { + using World world = World.Create(); + + Id id = world.Entity(); + Assert.True(id != 0); + + Entity e1 = world.Entity().Add(id); + Entity e2 = world.Entity(); + + Assert.True(e1 != 0); + Assert.True(e2 != 0); + + Assert.True(e1.Owns(Ecs.Wildcard)); + Assert.False(e2.Owns(Ecs.Wildcard)); + } + + [Fact] + private void OwnsWildcardPair() + { + using World world = World.Create(); + + Id rel = world.Entity(); + Assert.True(rel != 0); + + Id obj = world.Entity(); + Assert.True(obj != 0); + + Id obj2 = world.Entity(); + Assert.True(obj2 != 0); + + Id w1 = world.Id(rel, Ecs.Wildcard); + Id w2 = world.Id(Ecs.Wildcard, obj); + + Entity e1 = world.Entity().Add(rel, obj); + Entity e2 = world.Entity().Add(rel, obj2); + + Assert.True(e1 != 0); + Assert.True(e2 != 0); + + Assert.True(e1.Owns(w1)); + Assert.True(e1.Owns(w2)); + + Assert.True(e2.Owns(w1)); + Assert.False(e2.Owns(w2)); + } + + [Fact] + private void OwnsPairIdWithType() + { + using World world = World.Create(); + + Id id2 = world.Entity(); + Assert.True(id2 != 0); + + Id id3 = world.Entity(); + Assert.True(id3 != 0); + + Entity e = world.Entity() + .Add(id2); + + Assert.True(e != 0); + Assert.True(e.Owns(id2)); + Assert.False(e.Owns(id3)); + } + + [Fact] + private void IdFromWorld() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Assert.True(e != 0); + + Id id1 = world.Id(e); + Assert.True(id1 != 0); + Assert.True(id1 == e); + Assert.True(id1.World == world); + Assert.False(id1.IsPair()); + Assert.False(id1.IsWildCard()); + + Id id2 = world.Id(Ecs.Wildcard); + Assert.True(id2 != 0); + Assert.True(id2 == Ecs.Wildcard); + Assert.True(id2.World == world); + Assert.False(id2.IsPair()); + Assert.True(id2.IsWildCard()); + } + + [Fact] + private void IdPairFromWorld() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Assert.True(rel != 0); + + Entity obj = world.Entity(); + Assert.True(obj != 0); + + Id id1 = world.Id(rel, obj); + Assert.True(id1 != 0); + Assert.True(id1.First() == rel); + Assert.True(id1.Second() == obj); + Assert.True(id1.World == world); + Assert.True(id1.IsPair()); + Assert.False(id1.IsWildCard()); + + Id id2 = world.Id(rel, Ecs.Wildcard); + Assert.True(id2 != 0); + Assert.True(id2.First() == rel); + Assert.True(id2.Second() == Ecs.Wildcard); + Assert.True(id2.World == world); + Assert.True(id2.IsPair()); + Assert.True(id2.IsWildCard()); + } + + [Fact] + private void IdDefaultFromWorld() + { + using World world = World.Create(); + + Id idDefault = world.Id(); + Assert.True(idDefault == 0); + } + + [Fact] + private void IsA() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + + Entity e = world.Entity().IsA(@base); + + Assert.True(e.Has(EcsIsA, @base)); + } + + [Fact] + private void IsAWithType() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + + Entity e = world.Entity().IsA(); + + Assert.True(e.Has(Ecs.IsA, @base)); + Assert.True(e.HasSecond(Ecs.IsA)); + } + + [Fact] + private void ChildOf() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + + Entity e = world.Entity().ChildOf(@base); + + Assert.True(e.Has(Ecs.ChildOf, @base)); + } + + [Fact] + private void ChildOfWithType() + { + using World world = World.Create(); + + Entity @base = world.Entity(); + + Entity e = world.Entity().ChildOf(); + + Assert.True(e.Has(EcsChildOf, @base)); + Assert.True(e.HasSecond(EcsChildOf)); + } + + [Fact] + private void SlotOf() + { + using World world = World.Create(); + + Entity @base = world.Prefab(); + Entity baseChild = world.Prefab() + .ChildOf(@base) + .SlotOf(@base); + + Assert.True(baseChild.Has(Ecs.SlotOf, @base)); + + Entity inst = world.Entity().IsA(@base); + Assert.True(inst.Has(baseChild, Ecs.Wildcard)); + } + + [Fact] + private void SlotOfWithType() + { + using World world = World.Create(); + + Entity @base = world.Prefab(); + Entity baseChild = world.Prefab() + .ChildOf(@base) + .SlotOf(); + + Assert.True(baseChild.Has(Ecs.SlotOf, @base)); + + Entity inst = world.Entity().IsA(@base); + Assert.True(inst.Has(baseChild, Ecs.Wildcard)); + } + + [Fact] + private void Slot() + { + using World world = World.Create(); + + Entity @base = world.Prefab(); + Entity baseChild = world.Prefab() + .ChildOf(@base).Slot(); + + Assert.True(baseChild.Has(Ecs.SlotOf, @base)); + + Entity inst = world.Entity().IsA(@base); + Assert.True(inst.Has(baseChild, Ecs.Wildcard)); + } + + [Fact] + private void IdGetEntity() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + Id id = world.Id(e); + + Assert.True(id.ToEntity() == e); + } + + [Fact] + private void EachInStage() + { + using World world = World.Create(); + + Entity e = world.Entity().Add(); + Assert.True(e.Has()); + + world.ReadonlyBegin(); + + World s = world.GetStage(0); + Entity em = e.Mut(s); + Assert.True(em.Has()); + + int count = 0; + + em.Each((Entity obj) => + { + count++; + Assert.True(obj == world.Id()); + }); + + Assert.Equal(1, count); + + world.ReadonlyEnd(); + } + + [Fact] + private void IterRecycledParent() + { + using World world = World.Create(); + + Entity e = world.Entity(); + e.Destruct(); + + Entity e2 = world.Entity(); + Assert.True(e != e2); + Assert.True((uint)e.Id == (uint)e2.Id); + + Entity eChild = world.Entity().ChildOf(e2); + int count = 0; + + e2.Children((Entity child) => + { + count++; + Assert.True(child == eChild); + }); + + Assert.Equal(1, count); + } + + [Fact] + private void GetLambdaFromStage() + { + using World world = World.Create(); + + Entity e = world.Entity().Set(new Position(10, 20)); + + world.ReadonlyBegin(); + + World stage = world.GetStage(0); + + bool invoked = false; + e.Mut(stage).Read((ref readonly Position p) => + { + invoked = true; + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + }); + Assert.True(invoked); + + world.ReadonlyEnd(); + } + + + [Fact] + private void GetObjByTemplate() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity o1 = world.Entity(); + Entity o2 = world.Entity(); + + e1.Add(o1); + e1.Add(o2); + + Assert.True(o1 == e1.Target()); + Assert.True(o1 == e1.Target(0)); + Assert.True(o2 == e1.Target(1)); + } + + [Fact] + private void CreateNamedTwiceDeferred() + { + using World world = World.Create(); + + world.DeferBegin(); + + Entity e1 = world.Entity("e"); + Entity e2 = world.Entity("e"); + + Entity f1 = world.Entity("p.f"); + Entity f2 = world.Entity("p.f"); + + Entity g1 = default; + Entity g2 = default; + + world.Scope(world.Entity("q"), () => { g1 = world.Entity("g"); }); + + world.Scope(world.Entity("q"), () => { g2 = world.Entity("g"); }); + + world.DeferEnd(); + + Assert.Equal(".e", e1.Path()); + Assert.Equal(".p.f", f1.Path()); + Assert.Equal(".q.g", g1.Path()); + + Assert.True(e1 == e2); + Assert.True(f1 == f2); + Assert.True(g1 == g2); + } + + [Fact] + private void Clone() + { + using World world = World.Create(); + + PositionInitialized v = new PositionInitialized(10, 20); + + Entity src = world.Entity().Add().Set(v); + Entity dst = src.Clone(false); + Assert.True(dst.Has()); + Assert.True(dst.Has()); + + PositionInitialized* ptr = dst.GetPtr(); + Assert.True(ptr != null); + Assert.NotEqual(10, ptr->X); + Assert.NotEqual(20, ptr->Y); + } + + [Fact] + private void CloneWithValue() + { + using World world = World.Create(); + + PositionInitialized v = new PositionInitialized(10, 20); + + Entity src = world.Entity().Add().Set(v); + Entity dst = src.Clone(); + Assert.True(dst.Has()); + Assert.True(dst.Has()); + + PositionInitialized* ptr = dst.GetPtr(); + Assert.True(ptr != null); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void CloneToExisting() + { + using World world = World.Create(); + + PositionInitialized v = new PositionInitialized(10, 20); + + Entity src = world.Entity().Add().Set(v); + Entity dst = world.Entity(); + Entity result = src.Clone(true, dst); + Assert.True(result == dst); + + Assert.True(dst.Has()); + Assert.True(dst.Has()); + + PositionInitialized* ptr = dst.GetPtr(); + Assert.True(ptr != null); + Assert.Equal(10, ptr->X); + Assert.Equal(20, ptr->Y); + } + + [Fact] + private void SetDocName() + { + using World world = World.Create(); + + Entity e = world.Entity("foo_bar") + .SetDocName("Foo Bar"); + + Assert.Equal("foo_bar", e.Name()); + Assert.Equal("Foo Bar", e.DocName()); + } + + [Fact] + private void SetDocBrief() + { + using World world = World.Create(); + + Entity e = world.Entity("foo_bar") + .SetDocBrief("Foo Bar"); + + Assert.Equal("foo_bar", e.Name()); + Assert.Equal("Foo Bar", e.DocBrief()); + } + + [Fact] + private void SetDocDetail() + { + using World world = World.Create(); + + Entity e = world.Entity("foo_bar") + .SetDocDetail("Foo Bar"); + + Assert.Equal("foo_bar", e.Name()); + Assert.Equal("Foo Bar", e.DocDetail()); + } + + [Fact] + private void SetDocLink() + { + using World world = World.Create(); + + Entity e = world.Entity("foo_bar") + .SetDocLink("Foo Bar"); + + Assert.Equal("foo_bar", e.Name()); + Assert.Equal("Foo Bar", e.DocLink()); + } + + [Fact] + private void EntityWithRootName() + { + using World world = World.Create(); + + Entity e = world.Entity(".foo"); + Assert.Equal("foo", e.Name()); + Assert.Equal(".foo", e.Path()); + } + + [Fact] + private void EntityWithRootNameFromScope() + { + using World world = World.Create(); + + Entity p = world.Entity("parent"); + world.SetScope(p); + Entity e = world.Entity(".foo"); + world.SetScope(0); + + Assert.Equal("foo", e.Name()); + Assert.Equal(".foo", e.Path()); + } + + [Fact] + private void EntityWithType() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + Assert.Equal("EntityType", e.Name()); + Assert.Equal(".EntityType", e.Path()); + + Entity e2 = world.Entity(); + Assert.True(e == e2); + } + + [Fact] + private void PrefabWithType() + { + using World world = World.Create(); + + Entity e = world.Prefab(); + + Assert.Equal("EntityType", e.Name()); + Assert.Equal(".EntityType", e.Path()); + Assert.True(!e.Has()); + Assert.True(e.Has(Ecs.Prefab)); + + Entity e2 = world.Entity(); + Assert.True(e == e2); + } + + [Fact] + private void PrefabHierarchyWithTypes() + { + using World world = World.Create(); + + Entity turret = world.Prefab(); + Entity turretBase = world.Prefab(); + + Assert.True(turret != 0); + Assert.True(turretBase != 0); + Assert.True(turretBase.Has(EcsChildOf, turret)); + + Assert.Equal(".Turret", turret.Path()); + Assert.Equal(".Turret.Base", turretBase.Path()); + + Assert.Equal("Turret", turret.Symbol()); + Assert.Equal("Turret.Base", turretBase.Symbol()); + + Entity railgun = world.Prefab().IsA(); + Entity railgunBase = railgun.Lookup("Base"); + Entity railgunHead = world.Prefab(); + Entity railgunBeam = world.Prefab(); + + Assert.True(railgun != 0); + Assert.True(railgunBase != 0); + Assert.True(railgunHead != 0); + Assert.True(railgunBeam != 0); + Assert.True(railgunBase.Has(EcsChildOf, railgun)); + Assert.True(railgunHead.Has(EcsChildOf, railgun)); + Assert.True(railgunBeam.Has(EcsChildOf, railgun)); + + Assert.Equal(".Railgun", railgun.Path()); + Assert.Equal(".Railgun.Base", railgunBase.Path()); + Assert.Equal(".Railgun.Head", railgunHead.Path()); + Assert.Equal(".Railgun.Beam", railgunBeam.Path()); + + Assert.Equal("Railgun", railgun.Symbol()); + Assert.Equal("Railgun.Head", railgunHead.Symbol()); + Assert.Equal("Railgun.Beam", railgunBeam.Symbol()); + } + + [Fact] + private void PrefabHierarchyWithRootTypes() + { + using World world = World.Create(); + + Entity turret = world.Prefab(); + Entity turretBase = world.Prefab().ChildOf(); + + Assert.True(turret != 0); + Assert.True(turretBase != 0); + Assert.True(turretBase.Has(EcsChildOf, turret)); + + Assert.Equal(".Turret", turret.Path()); + Assert.Equal(".Turret.Base", turretBase.Path()); + + Assert.Equal("Turret", turret.Symbol()); + Assert.Equal("Base", turretBase.Symbol()); + + Entity inst = world.Entity().IsA(); + Assert.True(inst != 0); + + Entity instBase = inst.Lookup("Base"); + Assert.True(instBase != 0); + } + + [Fact] + private void PrefabHierarchyWithChildOverride() + { + using World world = World.Create(); + + Entity t = world.Prefab(); + Entity tb = world.Prefab().Add(); + Assert.True(t != 0); + Assert.True(tb != 0); + + Entity r = world.Prefab().IsA(); + Entity rb = world.Prefab().Add(); + Assert.True(r != 0); + Assert.True(rb != 0); + + Entity i = world.Entity().IsA(); + Assert.True(i != 0); + Entity ib = i.Lookup("Base"); + Assert.True(ib != 0); + Assert.True(ib.Has()); + Assert.True(ib.Has()); + } + + [Fact] + private void EntityWithNestedType() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity p = world.Entity(); + + Assert.Equal("EntityType", e.Name()); + Assert.Equal(".Parent.EntityType", e.Path()); + Assert.True(e.Has(EcsChildOf, p)); + + Entity e2 = world.Entity(); + Assert.True(e == e2); + } + + [Fact] + private void EntityWithTypeDefer() + { + using World world = World.Create(); + + world.DeferBegin(); + Entity e = world.Entity(); + world.DeferEnd(); + + Assert.Equal("Tag", e.Name()); + Assert.Equal("Tag", e.Symbol()); + Assert.True(world.Id() == e); + } + + [Fact] + private void AddIfTrueT() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + e.AddIf(true); + Assert.True(e.Has()); + } + + [Fact] + private void AddIfFalseT() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + e.AddIf(false); + Assert.True(!e.Has()); + + e.Add(); + Assert.True(e.Has()); + e.AddIf(false); + Assert.True(!e.Has()); + } + + [Fact] + private void AddIfTrueId() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity t = world.Entity(); + + e.AddIf(true, t); + Assert.True(e.Has(t)); + } + + [Fact] + private void AddIfFalseId() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity t = world.Entity(); + + e.AddIf(false, t); + Assert.True(!e.Has(t)); + e.Add(t); + Assert.True(e.Has(t)); + e.AddIf(false, t); + Assert.True(!e.Has(t)); + } + + [Fact] + private void AddIfTrueRO() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + e.AddIf(true); + Assert.True(e.Has()); + } + + [Fact] + private void AddIfFalseRO() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + e.AddIf(false); + Assert.True(!e.Has()); + e.Add(); + Assert.True(e.Has()); + e.AddIf(false); + Assert.True(!e.Has()); + } + + [Fact] + private void AddIfTrueRo() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity o = world.Entity(); + + e.AddIf(true, o); + Assert.True(e.Has(o)); + } + + [Fact] + private void AddIfFalseRo() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity o = world.Entity(); + + e.AddIf(false, o); + Assert.True(!e.Has(o)); + e.Add(o); + Assert.True(e.Has(o)); + e.AddIf(false, o); + Assert.True(!e.Has(o)); + } + + [Fact] + private void AddIfTruero() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity r = world.Entity(); + Entity o = world.Entity(); + + e.AddIf(true, r, o); + Assert.True(e.Has(r, o)); + } + + [Fact] + private void AddIfFalsero() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity r = world.Entity(); + Entity o = world.Entity(); + + e.AddIf(false, r, o); + Assert.True(!e.Has(r, o)); + e.Add(r, o); + Assert.True(e.Has(r, o)); + e.AddIf(false, r, o); + Assert.True(!e.Has(r, o)); + } + + [Fact] + private void AddIfExclusivero() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity r = world.Entity().Add(Ecs.Exclusive); + Entity o1 = world.Entity(); + Entity o2 = world.Entity(); + + e.Add(r, o1); + Assert.True(e.Has(r, o1)); + + e.AddIf(true, r, o2); + Assert.True(!e.Has(r, o1)); + Assert.True(e.Has(r, o2)); + + e.AddIf(false, r, o1); + Assert.True(!e.Has(r, o1)); + Assert.True(!e.Has(r, o2)); + } + + [Fact] + private void AddIfExclusiveRo() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Exclusive); + + Entity e = world.Entity(); + Entity o1 = world.Entity(); + Entity o2 = world.Entity(); + + e.Add(o1); + Assert.True(e.Has(o1)); + + e.AddIf(true, o2); + Assert.True(!e.Has(o1)); + Assert.True(e.Has(o2)); + + e.AddIf(false, o1); + Assert.True(!e.Has(o1)); + Assert.True(!e.Has(o2)); + } + + [Fact] + private void AddIfExclusiveRO() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Exclusive); + + Entity e = world.Entity(); + + e.Add(); + Assert.True(e.Has()); + + e.AddIf(true); + Assert.True(!e.Has()); + Assert.True(e.Has()); + + e.AddIf(false); + Assert.True(!e.Has()); + Assert.True(!e.Has()); + } + + [Fact] + private void AddIfPairWith0Object() + { + using World world = World.Create(); + + Entity e = world.Entity(); + Entity r = world.Entity(); + Entity o1 = world.Entity(); + + e.Add(r, o1); + Assert.True(e.Has(r, o1)); + + e.AddIf(false, r, 0); + Assert.True(!e.Has(r, o1)); + Assert.True(!e.Has(r, Ecs.Wildcard)); + } + + [Fact] + private void ChildrenWithCustomRelation() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + + Entity parent = world.Entity(); + Entity child1 = world.Entity().Add(rel, parent); + Entity child2 = world.Entity().Add(rel, parent); + world.Entity().ChildOf(parent); + + bool child1Found = false; + bool child2Found = false; + int count = 0; + + parent.Children(rel, (Entity child) => + { + if (child == child1) + child1Found = true; + else if (child == child2) child2Found = true; + count++; + }); + + Assert.Equal(2, count); + Assert.True(child1Found); + Assert.True(child2Found); + } + + [Fact] + private void ChildrenWithCustomRelationType() + { + using World world = World.Create(); + + Entity parent = world.Entity(); + Entity child1 = world.Entity().Add(parent); + Entity child2 = world.Entity().Add(parent); + world.Entity().ChildOf(parent); + + bool child1Found = false; + bool child2Found = false; + int count = 0; + + parent.Children((Entity child) => + { + if (child == child1) + child1Found = true; + else if (child == child2) child2Found = true; + count++; + }); + + Assert.Equal(2, count); + Assert.True(child1Found); + Assert.True(child2Found); + } + + [Fact] + private void ChildrenWithThis() + { + using World world = World.Create(); + + int count = 0; + world.Entity(Ecs.This).Children((Entity e) => { count++; }); + Assert.True(count == 0); + } + + [Fact] + private void ChildrenWithWildcard() + { + using World world = World.Create(); + + int count = 0; + world.Entity(Ecs.Wildcard).Children((Entity e) => { count++; }); + Assert.True(count == 0); + } + + [Fact] + private void ChildrenWithAny() + { + using World world = World.Create(); + + int count = 0; + world.Entity(Ecs.Any).Children((Entity e) => { count++; }); + Assert.True(count == 0); + } + + [Fact] + private void GetDepth() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity().ChildOf(e1); + Entity e3 = world.Entity().ChildOf(e2); + Entity e4 = world.Entity().ChildOf(e3); + + Assert.Equal(0, e1.Depth(EcsChildOf)); + Assert.Equal(1, e2.Depth(EcsChildOf)); + Assert.Equal(2, e3.Depth(EcsChildOf)); + Assert.Equal(3, e4.Depth(EcsChildOf)); + } + + [Fact] + private void GetDepthWithType() + { + using World world = World.Create(); + + world.Component().Add(EcsTraversable); + + Entity e1 = world.Entity(); + Entity e2 = world.Entity().Add(e1); + Entity e3 = world.Entity().Add(e2); + Entity e4 = world.Entity().Add(e3); + + Assert.Equal(0, e1.Depth()); + Assert.Equal(1, e2.Depth()); + Assert.Equal(2, e3.Depth()); + Assert.Equal(3, e4.Depth()); + } + + [Fact] + private void SetAlias() + { + using World world = World.Create(); + + Entity e = world.Entity("parent.child"); + e.SetAlias("parent_child"); + + Assert.True(e == world.Lookup("parent.child")); + Assert.True(e == world.Lookup("parent_child")); + } + + [Fact] + private void EntityLookupNotRecursive() + { + using World world = World.Create(); + + Entity child = default; + Entity foo = default; + + world.Entity("parent").Scope(() => + { + child = world.Entity("child"); + foo = world.Entity("foo"); + }); + + Assert.True(child.Lookup("foo") == 0); + Assert.True(child.Lookup("foo", true) == foo); + } + + [Fact] + private void WorldLookupNotRecursive() + { + using World world = World.Create(); + + Entity child = default; + Entity foo = default; + + world.Entity("parent").Scope(() => + { + child = world.Entity("child"); + foo = world.Entity("foo"); + }); + + child.Scope(() => + { + Assert.True(world.Lookup("foo") == foo); + Assert.True(world.Lookup("foo", ".", ".", false) == 0); + }); + } + + [Fact] + private void WorldLookupCustomSep() + { + using World world = World.Create(); + + Entity parent = world.Entity("parent"); + Entity child = default; + Entity foo = default; + + parent.Scope(() => + { + child = world.Entity("child"); + foo = world.Entity("foo"); + }); + + Assert.True(world.Lookup("parent::child", "::") == child); + Assert.True(world.Lookup("parent::foo", "::") == foo); + } + + [Fact] + private void WorldLookupCustomRootSep() + { + using World world = World.Create(); + + Entity parent = world.Entity("parent"); + Entity child = default; + Entity foo = default; + + parent.Scope(() => + { + child = world.Entity("child"); + foo = world.Entity("foo"); + }); + + Assert.True(world.Lookup("::parent::child", "::", "::") == child); + Assert.True(world.Lookup("::parent::foo", "::", "::") == foo); + } + + [Fact] + private void DependsOn() + { + using World world = World.Create(); + + Entity a = world.Entity(); + Entity b = world.Entity().DependsOn(a); + Assert.True(b.Has(Ecs.DependsOn, a)); + } + + [Fact] + private void DependsOnType() + { + using World world = World.Create(); + + Entity b = world.Entity().DependsOn(); + Assert.True(b.Has(Ecs.DependsOn, world.Id())); + } + + [Fact] + private void SetSparse() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + + Entity e = world.Entity().Set(new Velocity(1, 2)); + + Assert.True(e.Has()); + + Velocity* v = e.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void Insert1Sparse() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + + Entity e = world.Entity().Insert((ref Velocity v) => + { + v.X = 1; + v.Y = 2; + }); + + Assert.True(e.Has()); + + Velocity* v = e.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void Insert2With1Sparse() + { + using World world = World.Create(); + + world.Component(); + world.Component().Add(Ecs.Sparse); + + Entity e = world.Entity().Insert((ref Position p, ref Velocity v) => + { + p.X = 10; + p.Y = 20; + v.X = 1; + v.Y = 2; + }); + + Assert.True(e.Has()); + Assert.True(e.Has()); + + Position* p = e.GetPtr(); + Assert.Equal(10, p->X); + Assert.Equal(20, p->Y); + + Velocity* v = e.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void OverrideSparse() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + + Entity @base = world.Entity().Set(new Velocity(1, 2)); + + Entity e = world.Entity().IsA(@base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Velocity* v = e.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + } + + [Fact] + private void DeleteWithOverrideSparse() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + + Entity @base = world.Entity().Set(new Velocity(1, 2)); + + Entity e = world.Entity().IsA(@base); + + Assert.True(e.Has()); + Assert.True(e.Owns()); + + Velocity* v = e.GetPtr(); + Assert.Equal(1, v->X); + Assert.Equal(2, v->Y); + + e.Destruct(); + } + + [Fact] + private void IterType() + { + using World world = World.Create(); + + Entity e = world.Entity().Add().Add(); + + int count = 0; + bool posFound = false; + bool velocityFound = false; + + foreach (Id id in e.Type()) + { + count++; + + if (id == world.Id()) + posFound = true; + + if (id == world.Id()) + velocityFound = true; + } + + Assert.Equal(2, count); + Assert.True(posFound); + Assert.True(velocityFound); + } + + [Fact] + private void IterEmptyType() + { + using World world = World.Create(); + + Entity e = world.Entity(); + + int count = 0; + + foreach (Id id in e.Type()) + { + Assert.True(id != 0); + count++; + } + + Assert.Equal(0, count); + } +} diff --git a/src/Flecs.NET.Tests/Cpp/QueryTests.cs b/src/Flecs.NET.Tests/Cpp/QueryTests.cs index c57941b2..5349facf 100644 --- a/src/Flecs.NET.Tests/Cpp/QueryTests.cs +++ b/src/Flecs.NET.Tests/Cpp/QueryTests.cs @@ -1,3563 +1,3565 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using Flecs.NET.Core; -using Xunit; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Tests.Cpp; - -[SuppressMessage("ReSharper", "ParameterOnlyUsedForPreconditionCheck.Local")] -[SuppressMessage("ReSharper", "CompareOfFloatsByEqualityOperator")] -[SuppressMessage("ReSharper", "AccessToDisposedClosure")] -[SuppressMessage("ReSharper", "AccessToModifiedClosure")] -[SuppressMessage("ReSharper", "VariableHidesOuterVariable")] -public unsafe class QueryTests -{ - public static int InvokedCount; - - public QueryTests() - { - InvokedCount = default; - } - - [Fact] - private void TermEachComponent() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Set(new Position(1, 2)); - Entity e2 = world.Entity().Set(new Position(3, 4)); - Entity e3 = world.Entity().Set(new Position(5, 6)); - - e3.Add(); - - int count = 0; - world.Each((Entity e, ref Position p) => - { - if (e == e1) - { - Assert.Equal(1, p.X); - Assert.Equal(2, p.Y); - count++; - } - - if (e == e2) - { - Assert.Equal(3, p.X); - Assert.Equal(4, p.Y); - count++; - } - - if (e == e3) - { - Assert.Equal(5, p.X); - Assert.Equal(6, p.Y); - count++; - } - }); - - Assert.Equal(3, count); - } - - // TODO: Remove this? - // [Fact] - // private void TermEachTag() - // { - // using World world = World.Create(); - // - // Entity e1 = world.Entity().Add(); - // Entity e2 = world.Entity().Add(); - // Entity e3 = world.Entity().Add(); - // - // e3.Add(); - // - // int count = 0; - // world.Each((Entity e, ref Foo _) => - // { - // if (e == e1 || e == e2 || e == e3) count++; - // }); - // - // Assert.Equal(3, count); - // } - - [Fact] - private void TermEachId() - { - using World world = World.Create(); - - Entity foo = world.Entity(); - - Entity e1 = world.Entity().Add(foo); - Entity e2 = world.Entity().Add(foo); - Entity e3 = world.Entity().Add(foo); - - e3.Add(); - - int count = 0; - world.Each(foo, (Entity e) => - { - if (e == e1 || e == e2 || e == e3) count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void TermEachPairId() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity obj = world.Entity(); - - Entity e1 = world.Entity().Add(rel, obj); - Entity e2 = world.Entity().Add(rel, obj); - Entity e3 = world.Entity().Add(rel, obj); - - e3.Add(); - - int count = 0; - world.Each(world.Pair(rel, obj), (Entity e) => - { - if (e == e1 || e == e2 || e == e3) count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void TermEachPairRelationWildcard() - { - using World world = World.Create(); - - Entity rel1 = world.Entity(); - Entity rel2 = world.Entity(); - Entity obj = world.Entity(); - - Entity e1 = world.Entity().Add(rel1, obj); - Entity e2 = world.Entity().Add(rel1, obj); - Entity e3 = world.Entity().Add(rel2, obj); - - e3.Add(); - - int count = 0; - world.Each(world.Pair(Ecs.Wildcard, obj), (Entity e) => - { - if (e == e1 || e == e2 || e == e3) count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void TermEachPairObjectWildcard() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity obj1 = world.Entity(); - Entity obj2 = world.Entity(); - - Entity e1 = world.Entity().Add(rel, obj1); - Entity e2 = world.Entity().Add(rel, obj1); - Entity e3 = world.Entity().Add(rel, obj2); - - e3.Add(); - - int count = 0; - world.Each(world.Pair(rel, Ecs.Wildcard), (Entity e) => - { - if (e == e1 || e == e2 || e == e3) count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void TermGetId() - { - using World world = World.Create(); - - Entity foo = world.Entity(); - Entity bar = world.Entity(); - - using Query q = world.QueryBuilder() - .With() - .With() - .With(foo, bar) - .Build(); - - Assert.Equal(3, q.FieldCount()); - - Term - t = q.Term(0); - Assert.True(t.Id() == world.Id()); - t = q.Term(1); - Assert.True(t.Id() == world.Id()); - t = q.Term(2); - Assert.True(t.Id() == world.Pair(foo, bar)); - } - - [Fact] - private void TermGetSubj() - { - using World world = World.Create(); - - Entity foo = world.Entity(); - Entity bar = world.Entity(); - Entity src = world.Entity(); - - using Query q = world.QueryBuilder() - .With() - .With().Src(src) - .With(foo, bar) - .Build(); - - Assert.Equal(3, q.FieldCount()); - - Term - t = q.Term(0); - Assert.True(t.GetSrc() == Ecs.This); - t = q.Term(1); - Assert.True(t.GetSrc() == src); - t = q.Term(2); - Assert.True(t.GetSrc() == Ecs.This); - } - - [Fact] - private void TermGetPred() - { - using World world = World.Create(); - - Entity foo = world.Entity(); - Entity bar = world.Entity(); - Entity src = world.Entity(); - - using Query q = world.QueryBuilder() - .With() - .With().Src(src) - .With(foo, bar) - .Build(); - - Assert.Equal(3, q.FieldCount()); - - Term - t = q.Term(0); - Assert.True(t.GetFirst() == world.Id()); - t = q.Term(1); - Assert.True(t.GetFirst() == world.Id()); - t = q.Term(2); - Assert.True(t.GetFirst() == foo); - } - - [Fact] - private void TermGetObj() - { - using World world = World.Create(); - - Entity foo = world.Entity(); - Entity bar = world.Entity(); - Entity src = world.Entity(); - - using Query q = world.QueryBuilder() - .With() - .With().Src(src) - .With(foo, bar) - .Build(); - - Assert.Equal(3, q.FieldCount()); - - Term - t = q.Term(0); - Assert.True(t.GetSecond() == 0); - t = q.Term(1); - Assert.True(t.GetSecond() == 0); - t = q.Term(2); - Assert.True(t.GetSecond() == bar); - } - - [Fact] - private void GetFirst() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - Entity first = q.Iter().First(); - Assert.True(first != 0); - Assert.True(first == e1); - } - - [Fact] - private void GetCountDirect() - { - using World world = World.Create(); - - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - Assert.Equal(3, q.Count()); - } - - [Fact] - private void GetIsTrueDirect() - { - using World world = World.Create(); - - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - using Query q1 = world.QueryBuilder() - .With() - .Build(); - - using Query q2 = world.QueryBuilder() - .With() - .Build(); - - Assert.True(q1.IsTrue()); - Assert.False(q2.IsTrue()); - } - - [Fact] - private void GetFirstDirect() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - Entity first = q.First(); - Assert.True(first != 0); - Assert.True(first == e1); - } - - [Fact] - private void EachWithNoThis() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query f = world.QueryBuilder() - .TermAt(0).Src(e) - .TermAt(1).Src(e) - .Build(); - - int count = 0; - - f.Each((ref Position p, ref Velocity v) => - { - count++; - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - }); - - Assert.Equal(1, count); - } - - [Fact] - private void EachWithIterNoThis() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query f = world.QueryBuilder() - .TermAt(0).Src(e) - .TermAt(1).Src(e) - .Build(); - - int count = 0; - - f.Each((Iter it, int index, ref Position p, ref Velocity v) => - { - count++; - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - Assert.Equal(0, index); - Assert.Equal(0, it.Count()); - }); - - Assert.Equal(1, count); - } - - // [Fact] - // private void InvalidEachWithNoThis() - // { - // install_test_abort(); - // - // using World world = World.Create(); - // - // Entity e = world.Entity() - // .Set(new Position(10, 20)) - // .Set(new Velocity(1, 2)); - // - // using var f = world.QueryBuilder() - // .TermAt(0).Src(e) - // .TermAt(1).Src(e) - // .Build(); - // - // test_expect_abort(); - // - // f.Each((Entity e, ref Position p, ref Velocity v) => { }); - // } - - [Fact] - private void NamedQuery() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Add(); - Entity e2 = world.Entity().Add(); - - using Query q = world.Query("my_query"); - - int count = 0; - q.Each((Entity e, ref Position _) => - { - Assert.True(e == e1 || e == e2); - count++; - }); - Assert.Equal(2, count); - - Entity qe = q.Entity(); - Assert.True(qe != 0); - Assert.Equal("my_query", qe.Name()); - } - - [Fact] - private void NamedScopedQuery() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Add(); - Entity e2 = world.Entity().Add(); - - using Query q = world.Query("my.query"); - - int count = 0; - q.Each((Entity e, ref Position _) => - { - Assert.True(e == e1 || e == e2); - count++; - }); - Assert.Equal(2, count); - - Entity qe = q.Entity(); - Assert.True(qe != 0); - Assert.Equal("query", qe.Name()); - Assert.Equal(".my.query", qe.Path()); - } - - [Fact] - private void SetThisVar() - { - using World world = World.Create(); - - world.Entity().Set(new Position(1, 2)); - Entity e2 = world.Entity().Set(new Position(3, 4)); - world.Entity().Set(new Position(5, 6)); - - using Query q = world.Query("my.query"); - - int count = 0; - q.Iter().SetVar(0, e2).Each((Entity e, ref Position _) => - { - Assert.True(e == e2); - count++; - }); - Assert.Equal(1, count); - } - - [Fact] - private void InspectTermsWithExpr() - { - using World world = World.Create(); - - using Query f = world.QueryBuilder() - .Expr("(ChildOf,#0)") - .Build(); - - int count = 0; - f.EachTerm((ref Term term) => - { - Assert.True(term.Id().IsPair()); - count++; - }); - - Assert.Equal(1, count); - } - - [Fact] - private void Find() - { - using World world = World.Create(); - - world.Entity().Set(new Position(10, 20)); - Entity e2 = world.Entity().Set(new Position(20, 30)); - - using Query q = world.Query(); - - Entity r = q.Find((ref Position p) => { return p.X == 20; }); - - Assert.True(r == e2); - } - - [Fact] - private void FindNotFound() - { - using World world = World.Create(); - - world.Entity().Set(new Position(10, 20)); - world.Entity().Set(new Position(20, 30)); - - using Query q = world.Query(); - - Entity r = q.Find((ref Position p) => { return p.X == 30; }); - - Assert.True(r == 0); - } - - [Fact] - private void FindWithEntity() - { - using World world = World.Create(); - - world.Entity().Set(new Position(10, 20)).Set(new Velocity(20, 30)); - Entity e2 = world.Entity().Set(new Position(20, 30)).Set(new Velocity(20, 30)); - - using Query q = world.Query(); - - Entity r = q.Find((Entity e, ref Position p) => - { - return p.X == e.GetPtr()->X && - p.Y == e.GetPtr()->Y; - }); - - Assert.True(r == e2); - } - - [Fact] - private void FindWithMatchEmptyTables() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Set(new Position(10, 20)).Add(); - e1.Destruct(); - Entity e2 = world.Entity().Set(new Position(20, 30)); - - using Query q = world.QueryBuilder() - .QueryFlags(Ecs.QueryMatchEmptyTables) - .Build(); - - Entity r = q.Find((ref Position p) => - { - return p.X == 20; - }); - - Assert.True(r == e2); - } - - [Fact] - private void FindWithEntityWithMatchEmptyTables() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Set(new Position(10, 20)).Add(); - e1.Destruct(); - Entity e2 = world.Entity().Set(new Position(20, 30)); - - using Query q = world.QueryBuilder() - .QueryFlags(EcsQueryMatchEmptyTables) - .Build(); - - Entity r = q.Find((Entity e, ref Position p) => - { - return p.X == 20; - }); - - Assert.True(r == e2); - } - - [Fact] - private void Run() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.Query(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - - foreach (int i in it) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - } - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void RunConst() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.Query(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - - foreach (int i in it) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - } - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void RunShared() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .Set(new Velocity(1, 2)); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Add(Ecs.IsA, @base); - - Entity e2 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(3, 4)); - - using Query q = world.QueryBuilder() - .Expr("Velocity(self|up IsA)") - .Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - - if (!it.IsSelf(1)) - foreach (int i in it) - { - p[i].X += v[0].X; - p[i].Y += v[0].Y; - } - else - foreach (int i in it) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - } - }); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(13, p->X); - Assert.Equal(24, p->Y); - } - - [Fact] - private void RunOptional() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)) - .Set(new Mass(1)); - - Entity e2 = world.Entity() - .Set(new Position(30, 40)) - .Set(new Velocity(3, 4)) - .Set(new Mass(1)); - - Entity e3 = world.Entity() - .Set(new Position(50, 60)); - - Entity e4 = world.Entity() - .Set(new Position(70, 80)); - - using Query q = world.QueryBuilder() - .TermAt(1).Optional() - .TermAt(2).Optional() - .Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - Field m = it.Field(2); - - if (it.IsSet(1) && it.IsSet(2)) - foreach (int i in it) - { - p[i].X += v[i].X * m[i].Value; - p[i].Y += v[i].Y * m[i].Value; - } - else - foreach (int i in it) - { - p[i].X++; - p[i].Y++; - } - } - }); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(33, p->X); - Assert.Equal(44, p->Y); - - p = e3.GetPtr(); - Assert.Equal(51, p->X); - Assert.Equal(61, p->Y); - - p = e4.GetPtr(); - Assert.Equal(71, p->X); - Assert.Equal(81, p->Y); - } - - [Fact] - private void RunSparse() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.Query(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field v = it.Field(1); - - foreach (int i in it) - { - ref Position p = ref it.FieldAt(0, i); - p.X += v[i].X; - p.Y += v[i].Y; - } - } - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void RunSparseWithWith() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.QueryBuilder() - .With() - .With() - .Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field v = it.Field(1); - - foreach (int i in it) - { - ref Position p = ref it.FieldAt(0, i); - p.X += v[i].X; - p.Y += v[i].Y; - } - } - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void Each() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.Query(); - - q.Each((ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void EachConst() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.Query(); - - q.Each((ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void EachShared() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity @base = world.Entity() - .Set(new Velocity(1, 2)); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Add(Ecs.IsA, @base); - - Entity e2 = world.Entity() - .Set(new Position(20, 30)) - .Add(Ecs.IsA, @base); - - Entity e3 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(3, 4)); - - using Query q = world.Query(); - - q.Each((ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(21, p->X); - Assert.Equal(32, p->Y); - - p = e3.GetPtr(); - Assert.Equal(13, p->X); - Assert.Equal(24, p->Y); - } - - [Fact] - private void EachOptional() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)) - .Set(new Mass(1)); - - Entity e2 = world.Entity() - .Set(new Position(30, 40)) - .Set(new Velocity(3, 4)) - .Set(new Mass(1)); - - Entity e3 = world.Entity() - .Set(new Position(50, 60)); - - Entity e4 = world.Entity() - .Set(new Position(70, 80)); - - using Query q = world.QueryBuilder() - .TermAt(1).Optional() - .TermAt(2).Optional() - .Build(); - - q.Each((ref Position p, ref Velocity v, ref Mass m) => - { - if (!Unsafe.IsNullRef(ref v) && !Unsafe.IsNullRef(ref m)) - { - p.X += v.X * m.Value; - p.Y += v.Y * m.Value; - } - else - { - p.X++; - p.Y++; - } - }); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(33, p->X); - Assert.Equal(44, p->Y); - - p = e3.GetPtr(); - Assert.Equal(51, p->X); - Assert.Equal(61, p->Y); - - p = e4.GetPtr(); - Assert.Equal(71, p->X); - Assert.Equal(81, p->Y); - } - - [Fact] - private void EachSparse() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.Query(); - - q.Each((ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void EachSparseWithWith() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.QueryBuilder() - .With() - .With() - .Build(); - - q.Each((Iter it, int row) => - { - ref Position p = ref it.FieldAt(0, row); - ref Velocity v = ref it.FieldAt(1, row); - p.X += v.X; - p.Y += v.Y; - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void EachSparseMany() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Sparse); - world.Component(); - - List entities = new List(); - - for (int i = 0; i < 2000; i++) - { - entities.Add( - world.Entity() - .Set(new Position(10 + i, 20 + i)) - .Set(new Velocity(i, i)) - ); - } - - using Query q = world.Query(); - - q.Each(static (ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - for (int i = 0; i < 2000; i++) - { - Entity e = entities[i]; - - Position* p = e.GetPtr(); - Assert.Equal(10 + i * 2, p->X); - Assert.Equal(20 + i * 2, p->Y); - - Velocity* v = e.GetPtr(); - Assert.Equal(i, v->X); - Assert.Equal(i, v->Y); - } - } - - [Fact] - private void Signature() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.QueryBuilder().Expr("Position, Velocity").Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - - foreach (int i in it) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - } - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void SignatureConst() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity entity = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - using Query q = world.QueryBuilder().Expr("Position, [in] Velocity").Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - - foreach (int i in it) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - } - }); - - Position* p = entity.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - - [Fact] - private void SignatureShared() - { - using World world = World.Create(); - - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); - - Entity @base = world.Entity() - .Set(new Velocity(1, 2)); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Add(Ecs.IsA, @base); - - Entity e2 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(3, 4)); - - using Query q = world.QueryBuilder() - .Expr("Position, [in] Velocity(self|up IsA)") - .Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - - if (!it.IsSelf(1)) - foreach (int i in it) - { - p[i].X += v[0].X; - p[i].Y += v[0].Y; - } - else - foreach (int i in it) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - } - }); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(13, p->X); - Assert.Equal(24, p->Y); - } - - [Fact] - private void SignatureOptional() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)) - .Set(new Mass(1)); - - Entity e2 = world.Entity() - .Set(new Position(30, 40)) - .Set(new Velocity(3, 4)) - .Set(new Mass(1)); - - Entity e3 = world.Entity() - .Set(new Position(50, 60)); - - Entity e4 = world.Entity() - .Set(new Position(70, 80)); - - using Query q = world.QueryBuilder().Expr("Position, ?Velocity, ?Mass").Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Field v = it.Field(1); - Field m = it.Field(2); - - if (it.IsSet(1) && it.IsSet(2)) - foreach (int i in it) - { - p[i].X += v[i].X * m[i].Value; - p[i].Y += v[i].Y * m[i].Value; - } - else - foreach (int i in it) - { - p[i].X++; - p[i].Y++; - } - } - }); - - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - - p = e2.GetPtr(); - Assert.Equal(33, p->X); - Assert.Equal(44, p->Y); - - p = e3.GetPtr(); - Assert.Equal(51, p->X); - Assert.Equal(61, p->Y); - - p = e4.GetPtr(); - Assert.Equal(71, p->X); - Assert.Equal(81, p->Y); - } - - [Fact] - private void QuerySinglePair() - { - using World world = World.Create(); - - world.Entity().Add(); - Entity e2 = world.Entity().Add(); - - using Query q = world.QueryBuilder() - .Expr("(Pair, Velocity)") - .Build(); - - int tableCount = 0; - int entityCount = 0; - - q.Run((Iter it) => - { - while (it.Next()) - { - tableCount++; - foreach (int i in it) - { - Assert.True(it.Entity(i) == e2); - entityCount++; - } - } - }); - - Assert.Equal(1, tableCount); - Assert.Equal(1, entityCount); - } - - [Fact] - private void TagWithEach() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - Entity e = world.Entity() - .Add(); - - q.Each((Entity qe) => { Assert.True(qe == e); }); - } - - [Fact] - private void SharedTagWithEach() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - Entity @base = world.Prefab() - .Add(); - - Entity e = world.Entity() - .Add(Ecs.IsA, @base); - - q.Each((Entity qe) => { Assert.True(qe == e); }); - } - - private static int ComparePosition(ulong e1, void* p1, ulong e2, void* p2) - { - Position* pos1 = (Position*)p1; - Position* pos2 = (Position*)p2; - return pos1->X.CompareTo(pos2->X); - } - - [Fact] - private void SortBy() - { - using World world = World.Create(); - - world.Entity().Set(new Position(1, 0)); - world.Entity().Set(new Position(6, 0)); - world.Entity().Set(new Position(2, 0)); - world.Entity().Set(new Position(5, 0)); - world.Entity().Set(new Position(4, 0)); - - using Query q = world.QueryBuilder() - .OrderBy(ComparePosition) - .Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Field p = it.Field(0); - Assert.Equal(5, it.Count()); - Assert.Equal(1, p[0].X); - Assert.Equal(2, p[1].X); - Assert.Equal(4, p[2].X); - Assert.Equal(5, p[3].X); - Assert.Equal(6, p[4].X); - } - }); - } - - [Fact] - private void Changed() - { - using World world = World.Create(); - - Entity e = world.Entity().Set(new Position(1, 0)); - - using Query q = world.QueryBuilder() - .Cached() - .Build(); - - using Query qW = world.Query(); - - Assert.True(q.Changed()); - - q.Each((ref Position _) => { }); - Assert.False(q.Changed()); - - e.Set(new Position(2, 0)); - Assert.True(q.Changed()); - - q.Each((ref Position _) => { }); - Assert.False(q.Changed()); - - qW.Each((ref Position _) => { }); - Assert.True(q.Changed()); - } - - [Fact] - private void DefaultCtor() - { - using World world = World.Create(); - - Query qVar; - - int count = 0; - using Query q = world.Query(); - - world.Entity().Set(new Position(10, 20)); - - qVar = q; - - qVar.Each((ref Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - count++; - }); - - Assert.Equal(1, count); - } - - [Fact] - private void ExprWithTemplate() - { - using World world = World.Create(); - - Component> comp = world.Component>(); - Assert.Equal("Template", comp.Name()); - - int count = 0; - using Query q = world.QueryBuilder().Expr("Template").Build(); - - world.Entity() - .Set(new Position(10, 20)) - .Set(new Template(30, 40)); - - q.Each((Entity e, ref Position p) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Template* t = e.GetPtr>(); - Assert.Equal(30, t->X); - Assert.Equal(40, t->Y); - - count++; - }); - - Assert.Equal(1, count); - } - - [Fact] - private void QueryTypeWithTemplate() - { - using World world = World.Create(); - - Component> comp = world.Component>(); - Assert.Equal("Template", comp.Name()); - - int count = 0; - using Query> q = world.Query>(); - - world.Entity() - .Set(new Position(10, 20)) - .Set(new Template(30, 40)); - - q.Each((ref Position p, ref Template t) => - { - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - - Assert.Equal(30, t.X); - Assert.Equal(40, t.Y); - - count++; - }); - - Assert.Equal(1, count); - } - - [Fact] - private void CompareTermId() - { - using World world = World.Create(); - - int count = 0; - Entity e = world.Entity().Add(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Assert.True(it.Id(0) == it.World().Id()); - Assert.True(it.Entity(0) == e); - } - - count++; - }); - - Assert.Equal(1, count); - } - - // [Fact] - // private void TestNoDeferEach() - // { - // install_test_abort(); - // - // using World world = World.Create(); - // - // world.Entity().Add().Set(new Value(10)); - // - // using var q = world.QueryBuilder() - // .With() - // .Build(); - // - // q.Each((Entity e, ref Value v) => - // { - // test_expect_abort(); - // e.Remove(); - // }); - // - // Assert.True(false); - // } - - // [Fact] - // private void TestNoDeferIter() - // { - // install_test_abort(); - // - // using World world = World.Create(); - // - // world.Entity().Add().Set(new Value(10)); - // - // using var q = world.QueryBuilder() - // .With() - // .Build(); - // - // q.Run((Iter it, Field v) => - // { - // foreach (int i in it) - // { - // test_expect_abort(); - // it.Entity(i).Remove(); - // } - // }); - // - // Assert.True(false); - // } - - [Fact] - private void InspectTerms() - { - using World world = World.Create(); - - Entity p = world.Entity(); - - using Query q = world.QueryBuilder() - .With() - .With(Ecs.ChildOf, p) - .Build(); - - Assert.Equal(3, q.FieldCount()); - - Term t = q.Term(0); - Assert.Equal(world.Id(), t.Id()); - Assert.Equal(Ecs.And, t.Oper()); - Assert.Equal(Ecs.InOutDefault, t.InOut()); - - t = q.Term(1); - Assert.Equal(world.Id(), t.Id()); - Assert.Equal(Ecs.And, t.Oper()); - Assert.Equal(Ecs.InOutDefault, t.InOut()); - - t = q.Term(2); - Assert.Equal(world.Pair(Ecs.ChildOf, p), t.Id()); - Assert.Equal(Ecs.And, t.Oper()); - Assert.Equal(Ecs.InOutDefault, t.InOut()); - Assert.True(t.Id().Second() == p); - } - - [Fact] - private void InspectTermsWithEach() - { - using World world = World.Create(); - - Entity p = world.Entity(); - - using Query q = world.QueryBuilder() - .With() - .With(Ecs.ChildOf, p) - .Build(); - - int count = 0; - q.EachTerm((ref Term t) => - { - if (count == 0) - { - Assert.Equal(world.Id(), t.Id()); - Assert.Equal(Ecs.InOutDefault, t.InOut()); - } - else if (count == 1) - { - Assert.Equal(world.Id(), t.Id()); - Assert.Equal(Ecs.InOutDefault, t.InOut()); - } - else if (count == 2) - { - Assert.Equal(world.Pair(Ecs.ChildOf, p), t.Id()); - Assert.True(t.Id().Second() == p); - Assert.Equal(Ecs.InOutDefault, t.InOut()); - } - else - { - Assert.True(false); - } - - Assert.Equal(Ecs.And, t.Oper()); - - count++; - }); - - Assert.Equal(3, count); - } - - [Fact] - private void CompToStr() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - Assert.Equal("Position($this), Velocity($this)", q.Str()); - } - - [Fact] - private void PairToStr() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With() - .With() - .Build(); - Assert.Equal("Position($this), Velocity($this), Eats($this,Apples)", q.Str()); - } - - [Fact] - private void OperNotToStr() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With().Oper(Ecs.Not) - .Build(); - Assert.Equal("Position($this), !Velocity($this)", q.Str()); - } - - [Fact] - private void OperOptionalToStr() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With().Oper(Ecs.Optional) - .Build(); - Assert.Equal("Position($this), ?Velocity($this)", q.Str()); - } - - [Fact] - private void OperOrToStr() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With().Oper(Ecs.Or) - .With() - .Build(); - Assert.Equal("Position($this) || Velocity($this)", q.Str()); - } - - [Fact] - private void EachNoEntity1Comp() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Position(1, 2)); - - using Query q = world.Query(); - - int count = 0; - q.Each((ref Position p) => - { - Assert.Equal(1, p.X); - Assert.Equal(2, p.Y); - p.X += 1; - p.Y += 2; - count++; - }); - - Assert.Equal(1, count); - - Position* pos = e.GetPtr(); - Assert.Equal(2, pos->X); - Assert.Equal(4, pos->Y); - } - - [Fact] - private void EachNoEntity2Comps() - { - using World world = World.Create(); - - Entity e = world.Entity() - .Set(new Position(1, 2)) - .Set(new Velocity(10, 20)); - - using Query q = world.Query(); - - int count = 0; - q.Each((ref Position p, ref Velocity v) => - { - Assert.Equal(1, p.X); - Assert.Equal(2, p.Y); - Assert.Equal(10, v.X); - Assert.Equal(20, v.Y); - - p.X += 1; - p.Y += 2; - v.X += 1; - v.Y += 2; - count++; - }); - - Assert.Equal(1, count); - - Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => - { - Assert.Equal(2, p.X); - Assert.Equal(4, p.Y); - - Assert.Equal(11, v.X); - Assert.Equal(22, v.Y); - })); - - Assert.Equal(1, count); - } - - [Fact] - private void IterNoComps1Comp() - { - using World world = World.Create(); - - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add().Add(); - world.Entity().Add(); - - using Query q = world.Query(); - - int count = 0; - q.Run((Iter it) => - { - while (it.Next()) - count += it.Count(); - }); - - Assert.Equal(3, count); - } - - [Fact] - private void IterNoComps2Comps() - { - using World world = World.Create(); - - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add().Add(); - world.Entity().Add().Add(); - - using Query q = world.Query(); - - int count = 0; - q.Run((Iter it) => - { - while (it.Next()) - count += it.Count(); - }); - - Assert.Equal(2, count); - } - - [Fact] - private void IterNoCompsNoComps() - { - using World world = World.Create(); - - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add().Add(); - world.Entity().Add().Add(); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - int count = 0; - q.Run((Iter it) => - { - while (it.Next()) - count += it.Count(); - }); - - Assert.Equal(3, count); - } - - [Fact] - private void IterQueryInSystem() - { - using World world = World.Create(); - - world.Entity().Add().Add(); - - using Query q = world.Query(); - - int count = 0; - world.System() - .Each((Entity _, ref Position _) => { q.Each((Entity _, ref Velocity _) => { count++; }); }); - - world.Progress(); - - Assert.Equal(1, count); - } - - [Fact] - private void IterType() - { - using World world = World.Create(); - - world.Entity().Add(); - world.Entity().Add().Add(); - - using Query q = world.Query(); - - q.Run((Iter it) => - { - while (it.Next()) - { - Assert.True(it.Type().Count() >= 1); - Assert.True(it.Table().Has()); - } - }); - } - - [Fact] - private void InstancedQueryWithSingletonEach() - { - using World world = World.Create(); - - world.Set(new Velocity(1, 2)); - - Entity e1 = world.Entity().Set(new Position(10, 20)); - e1.Set(new Self(e1)); - Entity e2 = world.Entity().Set(new Position(20, 30)); - e2.Set(new Self(e2)); - Entity e3 = world.Entity().Set(new Position(30, 40)); - e3.Set(new Self(e3)); - Entity e4 = world.Entity().Set(new Position(40, 50)); - e4.Set(new Self(e4)); - Entity e5 = world.Entity().Set(new Position(50, 60)); - e5.Set(new Self(e5)); - - e4.Add(); - e5.Add(); - - using Query q = world.QueryBuilder() - .TermAt(2).Singleton() - .Build(); - - int count = 0; - q.Each((Entity e, ref Self s, ref Position p, ref Velocity v) => - { - Assert.True(e == s.Value); - p.X += v.X; - p.Y += v.Y; - count++; - }); - - Assert.Equal(5, count); - - Assert.True(e1.Read((ref readonly Position p) => - { - Assert.Equal(11, p.X); - Assert.Equal(22, p.Y); - })); - - Assert.True(e2.Read((ref readonly Position p) => - { - Assert.Equal(21, p.X); - Assert.Equal(32, p.Y); - })); - - Assert.True(e3.Read((ref readonly Position p) => - { - Assert.Equal(31, p.X); - Assert.Equal(42, p.Y); - })); - - Assert.True(e4.Read((ref readonly Position p) => - { - Assert.Equal(41, p.X); - Assert.Equal(52, p.Y); - })); - - Assert.True(e5.Read((ref readonly Position p) => - { - Assert.Equal(51, p.X); - Assert.Equal(62, p.Y); - })); - } - - [Fact] - private void InstancedQueryWithBaseEach() - { - using World world = World.Create(); - - Entity @base = world.Entity().Set(new Velocity(1, 2)); - - Entity e1 = world.Entity().IsA(@base).Set(new Position(10, 20)); - e1.Set(new Self(e1)); - Entity e2 = world.Entity().IsA(@base).Set(new Position(20, 30)); - e2.Set(new Self(e2)); - Entity e3 = world.Entity().IsA(@base).Set(new Position(30, 40)); - e3.Set(new Self(e3)); - Entity e4 = world.Entity().IsA(@base).Set(new Position(40, 50)).Add(); - e4.Set(new Self(e4)); - Entity e5 = world.Entity().IsA(@base).Set(new Position(50, 60)).Add(); - e5.Set(new Self(e5)); - Entity e6 = world.Entity().Set(new Position(60, 70)).Set(new Velocity(2, 3)); - e6.Set(new Self(e6)); - Entity e7 = world.Entity().Set(new Position(70, 80)).Set(new Velocity(4, 5)); - e7.Set(new Self(e7)); - - using Query q = world.QueryBuilder() - .Build(); - - int count = 0; - q.Each((Entity e, ref Self s, ref Position p, ref Velocity v) => - { - Assert.True(e == s.Value); - p.X += v.X; - p.Y += v.Y; - count++; - }); - - Assert.Equal(7, count); - - Assert.True(e1.Read((ref readonly Position p) => - { - Assert.Equal(11, p.X); - Assert.Equal(22, p.Y); - })); - - Assert.True(e2.Read((ref readonly Position p) => - { - Assert.Equal(21, p.X); - Assert.Equal(32, p.Y); - })); - - Assert.True(e3.Read((ref readonly Position p) => - { - Assert.Equal(31, p.X); - Assert.Equal(42, p.Y); - })); - - Assert.True(e4.Read((ref readonly Position p) => - { - Assert.Equal(41, p.X); - Assert.Equal(52, p.Y); - })); - - Assert.True(e5.Read((ref readonly Position p) => - { - Assert.Equal(51, p.X); - Assert.Equal(62, p.Y); - })); - - Assert.True(e6.Read((ref readonly Position p) => - { - Assert.Equal(62, p.X); - Assert.Equal(73, p.Y); - })); - - Assert.True(e7.Read((ref readonly Position p) => - { - Assert.Equal(74, p.X); - Assert.Equal(85, p.Y); - })); - } - - [Fact] - private void InstancedQueryWithSingletonIter() - { - using World world = World.Create(); - - world.Set(new Velocity(1, 2)); - - Entity e1 = world.Entity().Set(new Position(10, 20)); - e1.Set(new Self(e1)); - Entity e2 = world.Entity().Set(new Position(20, 30)); - e2.Set(new Self(e2)); - Entity e3 = world.Entity().Set(new Position(30, 40)); - e3.Set(new Self(e3)); - Entity e4 = world.Entity().Set(new Position(40, 50)); - e4.Set(new Self(e4)); - Entity e5 = world.Entity().Set(new Position(50, 60)); - e5.Set(new Self(e5)); - - e4.Add(); - e5.Add(); - - using Query q = world.QueryBuilder() - .TermAt(2).Singleton() - .Build(); - - int count = 0; - q.Run((Iter it) => - { - while (it.Next()) - { - Field s = it.Field(0); - Field p = it.Field(1); - Field v = it.Field(2); - - Assert.True(it.Count() > 1); - - foreach (int i in it) - { - p[i].X += v[0].X; - p[i].Y += v[0].Y; - Assert.True(it.Entity(i) == s[i].Value); - count++; - } - } - }); - - Assert.Equal(5, count); - - Assert.True(e1.Read((ref readonly Position p) => - { - Assert.Equal(11, p.X); - Assert.Equal(22, p.Y); - })); - - Assert.True(e2.Read((ref readonly Position p) => - { - Assert.Equal(21, p.X); - Assert.Equal(32, p.Y); - })); - - Assert.True(e3.Read((ref readonly Position p) => - { - Assert.Equal(31, p.X); - Assert.Equal(42, p.Y); - })); - - Assert.True(e4.Read((ref readonly Position p) => - { - Assert.Equal(41, p.X); - Assert.Equal(52, p.Y); - })); - - Assert.True(e5.Read((ref readonly Position p) => - { - Assert.Equal(51, p.X); - Assert.Equal(62, p.Y); - })); - } - - [Fact] - private void InstancedQueryWithBaseIter() - { - using World world = World.Create(); - - Entity @base = world.Entity().Set(new Velocity(1, 2)); - - Entity e1 = world.Entity().IsA(@base).Set(new Position(10, 20)); - e1.Set(new Self(e1)); - Entity e2 = world.Entity().IsA(@base).Set(new Position(20, 30)); - e2.Set(new Self(e2)); - Entity e3 = world.Entity().IsA(@base).Set(new Position(30, 40)); - e3.Set(new Self(e3)); - Entity e4 = world.Entity().IsA(@base).Set(new Position(40, 50)).Add(); - e4.Set(new Self(e4)); - Entity e5 = world.Entity().IsA(@base).Set(new Position(50, 60)).Add(); - e5.Set(new Self(e5)); - Entity e6 = world.Entity().Set(new Position(60, 70)).Set(new Velocity(2, 3)); - e6.Set(new Self(e6)); - Entity e7 = world.Entity().Set(new Position(70, 80)).Set(new Velocity(4, 5)); - e7.Set(new Self(e7)); - - using Query q = world.QueryBuilder() - .Build(); - - int count = 0; - q.Run((Iter it) => - { - while (it.Next()) - { - Field s = it.Field(0); - Field p = it.Field(1); - Field v = it.Field(2); - - Assert.True(it.Count() > 1); - - foreach (int i in it) - { - if (it.IsSelf(2)) - { - p[i].X += v[i].X; - p[i].Y += v[i].Y; - } - else - { - p[i].X += v[0].X; - p[i].Y += v[0].Y; - } - - Assert.True(it.Entity(i) == s[i].Value); - count++; - } - } - }); - - Assert.Equal(7, count); - - Assert.True(e1.Read((ref readonly Position p) => - { - Assert.Equal(11, p.X); - Assert.Equal(22, p.Y); - })); - - Assert.True(e2.Read((ref readonly Position p) => - { - Assert.Equal(21, p.X); - Assert.Equal(32, p.Y); - })); - - Assert.True(e3.Read((ref readonly Position p) => - { - Assert.Equal(31, p.X); - Assert.Equal(42, p.Y); - })); - - Assert.True(e4.Read((ref readonly Position p) => - { - Assert.Equal(41, p.X); - Assert.Equal(52, p.Y); - })); - - Assert.True(e5.Read((ref readonly Position p) => - { - Assert.Equal(51, p.X); - Assert.Equal(62, p.Y); - })); - - Assert.True(e6.Read((ref readonly Position p) => - { - Assert.Equal(62, p.X); - Assert.Equal(73, p.Y); - })); - - Assert.True(e7.Read((ref readonly Position p) => - { - Assert.Equal(74, p.X); - Assert.Equal(85, p.Y); - })); - } - - [Fact] - private void QueryEachFromComponent() - { - using World world = World.Create(); - - world.Entity().Set(new Position()).Set(new Velocity()); - world.Entity().Set(new Position()).Set(new Velocity()); - - using Query q = world.Query(); - Entity e = world.Entity().Set(new QueryWrapper(q)); - - QueryWrapper* qc = e.GetPtr(); - Assert.True(qc != null); - - int count = 0; - qc->Query.Each((Entity _, ref Position _, ref Velocity _) => { count++; }); - Assert.Equal(2, count); - } - - [Fact] - private void QueryIterFromComponent() - { - using World world = World.Create(); - - world.Entity().Set(new Position()).Set(new Velocity()); - world.Entity().Set(new Position()).Set(new Velocity()); - - using Query q = world.Query(); - Entity e = world.Entity().Set(new QueryWrapper(q)); - - QueryWrapper* qc = e.GetPtr(); - Assert.True(qc != null); - - int count = 0; - qc->Query.Run((Iter it) => - { - while (it.Next()) - count += it.Count(); - }); - Assert.Equal(2, count); - } - - private static void EachFunc(Entity e, ref Position p) - { - InvokedCount++; - p.X++; - p.Y++; - } - - private static void IterFunc(Iter it, Field p) - { - Assert.Equal(1, it.Count()); - InvokedCount++; - p[0].X++; - p[0].Y++; - } - - [Fact] - private void QueryEachWithFuncPtr() - { - using World world = World.Create(); - - Entity e = world.Entity().Set(new Position(10, 20)); - - using Query q = world.Query(); - - q.Each(&EachFunc); - - Assert.Equal(1, InvokedCount); - - Position* ptr = e.GetPtr(); - Assert.Equal(11, ptr->X); - Assert.Equal(21, ptr->Y); - } - - [Fact] - private void QueryIterWithFuncPtr() - { - using World world = World.Create(); - - Entity e = world.Entity().Set(new Position(10, 20)); - - using Query q = world.Query(); - - q.Iter(&IterFunc); - - Assert.Equal(1, InvokedCount); - - Position* ptr = e.GetPtr(); - Assert.Equal(11, ptr->X); - Assert.Equal(21, ptr->Y); - } - - [Fact] - private void QueryEachWithFuncNoPtr() - { - using World world = World.Create(); - - Entity e = world.Entity().Set(new Position(10, 20)); - - using Query q = world.Query(); - - q.Each(EachFunc); - - Assert.Equal(1, InvokedCount); - - Position* ptr = e.GetPtr(); - Assert.Equal(11, ptr->X); - Assert.Equal(21, ptr->Y); - } - - [Fact] - private void QueryIterWithFuncNoPtr() - { - using World world = World.Create(); - - Entity e = world.Entity().Set(new Position(10, 20)); - - using Query q = world.Query(); - - q.Iter(IterFunc); - - Assert.Equal(1, InvokedCount); - - Position* ptr = e.GetPtr(); - Assert.Equal(11, ptr->X); - Assert.Equal(21, ptr->Y); - } - - [Fact] - private void QueryEachWithIter() - { - using World world = World.Create(); - - Entity e1 = world.Entity(); - e1.Set(new Self(e1)); - e1.Set(new Position(10, 20)); - Entity e2 = world.Entity(); - e2.Set(new Self(e2)); - e2.Set(new Position(20, 30)); - - using Query q = world.Query(); - - int invoked = 0; - q.Each((Iter it, int i, ref Self s, ref Position p) => - { - Assert.Equal(2, it.Count()); - Assert.Equal(s.Value, it.Entity(i)); - p.X++; - p.Y++; - invoked++; - }); - - Assert.Equal(2, invoked); - - Position* ptr = e1.GetPtr(); - Assert.Equal(11, ptr->X); - Assert.Equal(21, ptr->Y); - - ptr = e2.GetPtr(); - Assert.Equal(21, ptr->X); - Assert.Equal(31, ptr->Y); - } - - // [Fact] - // private void InvalidFieldFromEachWithIter() - // { - // install_test_abort(); - // - // using World world = World.Create(); - // - // world.Entity() - // .Set(new Position(10, 20)) - // .Set(new Velocity(1, 2)); - // - // using var q = world.QueryBuilder() - // .With().InOut() - // .Build(); - // - // test_expect_abort(); - // - // q.Each((Iter it, int index, ref Position p) => { it.Field(1); }); - // } - - // [Fact] - // private void InvalidFieldTFromEachWithIter() - // { - // install_test_abort(); - // - // using World world = World.Create(); - // - // world.Entity() - // .Set(new Position(10, 20)) - // .Set(new Velocity(1, 2)); - // - // using var q = world.QueryBuilder() - // .With().InOut() - // .Build(); - // - // test_expect_abort(); - // - // q.Each((Iter it, int index, ref Position p) => { it.Field(1); }); - // } - - // [Fact] - // private void InvalidFieldConstTFromEachWithIter() - // { - // install_test_abort(); - // - // using World world = World.Create(); - // - // world.Entity() - // .Set(new Position(10, 20)) - // .Set(new Velocity(1, 2)); - // - // using var q = world.QueryBuilder() - // .With().InOut() - // .Build(); - // - // test_expect_abort(); - // - // q.Each((Iter it, int index, ref Position p) => { it.Field(1); }); - // } - - // [Fact] - // private void FieldAtFromEachWithIter() - // { - // using World world = World.Create(); - // - // Entity e1 = world.Entity() - // .Set(new Position(10, 20)) - // .Set(new Velocity(1, 2)); - // - // Entity e2 = world.Entity() - // .Set(new Position(20, 30)) - // .Set(new Velocity(3, 4)); - // - // using var q = world.QueryBuilder() - // .With().InOut() - // .Build(); - // - // int count = 0; - // - // q.Each((Iter it, int row, ref Position p) => - // { - // Velocity* v = (Velocity*)it.FieldAt(1, row); - // if (it.Entity(row) == e1) - // { - // Assert.Equal(1, v->X); - // Assert.Equal(2, v->Y); - // count++; - // } - // else if (it.Entity(row) == e2) - // { - // Assert.Equal(3, v->X); - // Assert.Equal(4, v->Y); - // count++; - // } - // }); - // - // Assert.Equal(2, count); - // } - - [Fact] - private void FieldAtTFromEachWithIter() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(20, 30)) - .Set(new Velocity(3, 4)); - - using Query q = world.QueryBuilder() - .With().InOut() - .Build(); - - int count = 0; - - q.Each((Iter it, int row, ref Position _) => - { - ref Velocity v = ref it.FieldAt(1, row); - if (it.Entity(row) == e1) - { - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - count++; - } - else if (it.Entity(row) == e2) - { - Assert.Equal(3, v.X); - Assert.Equal(4, v.Y); - count++; - } - }); - - Assert.Equal(2, count); - } - - [Fact] - private void FieldAtConstTFromEachWithIter() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(20, 30)) - .Set(new Velocity(3, 4)); - - using Query q = world.QueryBuilder() - .With().InOut() - .Build(); - - int count = 0; - - q.Each((Iter it, int row, ref Position _) => - { - ref Velocity v = ref it.FieldAt(1, row); - if (it.Entity(row) == e1) - { - Assert.Equal(1, v.X); - Assert.Equal(2, v.Y); - count++; - } - else if (it.Entity(row) == e2) - { - Assert.Equal(3, v.X); - Assert.Equal(4, v.Y); - count++; - } - }); - - Assert.Equal(2, count); - } - - [Fact] - private void ChangeTracking() - { - using World world = World.Create(); - - using Query qw = world.Query(); - using Query qr = world.QueryBuilder() - .Cached() - .Build(); - - Entity e1 = world.Entity().Add().Set(new Position(10, 20)); - world.Entity().Set(new Position(20, 30)); - - Assert.True(qr.Changed()); - qr.Run((Iter it) => - { - while (it.Next()) - { - } - }); - Assert.False(qr.Changed()); - - int count = 0, changeCount = 0; - - qw.Run((Iter it) => - { - while (it.Next()) - { - Assert.Equal(1, it.Count()); - - count++; - - if (it.Entity(0) == e1) - { - it.Skip(); - continue; - } - - changeCount++; - } - }); - - Assert.Equal(2, count); - Assert.Equal(1, changeCount); - - count = 0; - changeCount = 0; - - Assert.True(qr.Changed()); - - qr.Run((Iter it) => - { - while (it.Next()) - { - Assert.Equal(1, it.Count()); - - count++; - - if (it.Entity(0) == e1) - { - Assert.False(it.Changed()); - } - else - { - Assert.True(it.Changed()); - changeCount++; - } - } - }); - - Assert.Equal(2, count); - Assert.Equal(1, changeCount); - } - - [Fact] - private void NotWithWrite() - { - using World world = World.Create(); - - using Query q = world.QueryBuilder() - .With() - .With().Oper(Ecs.Not).Write() - .Build(); - - Entity e = world.Entity().Add(); - - int count = 0; - world.Defer(() => - { - q.Each((Entity ent) => - { - ent.Add(); - count++; - }); - }); - - Assert.Equal(1, count); - Assert.True(e.Has()); - - q.Each((Entity _) => { count++; }); - - Assert.Equal(1, count); - } - - [Fact] - private void InstancedNestedQueryWithIter() - { - using World world = World.Create(); - - using Query q1 = world.QueryBuilder() - .With() - .With().Singleton().InOut() - .Build(); - - using Query q2 = world.QueryBuilder() - .With() - .Build(); - - world.Add(); - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - int count = 0; - - q2.Run((Iter it2) => - { - while (it2.Next()) - { - q1.Iter(it2).Run((Iter it1) => - { - while (it1.Next()) - { - Assert.Equal(2, it1.Count()); - count += it1.Count(); - } - }); - } - }); - - Assert.Equal(2, count); - } - - [Fact] - private void InstancedNestedQueryWithEntity() - { - using World world = World.Create(); - - using Query q1 = world.QueryBuilder() - .With() - .With().Singleton().InOut() - .Build(); - - using Query q2 = world.QueryBuilder() - .With() - .Build(); - - world.Add(); - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - int count = 0; - - q2.Each((Entity e2) => - { - q1.Iter(e2).Run((Iter it1) => - { - while (it1.Next()) - { - Assert.Equal(2, it1.Count()); - count += it1.Count(); - } - }); - }); - - Assert.Equal(2, count); - } - - [Fact] - private void InstancedNestedQueryWithWorld() - { - using World world = World.Create(); - - using Query q1 = world.QueryBuilder() - .With() - .With().Singleton().InOut() - .Build(); - - using Query q2 = world.QueryBuilder() - .With() - .Build(); - - world.Add(); - world.Entity().Add(); - world.Entity().Add(); - world.Entity().Add(); - - int count = 0; - - q2.Run((Iter it2) => - { - while (it2.Next()) - { - q1.Iter(it2.World()).Run((Iter it1) => - { - while (it1.Next()) - { - Assert.Equal(2, it1.Count()); - count += it1.Count(); - } - }); - } - }); - - Assert.Equal(2, count); - } - - [Fact] - private void CapturedQuery() - { - using World world = World.Create(); - - using Query q = world.Query(); - Entity e1 = world.Entity().Set(new Position(10, 20)); - - Action action = () => - { - int count = 0; - q.Each((Entity e, ref Position p) => - { - Assert.True(e == e1); - Assert.Equal(10, p.X); - Assert.Equal(20, p.Y); - count++; - }); - Assert.Equal(1, count); - }; - - action(); - } - - [Fact] - private void PageIterCapturedQuery() - { - using World world = World.Create(); - - using Query q = world.Query(); - world.Entity().Set(new Position(10, 20)); - Entity e2 = world.Entity().Set(new Position(20, 30)); - world.Entity().Set(new Position(10, 20)); - - Action action = () => - { - int count = 0; - q.Iter().Page(1, 1).Each((Entity e, ref Position p) => - { - Assert.True(e == e2); - Assert.Equal(20, p.X); - Assert.Equal(30, p.Y); - count++; - }); - Assert.Equal(1, count); - }; - - action(); - } - - [Fact] - private void WorkerIterCapturedQuery() - { - using World world = World.Create(); - - using Query q = world.Query(); - world.Entity().Set(new Position(10, 20)); - Entity e2 = world.Entity().Set(new Position(20, 30)); - world.Entity().Set(new Position(10, 20)); - - Action action = () => - { - int count = 0; - q.Iter().Worker(1, 3).Each((Entity e, ref Position p) => - { - Assert.True(e == e2); - Assert.Equal(20, p.X); - Assert.Equal(30, p.Y); - count++; - }); - Assert.Equal(1, count); - }; - - action(); - } - - [Fact] - private void SetGroupCapturedQuery() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - using Query q = world.QueryBuilder() - .GroupBy(rel) - .Build(); - - world.Entity().Set(new Position(10, 20)).Add(rel, tgtA); - Entity e2 = world.Entity().Set(new Position(20, 30)).Add(rel, tgtB); - - new Action(() => - { - int count = 0; - q.SetGroup(tgtB).Each((Entity e, ref Position p) => - { - Assert.True(e == e2); - Assert.Equal(20, p.X); - Assert.Equal(30, p.Y); - count++; - }); - Assert.Equal(1, count); - })(); - } - - [Fact] - private void SetVarCapturedQuery() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - using Query q = world.QueryBuilder() - .With(rel, "$var") - .Build(); - - world.Entity().Set(new Position(10, 20)).Add(rel, tgtA); - Entity e2 = world.Entity().Set(new Position(20, 30)).Add(rel, tgtB); - - new Action(() => - { - int count = 0; - q.SetVar("var", tgtB).Each((Entity e, ref Position p) => - { - Assert.True(e == e2); - Assert.Equal(20, p.X); - Assert.Equal(30, p.Y); - count++; - }); - Assert.Equal(1, count); - })(); - } - - [Fact] - private void SetVarIdCapturedQuery() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity tgtA = world.Entity(); - Entity tgtB = world.Entity(); - - using Query q = world.QueryBuilder() - .With(rel, "$var") - .Build(); - - int var = q.FindVar("var"); - Assert.True(var != -1); - - world.Entity().Set(new Position(10, 20)).Add(rel, tgtA); - Entity e2 = world.Entity().Set(new Position(20, 30)).Add(rel, tgtB); - - new Action(() => - { - int count = 0; - q.SetVar(var, tgtB).Each((Entity e, ref Position p) => - { - Assert.True(e == e2); - Assert.Equal(20, p.X); - Assert.Equal(30, p.Y); - count++; - }); - Assert.Equal(1, count); - })(); - } - - [Fact] - private void IterEntities() - { - using World world = World.Create(); - - Entity e1 = world.Entity().Set(new Position(10, 20)); - Entity e2 = world.Entity().Set(new Position(10, 20)); - Entity e3 = world.Entity().Set(new Position(10, 20)); - - world.Query() - .Run((Iter it) => - { - while (it.Next()) - { - Assert.Equal(3, it.Count()); - - Field entities = it.Entities(); - Assert.True(entities[0] == e1); - Assert.True(entities[1] == e2); - Assert.True(entities[2] == e3); - } - }); - } - - [Fact] - private void IterGetPairWithId() - { - using World world = World.Create(); - - Entity rel = world.Entity(); - Entity tgt = world.Entity(); - Entity e = world.Entity().Add(rel, tgt); - - using Query q = world.QueryBuilder() - .With(rel, Ecs.Wildcard) - .Build(); - - int count = 0; - - q.Each((Iter it, int i) => - { - Assert.True(it.Id(0).IsPair()); - Assert.True(it.Id(0).First() == rel); - Assert.True(it.Id(0).Second() == tgt); - Assert.True(e == it.Entity(i)); - count++; - }); - - Assert.Equal(1, count); - } - - [Fact] - private void QueryFromEntity() - { - using World world = World.Create(); - - Entity qe = world.Entity(); - using Query q1 = world.QueryBuilder(qe) - .Build(); - - world.Entity().Add(); - Entity e2 = world.Entity().Add().Add(); - - int count = 0; - q1.Each((Entity e, ref Position _, ref Velocity _) => - { - count++; - Assert.True(e == e2); - }); - Assert.Equal(1, count); - - Query q2 = world.Query(qe); - q2.Each((Entity e) => - { - count++; - Assert.True(e == e2); - }); - Assert.Equal(2, count); - } - - [Fact] - private void QueryFromEntityName() - { - using World world = World.Create(); - - using Query q1 = world.QueryBuilder("qe") - .Build(); - - world.Entity().Add(); - Entity e2 = world.Entity().Add().Add(); - - int count = 0; - q1.Each((Entity e, ref Position _, ref Velocity _) => - { - count++; - Assert.True(e == e2); - }); - Assert.Equal(1, count); - - Query q2 = world.Query("qe"); - q2.Each((Entity e) => - { - count++; - Assert.True(e == e2); - }); - Assert.Equal(2, count); - } - - [Fact] - private void RunWithIterFini() - { - using World world = World.Create(); - - using Query q1 = world.Query(); - - int count = 0; - q1.Run((Iter it) => - { - it.Fini(); - count++; - }); - - Assert.Equal(1, count); - } - - - [Fact] - private void RunWithIterFiniInterrupt() - { - using World world = World.Create(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Add(); - world.Entity() - .Set(new Position(10, 20)) - .Add(); - world.Entity() - .Set(new Position(10, 20)) - .Add(); - - using Query q = world.Query(); - - int count = 0; - q.Run((Iter it) => - { - Assert.True(it.Next()); - Assert.Equal(1, it.Count()); - Assert.Equal(e1, it.Entity(0)); - - Assert.True(it.Next()); - count++; - it.Fini(); - }); - - Assert.Equal(1, count); - } - - [Fact] - private void RunWithIterFiniEmpty() - { - using World world = World.Create(); - - using Query q = world.Query(); - - int count = 0; - q.Run((Iter it) => - { - count++; - it.Fini(); - }); - - Assert.Equal(1, count); - } - - [Fact] - private void RunWithIterFiniNoQuery() - { - using World world = World.Create(); - - using Query q = world.Query(); - - int count = 0; - q.Run((Iter it) => - { - count++; - it.Fini(); - }); - - Assert.Equal(1, count); - } - - [Fact] - private void AddToMatchFromStagedQuery() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity e = world.Entity().Add(); - - World stage = world.GetStage(0); - - world.ReadonlyBegin(false); - - stage.Query() - .Each((Entity e, ref Position _) => - { - e.Add(); - Assert.True(!e.Has()); - }); - - world.ReadonlyEnd(); - - Assert.True(e.Has()); - Assert.True(e.Has()); - } - - [Fact] - private void AddToMatchFromStagedQueryReadonlyThreaded() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - - Entity e = world.Entity().Add(); - - World stage = world.GetStage(0); - - world.ReadonlyBegin(true); - - stage.Query() - .Each((Entity e, ref Position _) => - { - e.Add(); - Assert.True(!e.Has()); - }); - - world.ReadonlyEnd(); - - Assert.True(e.Has()); - Assert.True(e.Has()); - } - - [Fact] - private void EmptyTablesEach() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(20, 30)) - .Set(new Velocity(2, 3)); - - e2.Add(); - e2.Remove(); - - using Query q = world.QueryBuilder() - .QueryFlags(EcsQueryMatchEmptyTables) - .Build(); - - q.Each((ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - { - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - { - Position* p = e2.GetPtr(); - Assert.Equal(22, p->X); - Assert.Equal(33, p->Y); - } - } - - // TODO: Fix later - // [Fact] - // private void EmptyTablesEachWithEntity() - // { - // using World world = World.Create(); - // - // world.Component(); - // world.Component(); - // world.Component(); - // - // Entity e1 = world.Entity() - // .Set(new Position(10, 20)) - // .Set(new Velocity(1, 2)); - // - // Entity e2 = world.Entity() - // .Set(new Position(20, 30)) - // .Set(new Velocity(2, 3)); - // - // e2.Add(); - // e2.Remove(); - // - // using var q = world.QueryBuilder() - // .QueryFlags(EcsQueryMatchEmptyTables) - // .Build(); - // - // q.Each((Entity e, ref Position p, ref Velocity v) => - // { - // p.X += v.X; - // p.Y += v.Y; - // }); - // - // { - // Position* p = e1.GetPtr(); - // Assert.Equal(11, p->X); - // Assert.Equal(22, p->Y); - // } - // { - // Position* p = e2.GetPtr(); - // Assert.Equal(22, p->X); - // Assert.Equal(33, p->Y); - // } - // } - - [Fact] - private void EmptyTablesEachWithIter() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity e1 = world.Entity() - .Set(new Position(10, 20)) - .Set(new Velocity(1, 2)); - - Entity e2 = world.Entity() - .Set(new Position(20, 30)) - .Set(new Velocity(2, 3)); - - e2.Add(); - e2.Remove(); - - using Query q = world.QueryBuilder() - .QueryFlags(EcsQueryMatchEmptyTables) - .Build(); - - q.Each((Iter _, int _, ref Position p, ref Velocity v) => - { - p.X += v.X; - p.Y += v.Y; - }); - - { - Position* p = e1.GetPtr(); - Assert.Equal(11, p->X); - Assert.Equal(22, p->Y); - } - { - Position* p = e2.GetPtr(); - Assert.Equal(22, p->X); - Assert.Equal(33, p->Y); - } - } - - [Fact] - private void PairWithVariableSrc() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity other = world.Entity() - .Set(new OtherComp(10)); - - for (int i = 0; i < 3; i++) - world.Entity() - .Set(new ThisComp(i)) - .Add(other); - - using Query q = world.QueryBuilder() - .TermAt(0).Second("$other") - .TermAt(2).Src("$other") - .Build(); - - int isPresent = 0; - q.Each((ref RelData _, ref ThisComp thisComp, ref OtherComp otherComp) => - { - isPresent |= 1 << thisComp.X; - Assert.Equal(10, otherComp.X); - }); - - Assert.Equal(7, isPresent); - } - - [Fact] - private void PairWithVariableSrcNoRowFields() - { - using World world = World.Create(); - - world.Component(); - world.Component(); - world.Component(); - - Entity other = world.Entity() - .Set(new OtherComp(0)); - - world.Entity() - .Set(new OtherComp(1)); - - for (int i = 0; i < 3; i++) - world.Entity() - .Set(new ThisComp(i)) - .Add(other); - - using Query q = world.QueryBuilder() - .TermAt(0).Second("$other") - .TermAt(2).Src("$other") - .Build(); - - int isPresent = 0; - q.Each((ref RelData _, ref ThisComp thisComp, ref OtherComp otherComp) => - { - isPresent |= 1 << thisComp.X; - Assert.Equal(0, otherComp.X); - }); - - Assert.Equal(7, isPresent); - } - - [Fact] - private void IterTargets() - { - using World world = World.Create(); - - Entity likes = world.Entity(); - Entity pizza = world.Entity(); - Entity salad = world.Entity(); - Entity alice = world.Entity() - .Add(likes, pizza) - .Add(likes, salad); - - using Query q = world.QueryBuilder() - .With(likes, Ecs.Any) - .Build(); - - int count = 0; - int tgtCount = 0; - - q.Each((Iter it, int row) => - { - Entity e = it.Entity(row); - Assert.True(e == alice); - - it.Targets(0, (Entity tgt) => - { - if (tgtCount == 0) - Assert.True(tgt == pizza); - if (tgtCount == 1) - Assert.True(tgt == salad); - tgtCount++; - }); - - count++; - }); - - Assert.Equal(1, count); - Assert.Equal(2, tgtCount); - } - - [Fact] - [SuppressMessage("ReSharper", "InconsistentNaming")] - private void IterTargets2ndField() - { - using World world = World.Create(); - - Entity likes = world.Entity(); - Entity pizza = world.Entity(); - Entity salad = world.Entity(); - Entity alice = world.Entity() - .Add() - .Add(likes, pizza) - .Add(likes, salad); - - using Query q = world.QueryBuilder() - .With() - .With(likes, Ecs.Any) - .Build(); - - int count = 0; - int tgtCount = 0; - - q.Each((Iter it, int row) => - { - Entity e = it.Entity(row); - Assert.True(e == alice); - - it.Targets(1, (Entity tgt) => - { - if (tgtCount == 0) - Assert.True(tgt == pizza); - if (tgtCount == 1) - Assert.True(tgt == salad); - tgtCount++; - }); - - count++; - }); - - Assert.Equal(1, count); - Assert.Equal(2, tgtCount); - } - - [Fact] - private void IterTargetsFieldOutOfRange() - { - using World world = World.Create(); - - Entity likes = world.Entity(); - Entity pizza = world.Entity(); - Entity salad = world.Entity(); - Entity alice = world.Entity() - .Add(likes, pizza) - .Add(likes, salad); - - using Query q = world.QueryBuilder() - .With(likes, Ecs.Any) - .Build(); - - q.Each((Iter it, int row) => - { - Entity e = it.Entity(row); - Assert.True(e == alice); - - Assert.Throws(() => - { - it.Targets(1, (Entity _) => { }); - }); - }); - } - - [Fact] - private void IterTargetsFieldNotAPair() - { - using World world = World.Create(); - - Entity likes = world.Entity(); - Entity pizza = world.Entity(); - Entity salad = world.Entity(); - Entity alice = world.Entity() - .Add() - .Add(likes, pizza) - .Add(likes, salad); - - using Query q = world.QueryBuilder() - .With() - .Build(); - - q.Each((Iter it, int row) => - { - Entity e = it.Entity(row); - Assert.True(e == alice); - - Assert.Throws(() => - { - it.Targets(1, (Entity _) => { }); - }); - }); - } - - [Fact] - private void IterTargetsFieldNotSet() - { - using World world = World.Create(); - - Entity likes = world.Entity(); - Entity alice = world.Entity() - .Add(); - - using Query q = world.QueryBuilder() - .With() - .With(likes, Ecs.Any).Optional() - .Build(); - - q.Each((Iter it, int row) => - { - Entity e = it.Entity(row); - Assert.True(e == alice); - Assert.True(!it.IsSet(1)); - - Assert.Throws(() => - { - it.Targets(1, (Entity _) => { }); - }); - }); - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using Flecs.NET.Core; +using Xunit; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Tests.Cpp; + +[SuppressMessage("ReSharper", "ParameterOnlyUsedForPreconditionCheck.Local")] +[SuppressMessage("ReSharper", "CompareOfFloatsByEqualityOperator")] +[SuppressMessage("ReSharper", "AccessToDisposedClosure")] +[SuppressMessage("ReSharper", "AccessToModifiedClosure")] +[SuppressMessage("ReSharper", "VariableHidesOuterVariable")] +public unsafe class QueryTests +{ + public static int InvokedCount; + + public QueryTests() + { + InvokedCount = default; + } + + [Fact] + private void TermEachComponent() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Set(new Position(1, 2)); + Entity e2 = world.Entity().Set(new Position(3, 4)); + Entity e3 = world.Entity().Set(new Position(5, 6)); + + e3.Add(); + + int count = 0; + world.Each((Entity e, ref Position p) => + { + if (e == e1) + { + Assert.Equal(1, p.X); + Assert.Equal(2, p.Y); + count++; + } + + if (e == e2) + { + Assert.Equal(3, p.X); + Assert.Equal(4, p.Y); + count++; + } + + if (e == e3) + { + Assert.Equal(5, p.X); + Assert.Equal(6, p.Y); + count++; + } + }); + + Assert.Equal(3, count); + } + + // TODO: Remove this? + // [Fact] + // private void TermEachTag() + // { + // using World world = World.Create(); + // + // Entity e1 = world.Entity().Add(); + // Entity e2 = world.Entity().Add(); + // Entity e3 = world.Entity().Add(); + // + // e3.Add(); + // + // int count = 0; + // world.Each((Entity e, ref Foo _) => + // { + // if (e == e1 || e == e2 || e == e3) count++; + // }); + // + // Assert.Equal(3, count); + // } + + [Fact] + private void TermEachId() + { + using World world = World.Create(); + + Entity foo = world.Entity(); + + Entity e1 = world.Entity().Add(foo); + Entity e2 = world.Entity().Add(foo); + Entity e3 = world.Entity().Add(foo); + + e3.Add(); + + int count = 0; + world.Each(foo, (Entity e) => + { + if (e == e1 || e == e2 || e == e3) count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void TermEachPairId() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity obj = world.Entity(); + + Entity e1 = world.Entity().Add(rel, obj); + Entity e2 = world.Entity().Add(rel, obj); + Entity e3 = world.Entity().Add(rel, obj); + + e3.Add(); + + int count = 0; + world.Each(world.Pair(rel, obj), (Entity e) => + { + if (e == e1 || e == e2 || e == e3) count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void TermEachPairRelationWildcard() + { + using World world = World.Create(); + + Entity rel1 = world.Entity(); + Entity rel2 = world.Entity(); + Entity obj = world.Entity(); + + Entity e1 = world.Entity().Add(rel1, obj); + Entity e2 = world.Entity().Add(rel1, obj); + Entity e3 = world.Entity().Add(rel2, obj); + + e3.Add(); + + int count = 0; + world.Each(world.Pair(Ecs.Wildcard, obj), (Entity e) => + { + if (e == e1 || e == e2 || e == e3) count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void TermEachPairObjectWildcard() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity obj1 = world.Entity(); + Entity obj2 = world.Entity(); + + Entity e1 = world.Entity().Add(rel, obj1); + Entity e2 = world.Entity().Add(rel, obj1); + Entity e3 = world.Entity().Add(rel, obj2); + + e3.Add(); + + int count = 0; + world.Each(world.Pair(rel, Ecs.Wildcard), (Entity e) => + { + if (e == e1 || e == e2 || e == e3) count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void TermGetId() + { + using World world = World.Create(); + + Entity foo = world.Entity(); + Entity bar = world.Entity(); + + using Query q = world.QueryBuilder() + .With() + .With() + .With(foo, bar) + .Build(); + + Assert.Equal(3, q.FieldCount()); + + Term + t = q.Term(0); + Assert.True(t.Id() == world.Id()); + t = q.Term(1); + Assert.True(t.Id() == world.Id()); + t = q.Term(2); + Assert.True(t.Id() == world.Pair(foo, bar)); + } + + [Fact] + private void TermGetSubj() + { + using World world = World.Create(); + + Entity foo = world.Entity(); + Entity bar = world.Entity(); + Entity src = world.Entity(); + + using Query q = world.QueryBuilder() + .With() + .With().Src(src) + .With(foo, bar) + .Build(); + + Assert.Equal(3, q.FieldCount()); + + Term + t = q.Term(0); + Assert.True(t.GetSrc() == Ecs.This); + t = q.Term(1); + Assert.True(t.GetSrc() == src); + t = q.Term(2); + Assert.True(t.GetSrc() == Ecs.This); + } + + [Fact] + private void TermGetPred() + { + using World world = World.Create(); + + Entity foo = world.Entity(); + Entity bar = world.Entity(); + Entity src = world.Entity(); + + using Query q = world.QueryBuilder() + .With() + .With().Src(src) + .With(foo, bar) + .Build(); + + Assert.Equal(3, q.FieldCount()); + + Term + t = q.Term(0); + Assert.True(t.GetFirst() == world.Id()); + t = q.Term(1); + Assert.True(t.GetFirst() == world.Id()); + t = q.Term(2); + Assert.True(t.GetFirst() == foo); + } + + [Fact] + private void TermGetObj() + { + using World world = World.Create(); + + Entity foo = world.Entity(); + Entity bar = world.Entity(); + Entity src = world.Entity(); + + using Query q = world.QueryBuilder() + .With() + .With().Src(src) + .With(foo, bar) + .Build(); + + Assert.Equal(3, q.FieldCount()); + + Term + t = q.Term(0); + Assert.True(t.GetSecond() == 0); + t = q.Term(1); + Assert.True(t.GetSecond() == 0); + t = q.Term(2); + Assert.True(t.GetSecond() == bar); + } + + [Fact] + private void GetFirst() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + Entity first = q.Iter().First(); + Assert.True(first != 0); + Assert.True(first == e1); + } + + [Fact] + private void GetCountDirect() + { + using World world = World.Create(); + + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + Assert.Equal(3, q.Count()); + } + + [Fact] + private void GetIsTrueDirect() + { + using World world = World.Create(); + + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + using Query q1 = world.QueryBuilder() + .With() + .Build(); + + using Query q2 = world.QueryBuilder() + .With() + .Build(); + + Assert.True(q1.IsTrue()); + Assert.False(q2.IsTrue()); + } + + [Fact] + private void GetFirstDirect() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + Entity first = q.First(); + Assert.True(first != 0); + Assert.True(first == e1); + } + + [Fact] + private void EachWithNoThis() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query f = world.QueryBuilder() + .TermAt(0).Src(e) + .TermAt(1).Src(e) + .Build(); + + int count = 0; + + f.Each((ref Position p, ref Velocity v) => + { + count++; + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + }); + + Assert.Equal(1, count); + } + + [Fact] + private void EachWithIterNoThis() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query f = world.QueryBuilder() + .TermAt(0).Src(e) + .TermAt(1).Src(e) + .Build(); + + int count = 0; + + f.Each((Iter it, int index, ref Position p, ref Velocity v) => + { + count++; + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + Assert.Equal(0, index); + Assert.Equal(0, it.Count()); + }); + + Assert.Equal(1, count); + } + + // [Fact] + // private void InvalidEachWithNoThis() + // { + // install_test_abort(); + // + // using World world = World.Create(); + // + // Entity e = world.Entity() + // .Set(new Position(10, 20)) + // .Set(new Velocity(1, 2)); + // + // using var f = world.QueryBuilder() + // .TermAt(0).Src(e) + // .TermAt(1).Src(e) + // .Build(); + // + // test_expect_abort(); + // + // f.Each((Entity e, ref Position p, ref Velocity v) => { }); + // } + + [Fact] + private void NamedQuery() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Add(); + Entity e2 = world.Entity().Add(); + + using Query q = world.Query("my_query"); + + int count = 0; + q.Each((Entity e, ref Position _) => + { + Assert.True(e == e1 || e == e2); + count++; + }); + Assert.Equal(2, count); + + Entity qe = q.Entity(); + Assert.True(qe != 0); + Assert.Equal("my_query", qe.Name()); + } + + [Fact] + private void NamedScopedQuery() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Add(); + Entity e2 = world.Entity().Add(); + + using Query q = world.Query("my.query"); + + int count = 0; + q.Each((Entity e, ref Position _) => + { + Assert.True(e == e1 || e == e2); + count++; + }); + Assert.Equal(2, count); + + Entity qe = q.Entity(); + Assert.True(qe != 0); + Assert.Equal("query", qe.Name()); + Assert.Equal(".my.query", qe.Path()); + } + + [Fact] + private void SetThisVar() + { + using World world = World.Create(); + + world.Entity().Set(new Position(1, 2)); + Entity e2 = world.Entity().Set(new Position(3, 4)); + world.Entity().Set(new Position(5, 6)); + + using Query q = world.Query("my.query"); + + int count = 0; + q.Iter().SetVar(0, e2).Each((Entity e, ref Position _) => + { + Assert.True(e == e2); + count++; + }); + Assert.Equal(1, count); + } + + [Fact] + private void InspectTermsWithExpr() + { + using World world = World.Create(); + + using Query f = world.QueryBuilder() + .Expr("(ChildOf,#0)") + .Build(); + + int count = 0; + f.EachTerm((ref Term term) => + { + Assert.True(term.Id().IsPair()); + count++; + }); + + Assert.Equal(1, count); + } + + [Fact] + private void Find() + { + using World world = World.Create(); + + world.Entity().Set(new Position(10, 20)); + Entity e2 = world.Entity().Set(new Position(20, 30)); + + using Query q = world.Query(); + + Entity r = q.Find((ref Position p) => { return p.X == 20; }); + + Assert.True(r == e2); + } + + [Fact] + private void FindNotFound() + { + using World world = World.Create(); + + world.Entity().Set(new Position(10, 20)); + world.Entity().Set(new Position(20, 30)); + + using Query q = world.Query(); + + Entity r = q.Find((ref Position p) => { return p.X == 30; }); + + Assert.True(r == 0); + } + + [Fact] + private void FindWithEntity() + { + using World world = World.Create(); + + world.Entity().Set(new Position(10, 20)).Set(new Velocity(20, 30)); + Entity e2 = world.Entity().Set(new Position(20, 30)).Set(new Velocity(20, 30)); + + using Query q = world.Query(); + + Entity r = q.Find((Entity e, ref Position p) => + { + return p.X == e.GetPtr()->X && + p.Y == e.GetPtr()->Y; + }); + + Assert.True(r == e2); + } + + [Fact] + private void FindWithMatchEmptyTables() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Set(new Position(10, 20)).Add(); + e1.Destruct(); + Entity e2 = world.Entity().Set(new Position(20, 30)); + + using Query q = world.QueryBuilder() + .QueryFlags(Ecs.QueryMatchEmptyTables) + .Build(); + + Entity r = q.Find((ref Position p) => + { + return p.X == 20; + }); + + Assert.True(r == e2); + } + + [Fact] + private void FindWithEntityWithMatchEmptyTables() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Set(new Position(10, 20)).Add(); + e1.Destruct(); + Entity e2 = world.Entity().Set(new Position(20, 30)); + + using Query q = world.QueryBuilder() + .QueryFlags(EcsQueryMatchEmptyTables) + .Build(); + + Entity r = q.Find((Entity e, ref Position p) => + { + return p.X == 20; + }); + + Assert.True(r == e2); + } + + [Fact] + private void Run() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.Query(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + + foreach (int i in it) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + } + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void RunConst() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.Query(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + + foreach (int i in it) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + } + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void RunShared() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .Set(new Velocity(1, 2)); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Add(Ecs.IsA, @base); + + Entity e2 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(3, 4)); + + using Query q = world.QueryBuilder() + .Expr("Velocity(self|up IsA)") + .Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + + if (!it.IsSelf(1)) + foreach (int i in it) + { + p[i].X += v[0].X; + p[i].Y += v[0].Y; + } + else + foreach (int i in it) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + } + }); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(13, p->X); + Assert.Equal(24, p->Y); + } + + [Fact] + private void RunOptional() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)) + .Set(new Mass(1)); + + Entity e2 = world.Entity() + .Set(new Position(30, 40)) + .Set(new Velocity(3, 4)) + .Set(new Mass(1)); + + Entity e3 = world.Entity() + .Set(new Position(50, 60)); + + Entity e4 = world.Entity() + .Set(new Position(70, 80)); + + using Query q = world.QueryBuilder() + .TermAt(1).Optional() + .TermAt(2).Optional() + .Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + Field m = it.Field(2); + + if (it.IsSet(1) && it.IsSet(2)) + foreach (int i in it) + { + p[i].X += v[i].X * m[i].Value; + p[i].Y += v[i].Y * m[i].Value; + } + else + foreach (int i in it) + { + p[i].X++; + p[i].Y++; + } + } + }); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(33, p->X); + Assert.Equal(44, p->Y); + + p = e3.GetPtr(); + Assert.Equal(51, p->X); + Assert.Equal(61, p->Y); + + p = e4.GetPtr(); + Assert.Equal(71, p->X); + Assert.Equal(81, p->Y); + } + + [Fact] + private void RunSparse() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.Query(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field v = it.Field(1); + + foreach (int i in it) + { + ref Position p = ref it.FieldAt(0, i); + p.X += v[i].X; + p.Y += v[i].Y; + } + } + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void RunSparseWithWith() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.QueryBuilder() + .With() + .With() + .Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field v = it.Field(1); + + foreach (int i in it) + { + ref Position p = ref it.FieldAt(0, i); + p.X += v[i].X; + p.Y += v[i].Y; + } + } + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void Each() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.Query(); + + q.Each((ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void EachConst() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.Query(); + + q.Each((ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void EachShared() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity @base = world.Entity() + .Set(new Velocity(1, 2)); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Add(Ecs.IsA, @base); + + Entity e2 = world.Entity() + .Set(new Position(20, 30)) + .Add(Ecs.IsA, @base); + + Entity e3 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(3, 4)); + + using Query q = world.Query(); + + q.Each((ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(21, p->X); + Assert.Equal(32, p->Y); + + p = e3.GetPtr(); + Assert.Equal(13, p->X); + Assert.Equal(24, p->Y); + } + + [Fact] + private void EachOptional() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)) + .Set(new Mass(1)); + + Entity e2 = world.Entity() + .Set(new Position(30, 40)) + .Set(new Velocity(3, 4)) + .Set(new Mass(1)); + + Entity e3 = world.Entity() + .Set(new Position(50, 60)); + + Entity e4 = world.Entity() + .Set(new Position(70, 80)); + + using Query q = world.QueryBuilder() + .TermAt(1).Optional() + .TermAt(2).Optional() + .Build(); + + q.Each((ref Position p, ref Velocity v, ref Mass m) => + { + if (!Unsafe.IsNullRef(ref v) && !Unsafe.IsNullRef(ref m)) + { + p.X += v.X * m.Value; + p.Y += v.Y * m.Value; + } + else + { + p.X++; + p.Y++; + } + }); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(33, p->X); + Assert.Equal(44, p->Y); + + p = e3.GetPtr(); + Assert.Equal(51, p->X); + Assert.Equal(61, p->Y); + + p = e4.GetPtr(); + Assert.Equal(71, p->X); + Assert.Equal(81, p->Y); + } + + [Fact] + private void EachSparse() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.Query(); + + q.Each((ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void EachSparseWithWith() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.QueryBuilder() + .With() + .With() + .Build(); + + q.Each((Iter it, int row) => + { + ref Position p = ref it.FieldAt(0, row); + ref Velocity v = ref it.FieldAt(1, row); + p.X += v.X; + p.Y += v.Y; + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void EachSparseMany() + { + using World world = World.Create(); + + world.Component().Add(Ecs.Sparse); + world.Component(); + + List entities = new List(); + + for (int i = 0; i < 2000; i++) + { + entities.Add( + world.Entity() + .Set(new Position(10 + i, 20 + i)) + .Set(new Velocity(i, i)) + ); + } + + using Query q = world.Query(); + + q.Each(static (ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + for (int i = 0; i < 2000; i++) + { + Entity e = entities[i]; + + Position* p = e.GetPtr(); + Assert.Equal(10 + i * 2, p->X); + Assert.Equal(20 + i * 2, p->Y); + + Velocity* v = e.GetPtr(); + Assert.Equal(i, v->X); + Assert.Equal(i, v->Y); + } + } + + [Fact] + private void Signature() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.QueryBuilder().Expr("Position, Velocity").Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + + foreach (int i in it) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + } + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void SignatureConst() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity entity = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + using Query q = world.QueryBuilder().Expr("Position, [in] Velocity").Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + + foreach (int i in it) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + } + }); + + Position* p = entity.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + + [Fact] + private void SignatureShared() + { + using World world = World.Create(); + + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + world.Component().Add(Ecs.OnInstantiate, Ecs.Inherit); + + Entity @base = world.Entity() + .Set(new Velocity(1, 2)); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Add(Ecs.IsA, @base); + + Entity e2 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(3, 4)); + + using Query q = world.QueryBuilder() + .Expr("Position, [in] Velocity(self|up IsA)") + .Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + + if (!it.IsSelf(1)) + foreach (int i in it) + { + p[i].X += v[0].X; + p[i].Y += v[0].Y; + } + else + foreach (int i in it) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + } + }); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(13, p->X); + Assert.Equal(24, p->Y); + } + + [Fact] + private void SignatureOptional() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)) + .Set(new Mass(1)); + + Entity e2 = world.Entity() + .Set(new Position(30, 40)) + .Set(new Velocity(3, 4)) + .Set(new Mass(1)); + + Entity e3 = world.Entity() + .Set(new Position(50, 60)); + + Entity e4 = world.Entity() + .Set(new Position(70, 80)); + + using Query q = world.QueryBuilder().Expr("Position, ?Velocity, ?Mass").Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Field v = it.Field(1); + Field m = it.Field(2); + + if (it.IsSet(1) && it.IsSet(2)) + foreach (int i in it) + { + p[i].X += v[i].X * m[i].Value; + p[i].Y += v[i].Y * m[i].Value; + } + else + foreach (int i in it) + { + p[i].X++; + p[i].Y++; + } + } + }); + + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + + p = e2.GetPtr(); + Assert.Equal(33, p->X); + Assert.Equal(44, p->Y); + + p = e3.GetPtr(); + Assert.Equal(51, p->X); + Assert.Equal(61, p->Y); + + p = e4.GetPtr(); + Assert.Equal(71, p->X); + Assert.Equal(81, p->Y); + } + + [Fact] + private void QuerySinglePair() + { + using World world = World.Create(); + + world.Entity().Add(); + Entity e2 = world.Entity().Add(); + + using Query q = world.QueryBuilder() + .Expr("(Pair, Velocity)") + .Build(); + + int tableCount = 0; + int entityCount = 0; + + q.Run((Iter it) => + { + while (it.Next()) + { + tableCount++; + foreach (int i in it) + { + Assert.True(it.Entity(i) == e2); + entityCount++; + } + } + }); + + Assert.Equal(1, tableCount); + Assert.Equal(1, entityCount); + } + + [Fact] + private void TagWithEach() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + Entity e = world.Entity() + .Add(); + + q.Each((Entity qe) => { Assert.True(qe == e); }); + } + + [Fact] + private void SharedTagWithEach() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + Entity @base = world.Prefab() + .Add(); + + Entity e = world.Entity() + .Add(Ecs.IsA, @base); + + q.Each((Entity qe) => { Assert.True(qe == e); }); + } + + private static int ComparePosition(ulong e1, void* p1, ulong e2, void* p2) + { + Position* pos1 = (Position*)p1; + Position* pos2 = (Position*)p2; + return pos1->X.CompareTo(pos2->X); + } + + [Fact] + private void SortBy() + { + using World world = World.Create(); + + world.Entity().Set(new Position(1, 0)); + world.Entity().Set(new Position(6, 0)); + world.Entity().Set(new Position(2, 0)); + world.Entity().Set(new Position(5, 0)); + world.Entity().Set(new Position(4, 0)); + + using Query q = world.QueryBuilder() + .OrderBy(ComparePosition) + .Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Field p = it.Field(0); + Assert.Equal(5, it.Count()); + Assert.Equal(1, p[0].X); + Assert.Equal(2, p[1].X); + Assert.Equal(4, p[2].X); + Assert.Equal(5, p[3].X); + Assert.Equal(6, p[4].X); + } + }); + } + + [Fact] + private void Changed() + { + using World world = World.Create(); + + Entity e = world.Entity().Set(new Position(1, 0)); + + using Query q = world.QueryBuilder() + .DetectChanges() + .Cached() + .Build(); + + using Query qW = world.Query(); + + Assert.True(q.Changed()); + + q.Each((ref Position _) => { }); + Assert.False(q.Changed()); + + e.Set(new Position(2, 0)); + Assert.True(q.Changed()); + + q.Each((ref Position _) => { }); + Assert.False(q.Changed()); + + qW.Each((ref Position _) => { }); + Assert.True(q.Changed()); + } + + [Fact] + private void DefaultCtor() + { + using World world = World.Create(); + + Query qVar; + + int count = 0; + using Query q = world.Query(); + + world.Entity().Set(new Position(10, 20)); + + qVar = q; + + qVar.Each((ref Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + count++; + }); + + Assert.Equal(1, count); + } + + [Fact] + private void ExprWithTemplate() + { + using World world = World.Create(); + + Component> comp = world.Component>(); + Assert.Equal("Template", comp.Name()); + + int count = 0; + using Query q = world.QueryBuilder().Expr("Template").Build(); + + world.Entity() + .Set(new Position(10, 20)) + .Set(new Template(30, 40)); + + q.Each((Entity e, ref Position p) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Template* t = e.GetPtr>(); + Assert.Equal(30, t->X); + Assert.Equal(40, t->Y); + + count++; + }); + + Assert.Equal(1, count); + } + + [Fact] + private void QueryTypeWithTemplate() + { + using World world = World.Create(); + + Component> comp = world.Component>(); + Assert.Equal("Template", comp.Name()); + + int count = 0; + using Query> q = world.Query>(); + + world.Entity() + .Set(new Position(10, 20)) + .Set(new Template(30, 40)); + + q.Each((ref Position p, ref Template t) => + { + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + + Assert.Equal(30, t.X); + Assert.Equal(40, t.Y); + + count++; + }); + + Assert.Equal(1, count); + } + + [Fact] + private void CompareTermId() + { + using World world = World.Create(); + + int count = 0; + Entity e = world.Entity().Add(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Assert.True(it.Id(0) == it.World().Id()); + Assert.True(it.Entity(0) == e); + } + + count++; + }); + + Assert.Equal(1, count); + } + + // [Fact] + // private void TestNoDeferEach() + // { + // install_test_abort(); + // + // using World world = World.Create(); + // + // world.Entity().Add().Set(new Value(10)); + // + // using var q = world.QueryBuilder() + // .With() + // .Build(); + // + // q.Each((Entity e, ref Value v) => + // { + // test_expect_abort(); + // e.Remove(); + // }); + // + // Assert.True(false); + // } + + // [Fact] + // private void TestNoDeferIter() + // { + // install_test_abort(); + // + // using World world = World.Create(); + // + // world.Entity().Add().Set(new Value(10)); + // + // using var q = world.QueryBuilder() + // .With() + // .Build(); + // + // q.Run((Iter it, Field v) => + // { + // foreach (int i in it) + // { + // test_expect_abort(); + // it.Entity(i).Remove(); + // } + // }); + // + // Assert.True(false); + // } + + [Fact] + private void InspectTerms() + { + using World world = World.Create(); + + Entity p = world.Entity(); + + using Query q = world.QueryBuilder() + .With() + .With(Ecs.ChildOf, p) + .Build(); + + Assert.Equal(3, q.FieldCount()); + + Term t = q.Term(0); + Assert.Equal(world.Id(), t.Id()); + Assert.Equal(Ecs.And, t.Oper()); + Assert.Equal(Ecs.InOutDefault, t.InOut()); + + t = q.Term(1); + Assert.Equal(world.Id(), t.Id()); + Assert.Equal(Ecs.And, t.Oper()); + Assert.Equal(Ecs.InOutDefault, t.InOut()); + + t = q.Term(2); + Assert.Equal(world.Pair(Ecs.ChildOf, p), t.Id()); + Assert.Equal(Ecs.And, t.Oper()); + Assert.Equal(Ecs.InOutDefault, t.InOut()); + Assert.True(t.Id().Second() == p); + } + + [Fact] + private void InspectTermsWithEach() + { + using World world = World.Create(); + + Entity p = world.Entity(); + + using Query q = world.QueryBuilder() + .With() + .With(Ecs.ChildOf, p) + .Build(); + + int count = 0; + q.EachTerm((ref Term t) => + { + if (count == 0) + { + Assert.Equal(world.Id(), t.Id()); + Assert.Equal(Ecs.InOutDefault, t.InOut()); + } + else if (count == 1) + { + Assert.Equal(world.Id(), t.Id()); + Assert.Equal(Ecs.InOutDefault, t.InOut()); + } + else if (count == 2) + { + Assert.Equal(world.Pair(Ecs.ChildOf, p), t.Id()); + Assert.True(t.Id().Second() == p); + Assert.Equal(Ecs.InOutDefault, t.InOut()); + } + else + { + Assert.True(false); + } + + Assert.Equal(Ecs.And, t.Oper()); + + count++; + }); + + Assert.Equal(3, count); + } + + [Fact] + private void CompToStr() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + Assert.Equal("Position($this), Velocity($this)", q.Str()); + } + + [Fact] + private void PairToStr() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With() + .With() + .Build(); + Assert.Equal("Position($this), Velocity($this), Eats($this,Apples)", q.Str()); + } + + [Fact] + private void OperNotToStr() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With().Oper(Ecs.Not) + .Build(); + Assert.Equal("Position($this), !Velocity($this)", q.Str()); + } + + [Fact] + private void OperOptionalToStr() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With().Oper(Ecs.Optional) + .Build(); + Assert.Equal("Position($this), ?Velocity($this)", q.Str()); + } + + [Fact] + private void OperOrToStr() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With().Oper(Ecs.Or) + .With() + .Build(); + Assert.Equal("Position($this) || Velocity($this)", q.Str()); + } + + [Fact] + private void EachNoEntity1Comp() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Position(1, 2)); + + using Query q = world.Query(); + + int count = 0; + q.Each((ref Position p) => + { + Assert.Equal(1, p.X); + Assert.Equal(2, p.Y); + p.X += 1; + p.Y += 2; + count++; + }); + + Assert.Equal(1, count); + + Position* pos = e.GetPtr(); + Assert.Equal(2, pos->X); + Assert.Equal(4, pos->Y); + } + + [Fact] + private void EachNoEntity2Comps() + { + using World world = World.Create(); + + Entity e = world.Entity() + .Set(new Position(1, 2)) + .Set(new Velocity(10, 20)); + + using Query q = world.Query(); + + int count = 0; + q.Each((ref Position p, ref Velocity v) => + { + Assert.Equal(1, p.X); + Assert.Equal(2, p.Y); + Assert.Equal(10, v.X); + Assert.Equal(20, v.Y); + + p.X += 1; + p.Y += 2; + v.X += 1; + v.Y += 2; + count++; + }); + + Assert.Equal(1, count); + + Assert.True(e.Read((ref readonly Position p, ref readonly Velocity v) => + { + Assert.Equal(2, p.X); + Assert.Equal(4, p.Y); + + Assert.Equal(11, v.X); + Assert.Equal(22, v.Y); + })); + + Assert.Equal(1, count); + } + + [Fact] + private void IterNoComps1Comp() + { + using World world = World.Create(); + + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add().Add(); + world.Entity().Add(); + + using Query q = world.Query(); + + int count = 0; + q.Run((Iter it) => + { + while (it.Next()) + count += it.Count(); + }); + + Assert.Equal(3, count); + } + + [Fact] + private void IterNoComps2Comps() + { + using World world = World.Create(); + + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add().Add(); + world.Entity().Add().Add(); + + using Query q = world.Query(); + + int count = 0; + q.Run((Iter it) => + { + while (it.Next()) + count += it.Count(); + }); + + Assert.Equal(2, count); + } + + [Fact] + private void IterNoCompsNoComps() + { + using World world = World.Create(); + + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add().Add(); + world.Entity().Add().Add(); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + int count = 0; + q.Run((Iter it) => + { + while (it.Next()) + count += it.Count(); + }); + + Assert.Equal(3, count); + } + + [Fact] + private void IterQueryInSystem() + { + using World world = World.Create(); + + world.Entity().Add().Add(); + + using Query q = world.Query(); + + int count = 0; + world.System() + .Each((Entity _, ref Position _) => { q.Each((Entity _, ref Velocity _) => { count++; }); }); + + world.Progress(); + + Assert.Equal(1, count); + } + + [Fact] + private void IterType() + { + using World world = World.Create(); + + world.Entity().Add(); + world.Entity().Add().Add(); + + using Query q = world.Query(); + + q.Run((Iter it) => + { + while (it.Next()) + { + Assert.True(it.Type().Count() >= 1); + Assert.True(it.Table().Has()); + } + }); + } + + [Fact] + private void InstancedQueryWithSingletonEach() + { + using World world = World.Create(); + + world.Set(new Velocity(1, 2)); + + Entity e1 = world.Entity().Set(new Position(10, 20)); + e1.Set(new Self(e1)); + Entity e2 = world.Entity().Set(new Position(20, 30)); + e2.Set(new Self(e2)); + Entity e3 = world.Entity().Set(new Position(30, 40)); + e3.Set(new Self(e3)); + Entity e4 = world.Entity().Set(new Position(40, 50)); + e4.Set(new Self(e4)); + Entity e5 = world.Entity().Set(new Position(50, 60)); + e5.Set(new Self(e5)); + + e4.Add(); + e5.Add(); + + using Query q = world.QueryBuilder() + .TermAt(2).Singleton() + .Build(); + + int count = 0; + q.Each((Entity e, ref Self s, ref Position p, ref Velocity v) => + { + Assert.True(e == s.Value); + p.X += v.X; + p.Y += v.Y; + count++; + }); + + Assert.Equal(5, count); + + Assert.True(e1.Read((ref readonly Position p) => + { + Assert.Equal(11, p.X); + Assert.Equal(22, p.Y); + })); + + Assert.True(e2.Read((ref readonly Position p) => + { + Assert.Equal(21, p.X); + Assert.Equal(32, p.Y); + })); + + Assert.True(e3.Read((ref readonly Position p) => + { + Assert.Equal(31, p.X); + Assert.Equal(42, p.Y); + })); + + Assert.True(e4.Read((ref readonly Position p) => + { + Assert.Equal(41, p.X); + Assert.Equal(52, p.Y); + })); + + Assert.True(e5.Read((ref readonly Position p) => + { + Assert.Equal(51, p.X); + Assert.Equal(62, p.Y); + })); + } + + [Fact] + private void InstancedQueryWithBaseEach() + { + using World world = World.Create(); + + Entity @base = world.Entity().Set(new Velocity(1, 2)); + + Entity e1 = world.Entity().IsA(@base).Set(new Position(10, 20)); + e1.Set(new Self(e1)); + Entity e2 = world.Entity().IsA(@base).Set(new Position(20, 30)); + e2.Set(new Self(e2)); + Entity e3 = world.Entity().IsA(@base).Set(new Position(30, 40)); + e3.Set(new Self(e3)); + Entity e4 = world.Entity().IsA(@base).Set(new Position(40, 50)).Add(); + e4.Set(new Self(e4)); + Entity e5 = world.Entity().IsA(@base).Set(new Position(50, 60)).Add(); + e5.Set(new Self(e5)); + Entity e6 = world.Entity().Set(new Position(60, 70)).Set(new Velocity(2, 3)); + e6.Set(new Self(e6)); + Entity e7 = world.Entity().Set(new Position(70, 80)).Set(new Velocity(4, 5)); + e7.Set(new Self(e7)); + + using Query q = world.QueryBuilder() + .Build(); + + int count = 0; + q.Each((Entity e, ref Self s, ref Position p, ref Velocity v) => + { + Assert.True(e == s.Value); + p.X += v.X; + p.Y += v.Y; + count++; + }); + + Assert.Equal(7, count); + + Assert.True(e1.Read((ref readonly Position p) => + { + Assert.Equal(11, p.X); + Assert.Equal(22, p.Y); + })); + + Assert.True(e2.Read((ref readonly Position p) => + { + Assert.Equal(21, p.X); + Assert.Equal(32, p.Y); + })); + + Assert.True(e3.Read((ref readonly Position p) => + { + Assert.Equal(31, p.X); + Assert.Equal(42, p.Y); + })); + + Assert.True(e4.Read((ref readonly Position p) => + { + Assert.Equal(41, p.X); + Assert.Equal(52, p.Y); + })); + + Assert.True(e5.Read((ref readonly Position p) => + { + Assert.Equal(51, p.X); + Assert.Equal(62, p.Y); + })); + + Assert.True(e6.Read((ref readonly Position p) => + { + Assert.Equal(62, p.X); + Assert.Equal(73, p.Y); + })); + + Assert.True(e7.Read((ref readonly Position p) => + { + Assert.Equal(74, p.X); + Assert.Equal(85, p.Y); + })); + } + + [Fact] + private void InstancedQueryWithSingletonIter() + { + using World world = World.Create(); + + world.Set(new Velocity(1, 2)); + + Entity e1 = world.Entity().Set(new Position(10, 20)); + e1.Set(new Self(e1)); + Entity e2 = world.Entity().Set(new Position(20, 30)); + e2.Set(new Self(e2)); + Entity e3 = world.Entity().Set(new Position(30, 40)); + e3.Set(new Self(e3)); + Entity e4 = world.Entity().Set(new Position(40, 50)); + e4.Set(new Self(e4)); + Entity e5 = world.Entity().Set(new Position(50, 60)); + e5.Set(new Self(e5)); + + e4.Add(); + e5.Add(); + + using Query q = world.QueryBuilder() + .TermAt(2).Singleton() + .Build(); + + int count = 0; + q.Run((Iter it) => + { + while (it.Next()) + { + Field s = it.Field(0); + Field p = it.Field(1); + Field v = it.Field(2); + + Assert.True(it.Count() > 1); + + foreach (int i in it) + { + p[i].X += v[0].X; + p[i].Y += v[0].Y; + Assert.True(it.Entity(i) == s[i].Value); + count++; + } + } + }); + + Assert.Equal(5, count); + + Assert.True(e1.Read((ref readonly Position p) => + { + Assert.Equal(11, p.X); + Assert.Equal(22, p.Y); + })); + + Assert.True(e2.Read((ref readonly Position p) => + { + Assert.Equal(21, p.X); + Assert.Equal(32, p.Y); + })); + + Assert.True(e3.Read((ref readonly Position p) => + { + Assert.Equal(31, p.X); + Assert.Equal(42, p.Y); + })); + + Assert.True(e4.Read((ref readonly Position p) => + { + Assert.Equal(41, p.X); + Assert.Equal(52, p.Y); + })); + + Assert.True(e5.Read((ref readonly Position p) => + { + Assert.Equal(51, p.X); + Assert.Equal(62, p.Y); + })); + } + + [Fact] + private void InstancedQueryWithBaseIter() + { + using World world = World.Create(); + + Entity @base = world.Entity().Set(new Velocity(1, 2)); + + Entity e1 = world.Entity().IsA(@base).Set(new Position(10, 20)); + e1.Set(new Self(e1)); + Entity e2 = world.Entity().IsA(@base).Set(new Position(20, 30)); + e2.Set(new Self(e2)); + Entity e3 = world.Entity().IsA(@base).Set(new Position(30, 40)); + e3.Set(new Self(e3)); + Entity e4 = world.Entity().IsA(@base).Set(new Position(40, 50)).Add(); + e4.Set(new Self(e4)); + Entity e5 = world.Entity().IsA(@base).Set(new Position(50, 60)).Add(); + e5.Set(new Self(e5)); + Entity e6 = world.Entity().Set(new Position(60, 70)).Set(new Velocity(2, 3)); + e6.Set(new Self(e6)); + Entity e7 = world.Entity().Set(new Position(70, 80)).Set(new Velocity(4, 5)); + e7.Set(new Self(e7)); + + using Query q = world.QueryBuilder() + .Build(); + + int count = 0; + q.Run((Iter it) => + { + while (it.Next()) + { + Field s = it.Field(0); + Field p = it.Field(1); + Field v = it.Field(2); + + Assert.True(it.Count() > 1); + + foreach (int i in it) + { + if (it.IsSelf(2)) + { + p[i].X += v[i].X; + p[i].Y += v[i].Y; + } + else + { + p[i].X += v[0].X; + p[i].Y += v[0].Y; + } + + Assert.True(it.Entity(i) == s[i].Value); + count++; + } + } + }); + + Assert.Equal(7, count); + + Assert.True(e1.Read((ref readonly Position p) => + { + Assert.Equal(11, p.X); + Assert.Equal(22, p.Y); + })); + + Assert.True(e2.Read((ref readonly Position p) => + { + Assert.Equal(21, p.X); + Assert.Equal(32, p.Y); + })); + + Assert.True(e3.Read((ref readonly Position p) => + { + Assert.Equal(31, p.X); + Assert.Equal(42, p.Y); + })); + + Assert.True(e4.Read((ref readonly Position p) => + { + Assert.Equal(41, p.X); + Assert.Equal(52, p.Y); + })); + + Assert.True(e5.Read((ref readonly Position p) => + { + Assert.Equal(51, p.X); + Assert.Equal(62, p.Y); + })); + + Assert.True(e6.Read((ref readonly Position p) => + { + Assert.Equal(62, p.X); + Assert.Equal(73, p.Y); + })); + + Assert.True(e7.Read((ref readonly Position p) => + { + Assert.Equal(74, p.X); + Assert.Equal(85, p.Y); + })); + } + + [Fact] + private void QueryEachFromComponent() + { + using World world = World.Create(); + + world.Entity().Set(new Position()).Set(new Velocity()); + world.Entity().Set(new Position()).Set(new Velocity()); + + using Query q = world.Query(); + Entity e = world.Entity().Set(new QueryWrapper(q)); + + QueryWrapper* qc = e.GetPtr(); + Assert.True(qc != null); + + int count = 0; + qc->Query.Each((Entity _, ref Position _, ref Velocity _) => { count++; }); + Assert.Equal(2, count); + } + + [Fact] + private void QueryIterFromComponent() + { + using World world = World.Create(); + + world.Entity().Set(new Position()).Set(new Velocity()); + world.Entity().Set(new Position()).Set(new Velocity()); + + using Query q = world.Query(); + Entity e = world.Entity().Set(new QueryWrapper(q)); + + QueryWrapper* qc = e.GetPtr(); + Assert.True(qc != null); + + int count = 0; + qc->Query.Run((Iter it) => + { + while (it.Next()) + count += it.Count(); + }); + Assert.Equal(2, count); + } + + private static void EachFunc(Entity e, ref Position p) + { + InvokedCount++; + p.X++; + p.Y++; + } + + private static void IterFunc(Iter it, Field p) + { + Assert.Equal(1, it.Count()); + InvokedCount++; + p[0].X++; + p[0].Y++; + } + + [Fact] + private void QueryEachWithFuncPtr() + { + using World world = World.Create(); + + Entity e = world.Entity().Set(new Position(10, 20)); + + using Query q = world.Query(); + + q.Each(&EachFunc); + + Assert.Equal(1, InvokedCount); + + Position* ptr = e.GetPtr(); + Assert.Equal(11, ptr->X); + Assert.Equal(21, ptr->Y); + } + + [Fact] + private void QueryIterWithFuncPtr() + { + using World world = World.Create(); + + Entity e = world.Entity().Set(new Position(10, 20)); + + using Query q = world.Query(); + + q.Iter(&IterFunc); + + Assert.Equal(1, InvokedCount); + + Position* ptr = e.GetPtr(); + Assert.Equal(11, ptr->X); + Assert.Equal(21, ptr->Y); + } + + [Fact] + private void QueryEachWithFuncNoPtr() + { + using World world = World.Create(); + + Entity e = world.Entity().Set(new Position(10, 20)); + + using Query q = world.Query(); + + q.Each(EachFunc); + + Assert.Equal(1, InvokedCount); + + Position* ptr = e.GetPtr(); + Assert.Equal(11, ptr->X); + Assert.Equal(21, ptr->Y); + } + + [Fact] + private void QueryIterWithFuncNoPtr() + { + using World world = World.Create(); + + Entity e = world.Entity().Set(new Position(10, 20)); + + using Query q = world.Query(); + + q.Iter(IterFunc); + + Assert.Equal(1, InvokedCount); + + Position* ptr = e.GetPtr(); + Assert.Equal(11, ptr->X); + Assert.Equal(21, ptr->Y); + } + + [Fact] + private void QueryEachWithIter() + { + using World world = World.Create(); + + Entity e1 = world.Entity(); + e1.Set(new Self(e1)); + e1.Set(new Position(10, 20)); + Entity e2 = world.Entity(); + e2.Set(new Self(e2)); + e2.Set(new Position(20, 30)); + + using Query q = world.Query(); + + int invoked = 0; + q.Each((Iter it, int i, ref Self s, ref Position p) => + { + Assert.Equal(2, it.Count()); + Assert.Equal(s.Value, it.Entity(i)); + p.X++; + p.Y++; + invoked++; + }); + + Assert.Equal(2, invoked); + + Position* ptr = e1.GetPtr(); + Assert.Equal(11, ptr->X); + Assert.Equal(21, ptr->Y); + + ptr = e2.GetPtr(); + Assert.Equal(21, ptr->X); + Assert.Equal(31, ptr->Y); + } + + // [Fact] + // private void InvalidFieldFromEachWithIter() + // { + // install_test_abort(); + // + // using World world = World.Create(); + // + // world.Entity() + // .Set(new Position(10, 20)) + // .Set(new Velocity(1, 2)); + // + // using var q = world.QueryBuilder() + // .With().InOut() + // .Build(); + // + // test_expect_abort(); + // + // q.Each((Iter it, int index, ref Position p) => { it.Field(1); }); + // } + + // [Fact] + // private void InvalidFieldTFromEachWithIter() + // { + // install_test_abort(); + // + // using World world = World.Create(); + // + // world.Entity() + // .Set(new Position(10, 20)) + // .Set(new Velocity(1, 2)); + // + // using var q = world.QueryBuilder() + // .With().InOut() + // .Build(); + // + // test_expect_abort(); + // + // q.Each((Iter it, int index, ref Position p) => { it.Field(1); }); + // } + + // [Fact] + // private void InvalidFieldConstTFromEachWithIter() + // { + // install_test_abort(); + // + // using World world = World.Create(); + // + // world.Entity() + // .Set(new Position(10, 20)) + // .Set(new Velocity(1, 2)); + // + // using var q = world.QueryBuilder() + // .With().InOut() + // .Build(); + // + // test_expect_abort(); + // + // q.Each((Iter it, int index, ref Position p) => { it.Field(1); }); + // } + + // [Fact] + // private void FieldAtFromEachWithIter() + // { + // using World world = World.Create(); + // + // Entity e1 = world.Entity() + // .Set(new Position(10, 20)) + // .Set(new Velocity(1, 2)); + // + // Entity e2 = world.Entity() + // .Set(new Position(20, 30)) + // .Set(new Velocity(3, 4)); + // + // using var q = world.QueryBuilder() + // .With().InOut() + // .Build(); + // + // int count = 0; + // + // q.Each((Iter it, int row, ref Position p) => + // { + // Velocity* v = (Velocity*)it.FieldAt(1, row); + // if (it.Entity(row) == e1) + // { + // Assert.Equal(1, v->X); + // Assert.Equal(2, v->Y); + // count++; + // } + // else if (it.Entity(row) == e2) + // { + // Assert.Equal(3, v->X); + // Assert.Equal(4, v->Y); + // count++; + // } + // }); + // + // Assert.Equal(2, count); + // } + + [Fact] + private void FieldAtTFromEachWithIter() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(20, 30)) + .Set(new Velocity(3, 4)); + + using Query q = world.QueryBuilder() + .With().InOut() + .Build(); + + int count = 0; + + q.Each((Iter it, int row, ref Position _) => + { + ref Velocity v = ref it.FieldAt(1, row); + if (it.Entity(row) == e1) + { + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + count++; + } + else if (it.Entity(row) == e2) + { + Assert.Equal(3, v.X); + Assert.Equal(4, v.Y); + count++; + } + }); + + Assert.Equal(2, count); + } + + [Fact] + private void FieldAtConstTFromEachWithIter() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(20, 30)) + .Set(new Velocity(3, 4)); + + using Query q = world.QueryBuilder() + .With().InOut() + .Build(); + + int count = 0; + + q.Each((Iter it, int row, ref Position _) => + { + ref Velocity v = ref it.FieldAt(1, row); + if (it.Entity(row) == e1) + { + Assert.Equal(1, v.X); + Assert.Equal(2, v.Y); + count++; + } + else if (it.Entity(row) == e2) + { + Assert.Equal(3, v.X); + Assert.Equal(4, v.Y); + count++; + } + }); + + Assert.Equal(2, count); + } + + [Fact] + private void ChangeTracking() + { + using World world = World.Create(); + + using Query qw = world.Query(); + using Query qr = world.QueryBuilder() + .DetectChanges() + .Cached() + .Build(); + + Entity e1 = world.Entity().Add().Set(new Position(10, 20)); + world.Entity().Set(new Position(20, 30)); + + Assert.True(qr.Changed()); + qr.Run((Iter it) => + { + while (it.Next()) + { + } + }); + Assert.False(qr.Changed()); + + int count = 0, changeCount = 0; + + qw.Run((Iter it) => + { + while (it.Next()) + { + Assert.Equal(1, it.Count()); + + count++; + + if (it.Entity(0) == e1) + { + it.Skip(); + continue; + } + + changeCount++; + } + }); + + Assert.Equal(2, count); + Assert.Equal(1, changeCount); + + count = 0; + changeCount = 0; + + Assert.True(qr.Changed()); + + qr.Run((Iter it) => + { + while (it.Next()) + { + Assert.Equal(1, it.Count()); + + count++; + + if (it.Entity(0) == e1) + { + Assert.False(it.Changed()); + } + else + { + Assert.True(it.Changed()); + changeCount++; + } + } + }); + + Assert.Equal(2, count); + Assert.Equal(1, changeCount); + } + + [Fact] + private void NotWithWrite() + { + using World world = World.Create(); + + using Query q = world.QueryBuilder() + .With() + .With().Oper(Ecs.Not).Write() + .Build(); + + Entity e = world.Entity().Add(); + + int count = 0; + world.Defer(() => + { + q.Each((Entity ent) => + { + ent.Add(); + count++; + }); + }); + + Assert.Equal(1, count); + Assert.True(e.Has()); + + q.Each((Entity _) => { count++; }); + + Assert.Equal(1, count); + } + + [Fact] + private void InstancedNestedQueryWithIter() + { + using World world = World.Create(); + + using Query q1 = world.QueryBuilder() + .With() + .With().Singleton().InOut() + .Build(); + + using Query q2 = world.QueryBuilder() + .With() + .Build(); + + world.Add(); + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + int count = 0; + + q2.Run((Iter it2) => + { + while (it2.Next()) + { + q1.Iter(it2).Run((Iter it1) => + { + while (it1.Next()) + { + Assert.Equal(2, it1.Count()); + count += it1.Count(); + } + }); + } + }); + + Assert.Equal(2, count); + } + + [Fact] + private void InstancedNestedQueryWithEntity() + { + using World world = World.Create(); + + using Query q1 = world.QueryBuilder() + .With() + .With().Singleton().InOut() + .Build(); + + using Query q2 = world.QueryBuilder() + .With() + .Build(); + + world.Add(); + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + int count = 0; + + q2.Each((Entity e2) => + { + q1.Iter(e2).Run((Iter it1) => + { + while (it1.Next()) + { + Assert.Equal(2, it1.Count()); + count += it1.Count(); + } + }); + }); + + Assert.Equal(2, count); + } + + [Fact] + private void InstancedNestedQueryWithWorld() + { + using World world = World.Create(); + + using Query q1 = world.QueryBuilder() + .With() + .With().Singleton().InOut() + .Build(); + + using Query q2 = world.QueryBuilder() + .With() + .Build(); + + world.Add(); + world.Entity().Add(); + world.Entity().Add(); + world.Entity().Add(); + + int count = 0; + + q2.Run((Iter it2) => + { + while (it2.Next()) + { + q1.Iter(it2.World()).Run((Iter it1) => + { + while (it1.Next()) + { + Assert.Equal(2, it1.Count()); + count += it1.Count(); + } + }); + } + }); + + Assert.Equal(2, count); + } + + [Fact] + private void CapturedQuery() + { + using World world = World.Create(); + + using Query q = world.Query(); + Entity e1 = world.Entity().Set(new Position(10, 20)); + + Action action = () => + { + int count = 0; + q.Each((Entity e, ref Position p) => + { + Assert.True(e == e1); + Assert.Equal(10, p.X); + Assert.Equal(20, p.Y); + count++; + }); + Assert.Equal(1, count); + }; + + action(); + } + + [Fact] + private void PageIterCapturedQuery() + { + using World world = World.Create(); + + using Query q = world.Query(); + world.Entity().Set(new Position(10, 20)); + Entity e2 = world.Entity().Set(new Position(20, 30)); + world.Entity().Set(new Position(10, 20)); + + Action action = () => + { + int count = 0; + q.Iter().Page(1, 1).Each((Entity e, ref Position p) => + { + Assert.True(e == e2); + Assert.Equal(20, p.X); + Assert.Equal(30, p.Y); + count++; + }); + Assert.Equal(1, count); + }; + + action(); + } + + [Fact] + private void WorkerIterCapturedQuery() + { + using World world = World.Create(); + + using Query q = world.Query(); + world.Entity().Set(new Position(10, 20)); + Entity e2 = world.Entity().Set(new Position(20, 30)); + world.Entity().Set(new Position(10, 20)); + + Action action = () => + { + int count = 0; + q.Iter().Worker(1, 3).Each((Entity e, ref Position p) => + { + Assert.True(e == e2); + Assert.Equal(20, p.X); + Assert.Equal(30, p.Y); + count++; + }); + Assert.Equal(1, count); + }; + + action(); + } + + [Fact] + private void SetGroupCapturedQuery() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + using Query q = world.QueryBuilder() + .GroupBy(rel) + .Build(); + + world.Entity().Set(new Position(10, 20)).Add(rel, tgtA); + Entity e2 = world.Entity().Set(new Position(20, 30)).Add(rel, tgtB); + + new Action(() => + { + int count = 0; + q.SetGroup(tgtB).Each((Entity e, ref Position p) => + { + Assert.True(e == e2); + Assert.Equal(20, p.X); + Assert.Equal(30, p.Y); + count++; + }); + Assert.Equal(1, count); + })(); + } + + [Fact] + private void SetVarCapturedQuery() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + using Query q = world.QueryBuilder() + .With(rel, "$var") + .Build(); + + world.Entity().Set(new Position(10, 20)).Add(rel, tgtA); + Entity e2 = world.Entity().Set(new Position(20, 30)).Add(rel, tgtB); + + new Action(() => + { + int count = 0; + q.SetVar("var", tgtB).Each((Entity e, ref Position p) => + { + Assert.True(e == e2); + Assert.Equal(20, p.X); + Assert.Equal(30, p.Y); + count++; + }); + Assert.Equal(1, count); + })(); + } + + [Fact] + private void SetVarIdCapturedQuery() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity tgtA = world.Entity(); + Entity tgtB = world.Entity(); + + using Query q = world.QueryBuilder() + .With(rel, "$var") + .Build(); + + int var = q.FindVar("var"); + Assert.True(var != -1); + + world.Entity().Set(new Position(10, 20)).Add(rel, tgtA); + Entity e2 = world.Entity().Set(new Position(20, 30)).Add(rel, tgtB); + + new Action(() => + { + int count = 0; + q.SetVar(var, tgtB).Each((Entity e, ref Position p) => + { + Assert.True(e == e2); + Assert.Equal(20, p.X); + Assert.Equal(30, p.Y); + count++; + }); + Assert.Equal(1, count); + })(); + } + + [Fact] + private void IterEntities() + { + using World world = World.Create(); + + Entity e1 = world.Entity().Set(new Position(10, 20)); + Entity e2 = world.Entity().Set(new Position(10, 20)); + Entity e3 = world.Entity().Set(new Position(10, 20)); + + world.Query() + .Run((Iter it) => + { + while (it.Next()) + { + Assert.Equal(3, it.Count()); + + Field entities = it.Entities(); + Assert.True(entities[0] == e1); + Assert.True(entities[1] == e2); + Assert.True(entities[2] == e3); + } + }); + } + + [Fact] + private void IterGetPairWithId() + { + using World world = World.Create(); + + Entity rel = world.Entity(); + Entity tgt = world.Entity(); + Entity e = world.Entity().Add(rel, tgt); + + using Query q = world.QueryBuilder() + .With(rel, Ecs.Wildcard) + .Build(); + + int count = 0; + + q.Each((Iter it, int i) => + { + Assert.True(it.Id(0).IsPair()); + Assert.True(it.Id(0).First() == rel); + Assert.True(it.Id(0).Second() == tgt); + Assert.True(e == it.Entity(i)); + count++; + }); + + Assert.Equal(1, count); + } + + [Fact] + private void QueryFromEntity() + { + using World world = World.Create(); + + Entity qe = world.Entity(); + using Query q1 = world.QueryBuilder(qe) + .Build(); + + world.Entity().Add(); + Entity e2 = world.Entity().Add().Add(); + + int count = 0; + q1.Each((Entity e, ref Position _, ref Velocity _) => + { + count++; + Assert.True(e == e2); + }); + Assert.Equal(1, count); + + Query q2 = world.Query(qe); + q2.Each((Entity e) => + { + count++; + Assert.True(e == e2); + }); + Assert.Equal(2, count); + } + + [Fact] + private void QueryFromEntityName() + { + using World world = World.Create(); + + using Query q1 = world.QueryBuilder("qe") + .Build(); + + world.Entity().Add(); + Entity e2 = world.Entity().Add().Add(); + + int count = 0; + q1.Each((Entity e, ref Position _, ref Velocity _) => + { + count++; + Assert.True(e == e2); + }); + Assert.Equal(1, count); + + Query q2 = world.Query("qe"); + q2.Each((Entity e) => + { + count++; + Assert.True(e == e2); + }); + Assert.Equal(2, count); + } + + [Fact] + private void RunWithIterFini() + { + using World world = World.Create(); + + using Query q1 = world.Query(); + + int count = 0; + q1.Run((Iter it) => + { + it.Fini(); + count++; + }); + + Assert.Equal(1, count); + } + + + [Fact] + private void RunWithIterFiniInterrupt() + { + using World world = World.Create(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Add(); + world.Entity() + .Set(new Position(10, 20)) + .Add(); + world.Entity() + .Set(new Position(10, 20)) + .Add(); + + using Query q = world.Query(); + + int count = 0; + q.Run((Iter it) => + { + Assert.True(it.Next()); + Assert.Equal(1, it.Count()); + Assert.Equal(e1, it.Entity(0)); + + Assert.True(it.Next()); + count++; + it.Fini(); + }); + + Assert.Equal(1, count); + } + + [Fact] + private void RunWithIterFiniEmpty() + { + using World world = World.Create(); + + using Query q = world.Query(); + + int count = 0; + q.Run((Iter it) => + { + count++; + it.Fini(); + }); + + Assert.Equal(1, count); + } + + [Fact] + private void RunWithIterFiniNoQuery() + { + using World world = World.Create(); + + using Query q = world.Query(); + + int count = 0; + q.Run((Iter it) => + { + count++; + it.Fini(); + }); + + Assert.Equal(1, count); + } + + [Fact] + private void AddToMatchFromStagedQuery() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity e = world.Entity().Add(); + + World stage = world.GetStage(0); + + world.ReadonlyBegin(false); + + stage.Query() + .Each((Entity e, ref Position _) => + { + e.Add(); + Assert.True(!e.Has()); + }); + + world.ReadonlyEnd(); + + Assert.True(e.Has()); + Assert.True(e.Has()); + } + + [Fact] + private void AddToMatchFromStagedQueryReadonlyThreaded() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + + Entity e = world.Entity().Add(); + + World stage = world.GetStage(0); + + world.ReadonlyBegin(true); + + stage.Query() + .Each((Entity e, ref Position _) => + { + e.Add(); + Assert.True(!e.Has()); + }); + + world.ReadonlyEnd(); + + Assert.True(e.Has()); + Assert.True(e.Has()); + } + + [Fact] + private void EmptyTablesEach() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(20, 30)) + .Set(new Velocity(2, 3)); + + e2.Add(); + e2.Remove(); + + using Query q = world.QueryBuilder() + .QueryFlags(EcsQueryMatchEmptyTables) + .Build(); + + q.Each((ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + { + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + { + Position* p = e2.GetPtr(); + Assert.Equal(22, p->X); + Assert.Equal(33, p->Y); + } + } + + // TODO: Fix later + // [Fact] + // private void EmptyTablesEachWithEntity() + // { + // using World world = World.Create(); + // + // world.Component(); + // world.Component(); + // world.Component(); + // + // Entity e1 = world.Entity() + // .Set(new Position(10, 20)) + // .Set(new Velocity(1, 2)); + // + // Entity e2 = world.Entity() + // .Set(new Position(20, 30)) + // .Set(new Velocity(2, 3)); + // + // e2.Add(); + // e2.Remove(); + // + // using var q = world.QueryBuilder() + // .QueryFlags(EcsQueryMatchEmptyTables) + // .Build(); + // + // q.Each((Entity e, ref Position p, ref Velocity v) => + // { + // p.X += v.X; + // p.Y += v.Y; + // }); + // + // { + // Position* p = e1.GetPtr(); + // Assert.Equal(11, p->X); + // Assert.Equal(22, p->Y); + // } + // { + // Position* p = e2.GetPtr(); + // Assert.Equal(22, p->X); + // Assert.Equal(33, p->Y); + // } + // } + + [Fact] + private void EmptyTablesEachWithIter() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity e1 = world.Entity() + .Set(new Position(10, 20)) + .Set(new Velocity(1, 2)); + + Entity e2 = world.Entity() + .Set(new Position(20, 30)) + .Set(new Velocity(2, 3)); + + e2.Add(); + e2.Remove(); + + using Query q = world.QueryBuilder() + .QueryFlags(EcsQueryMatchEmptyTables) + .Build(); + + q.Each((Iter _, int _, ref Position p, ref Velocity v) => + { + p.X += v.X; + p.Y += v.Y; + }); + + { + Position* p = e1.GetPtr(); + Assert.Equal(11, p->X); + Assert.Equal(22, p->Y); + } + { + Position* p = e2.GetPtr(); + Assert.Equal(22, p->X); + Assert.Equal(33, p->Y); + } + } + + [Fact] + private void PairWithVariableSrc() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity other = world.Entity() + .Set(new OtherComp(10)); + + for (int i = 0; i < 3; i++) + world.Entity() + .Set(new ThisComp(i)) + .Add(other); + + using Query q = world.QueryBuilder() + .TermAt(0).Second("$other") + .TermAt(2).Src("$other") + .Build(); + + int isPresent = 0; + q.Each((ref RelData _, ref ThisComp thisComp, ref OtherComp otherComp) => + { + isPresent |= 1 << thisComp.X; + Assert.Equal(10, otherComp.X); + }); + + Assert.Equal(7, isPresent); + } + + [Fact] + private void PairWithVariableSrcNoRowFields() + { + using World world = World.Create(); + + world.Component(); + world.Component(); + world.Component(); + + Entity other = world.Entity() + .Set(new OtherComp(0)); + + world.Entity() + .Set(new OtherComp(1)); + + for (int i = 0; i < 3; i++) + world.Entity() + .Set(new ThisComp(i)) + .Add(other); + + using Query q = world.QueryBuilder() + .TermAt(0).Second("$other") + .TermAt(2).Src("$other") + .Build(); + + int isPresent = 0; + q.Each((ref RelData _, ref ThisComp thisComp, ref OtherComp otherComp) => + { + isPresent |= 1 << thisComp.X; + Assert.Equal(0, otherComp.X); + }); + + Assert.Equal(7, isPresent); + } + + [Fact] + private void IterTargets() + { + using World world = World.Create(); + + Entity likes = world.Entity(); + Entity pizza = world.Entity(); + Entity salad = world.Entity(); + Entity alice = world.Entity() + .Add(likes, pizza) + .Add(likes, salad); + + using Query q = world.QueryBuilder() + .With(likes, Ecs.Any) + .Build(); + + int count = 0; + int tgtCount = 0; + + q.Each((Iter it, int row) => + { + Entity e = it.Entity(row); + Assert.True(e == alice); + + it.Targets(0, (Entity tgt) => + { + if (tgtCount == 0) + Assert.True(tgt == pizza); + if (tgtCount == 1) + Assert.True(tgt == salad); + tgtCount++; + }); + + count++; + }); + + Assert.Equal(1, count); + Assert.Equal(2, tgtCount); + } + + [Fact] + [SuppressMessage("ReSharper", "InconsistentNaming")] + private void IterTargets2ndField() + { + using World world = World.Create(); + + Entity likes = world.Entity(); + Entity pizza = world.Entity(); + Entity salad = world.Entity(); + Entity alice = world.Entity() + .Add() + .Add(likes, pizza) + .Add(likes, salad); + + using Query q = world.QueryBuilder() + .With() + .With(likes, Ecs.Any) + .Build(); + + int count = 0; + int tgtCount = 0; + + q.Each((Iter it, int row) => + { + Entity e = it.Entity(row); + Assert.True(e == alice); + + it.Targets(1, (Entity tgt) => + { + if (tgtCount == 0) + Assert.True(tgt == pizza); + if (tgtCount == 1) + Assert.True(tgt == salad); + tgtCount++; + }); + + count++; + }); + + Assert.Equal(1, count); + Assert.Equal(2, tgtCount); + } + + [Fact] + private void IterTargetsFieldOutOfRange() + { + using World world = World.Create(); + + Entity likes = world.Entity(); + Entity pizza = world.Entity(); + Entity salad = world.Entity(); + Entity alice = world.Entity() + .Add(likes, pizza) + .Add(likes, salad); + + using Query q = world.QueryBuilder() + .With(likes, Ecs.Any) + .Build(); + + q.Each((Iter it, int row) => + { + Entity e = it.Entity(row); + Assert.True(e == alice); + + Assert.Throws(() => + { + it.Targets(1, (Entity _) => { }); + }); + }); + } + + [Fact] + private void IterTargetsFieldNotAPair() + { + using World world = World.Create(); + + Entity likes = world.Entity(); + Entity pizza = world.Entity(); + Entity salad = world.Entity(); + Entity alice = world.Entity() + .Add() + .Add(likes, pizza) + .Add(likes, salad); + + using Query q = world.QueryBuilder() + .With() + .Build(); + + q.Each((Iter it, int row) => + { + Entity e = it.Entity(row); + Assert.True(e == alice); + + Assert.Throws(() => + { + it.Targets(1, (Entity _) => { }); + }); + }); + } + + [Fact] + private void IterTargetsFieldNotSet() + { + using World world = World.Create(); + + Entity likes = world.Entity(); + Entity alice = world.Entity() + .Add(); + + using Query q = world.QueryBuilder() + .With() + .With(likes, Ecs.Any).Optional() + .Build(); + + q.Each((Iter it, int row) => + { + Entity e = it.Entity(row); + Assert.True(e == alice); + Assert.True(!it.IsSet(1)); + + Assert.Throws(() => + { + it.Targets(1, (Entity _) => { }); + }); + }); + } +} diff --git a/src/Flecs.NET.Tests/Cpp/UnionTests.cs b/src/Flecs.NET.Tests/Cpp/UnionTests.cs deleted file mode 100644 index c2681768..00000000 --- a/src/Flecs.NET.Tests/Cpp/UnionTests.cs +++ /dev/null @@ -1,143 +0,0 @@ -using Flecs.NET.Core; -using Xunit; - -namespace Flecs.NET.Tests.Cpp; - -public class UnionTests -{ - [Fact] - private void AddCase() - { - using World world = World.Create(); - - Entity standing = world.Entity("Standing"); - Entity walking = world.Entity("Walking"); - Entity movement = world.Entity().Add(Ecs.Union); - - Entity e = world.Entity() - .Add(movement, standing); - Assert.True(e.Has(movement, standing)); - - Table table = e.Table(); - - e.Add(movement, walking); - Assert.True(e.Table() == table); - - Assert.True(e.Has(movement, walking)); - Assert.True(!e.Has(movement, standing)); - } - - [Fact] - private void GetCase() - { - using World world = World.Create(); - - Entity standing = world.Entity("Standing"); - world.Entity("Walking"); - Entity movement = world.Entity().Add(Ecs.Union); - - Entity e = world.Entity() - .Add(movement, standing); - Assert.True(e.Has(movement, standing)); - - Assert.True(e.Target(movement) == standing); - } - - [Fact] - private void AddCaseWithType() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Union); - - Entity e = world.Entity().Add(); - Assert.True((e.Has())); - - e.Add(); - - Assert.True((e.Has())); - Assert.True((!e.Has())); - } - - [Fact] - private void AddSwitchWithType() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Union); - - Entity e = world.Entity().Add(); - Assert.True((e.Has())); - - e.Add(); - - Assert.True((e.Has())); - Assert.True((!e.Has())); - } - - [Fact] - private void AddRemoveSwitchWithType() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Union); - - Entity e = world.Entity().Add(); - Assert.True(e.Has(Ecs.Wildcard)); - Assert.True((e.Has())); - - Table table = e.Table(); - - e.Add(); - - Assert.True((e.Has())); - Assert.True((!e.Has())); - Assert.True(e.Table() == table); - - Entity c = e.Target(); - Assert.True(c != 0); - Assert.True(c == world.Id()); - - e.Remove(Ecs.Wildcard); - Assert.True(!e.Has(Ecs.Wildcard)); - Assert.True((!e.Has())); - Assert.True(e.Table() != table); - } - - [Fact] - private void SwitchEnumType() - { - using World world = World.Create(); - - world.Component().Add(Ecs.Union); - - Entity e = world.Entity().Add(Color.Red); - Assert.True(e.Has(Color.Red)); - Assert.True(!e.Has(Color.Green)); - Assert.True(!e.Has(Color.Blue)); - Assert.True(e.Has(Ecs.Wildcard)); - - Table table = e.Table(); - - e.Add(Color.Green); - Assert.True(!e.Has(Color.Red)); - Assert.True(e.Has(Color.Green)); - Assert.True(!e.Has(Color.Blue)); - Assert.True(e.Has(Ecs.Wildcard)); - Assert.True(e.Table() == table); - - e.Add(Color.Blue); - Assert.True(!e.Has(Color.Red)); - Assert.True(!e.Has(Color.Green)); - Assert.True(e.Has(Color.Blue)); - Assert.True(e.Has(Ecs.Wildcard)); - Assert.True(e.Table() == table); - - e.Remove(Ecs.Wildcard); - Assert.True(!e.Has(Color.Red)); - Assert.True(!e.Has(Color.Green)); - Assert.True(!e.Has(Color.Blue)); - Assert.True(!e.Has(Ecs.Wildcard)); - Assert.True(e.Table() != table); - } -} diff --git a/src/Flecs.NET/Core/BindingContext/Functions.cs b/src/Flecs.NET/Core/BindingContext/Functions.cs index aa3bb289..2aa25379 100644 --- a/src/Flecs.NET/Core/BindingContext/Functions.cs +++ b/src/Flecs.NET/Core/BindingContext/Functions.cs @@ -1,1058 +1,1090 @@ -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Flecs.NET.Utilities; - -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core.BindingContext; - -/// -/// A static class for binding context functions. -/// -internal static unsafe partial class Functions -{ - #region Context Free - - [UnmanagedCallersOnly] - internal static void WorldContextFree(void* context) - { - WorldContext.Free((WorldContext*)context); - } - - [UnmanagedCallersOnly] - internal static void IteratorContextFree(void* context) - { - IteratorContext.Free((IteratorContext*)context); - } - - [UnmanagedCallersOnly] - internal static void RunContextFree(void* context) - { - RunContext.Free((RunContext*)context); - } - - [UnmanagedCallersOnly] - internal static void QueryContextFree(void* context) - { - QueryContext.Free((QueryContext*)context); - } - - [UnmanagedCallersOnly] - internal static void GroupByContextFree(void* context) - { - GroupByContext.Free((GroupByContext*)context); - } - - [UnmanagedCallersOnly] - internal static void TypeHooksContextFree(void* context) - { - TypeHooksContext.Free((TypeHooksContext*)context); - } - - [UnmanagedCallersOnly] - internal static void UserContextFree(void* context) - { - UserContext.Free((UserContext*)context); - } - - internal static void UserContextFinishDelegate(ref UserContext context) - { - ((Ecs.UserContextFinish)context.Callback.Delegate.Target!)(ref context.Get()); - } - - internal static void UserContextFinishPointer(ref UserContext context) - { - ((delegate*)context.Callback.Pointer)(ref context.Get()); - } - - #endregion - - #region Iterator Callbacks - - [UnmanagedCallersOnly] - internal static void IteratorCallback(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - ((delegate*)context->Callback.Invoker)(iter); - } - - internal static void ActionCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - ((Action)context->Callback.Delegate.Target!)(); - } - - internal static void ActionCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - ((delegate*)context->Callback.Pointer)(); - } - - internal static void IterCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterCallback)context->Callback.Delegate.Target!); - } - - internal static void IterCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*)context->Callback.Pointer); - } - - internal static void EachEntityCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityCallback)context->Callback.Delegate.Target!); - } - - internal static void EachEntityCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->Callback.Pointer); - } - - internal static void EachIterCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterCallback)context->Callback.Delegate.Target!); - } - - internal static void EachIterCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->Callback.Pointer); - } - - internal static void ObserveEntityCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (Ecs.ObserveEntityCallback)context->Callback.Delegate.Target!); - } - - internal static void ObserveEntityCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (delegate*)context->Callback.Pointer); - } - - internal static void ObserveRefCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (Ecs.ObserveRefCallback)context->Callback.Delegate.Target!); - } - - internal static void ObserveRefCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (delegate*)context->Callback.Pointer); - } - - internal static void ObservePointerCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (Ecs.ObservePointerCallback)context->Callback.Delegate.Target!); - } - - internal static void ObservePointerCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (delegate*)context->Callback.Pointer); - } - - internal static void ObserveEntityRefCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (Ecs.ObserveEntityRefCallback)context->Callback.Delegate.Target!); - } - - internal static void ObserveEntityRefCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (delegate*)context->Callback.Pointer); - } - - internal static void ObserveEntityPointerCallbackDelegate(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (Ecs.ObserveEntityPointerCallback)context->Callback.Delegate.Target!); - } - - internal static void ObserveEntityPointerCallbackPointer(ecs_iter_t* iter) - { - IteratorContext* context = (IteratorContext*)iter->callback_ctx; - Invoker.Observe(iter, (delegate*)context->Callback.Pointer); - } - - #endregion - - #region Run Callbacks - - [UnmanagedCallersOnly] - internal static void RunCallback(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - ((delegate*)context->Callback.Invoker)(iter); - } - - internal static void RunCallbackDelegate(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - Invoker.Run(iter, (Ecs.RunCallback)context->Callback.Delegate.Target!); - } - - internal static void RunCallbackPointer(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - Invoker.Run(iter, (delegate*)context->Callback.Pointer); - } - - internal static void RunDelegateCallbackDelegate(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - Invoker.Run(iter, (Ecs.RunDelegateCallback)context->Callback.Delegate.Target!); - } - - internal static void RunDelegateCallbackPointer(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - Invoker.Run(iter, (delegate*, void>)context->Callback.Pointer); - } - - internal static void RunPointerCallbackDelegate(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - Invoker.Run(iter, (Ecs.RunPointerCallback)context->Callback.Delegate.Target!); - } - - internal static void RunPointerCallbackPointer(ecs_iter_t* iter) - { - RunContext* context = (RunContext*)iter->run_ctx; - Invoker.Run(iter, (delegate*, void>)context->Callback.Pointer); - } - - #endregion - - #region Group By Callbacks - - [UnmanagedCallersOnly] - internal static ulong GroupByCallback(ecs_world_t* world, ecs_table_t* table, ulong id, void* context) - { - GroupByContext* groupByContext = (GroupByContext*)context; - return ((delegate*)groupByContext->GroupBy.Invoker)(world, table, id, groupByContext); - } - - internal static ulong GroupByCallbackDelegate(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) - { - return ((Ecs.GroupByCallback)context->GroupBy.Delegate.Target!)(world, new Table(world, table), id); - } - - internal static ulong GroupByCallbackPointer(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) - { - return ((delegate*)context->GroupBy.Pointer)(world, new Table(world, table), id); - } - - internal static ulong GroupByCallbackDelegate(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) - { - return ((Ecs.GroupByCallback)context->GroupBy.Delegate.Target!)(world, new Table(world, table), id, ref context->GroupByUserContext.Get()); - } - - internal static ulong GroupByCallbackPointer(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) - { - return ((delegate*)context->GroupBy.Pointer)(world, new Table(world, table), id, ref context->GroupByUserContext.Get()); - } - - #endregion - - #region Group Create Callbacks - - [UnmanagedCallersOnly] - internal static void* GroupCreateCallback(ecs_world_t* world, ulong id, void* context) - { - GroupByContext* groupByContext = (GroupByContext*)context; - return ((delegate*)groupByContext->GroupCreate.Invoker)(world, id, groupByContext); - } - - internal static void* GroupCreateCallbackDelegate(ecs_world_t* world, ulong id, GroupByContext* context) - { - ((Ecs.GroupCreateCallback)context->GroupCreate.Delegate.Target!)(world, id); - return null; - } - - internal static void* GroupCreateCallbackPointer(ecs_world_t* world, ulong id, GroupByContext* context) - { - ((delegate*)context->GroupCreate.Pointer)(world, id); - return null; - } - - internal static void* GroupCreateCallbackDelegate(ecs_world_t* world, ulong id, GroupByContext* context) - { - ((Ecs.GroupCreateCallback)context->GroupCreate.Delegate.Target!)(world, id, out T groupContext); - return UserContext.Alloc(ref groupContext); - } - - internal static void* GroupCreateCallbackPointer(ecs_world_t* world, ulong id, GroupByContext* context) - { - ((delegate*)context->GroupCreate.Pointer)(world, id, out T groupContext); - return UserContext.Alloc(ref groupContext); - } - - #endregion - - #region Group Delete Callbacks - - [UnmanagedCallersOnly] - internal static void GroupDeleteCallback(ecs_world_t* world, ulong id, void* userContext, void* context) - { - GroupByContext* groupByContext = (GroupByContext*)context; - ((delegate*)groupByContext->GroupDelete.Invoker)(world, id, (UserContext*)userContext, groupByContext); - } - - internal static void GroupDeleteCallbackDelegate(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) - { - ((Ecs.GroupDeleteCallback)context->GroupDelete.Delegate.Target!)(world, id); - - if (userContext == null) - return; - - userContext->Dispose(); - Memory.Free(userContext); - } - - internal static void GroupDeleteCallbackPointer(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) - { - ((delegate*)context->GroupDelete.Pointer)(world, id); - - if (userContext == null) - return; - - userContext->Dispose(); - Memory.Free(userContext); - } - - internal static void GroupDeleteCallbackDelegate(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) - { - ((Ecs.GroupDeleteCallback)context->GroupDelete.Delegate.Target!)(world, id, ref userContext->Get()); - - if (userContext == null) - return; - - userContext->Dispose(); - Memory.Free(userContext); - } - - internal static void GroupDeleteCallbackPointer(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) - { - ((delegate*)context->GroupDelete.Pointer)(world, id, ref userContext->Get()); - - if (userContext == null) - return; - - userContext->Dispose(); - Memory.Free(userContext); - } - - #endregion - - #region Post Frame Callbacks - - [UnmanagedCallersOnly] - internal static void PostFrameCallback(ecs_world_t* world, void* ctx) - { - PostFrameContext* context = (PostFrameContext*)ctx; - ((delegate*)context->Callback.Invoker)(world, ctx); - } - - internal static void PostFrameCallbackDelegate(ecs_world_t* world, void* ctx) - { - PostFrameContext* context = (PostFrameContext*)ctx; - ((Ecs.PostFrameCallback)context->Callback.Delegate.Target!)(world); - } - - internal static void PostFrameCallbackPointer(ecs_world_t* world, void* ctx) - { - PostFrameContext* context = (PostFrameContext*)ctx; - ((delegate*)context->Callback.Pointer)(world); - } - - #endregion - - #region World Finish Callbacks - - [UnmanagedCallersOnly] - internal static void WorldFinishCallback(ecs_world_t* world, void* ctx) - { - WorldFinishContext* context = (WorldFinishContext*)ctx; - ((delegate*)context->Callback.Invoker)(world, ctx); - } - - internal static void WorldFinishCallbackDelegate(ecs_world_t* world, void* ctx) - { - WorldFinishContext* context = (WorldFinishContext*)ctx; - ((Ecs.WorldFinishCallback)context->Callback.Delegate.Target!)(world); - } - - internal static void WorldFinishCallbackPointer(ecs_world_t* world, void* ctx) - { - WorldFinishContext* context = (WorldFinishContext*)ctx; - ((delegate*)context->Callback.Pointer)(world); - } - - #endregion - - #region App Init Callbacks - - [UnmanagedCallersOnly] - internal static int AppInitCallback(ecs_world_t* world) - { - WorldContext* context = new World(world).GetBindingContext(); - ((delegate*)context->AppInit.Invoker)(world, context); - return 0; - } - - internal static void AppInitCallbackDelegate(World world, WorldContext* context) - { - ((Ecs.AppInitCallback)context->AppInit.Delegate.Target!)(world); - } - - internal static void AppInitCallbackPointer(World world, WorldContext* context) - { - ((delegate*)context->AppInit.Pointer)(world); - } - - #endregion - - #region Os Api Callbacks - - [UnmanagedCallersOnly] - internal static void AbortCallback() - { - ((delegate*)Ecs.Os.Context.Abort.Invoker)(); - } - - internal static void AbortCallbackDelegate() - { - ((Action)Ecs.Os.Context.Abort.Delegate.Target!)(); - } - - internal static void AbortCallbackPointer() - { - ((delegate*)Ecs.Os.Context.Abort.Pointer)(); - } - - [UnmanagedCallersOnly] - internal static void LogCallback(int level, byte* file, int line, byte* message) - { - ((delegate*)Ecs.Os.Context.Log.Invoker)(level, file, line, message); - } - - internal static void LogCallbackDelegate(int level, byte* file, int line, byte* message) - { - ((Ecs.LogCallback)Ecs.Os.Context.Log.Delegate.Target!)(level, NativeString.GetString(file), line, NativeString.GetString(message)); - } - - internal static void LogCallbackPointer(int level, byte* file, int line, byte* message) - { - ((delegate*)Ecs.Os.Context.Log.Pointer)(level, NativeString.GetString(file), line, NativeString.GetString(message)); - } - - #endregion - - #region Resource Hook Callbacks - - [UnmanagedCallersOnly] - internal static void CtorCallback(void* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - ((delegate*)context->Ctor.Invoker)(data, count, typeInfo); - } - - [UnmanagedCallersOnly] - internal static void DtorCallback(void* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - ((delegate*)context->Dtor.Invoker)(data, count, typeInfo); - } - - [UnmanagedCallersOnly] - internal static void MoveCallback(void* dst, void* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - ((delegate*)context->Move.Invoker)(dst, src, count, typeInfo); - } - - [UnmanagedCallersOnly] - internal static void CopyCallback(void* dst, void* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - ((delegate*)context->Copy.Invoker)(dst, src, count, typeInfo); - } - - internal static void DefaultManagedCtorCallback(GCHandle* data, int count, ecs_type_info_t* typeInfo) - { - for (int i = 0; i < count; i++) - data[i] = GCHandle.Alloc(new StrongBox()); - } - - internal static void DefaultManagedDtorCallback(GCHandle* data, int count, ecs_type_info_t* typeInfo) - { - for (int i = 0; i < count; i++) - data[i].Free(); - } - - internal static void DefaultManagedMoveCallback(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) - { - for (int i = 0; i < count; i++) - { - StrongBox dstBox = (StrongBox)dst[i].Target!; - StrongBox srcBox = (StrongBox)src[i].Target!; - dstBox.Value = srcBox.Value!; - } - } - - internal static void DefaultManagedCopyCallback(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) - { - for (int i = 0; i < count; i++) - { - StrongBox dstBox = (StrongBox)dst[i].Target!; - StrongBox srcBox = (StrongBox)src[i].Target!; - dstBox.Value = srcBox.Value!; - } - } - - internal static void ManagedCtorCallbackDelegate(GCHandle* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.CtorCallback callback = (Ecs.CtorCallback)context->Ctor.Delegate.Target!; - - for (int i = 0; i < count; i++) - { - StrongBox box = new(); - callback(ref box.Value!, new TypeInfo(typeInfo)); - data[i] = GCHandle.Alloc(box); - } - } - - internal static void ManagedCtorCallbackPointer(GCHandle* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Ctor.Pointer; - - for (int i = 0; i < count; i++) - { - StrongBox box = new(); - callback(ref box.Value!, new TypeInfo(typeInfo)); - data[i] = GCHandle.Alloc(box); - } - } - - internal static void ManagedDtorCallbackDelegate(GCHandle* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.DtorCallback callback = (Ecs.DtorCallback)context->Dtor.Delegate.Target!; - - for (int i = 0; i < count; i++) - { - StrongBox box = (StrongBox)data[i].Target!; - callback(ref box.Value!, new TypeInfo(typeInfo)); - data[i].Free(); - } - } - - internal static void ManagedDtorCallbackPointer(GCHandle* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Dtor.Pointer; - - for (int i = 0; i < count; i++) - { - StrongBox box = (StrongBox)data[i].Target!; - callback(ref box.Value!, new TypeInfo(typeInfo)); - data[i].Free(); - } - } - - internal static void ManagedMoveCallbackDelegate(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.MoveCallback callback = (Ecs.MoveCallback)context->Move.Delegate.Target!; - - for (int i = 0; i < count; i++) - { - StrongBox dstBox = (StrongBox)dst[i].Target!; - StrongBox srcBox = (StrongBox)src[i].Target!; - callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); - } - } - - internal static void ManagedMoveCallbackPointer(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Move.Pointer; - - for (int i = 0; i < count; i++) - { - StrongBox dstBox = (StrongBox)dst[i].Target!; - StrongBox srcBox = (StrongBox)src[i].Target!; - callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); - } - } - - internal static void ManagedCopyCallbackDelegate(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.CopyCallback callback = (Ecs.CopyCallback)context->Copy.Delegate.Target!; - - for (int i = 0; i < count; i++) - { - StrongBox dstBox = (StrongBox)dst[i].Target!; - StrongBox srcBox = (StrongBox)src[i].Target!; - callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); - } - } - - internal static void ManagedCopyCallbackPointer(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Copy.Pointer; - - for (int i = 0; i < count; i++) - { - StrongBox dstBox = (StrongBox)dst[i].Target!; - StrongBox srcBox = (StrongBox)src[i].Target!; - callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); - } - } - - internal static void UnmanagedCtorCallbackDelegate(T* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.CtorCallback callback = (Ecs.CtorCallback)context->Ctor.Delegate.Target!; - - for (int i = 0; i < count; i++) - callback(ref data[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedCtorCallbackPointer(T* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Ctor.Pointer; - - for (int i = 0; i < count; i++) - callback(ref data[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedDtorCallbackDelegate(T* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.DtorCallback callback = (Ecs.DtorCallback)context->Dtor.Delegate.Target!; - - for (int i = 0; i < count; i++) - callback(ref data[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedDtorCallbackPointer(T* data, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Dtor.Pointer; - - for (int i = 0; i < count; i++) - callback(ref data[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedMoveCallbackDelegate(T* dst, T* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.MoveCallback callback = (Ecs.MoveCallback)context->Move.Delegate.Target!; - - for (int i = 0; i < count; i++) - callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedMoveCallbackPointer(T* dst, T* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Move.Pointer; - - for (int i = 0; i < count; i++) - callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedCopyCallbackDelegate(T* dst, T* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - Ecs.CopyCallback callback = (Ecs.CopyCallback)context->Copy.Delegate.Target!; - - for (int i = 0; i < count; i++) - callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); - } - - internal static void UnmanagedCopyCallbackPointer(T* dst, T* src, int count, ecs_type_info_t* typeInfo) - { - TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; - delegate* callback = (delegate*)context->Copy.Pointer; - - for (int i = 0; i < count; i++) - callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); - } - - #endregion - - #region OnAdd Hook Callbacks - - [UnmanagedCallersOnly] - internal static void OnAddCallback(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - ((delegate*)context->OnAdd.Invoker)(iter); - } - - internal static void OnAddIterFieldCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterFieldCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddIterFieldCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*, void>)context->OnAdd.Pointer); - } - - internal static void OnAddIterSpanCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterSpanCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddIterSpanCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*, void>)context->OnAdd.Pointer); - } - - internal static void OnAddIterPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterPointerCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddIterPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*)context->OnAdd.Pointer); - } - - internal static void OnAddEachRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachRefCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddEachRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); - } - - internal static void OnAddEachEntityRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityRefCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddEachEntityRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); - } - - internal static void OnAddEachIterRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterRefCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddEachIterRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); - } - - internal static void OnAddEachPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachPointerCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddEachPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); - } - - internal static void OnAddEachEntityPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityPointerCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddEachEntityPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); - } - - internal static void OnAddEachIterPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterPointerCallback)context->OnAdd.Delegate.Target!); - } - - internal static void OnAddEachIterPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); - } - - #endregion - - #region OnSet Hook Callbacks - - [UnmanagedCallersOnly] - internal static void OnSetCallback(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - ((delegate*)context->OnSet.Invoker)(iter); - } - - internal static void OnSetIterFieldCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterFieldCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetIterFieldCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*, void>)context->OnSet.Pointer); - } - - internal static void OnSetIterSpanCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterSpanCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetIterSpanCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*, void>)context->OnSet.Pointer); - } - - internal static void OnSetIterPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterPointerCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetIterPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*)context->OnSet.Pointer); - } - - internal static void OnSetEachRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachRefCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetEachRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnSet.Pointer); - } - - internal static void OnSetEachEntityRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityRefCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetEachEntityRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnSet.Pointer); - } - - internal static void OnSetEachIterRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterRefCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetEachIterRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnSet.Pointer); - } - - internal static void OnSetEachPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachPointerCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetEachPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnSet.Pointer); - } - - internal static void OnSetEachEntityPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityPointerCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetEachEntityPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnSet.Pointer); - } - - internal static void OnSetEachIterPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterPointerCallback)context->OnSet.Delegate.Target!); - } - - internal static void OnSetEachIterPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnSet.Pointer); - } - - #endregion - - #region OnRemove Hook Callbacks - - [UnmanagedCallersOnly] - internal static void OnRemoveCallback(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - ((delegate*)context->OnRemove.Invoker)(iter); - } - - internal static void OnRemoveIterFieldCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterFieldCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveIterFieldCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*, void>)context->OnRemove.Pointer); - } - - internal static void OnRemoveIterSpanCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterSpanCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveIterSpanCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*, void>)context->OnRemove.Pointer); - } - - internal static void OnRemoveIterPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (Ecs.IterPointerCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveIterPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Iter(iter, (delegate*)context->OnRemove.Pointer); - } - - internal static void OnRemoveEachRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachRefCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveEachRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); - } - - internal static void OnRemoveEachEntityRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityRefCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveEachEntityRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); - } - - internal static void OnRemoveEachIterRefCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterRefCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveEachIterRefCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); - } - - internal static void OnRemoveEachPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachPointerCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveEachPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); - } - - internal static void OnRemoveEachEntityPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachEntityPointerCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveEachEntityPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); - } - - internal static void OnRemoveEachIterPointerCallbackDelegate(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (Ecs.EachIterPointerCallback)context->OnRemove.Delegate.Target!); - } - - internal static void OnRemoveEachIterPointerCallbackPointer(ecs_iter_t* iter) - { - TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; - Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); - } - - #endregion -} +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Flecs.NET.Utilities; + +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core.BindingContext; + +/// +/// A static class for binding context functions. +/// +internal static unsafe partial class Functions +{ + #region Context Free + + [UnmanagedCallersOnly] + internal static void WorldContextFree(void* context) + { + WorldContext.Free((WorldContext*)context); + } + + [UnmanagedCallersOnly] + internal static void IteratorContextFree(void* context) + { + IteratorContext.Free((IteratorContext*)context); + } + + [UnmanagedCallersOnly] + internal static void RunContextFree(void* context) + { + RunContext.Free((RunContext*)context); + } + + [UnmanagedCallersOnly] + internal static void QueryContextFree(void* context) + { + QueryContext.Free((QueryContext*)context); + } + + [UnmanagedCallersOnly] + internal static void GroupByContextFree(void* context) + { + GroupByContext.Free((GroupByContext*)context); + } + + [UnmanagedCallersOnly] + internal static void TypeHooksContextFree(void* context) + { + TypeHooksContext.Free((TypeHooksContext*)context); + } + + [UnmanagedCallersOnly] + internal static void UserContextFree(void* context) + { + UserContext.Free((UserContext*)context); + } + + internal static void UserContextFinishDelegate(ref UserContext context) + { + ((Ecs.UserContextFinish)context.Callback.Delegate.Target!)(ref context.Get()); + } + + internal static void UserContextFinishPointer(ref UserContext context) + { + ((delegate*)context.Callback.Pointer)(ref context.Get()); + } + + #endregion + + #region Iterator Callbacks + + [UnmanagedCallersOnly] + internal static void IteratorCallback(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + ((delegate*)context->Callback.Invoker)(iter); + } + + internal static void ActionCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + ((Action)context->Callback.Delegate.Target!)(); + } + + internal static void ActionCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + ((delegate*)context->Callback.Pointer)(); + } + + internal static void IterCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterCallback)context->Callback.Delegate.Target!); + } + + internal static void IterCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*)context->Callback.Pointer); + } + + internal static void EachEntityCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityCallback)context->Callback.Delegate.Target!); + } + + internal static void EachEntityCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->Callback.Pointer); + } + + internal static void EachIterCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterCallback)context->Callback.Delegate.Target!); + } + + internal static void EachIterCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->Callback.Pointer); + } + + internal static void ObserveEntityCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (Ecs.ObserveEntityCallback)context->Callback.Delegate.Target!); + } + + internal static void ObserveEntityCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (delegate*)context->Callback.Pointer); + } + + internal static void ObserveRefCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (Ecs.ObserveRefCallback)context->Callback.Delegate.Target!); + } + + internal static void ObserveRefCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (delegate*)context->Callback.Pointer); + } + + internal static void ObservePointerCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (Ecs.ObservePointerCallback)context->Callback.Delegate.Target!); + } + + internal static void ObservePointerCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (delegate*)context->Callback.Pointer); + } + + internal static void ObserveEntityRefCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (Ecs.ObserveEntityRefCallback)context->Callback.Delegate.Target!); + } + + internal static void ObserveEntityRefCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (delegate*)context->Callback.Pointer); + } + + internal static void ObserveEntityPointerCallbackDelegate(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (Ecs.ObserveEntityPointerCallback)context->Callback.Delegate.Target!); + } + + internal static void ObserveEntityPointerCallbackPointer(ecs_iter_t* iter) + { + IteratorContext* context = (IteratorContext*)iter->callback_ctx; + Invoker.Observe(iter, (delegate*)context->Callback.Pointer); + } + + #endregion + + #region Run Callbacks + + [UnmanagedCallersOnly] + internal static void RunCallback(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + ((delegate*)context->Callback.Invoker)(iter); + } + + internal static void RunCallbackDelegate(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + Invoker.Run(iter, (Ecs.RunCallback)context->Callback.Delegate.Target!); + } + + internal static void RunCallbackPointer(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + Invoker.Run(iter, (delegate*)context->Callback.Pointer); + } + + internal static void RunDelegateCallbackDelegate(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + Invoker.Run(iter, (Ecs.RunDelegateCallback)context->Callback.Delegate.Target!); + } + + internal static void RunDelegateCallbackPointer(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + Invoker.Run(iter, (delegate*, void>)context->Callback.Pointer); + } + + internal static void RunPointerCallbackDelegate(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + Invoker.Run(iter, (Ecs.RunPointerCallback)context->Callback.Delegate.Target!); + } + + internal static void RunPointerCallbackPointer(ecs_iter_t* iter) + { + RunContext* context = (RunContext*)iter->run_ctx; + Invoker.Run(iter, (delegate*, void>)context->Callback.Pointer); + } + + #endregion + + #region Group By Callbacks + + [UnmanagedCallersOnly] + internal static ulong GroupByCallback(ecs_world_t* world, ecs_table_t* table, ulong id, void* context) + { + GroupByContext* groupByContext = (GroupByContext*)context; + return ((delegate*)groupByContext->GroupBy.Invoker)(world, table, id, groupByContext); + } + + internal static ulong GroupByCallbackDelegate(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) + { + return ((Ecs.GroupByCallback)context->GroupBy.Delegate.Target!)(world, new Table(world, table), id); + } + + internal static ulong GroupByCallbackPointer(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) + { + return ((delegate*)context->GroupBy.Pointer)(world, new Table(world, table), id); + } + + internal static ulong GroupByCallbackDelegate(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) + { + return ((Ecs.GroupByCallback)context->GroupBy.Delegate.Target!)(world, new Table(world, table), id, ref context->GroupByUserContext.Get()); + } + + internal static ulong GroupByCallbackPointer(ecs_world_t* world, ecs_table_t* table, ulong id, GroupByContext* context) + { + return ((delegate*)context->GroupBy.Pointer)(world, new Table(world, table), id, ref context->GroupByUserContext.Get()); + } + + #endregion + + #region Group Create Callbacks + + [UnmanagedCallersOnly] + internal static void* GroupCreateCallback(ecs_world_t* world, ulong id, void* context) + { + GroupByContext* groupByContext = (GroupByContext*)context; + return ((delegate*)groupByContext->GroupCreate.Invoker)(world, id, groupByContext); + } + + internal static void* GroupCreateCallbackDelegate(ecs_world_t* world, ulong id, GroupByContext* context) + { + ((Ecs.GroupCreateCallback)context->GroupCreate.Delegate.Target!)(world, id); + return null; + } + + internal static void* GroupCreateCallbackPointer(ecs_world_t* world, ulong id, GroupByContext* context) + { + ((delegate*)context->GroupCreate.Pointer)(world, id); + return null; + } + + internal static void* GroupCreateCallbackDelegate(ecs_world_t* world, ulong id, GroupByContext* context) + { + ((Ecs.GroupCreateCallback)context->GroupCreate.Delegate.Target!)(world, id, out T groupContext); + return UserContext.Alloc(ref groupContext); + } + + internal static void* GroupCreateCallbackPointer(ecs_world_t* world, ulong id, GroupByContext* context) + { + ((delegate*)context->GroupCreate.Pointer)(world, id, out T groupContext); + return UserContext.Alloc(ref groupContext); + } + + #endregion + + #region Group Delete Callbacks + + [UnmanagedCallersOnly] + internal static void GroupDeleteCallback(ecs_world_t* world, ulong id, void* userContext, void* context) + { + GroupByContext* groupByContext = (GroupByContext*)context; + ((delegate*)groupByContext->GroupDelete.Invoker)(world, id, (UserContext*)userContext, groupByContext); + } + + internal static void GroupDeleteCallbackDelegate(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) + { + ((Ecs.GroupDeleteCallback)context->GroupDelete.Delegate.Target!)(world, id); + + if (userContext == null) + return; + + userContext->Dispose(); + Memory.Free(userContext); + } + + internal static void GroupDeleteCallbackPointer(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) + { + ((delegate*)context->GroupDelete.Pointer)(world, id); + + if (userContext == null) + return; + + userContext->Dispose(); + Memory.Free(userContext); + } + + internal static void GroupDeleteCallbackDelegate(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) + { + ((Ecs.GroupDeleteCallback)context->GroupDelete.Delegate.Target!)(world, id, ref userContext->Get()); + + if (userContext == null) + return; + + userContext->Dispose(); + Memory.Free(userContext); + } + + internal static void GroupDeleteCallbackPointer(ecs_world_t* world, ulong id, UserContext* userContext, GroupByContext* context) + { + ((delegate*)context->GroupDelete.Pointer)(world, id, ref userContext->Get()); + + if (userContext == null) + return; + + userContext->Dispose(); + Memory.Free(userContext); + } + + #endregion + + #region Post Frame Callbacks + + [UnmanagedCallersOnly] + internal static void PostFrameCallback(ecs_world_t* world, void* ctx) + { + PostFrameContext* context = (PostFrameContext*)ctx; + ((delegate*)context->Callback.Invoker)(world, ctx); + } + + internal static void PostFrameCallbackDelegate(ecs_world_t* world, void* ctx) + { + PostFrameContext* context = (PostFrameContext*)ctx; + ((Ecs.PostFrameCallback)context->Callback.Delegate.Target!)(world); + } + + internal static void PostFrameCallbackPointer(ecs_world_t* world, void* ctx) + { + PostFrameContext* context = (PostFrameContext*)ctx; + ((delegate*)context->Callback.Pointer)(world); + } + + #endregion + + #region World Finish Callbacks + + [UnmanagedCallersOnly] + internal static void WorldFinishCallback(ecs_world_t* world, void* ctx) + { + WorldFinishContext* context = (WorldFinishContext*)ctx; + ((delegate*)context->Callback.Invoker)(world, ctx); + } + + internal static void WorldFinishCallbackDelegate(ecs_world_t* world, void* ctx) + { + WorldFinishContext* context = (WorldFinishContext*)ctx; + ((Ecs.WorldFinishCallback)context->Callback.Delegate.Target!)(world); + } + + internal static void WorldFinishCallbackPointer(ecs_world_t* world, void* ctx) + { + WorldFinishContext* context = (WorldFinishContext*)ctx; + ((delegate*)context->Callback.Pointer)(world); + } + + #endregion + + #region App Init Callbacks + + [UnmanagedCallersOnly] + internal static int AppInitCallback(ecs_world_t* world) + { + WorldContext* context = new World(world).GetBindingContext(); + ((delegate*)context->AppInit.Invoker)(world, context); + return 0; + } + + internal static void AppInitCallbackDelegate(World world, WorldContext* context) + { + ((Ecs.AppInitCallback)context->AppInit.Delegate.Target!)(world); + } + + internal static void AppInitCallbackPointer(World world, WorldContext* context) + { + ((delegate*)context->AppInit.Pointer)(world); + } + + #endregion + + #region Os Api Callbacks + + [UnmanagedCallersOnly] + internal static void AbortCallback() + { + ((delegate*)Ecs.Os.Context.Abort.Invoker)(); + } + + internal static void AbortCallbackDelegate() + { + ((Action)Ecs.Os.Context.Abort.Delegate.Target!)(); + } + + internal static void AbortCallbackPointer() + { + ((delegate*)Ecs.Os.Context.Abort.Pointer)(); + } + + [UnmanagedCallersOnly] + internal static void LogCallback(int level, byte* file, int line, byte* message) + { + ((delegate*)Ecs.Os.Context.Log.Invoker)(level, file, line, message); + } + + internal static void LogCallbackDelegate(int level, byte* file, int line, byte* message) + { + ((Ecs.LogCallback)Ecs.Os.Context.Log.Delegate.Target!)(level, NativeString.GetString(file), line, NativeString.GetString(message)); + } + + internal static void LogCallbackPointer(int level, byte* file, int line, byte* message) + { + ((delegate*)Ecs.Os.Context.Log.Pointer)(level, NativeString.GetString(file), line, NativeString.GetString(message)); + } + + [UnmanagedCallersOnly] + internal static void TracePushCallback(byte* file, ulong line, byte* message) + { + ((delegate*)Ecs.Os.Context.TracePush.Invoker)(file, line, message); + } + + internal static void TracePushCallbackDelegate(byte* file, ulong line, byte* message) + { + ((Ecs.TraceCallback)Ecs.Os.Context.TracePush.Delegate.Target!)(NativeString.GetString(file), line, NativeString.GetString(message)); + } + + internal static void TracePushCallbackPointer(byte* file, ulong line, byte* message) + { + ((delegate*)Ecs.Os.Context.TracePush.Pointer)(NativeString.GetString(file), line, NativeString.GetString(message)); + } + + [UnmanagedCallersOnly] + internal static void TracePopCallback(byte* file, ulong line, byte* message) + { + ((delegate*)Ecs.Os.Context.TracePop.Invoker)(file, line, message); + } + + internal static void TracePopCallbackDelegate(byte* file, ulong line, byte* message) + { + ((Ecs.TraceCallback)Ecs.Os.Context.TracePop.Delegate.Target!)(NativeString.GetString(file), line, NativeString.GetString(message)); + } + + internal static void TracePopCallbackPointer(byte* file, ulong line, byte* message) + { + ((delegate*)Ecs.Os.Context.TracePop.Pointer)(NativeString.GetString(file), line, NativeString.GetString(message)); + } + + #endregion + + #region Resource Hook Callbacks + + [UnmanagedCallersOnly] + internal static void CtorCallback(void* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + ((delegate*)context->Ctor.Invoker)(data, count, typeInfo); + } + + [UnmanagedCallersOnly] + internal static void DtorCallback(void* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + ((delegate*)context->Dtor.Invoker)(data, count, typeInfo); + } + + [UnmanagedCallersOnly] + internal static void MoveCallback(void* dst, void* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + ((delegate*)context->Move.Invoker)(dst, src, count, typeInfo); + } + + [UnmanagedCallersOnly] + internal static void CopyCallback(void* dst, void* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + ((delegate*)context->Copy.Invoker)(dst, src, count, typeInfo); + } + + internal static void DefaultManagedCtorCallback(GCHandle* data, int count, ecs_type_info_t* typeInfo) + { + for (int i = 0; i < count; i++) + data[i] = GCHandle.Alloc(new StrongBox()); + } + + internal static void DefaultManagedDtorCallback(GCHandle* data, int count, ecs_type_info_t* typeInfo) + { + for (int i = 0; i < count; i++) + data[i].Free(); + } + + internal static void DefaultManagedMoveCallback(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) + { + for (int i = 0; i < count; i++) + { + StrongBox dstBox = (StrongBox)dst[i].Target!; + StrongBox srcBox = (StrongBox)src[i].Target!; + dstBox.Value = srcBox.Value!; + } + } + + internal static void DefaultManagedCopyCallback(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) + { + for (int i = 0; i < count; i++) + { + StrongBox dstBox = (StrongBox)dst[i].Target!; + StrongBox srcBox = (StrongBox)src[i].Target!; + dstBox.Value = srcBox.Value!; + } + } + + internal static void ManagedCtorCallbackDelegate(GCHandle* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.CtorCallback callback = (Ecs.CtorCallback)context->Ctor.Delegate.Target!; + + for (int i = 0; i < count; i++) + { + StrongBox box = new(); + callback(ref box.Value!, new TypeInfo(typeInfo)); + data[i] = GCHandle.Alloc(box); + } + } + + internal static void ManagedCtorCallbackPointer(GCHandle* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Ctor.Pointer; + + for (int i = 0; i < count; i++) + { + StrongBox box = new(); + callback(ref box.Value!, new TypeInfo(typeInfo)); + data[i] = GCHandle.Alloc(box); + } + } + + internal static void ManagedDtorCallbackDelegate(GCHandle* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.DtorCallback callback = (Ecs.DtorCallback)context->Dtor.Delegate.Target!; + + for (int i = 0; i < count; i++) + { + StrongBox box = (StrongBox)data[i].Target!; + callback(ref box.Value!, new TypeInfo(typeInfo)); + data[i].Free(); + } + } + + internal static void ManagedDtorCallbackPointer(GCHandle* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Dtor.Pointer; + + for (int i = 0; i < count; i++) + { + StrongBox box = (StrongBox)data[i].Target!; + callback(ref box.Value!, new TypeInfo(typeInfo)); + data[i].Free(); + } + } + + internal static void ManagedMoveCallbackDelegate(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.MoveCallback callback = (Ecs.MoveCallback)context->Move.Delegate.Target!; + + for (int i = 0; i < count; i++) + { + StrongBox dstBox = (StrongBox)dst[i].Target!; + StrongBox srcBox = (StrongBox)src[i].Target!; + callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); + } + } + + internal static void ManagedMoveCallbackPointer(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Move.Pointer; + + for (int i = 0; i < count; i++) + { + StrongBox dstBox = (StrongBox)dst[i].Target!; + StrongBox srcBox = (StrongBox)src[i].Target!; + callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); + } + } + + internal static void ManagedCopyCallbackDelegate(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.CopyCallback callback = (Ecs.CopyCallback)context->Copy.Delegate.Target!; + + for (int i = 0; i < count; i++) + { + StrongBox dstBox = (StrongBox)dst[i].Target!; + StrongBox srcBox = (StrongBox)src[i].Target!; + callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); + } + } + + internal static void ManagedCopyCallbackPointer(GCHandle* dst, GCHandle* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Copy.Pointer; + + for (int i = 0; i < count; i++) + { + StrongBox dstBox = (StrongBox)dst[i].Target!; + StrongBox srcBox = (StrongBox)src[i].Target!; + callback(ref dstBox.Value!, ref srcBox.Value!, new TypeInfo(typeInfo)); + } + } + + internal static void UnmanagedCtorCallbackDelegate(T* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.CtorCallback callback = (Ecs.CtorCallback)context->Ctor.Delegate.Target!; + + for (int i = 0; i < count; i++) + callback(ref data[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedCtorCallbackPointer(T* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Ctor.Pointer; + + for (int i = 0; i < count; i++) + callback(ref data[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedDtorCallbackDelegate(T* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.DtorCallback callback = (Ecs.DtorCallback)context->Dtor.Delegate.Target!; + + for (int i = 0; i < count; i++) + callback(ref data[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedDtorCallbackPointer(T* data, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Dtor.Pointer; + + for (int i = 0; i < count; i++) + callback(ref data[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedMoveCallbackDelegate(T* dst, T* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.MoveCallback callback = (Ecs.MoveCallback)context->Move.Delegate.Target!; + + for (int i = 0; i < count; i++) + callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedMoveCallbackPointer(T* dst, T* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Move.Pointer; + + for (int i = 0; i < count; i++) + callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedCopyCallbackDelegate(T* dst, T* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + Ecs.CopyCallback callback = (Ecs.CopyCallback)context->Copy.Delegate.Target!; + + for (int i = 0; i < count; i++) + callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); + } + + internal static void UnmanagedCopyCallbackPointer(T* dst, T* src, int count, ecs_type_info_t* typeInfo) + { + TypeHooksContext* context = (TypeHooksContext*)typeInfo->hooks.binding_ctx; + delegate* callback = (delegate*)context->Copy.Pointer; + + for (int i = 0; i < count; i++) + callback(ref dst[i], ref src[i], new TypeInfo(typeInfo)); + } + + #endregion + + #region OnAdd Hook Callbacks + + [UnmanagedCallersOnly] + internal static void OnAddCallback(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + ((delegate*)context->OnAdd.Invoker)(iter); + } + + internal static void OnAddIterFieldCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterFieldCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddIterFieldCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*, void>)context->OnAdd.Pointer); + } + + internal static void OnAddIterSpanCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterSpanCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddIterSpanCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*, void>)context->OnAdd.Pointer); + } + + internal static void OnAddIterPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterPointerCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddIterPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*)context->OnAdd.Pointer); + } + + internal static void OnAddEachRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachRefCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddEachRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); + } + + internal static void OnAddEachEntityRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityRefCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddEachEntityRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); + } + + internal static void OnAddEachIterRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterRefCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddEachIterRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); + } + + internal static void OnAddEachPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachPointerCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddEachPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); + } + + internal static void OnAddEachEntityPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityPointerCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddEachEntityPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); + } + + internal static void OnAddEachIterPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterPointerCallback)context->OnAdd.Delegate.Target!); + } + + internal static void OnAddEachIterPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnAdd.Pointer); + } + + #endregion + + #region OnSet Hook Callbacks + + [UnmanagedCallersOnly] + internal static void OnSetCallback(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + ((delegate*)context->OnSet.Invoker)(iter); + } + + internal static void OnSetIterFieldCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterFieldCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetIterFieldCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*, void>)context->OnSet.Pointer); + } + + internal static void OnSetIterSpanCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterSpanCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetIterSpanCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*, void>)context->OnSet.Pointer); + } + + internal static void OnSetIterPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterPointerCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetIterPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*)context->OnSet.Pointer); + } + + internal static void OnSetEachRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachRefCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetEachRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnSet.Pointer); + } + + internal static void OnSetEachEntityRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityRefCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetEachEntityRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnSet.Pointer); + } + + internal static void OnSetEachIterRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterRefCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetEachIterRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnSet.Pointer); + } + + internal static void OnSetEachPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachPointerCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetEachPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnSet.Pointer); + } + + internal static void OnSetEachEntityPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityPointerCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetEachEntityPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnSet.Pointer); + } + + internal static void OnSetEachIterPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterPointerCallback)context->OnSet.Delegate.Target!); + } + + internal static void OnSetEachIterPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnSet.Pointer); + } + + #endregion + + #region OnRemove Hook Callbacks + + [UnmanagedCallersOnly] + internal static void OnRemoveCallback(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + ((delegate*)context->OnRemove.Invoker)(iter); + } + + internal static void OnRemoveIterFieldCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterFieldCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveIterFieldCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*, void>)context->OnRemove.Pointer); + } + + internal static void OnRemoveIterSpanCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterSpanCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveIterSpanCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*, void>)context->OnRemove.Pointer); + } + + internal static void OnRemoveIterPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (Ecs.IterPointerCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveIterPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Iter(iter, (delegate*)context->OnRemove.Pointer); + } + + internal static void OnRemoveEachRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachRefCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveEachRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); + } + + internal static void OnRemoveEachEntityRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityRefCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveEachEntityRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); + } + + internal static void OnRemoveEachIterRefCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterRefCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveEachIterRefCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); + } + + internal static void OnRemoveEachPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachPointerCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveEachPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); + } + + internal static void OnRemoveEachEntityPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachEntityPointerCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveEachEntityPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); + } + + internal static void OnRemoveEachIterPointerCallbackDelegate(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (Ecs.EachIterPointerCallback)context->OnRemove.Delegate.Target!); + } + + internal static void OnRemoveEachIterPointerCallbackPointer(ecs_iter_t* iter) + { + TypeHooksContext* context = (TypeHooksContext*)iter->callback_ctx; + Invoker.Each(iter, (delegate*)context->OnRemove.Pointer); + } + + #endregion +} diff --git a/src/Flecs.NET/Core/BindingContext/OsApiContext.cs b/src/Flecs.NET/Core/BindingContext/OsApiContext.cs index 39633324..49701ad7 100644 --- a/src/Flecs.NET/Core/BindingContext/OsApiContext.cs +++ b/src/Flecs.NET/Core/BindingContext/OsApiContext.cs @@ -1,30 +1,34 @@ -using System; -using Flecs.NET.Utilities; - -namespace Flecs.NET.Core.BindingContext; - -internal unsafe struct OsApiContext : IDisposable -{ - public Callback Abort; - public Callback Log; - - public void Dispose() - { - Abort.Dispose(); - Log.Dispose(); - } - - public static void Free(OsApiContext* context) - { - if (context == null) - return; - context->Dispose(); - Memory.Free(context); - } - - public static void Free(ref OsApiContext context) - { - fixed (OsApiContext* ptr = &context) - Free(ptr); - } -} +using System; +using Flecs.NET.Utilities; + +namespace Flecs.NET.Core.BindingContext; + +internal unsafe struct OsApiContext : IDisposable +{ + public Callback Abort; + public Callback Log; + public Callback TracePush; + public Callback TracePop; + + public void Dispose() + { + Abort.Dispose(); + Log.Dispose(); + TracePush.Dispose(); + TracePop.Dispose(); + } + + public static void Free(OsApiContext* context) + { + if (context == null) + return; + context->Dispose(); + Memory.Free(context); + } + + public static void Free(ref OsApiContext context) + { + fixed (OsApiContext* ptr = &context) + Free(ptr); + } +} diff --git a/src/Flecs.NET/Core/Ecs/Aliases.cs b/src/Flecs.NET/Core/Ecs/Aliases.cs index 3ffefdfe..448f4b11 100644 --- a/src/Flecs.NET/Core/Ecs/Aliases.cs +++ b/src/Flecs.NET/Core/Ecs/Aliases.cs @@ -1,663 +1,662 @@ -#pragma warning disable CA1707, CA1708 - -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public static partial class Ecs -{ - // Enums - - /// - /// Equivalent to - /// - public const ecs_inout_kind_t InOutDefault = EcsInOutDefault; - - /// - /// Equivalent to - /// - public const ecs_inout_kind_t InOutNone = EcsInOutNone; - - /// - /// Equivalent to - /// - public const ecs_inout_kind_t InOutFilter = EcsInOutFilter; - - /// - /// Equivalent to - /// - public const ecs_inout_kind_t InOut = EcsInOut; - - /// - /// Equivalent to - /// - public const ecs_inout_kind_t In = EcsIn; - - /// - /// Equivalent to - /// - public const ecs_inout_kind_t Out = EcsOut; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t And = EcsAnd; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t Or = EcsOr; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t Not = EcsNot; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t Optional = EcsOptional; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t AndFrom = EcsAndFrom; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t OrFrom = EcsOrFrom; - - /// - /// Equivalent to - /// - public const ecs_oper_kind_t NotFrom = EcsNotFrom; - - /// - /// Equivalent to - /// - public const ecs_query_cache_kind_t QueryCacheDefault = EcsQueryCacheDefault; - - /// - /// Equivalent to - /// - public const ecs_query_cache_kind_t QueryCacheAuto = EcsQueryCacheAuto; - - /// - /// Equivalent to - /// - public const ecs_query_cache_kind_t QueryCacheAll = EcsQueryCacheAll; - - /// - /// Equivalent to - /// - public const ecs_query_cache_kind_t QueryCacheNone = EcsQueryCacheNone; - - - // Built-in term flags - - /// - /// Equivalent to - /// - public const ulong Self = EcsSelf; - - /// - /// Equivalent to - /// - public const ulong Up = EcsUp; - - /// - /// Equivalent to - /// - public const ulong Trav = EcsTrav; - - /// - /// Equivalent to - /// - public const ulong Cascade = EcsCascade; - - /// - /// Equivalent to - /// - public const ulong Desc = EcsDesc; - - /// - /// Equivalent to - /// - public const ulong IsVariable = EcsIsVariable; - - /// - /// Equivalent to - /// - public const ulong IsEntity = EcsIsEntity; - - /// - /// Equivalent to - /// - public const ulong IsName = EcsIsName; - - /// - /// Equivalent to - /// - public const ulong TraverseFlags = EcsTraverseFlags; - - /// - /// Equivalent to - /// - public const ulong TermRefFlags = EcsTermRefFlags; - - // Id bit flags - - /// - /// Reference to . - /// - public static ref ulong PAIR => ref ECS_PAIR; - - /// - /// Reference to . - /// - public static ref ulong AUTO_OVERRIDE => ref ECS_AUTO_OVERRIDE; - - /// - /// Reference to . - /// - public static ref ulong TOGGLE => ref ECS_TOGGLE; - - // Built-in tags - - /// - /// Reference to . - /// - public static ref ulong Query => ref EcsQuery; - - /// - /// Reference to . - /// - public static ref ulong Observer => ref EcsObserver; - - /// - /// Reference to . - /// - public static ref ulong Private => ref EcsPrivate; - - /// - /// Reference to . - /// - public static ref ulong Module => ref EcsModule; - - /// - /// Reference to . - /// - public static ref ulong Prefab => ref EcsPrefab; - - /// - /// Reference to . - /// - public static ref ulong Disabled => ref EcsDisabled; - - /// - /// Reference to . - /// - public static ref ulong Empty => ref EcsEmpty; - - /// - /// Reference to . - /// - public static ref ulong Monitor => ref EcsMonitor; - - /// - /// Reference to . - /// - public static ref ulong System => ref EcsSystem; - - /// - /// Reference to . - /// - public static ref ulong Pipeline => ref FLECS_IDEcsPipelineID_; - - /// - /// Reference to . - /// - public static ref ulong Phase => ref EcsPhase; - - /// - /// Reference to . - /// - public static ref ulong Constant => ref EcsConstant; - - // Built-in event tags - - /// - /// Reference to . - /// - public static ref ulong OnAdd => ref EcsOnAdd; - - /// - /// Reference to . - /// - public static ref ulong OnRemove => ref EcsOnRemove; - - /// - /// Reference to . - /// - public static ref ulong OnSet => ref EcsOnSet; - - /// - /// Reference to . - /// - public static ref ulong OnTableCreate => ref EcsOnTableCreate; - - /// - /// Reference to . - /// - public static ref ulong OnTableDelete => ref EcsOnTableDelete; - - // Built-in entity ids - - /// - /// Reference to . - /// - public static ref ulong Flecs => ref EcsFlecs; - - /// - /// Reference to . - /// - public static ref ulong FlecsCore => ref EcsFlecsCore; - - /// - /// Reference to . - /// - public static ref ulong World => ref EcsWorld; - - // Component Traits - - /// - /// Reference to . - /// - public static ref ulong Wildcard => ref EcsWildcard; - - /// - /// Reference to . - /// - public static ref ulong Any => ref EcsAny; - - /// - /// Reference to . - /// - public static ref ulong This => ref EcsThis; - - /// - /// Reference to . - /// - public static ref ulong Transitive => ref EcsTransitive; - - /// - /// Reference to . - /// - public static ref ulong Reflexive => ref EcsReflexive; - - /// - /// Reference to . - /// - public static ref ulong Final => ref EcsFinal; - - /// - /// Reference to . - /// - public static ref ulong Inheritable => ref EcsInheritable; - - /// - /// Reference to . - /// - public static ref ulong PairIsTag => ref EcsPairIsTag; - - /// - /// Reference to . - /// - public static ref ulong Exclusive => ref EcsExclusive; - - /// - /// Reference to . - /// - public static ref ulong Acyclic => ref EcsAcyclic; - - /// - /// Reference to . - /// - public static ref ulong Traversable => ref EcsTraversable; - - /// - /// Reference to . - /// - public static ref ulong Symmetric => ref EcsSymmetric; - - /// - /// Reference to . - /// - public static ref ulong With => ref EcsWith; - - /// - /// Reference to . - /// - public static ref ulong OneOf => ref EcsOneOf; - - /// - /// Reference to . - /// - public static ref ulong Trait => ref EcsTrait; - - /// - /// Reference to . - /// - public static ref ulong Relationship => ref EcsRelationship; - - /// - /// Reference to . - /// - public static ref ulong Target => ref EcsTarget; - - /// - /// Reference to . - /// - public static ref ulong CanToggle => ref EcsCanToggle; - - // OnInstantiate Trait - - /// - /// Reference to . - /// - public static ref ulong OnInstantiate => ref EcsOnInstantiate; - - /// - /// Reference to . - /// - public static ref ulong Override => ref EcsOverride; - - /// - /// Reference to . - /// - public static ref ulong Inherit => ref EcsInherit; - - /// - /// Reference to . - /// - public static ref ulong DontInherit => ref EcsDontInherit; - - // OnDelete/OnDeleteTarget Traits - - /// - /// Reference to . - /// - public static ref ulong OnDelete => ref EcsOnDelete; - - /// - /// Reference to . - /// - public static ref ulong OnDeleteTarget => ref EcsOnDeleteTarget; - - /// - /// Reference to . - /// - public static ref ulong Remove => ref EcsRemove; - - /// - /// Reference to . - /// - public static ref ulong Delete => ref EcsDelete; - - /// - /// Reference to . - /// - public static ref ulong Panic => ref EcsPanic; - - // Built-in relationships - - /// - /// Reference to . - /// - public static ref ulong IsA => ref EcsIsA; - - /// - /// Reference to . - /// - public static ref ulong ChildOf => ref EcsChildOf; - - /// - /// Reference to . - /// - public static ref ulong DependsOn => ref EcsDependsOn; - - /// - /// Reference to . - /// - public static ref ulong SlotOf => ref EcsSlotOf; - - // Built-in identifiers - - /// - /// Reference to . - /// - public static ref ulong Name => ref EcsName; - - /// - /// Reference to . - /// - public static ref ulong Symbol => ref EcsSymbol; - - // Storage - - /// - /// Reference to . - /// - public static ref ulong Sparse => ref EcsSparse; - - /// - /// Reference to . - /// - public static ref ulong Union => ref EcsUnion; - - // Built-in predicates for comparing entity ids in queries. - - /// - /// Reference to . - /// - public static ref ulong PredEq => ref EcsPredEq; - - /// - /// Reference to . - /// - public static ref ulong PredMatch => ref EcsPredMatch; - - /// - /// Reference to . - /// - public static ref ulong PredLookup => ref EcsPredLookup; - - // Built-in marker entities for query scopes - - /// - /// Reference to . - /// - public static ref ulong ScopeOpen => ref EcsScopeOpen; - - /// - /// Reference to . - /// - public static ref ulong ScopeClose => ref EcsScopeClose; - - // Built-in pipeline tags - - /// - /// Reference to . - /// - public static ref ulong OnStart => ref EcsOnStart; - - /// - /// Reference to . - /// - public static ref ulong PreFrame => ref EcsPreFrame; - - /// - /// Reference to . - /// - public static ref ulong OnLoad => ref EcsOnLoad; - - /// - /// Reference to . - /// - public static ref ulong PostLoad => ref EcsPostLoad; - - /// - /// Reference to . - /// - public static ref ulong PreUpdate => ref EcsPreUpdate; - - /// - /// Reference to . - /// - public static ref ulong OnUpdate => ref EcsOnUpdate; - - /// - /// Reference to . - /// - public static ref ulong OnValidate => ref EcsOnValidate; - - /// - /// Reference to . - /// - public static ref ulong PostUpdate => ref EcsPostUpdate; - - /// - /// Reference to . - /// - public static ref ulong PreStore => ref EcsPreStore; - - /// - /// Reference to . - /// - public static ref ulong OnStore => ref EcsOnStore; - - /// - /// Reference to . - /// - public static ref ulong PostFrame => ref EcsPostFrame; - - // Built-in reflection types - - /// - /// Reference to . - /// - public static ref ulong Bool => ref FLECS_IDecs_bool_tID_; - - /// - /// Reference to . - /// - public static ref ulong Char => ref FLECS_IDecs_char_tID_; - - /// - /// Reference to . - /// - public static ref ulong Byte => ref FLECS_IDecs_byte_tID_; - - /// - /// Reference to . - /// - public static ref ulong U8 => ref FLECS_IDecs_u8_tID_; - - /// - /// Reference to . - /// - public static ref ulong U16 => ref FLECS_IDecs_u16_tID_; - - /// - /// Reference to . - /// - public static ref ulong U32 => ref FLECS_IDecs_u32_tID_; - - /// - /// Reference to . - /// - public static ref ulong U64 => ref FLECS_IDecs_u64_tID_; - - /// - /// Reference to . - /// - public static ref ulong Uptr => ref FLECS_IDecs_uptr_tID_; - - /// - /// Reference to . - /// - public static ref ulong I8 => ref FLECS_IDecs_i8_tID_; - - /// - /// Reference to . - /// - public static ref ulong I16 => ref FLECS_IDecs_i16_tID_; - - /// - /// Reference to . - /// - public static ref ulong I32 => ref FLECS_IDecs_i32_tID_; - - /// - /// Reference to . - /// - public static ref ulong I64 => ref FLECS_IDecs_i64_tID_; - - /// - /// Reference to . - /// - public static ref ulong Iptr => ref FLECS_IDecs_iptr_tID_; - - /// - /// Reference to . - /// - public static ref ulong F32 => ref FLECS_IDecs_f32_tID_; - - /// - /// Reference to . - /// - public static ref ulong F64 => ref FLECS_IDecs_f64_tID_; - - /// - /// Reference to . - /// - public static ref ulong String => ref FLECS_IDecs_string_tID_; - - /// - /// Reference to . - /// - public static ref ulong Entity => ref FLECS_IDecs_entity_tID_; - - /// - /// Reference to . - /// - public static ref ulong Quantity => ref EcsQuantity; - - /// - /// Query must match prefabs. - /// - public const uint QueryMatchPrefab = EcsQueryMatchPrefab; - - /// - /// Query must match disabled entities. - /// - public const uint QueryMatchDisabled = EcsQueryMatchDisabled; - - /// - /// Query must match empty tables. - /// - public const uint QueryMatchEmptyTables = EcsQueryMatchEmptyTables; - - /// - /// Query may have unresolved entity identifiers. - /// - public const uint QueryAllowUnresolvedByName = EcsQueryAllowUnresolvedByName; - - /// - /// Query only returns whole tables (ignores toggle/member fields). - /// - public const uint QueryTableOnly = EcsQueryTableOnly; -} - -#pragma warning restore CA1707, CA1708 +#pragma warning disable CA1707, CA1708 + +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public static partial class Ecs +{ + // Enums + + /// + /// Equivalent to + /// + public const ecs_inout_kind_t InOutDefault = EcsInOutDefault; + + /// + /// Equivalent to + /// + public const ecs_inout_kind_t InOutNone = EcsInOutNone; + + /// + /// Equivalent to + /// + public const ecs_inout_kind_t InOutFilter = EcsInOutFilter; + + /// + /// Equivalent to + /// + public const ecs_inout_kind_t InOut = EcsInOut; + + /// + /// Equivalent to + /// + public const ecs_inout_kind_t In = EcsIn; + + /// + /// Equivalent to + /// + public const ecs_inout_kind_t Out = EcsOut; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t And = EcsAnd; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t Or = EcsOr; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t Not = EcsNot; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t Optional = EcsOptional; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t AndFrom = EcsAndFrom; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t OrFrom = EcsOrFrom; + + /// + /// Equivalent to + /// + public const ecs_oper_kind_t NotFrom = EcsNotFrom; + + /// + /// Equivalent to + /// + public const ecs_query_cache_kind_t QueryCacheDefault = EcsQueryCacheDefault; + + /// + /// Equivalent to + /// + public const ecs_query_cache_kind_t QueryCacheAuto = EcsQueryCacheAuto; + + /// + /// Equivalent to + /// + public const ecs_query_cache_kind_t QueryCacheAll = EcsQueryCacheAll; + + /// + /// Equivalent to + /// + public const ecs_query_cache_kind_t QueryCacheNone = EcsQueryCacheNone; + + + // Built-in term flags + + /// + /// Equivalent to + /// + public const ulong Self = EcsSelf; + + /// + /// Equivalent to + /// + public const ulong Up = EcsUp; + + /// + /// Equivalent to + /// + public const ulong Trav = EcsTrav; + + /// + /// Equivalent to + /// + public const ulong Cascade = EcsCascade; + + /// + /// Equivalent to + /// + public const ulong Desc = EcsDesc; + + /// + /// Equivalent to + /// + public const ulong IsVariable = EcsIsVariable; + + /// + /// Equivalent to + /// + public const ulong IsEntity = EcsIsEntity; + + /// + /// Equivalent to + /// + public const ulong IsName = EcsIsName; + + /// + /// Equivalent to + /// + public const ulong TraverseFlags = EcsTraverseFlags; + + /// + /// Equivalent to + /// + public const ulong TermRefFlags = EcsTermRefFlags; + + // Id bit flags + + /// + /// Reference to . + /// + public static ref ulong PAIR => ref ECS_PAIR; + + /// + /// Reference to . + /// + public static ref ulong AUTO_OVERRIDE => ref ECS_AUTO_OVERRIDE; + + /// + /// Reference to . + /// + public static ref ulong TOGGLE => ref ECS_TOGGLE; + + // Built-in tags + + /// + /// Reference to . + /// + public static ref ulong Query => ref EcsQuery; + + /// + /// Reference to . + /// + public static ref ulong Observer => ref EcsObserver; + + /// + /// Reference to . + /// + public static ref ulong Private => ref EcsPrivate; + + /// + /// Reference to . + /// + public static ref ulong Module => ref EcsModule; + + /// + /// Reference to . + /// + public static ref ulong Prefab => ref EcsPrefab; + + /// + /// Reference to . + /// + public static ref ulong Disabled => ref EcsDisabled; + + /// + /// Reference to . + /// + public static ref ulong Empty => ref EcsEmpty; + + /// + /// Reference to . + /// + public static ref ulong Monitor => ref EcsMonitor; + + /// + /// Reference to . + /// + public static ref ulong System => ref EcsSystem; + + /// + /// Reference to . + /// + public static ref ulong Pipeline => ref FLECS_IDEcsPipelineID_; + + /// + /// Reference to . + /// + public static ref ulong Phase => ref EcsPhase; + + /// + /// Reference to . + /// + public static ref ulong Constant => ref EcsConstant; + + // Built-in event tags + + /// + /// Reference to . + /// + public static ref ulong OnAdd => ref EcsOnAdd; + + /// + /// Reference to . + /// + public static ref ulong OnRemove => ref EcsOnRemove; + + /// + /// Reference to . + /// + public static ref ulong OnSet => ref EcsOnSet; + + /// + /// Reference to . + /// + public static ref ulong OnTableCreate => ref EcsOnTableCreate; + + /// + /// Reference to . + /// + public static ref ulong OnTableDelete => ref EcsOnTableDelete; + + // Built-in entity ids + + /// + /// Reference to . + /// + public static ref ulong Flecs => ref EcsFlecs; + + /// + /// Reference to . + /// + public static ref ulong FlecsCore => ref EcsFlecsCore; + + /// + /// Reference to . + /// + public static ref ulong World => ref EcsWorld; + + // Component Traits + + /// + /// Reference to . + /// + public static ref ulong Wildcard => ref EcsWildcard; + + /// + /// Reference to . + /// + public static ref ulong Any => ref EcsAny; + + /// + /// Reference to . + /// + public static ref ulong This => ref EcsThis; + + /// + /// Reference to . + /// + public static ref ulong Transitive => ref EcsTransitive; + + /// + /// Reference to . + /// + public static ref ulong Reflexive => ref EcsReflexive; + + /// + /// Reference to . + /// + public static ref ulong Final => ref EcsFinal; + + /// + /// Reference to . + /// + public static ref ulong Inheritable => ref EcsInheritable; + + /// + /// Reference to . + /// + public static ref ulong PairIsTag => ref EcsPairIsTag; + + /// + /// Reference to . + /// + public static ref ulong Exclusive => ref EcsExclusive; + + /// + /// Reference to . + /// + public static ref ulong Acyclic => ref EcsAcyclic; + + /// + /// Reference to . + /// + public static ref ulong Traversable => ref EcsTraversable; + + /// + /// Reference to . + /// + public static ref ulong Symmetric => ref EcsSymmetric; + + /// + /// Reference to . + /// + public static ref ulong With => ref EcsWith; + + /// + /// Reference to . + /// + public static ref ulong OneOf => ref EcsOneOf; + + /// + /// Reference to . + /// + public static ref ulong Trait => ref EcsTrait; + + /// + /// Reference to . + /// + public static ref ulong Relationship => ref EcsRelationship; + + /// + /// Reference to . + /// + public static ref ulong Target => ref EcsTarget; + + /// + /// Reference to . + /// + public static ref ulong CanToggle => ref EcsCanToggle; + + // OnInstantiate Trait + + /// + /// Reference to . + /// + public static ref ulong OnInstantiate => ref EcsOnInstantiate; + + /// + /// Reference to . + /// + public static ref ulong Override => ref EcsOverride; + + /// + /// Reference to . + /// + public static ref ulong Inherit => ref EcsInherit; + + /// + /// Reference to . + /// + public static ref ulong DontInherit => ref EcsDontInherit; + + // OnDelete/OnDeleteTarget Traits + + /// + /// Reference to . + /// + public static ref ulong OnDelete => ref EcsOnDelete; + + /// + /// Reference to . + /// + public static ref ulong OnDeleteTarget => ref EcsOnDeleteTarget; + + /// + /// Reference to . + /// + public static ref ulong Remove => ref EcsRemove; + + /// + /// Reference to . + /// + public static ref ulong Delete => ref EcsDelete; + + /// + /// Reference to . + /// + public static ref ulong Panic => ref EcsPanic; + + // Built-in relationships + + /// + /// Reference to . + /// + public static ref ulong IsA => ref EcsIsA; + + /// + /// Reference to . + /// + public static ref ulong ChildOf => ref EcsChildOf; + + /// + /// Reference to . + /// + public static ref ulong DependsOn => ref EcsDependsOn; + + /// + /// Reference to . + /// + public static ref ulong SlotOf => ref EcsSlotOf; + + public static ref ulong OrderedChildren => ref EcsOrderedChildren; + + // Built-in identifiers + + /// + /// Reference to . + /// + public static ref ulong Name => ref EcsName; + + /// + /// Reference to . + /// + public static ref ulong Symbol => ref EcsSymbol; + + // Storage + + /// + /// Reference to . + /// + public static ref ulong Sparse => ref EcsSparse; + + public static ref ulong DontFragment => ref EcsDontFragment; + + // Built-in predicates for comparing entity ids in queries. + + /// + /// Reference to . + /// + public static ref ulong PredEq => ref EcsPredEq; + + /// + /// Reference to . + /// + public static ref ulong PredMatch => ref EcsPredMatch; + + /// + /// Reference to . + /// + public static ref ulong PredLookup => ref EcsPredLookup; + + // Built-in marker entities for query scopes + + /// + /// Reference to . + /// + public static ref ulong ScopeOpen => ref EcsScopeOpen; + + /// + /// Reference to . + /// + public static ref ulong ScopeClose => ref EcsScopeClose; + + // Built-in pipeline tags + + /// + /// Reference to . + /// + public static ref ulong OnStart => ref EcsOnStart; + + /// + /// Reference to . + /// + public static ref ulong PreFrame => ref EcsPreFrame; + + /// + /// Reference to . + /// + public static ref ulong OnLoad => ref EcsOnLoad; + + /// + /// Reference to . + /// + public static ref ulong PostLoad => ref EcsPostLoad; + + /// + /// Reference to . + /// + public static ref ulong PreUpdate => ref EcsPreUpdate; + + /// + /// Reference to . + /// + public static ref ulong OnUpdate => ref EcsOnUpdate; + + /// + /// Reference to . + /// + public static ref ulong OnValidate => ref EcsOnValidate; + + /// + /// Reference to . + /// + public static ref ulong PostUpdate => ref EcsPostUpdate; + + /// + /// Reference to . + /// + public static ref ulong PreStore => ref EcsPreStore; + + /// + /// Reference to . + /// + public static ref ulong OnStore => ref EcsOnStore; + + /// + /// Reference to . + /// + public static ref ulong PostFrame => ref EcsPostFrame; + + // Built-in reflection types + + /// + /// Reference to . + /// + public static ref ulong Bool => ref FLECS_IDecs_bool_tID_; + + /// + /// Reference to . + /// + public static ref ulong Char => ref FLECS_IDecs_char_tID_; + + /// + /// Reference to . + /// + public static ref ulong Byte => ref FLECS_IDecs_byte_tID_; + + /// + /// Reference to . + /// + public static ref ulong U8 => ref FLECS_IDecs_u8_tID_; + + /// + /// Reference to . + /// + public static ref ulong U16 => ref FLECS_IDecs_u16_tID_; + + /// + /// Reference to . + /// + public static ref ulong U32 => ref FLECS_IDecs_u32_tID_; + + /// + /// Reference to . + /// + public static ref ulong U64 => ref FLECS_IDecs_u64_tID_; + + /// + /// Reference to . + /// + public static ref ulong Uptr => ref FLECS_IDecs_uptr_tID_; + + /// + /// Reference to . + /// + public static ref ulong I8 => ref FLECS_IDecs_i8_tID_; + + /// + /// Reference to . + /// + public static ref ulong I16 => ref FLECS_IDecs_i16_tID_; + + /// + /// Reference to . + /// + public static ref ulong I32 => ref FLECS_IDecs_i32_tID_; + + /// + /// Reference to . + /// + public static ref ulong I64 => ref FLECS_IDecs_i64_tID_; + + /// + /// Reference to . + /// + public static ref ulong Iptr => ref FLECS_IDecs_iptr_tID_; + + /// + /// Reference to . + /// + public static ref ulong F32 => ref FLECS_IDecs_f32_tID_; + + /// + /// Reference to . + /// + public static ref ulong F64 => ref FLECS_IDecs_f64_tID_; + + /// + /// Reference to . + /// + public static ref ulong String => ref FLECS_IDecs_string_tID_; + + /// + /// Reference to . + /// + public static ref ulong Entity => ref FLECS_IDecs_entity_tID_; + + /// + /// Reference to . + /// + public static ref ulong Quantity => ref EcsQuantity; + + /// + /// Query must match prefabs. + /// + public const uint QueryMatchPrefab = EcsQueryMatchPrefab; + + /// + /// Query must match disabled entities. + /// + public const uint QueryMatchDisabled = EcsQueryMatchDisabled; + + /// + /// Query must match empty tables. + /// + public const uint QueryMatchEmptyTables = EcsQueryMatchEmptyTables; + + /// + /// Query may have unresolved entity identifiers. + /// + public const uint QueryAllowUnresolvedByName = EcsQueryAllowUnresolvedByName; + + /// + /// Query only returns whole tables (ignores toggle/member fields). + /// + public const uint QueryTableOnly = EcsQueryTableOnly; +} + +#pragma warning restore CA1707, CA1708 diff --git a/src/Flecs.NET/Core/Ecs/Delegates.cs b/src/Flecs.NET/Core/Ecs/Delegates.cs index ed0445d8..03522604 100644 --- a/src/Flecs.NET/Core/Ecs/Delegates.cs +++ b/src/Flecs.NET/Core/Ecs/Delegates.cs @@ -1,166 +1,168 @@ -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public static unsafe partial class Ecs -{ - /// - /// App init callback. - /// - public delegate void AppInitCallback(World world); - - /// - /// Callback to be run before a user context object is released by flecs. - /// - /// The user context type. - public delegate void UserContextFinish(ref T value); - - /// - /// Ctor type hook callback. - /// - /// - public delegate void CtorCallback(ref T data, TypeInfo typeInfo); - - /// - /// Dtor type hook callback. - /// - /// - public delegate void DtorCallback(ref T data, TypeInfo typeInfo); - - /// - /// Move type hook callback. - /// - /// - public delegate void MoveCallback(ref T dst, ref T src, TypeInfo typeInfo); - - /// - /// Copy type hook callback. - /// - /// - public delegate void CopyCallback(ref T dst, ref T src, TypeInfo typeInfo); - - /// - /// Each entity callback. - /// - public delegate void EachEntityCallback(Entity entity); - - /// - /// Each id callback. - /// - public delegate void EachIdCallback(Id id); - - /// - /// Each index callback. - /// - public delegate void EachIterCallback(Iter it, int i); - - /// - /// Function signature that takes an argument. - /// - public delegate void ObserveEntityCallback(Entity e); - - /// - /// Function signature that takes a ref T argument. - /// - /// - public delegate void ObserveRefCallback(ref T component); - - /// - /// Function signature that takes a T* callback. - /// - /// - public delegate void ObservePointerCallback(T* component); - - /// - /// Function signature that takes an and a ref T argument. - /// - /// - public delegate void ObserveEntityRefCallback(Entity e, ref T component); - - /// - /// Function signature that takes an and a T* argument. - /// - /// - public delegate void ObserveEntityPointerCallback(Entity e, T* component); - - /// - /// World finish callback. - /// - public delegate void WorldFinishCallback(World world); - - /// - /// Run post frame callback. - /// - public delegate void PostFrameCallback(World world); - - /// - /// GroupBy Callback. - /// - public delegate ulong GroupByCallback(World world, Table table, ulong group); - - /// - /// GroupBy Callback. - /// - public delegate ulong GroupByCallback(World world, Table table, ulong group, ref T groupByContext); - - /// - /// Group create callback. - /// - public delegate void GroupCreateCallback(World world, ulong group); - - /// - /// Group create callback. - /// - public delegate void GroupCreateCallback(World world, ulong group, out T groupContext); - - /// - /// Group delete action. - /// - public delegate void GroupDeleteCallback(World world, ulong group); - - /// - /// Group delete action. - /// - public delegate void GroupDeleteCallback(World world, ulong group, ref T context); - - /// - /// Iter callback. - /// - public delegate void IterCallback(Iter it); - - /// - /// OrderBy action. - /// - public delegate int OrderByCallback(ulong e1, void* ptr1, ulong e2, void* ptr2); - - /// - /// A callback that takes a reference to a world. - /// - public delegate void WorldCallback(World world); - - /// - /// A callback that takes a reference to a term. - /// - public delegate void TermCallback(ref Term term); - - /// - /// Run callback. - /// - public delegate void RunCallback(Iter it); - - /// - /// Run delegate callback. - /// - public delegate void RunDelegateCallback(Iter it, Action callback); - - /// - /// Run function pointer callback. - /// - public delegate void RunPointerCallback(Iter it, delegate* callback); - - /// - /// Os api log callback. - /// - public delegate void LogCallback(int level, string file, int line, string message); -} +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public static unsafe partial class Ecs +{ + /// + /// App init callback. + /// + public delegate void AppInitCallback(World world); + + /// + /// Callback to be run before a user context object is released by flecs. + /// + /// The user context type. + public delegate void UserContextFinish(ref T value); + + /// + /// Ctor type hook callback. + /// + /// + public delegate void CtorCallback(ref T data, TypeInfo typeInfo); + + /// + /// Dtor type hook callback. + /// + /// + public delegate void DtorCallback(ref T data, TypeInfo typeInfo); + + /// + /// Move type hook callback. + /// + /// + public delegate void MoveCallback(ref T dst, ref T src, TypeInfo typeInfo); + + /// + /// Copy type hook callback. + /// + /// + public delegate void CopyCallback(ref T dst, ref T src, TypeInfo typeInfo); + + /// + /// Each entity callback. + /// + public delegate void EachEntityCallback(Entity entity); + + /// + /// Each id callback. + /// + public delegate void EachIdCallback(Id id); + + /// + /// Each index callback. + /// + public delegate void EachIterCallback(Iter it, int i); + + /// + /// Function signature that takes an argument. + /// + public delegate void ObserveEntityCallback(Entity e); + + /// + /// Function signature that takes a ref T argument. + /// + /// + public delegate void ObserveRefCallback(ref T component); + + /// + /// Function signature that takes a T* callback. + /// + /// + public delegate void ObservePointerCallback(T* component); + + /// + /// Function signature that takes an and a ref T argument. + /// + /// + public delegate void ObserveEntityRefCallback(Entity e, ref T component); + + /// + /// Function signature that takes an and a T* argument. + /// + /// + public delegate void ObserveEntityPointerCallback(Entity e, T* component); + + /// + /// World finish callback. + /// + public delegate void WorldFinishCallback(World world); + + /// + /// Run post frame callback. + /// + public delegate void PostFrameCallback(World world); + + /// + /// GroupBy Callback. + /// + public delegate ulong GroupByCallback(World world, Table table, ulong group); + + /// + /// GroupBy Callback. + /// + public delegate ulong GroupByCallback(World world, Table table, ulong group, ref T groupByContext); + + /// + /// Group create callback. + /// + public delegate void GroupCreateCallback(World world, ulong group); + + /// + /// Group create callback. + /// + public delegate void GroupCreateCallback(World world, ulong group, out T groupContext); + + /// + /// Group delete action. + /// + public delegate void GroupDeleteCallback(World world, ulong group); + + /// + /// Group delete action. + /// + public delegate void GroupDeleteCallback(World world, ulong group, ref T context); + + /// + /// Iter callback. + /// + public delegate void IterCallback(Iter it); + + /// + /// OrderBy action. + /// + public delegate int OrderByCallback(ulong e1, void* ptr1, ulong e2, void* ptr2); + + /// + /// A callback that takes a reference to a world. + /// + public delegate void WorldCallback(World world); + + /// + /// A callback that takes a reference to a term. + /// + public delegate void TermCallback(ref Term term); + + /// + /// Run callback. + /// + public delegate void RunCallback(Iter it); + + /// + /// Run delegate callback. + /// + public delegate void RunDelegateCallback(Iter it, Action callback); + + /// + /// Run function pointer callback. + /// + public delegate void RunPointerCallback(Iter it, delegate* callback); + + /// + /// Os api log callback. + /// + public delegate void LogCallback(int level, string file, int line, string message); + + public delegate void TraceCallback(string file, ulong line, string message); +} diff --git a/src/Flecs.NET/Core/Ecs/OsApi.cs b/src/Flecs.NET/Core/Ecs/OsApi.cs index a2ff2c35..c72a1427 100644 --- a/src/Flecs.NET/Core/Ecs/OsApi.cs +++ b/src/Flecs.NET/Core/Ecs/OsApi.cs @@ -1,97 +1,125 @@ -using System; -using Flecs.NET.Core.BindingContext; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public static unsafe partial class Ecs -{ - /// - /// Static class for overriding the os api. - /// - public static class Os - { - private static bool _initialized; - - internal static OsApiContext Context; - - /// - /// Determines whether the abort function can be overriden by Flecs.NET. If set to false, - /// the abort function provided by flecs will be used. This should be set before the first call - /// to World.Create(); - /// - public static bool OverrideAbort { get; set; } = true; - - /// - /// Determines whether the log function can be overriden by Flecs.NET. If set to false, - /// the log provided by flecs will be used. This should be set before the first call - /// to World.Create(); - /// - public static bool OverrideLog { get; set; } = true; - - /// - /// Override the default os api. - /// - internal static void OverrideOsApi() - { - if (_initialized) - return; - - ecs_os_init(); - - if (OverrideAbort) - { - if (Context.Abort == default) - SetAbort(&DefaultAbort); - - ecs_os_api.abort_ = &Functions.AbortCallback; - } - - if (OverrideLog) - ecs_os_api.log_ = Context.Log == default ? ecs_os_api.log_ : &Functions.LogCallback; - - _initialized = true; - } - - /// - /// Sets os api abort callback. - /// - /// The callback. - public static void SetAbort(Action callback) - { - Context.Abort.Set(callback, (delegate*)&Functions.AbortCallbackDelegate); - } - - /// - /// Sets os api abort callback. - /// - /// The callback. - public static void SetAbort(delegate* callback) - { - Context.Abort.Set(callback, (delegate*)&Functions.AbortCallbackPointer); - } - - /// - /// Sets the os api log callback. - /// - /// The callback. - public static void SetLog(LogCallback callback) - { - Context.Log.Set(callback, (delegate*)&Functions.LogCallbackDelegate); - } - - /// - /// Sets the os api log callback. - /// - /// The callback. - public static void SetLog(delegate* callback) - { - Context.Log.Set(callback, (delegate*)&Functions.LogCallbackPointer); - } - - private static void DefaultAbort() - { - throw new NativeException("Application aborted from native code."); - } - } -} +using System; +using Flecs.NET.Core.BindingContext; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public static unsafe partial class Ecs +{ + /// + /// Static class for overriding the os api. + /// + public static class Os + { + private static bool _initialized; + + internal static OsApiContext Context; + + /// + /// Determines whether the abort function can be overriden by Flecs.NET. If set to false, + /// the abort function provided by flecs will be used. This should be set before the first call + /// to World.Create(); + /// + public static bool OverrideAbort { get; set; } = true; + + /// + /// Determines whether the log function can be overriden by Flecs.NET. If set to false, + /// the log provided by flecs will be used. This should be set before the first call + /// to World.Create(); + /// + public static bool OverrideLog { get; set; } = true; + + public static bool OverrideTrace { get; set; } = true; + + /// + /// Override the default os api. + /// + internal static void OverrideOsApi() + { + if (_initialized) + return; + + ecs_os_init(); + + if (OverrideAbort) + { + if (Context.Abort == default) + SetAbort(&DefaultAbort); + + ecs_os_api.abort_ = &Functions.AbortCallback; + } + + if (OverrideLog) + ecs_os_api.log_ = Context.Log == default ? ecs_os_api.log_ : &Functions.LogCallback; + + if (OverrideTrace) + { + ecs_os_api.perf_trace_push_ = Context.Log == default ? ecs_os_api.perf_trace_push_ : &Functions.TracePushCallback; + ecs_os_api.perf_trace_push_ = Context.Log == default ? ecs_os_api.perf_trace_pop_ : &Functions.TracePopCallback; + } + + _initialized = true; + } + + /// + /// Sets os api abort callback. + /// + /// The callback. + public static void SetAbort(Action callback) + { + Context.Abort.Set(callback, (delegate*)&Functions.AbortCallbackDelegate); + } + + /// + /// Sets os api abort callback. + /// + /// The callback. + public static void SetAbort(delegate* callback) + { + Context.Abort.Set(callback, (delegate*)&Functions.AbortCallbackPointer); + } + + /// + /// Sets the os api log callback. + /// + /// The callback. + public static void SetLog(LogCallback callback) + { + Context.Log.Set(callback, (delegate*)&Functions.LogCallbackDelegate); + } + + /// + /// Sets the os api log callback. + /// + /// The callback. + public static void SetLog(delegate* callback) + { + Context.Log.Set(callback, (delegate*)&Functions.LogCallbackPointer); + } + + public static void SetTracePush(TraceCallback callback) + { + Context.TracePush.Set(callback, (delegate*)&Functions.TracePushCallbackDelegate); + } + + public static void SetTracePush(delegate* callback) + { + Context.TracePush.Set(callback, (delegate*)&Functions.TracePushCallbackPointer); + } + + public static void SetTracePop(TraceCallback callback) + { + Context.TracePop.Set(callback, (delegate*)&Functions.TracePopCallbackDelegate); + } + + public static void SetTracePop(delegate* callback) + { + Context.TracePop.Set(callback, (delegate*)&Functions.TracePopCallbackPointer); + } + + private static void DefaultAbort() + { + throw new NativeException("Application aborted from native code."); + } + } +} diff --git a/src/Flecs.NET/Core/Entity.cs b/src/Flecs.NET/Core/Entity.cs index 4a242c42..dc3bdd1d 100644 --- a/src/Flecs.NET/Core/Entity.cs +++ b/src/Flecs.NET/Core/Entity.cs @@ -1,3686 +1,3694 @@ -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Flecs.NET.Core.BindingContext; -using Flecs.NET.Utilities; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// A wrapper for working with entities. -/// -public unsafe partial struct Entity : IEquatable, IEntity -{ - private Id _id; - - /// - /// Reference to world. - /// - public ref ecs_world_t* World => ref _id.World; - - /// - /// Reference to id. - /// - public ref Id Id => ref _id; - - ref Entity IEntity.Entity => ref this; - - /// - /// Returns a null entity. - /// - /// - public static Entity Null() - { - return default; - } - - /// - /// Returns a null entity for the provided world. - /// - /// - /// - public static Entity Null(ecs_world_t* world) - { - return new Entity(world, 0); - } - - /// - /// Creates an entity with the provided id. - /// - /// - public Entity(ulong id) - { - _id = id; - } - - /// - /// Creates an entity for the provided world. - /// - /// - public Entity(ecs_world_t* world) - { - if (ecs_get_scope(world) == 0 && ecs_get_with(world) == 0) - { - _id = new Id(world, ecs_new(world)); - } - else - { - ecs_entity_desc_t desc = default; - _id = new Id(world, ecs_entity_init(world, &desc)); - } - } - - /// - /// Creates an entity from the provided world and id. - /// - /// - /// - public Entity(ecs_world_t* world, ulong id) - { - _id = new Id(world, id); - } - - /// - /// Creates an entity from the provided world and name. - /// - /// - /// - public Entity(ecs_world_t* world, string name) - { - using NativeString nativeName = (NativeString)name; - - ecs_entity_desc_t desc = default; - desc.name = nativeName; - desc.sep = Pointers.DefaultSeparator; - desc.root_sep = Pointers.DefaultSeparator; - - _id = new Id(world, ecs_entity_init(world, &desc)); - } - - /// - /// Check if entity is valid. - /// - /// - public bool IsValid() - { - return World != null && ecs_is_valid(World, Id); - } - - /// - /// Check if entity is alive. - /// - /// - public bool IsAlive() - { - return World != null && ecs_is_alive(World, Id); - } - - /// - /// Return the entity name. - /// - /// - public string Name() - { - return NativeString.GetString(ecs_get_name(World, Id)); - } - - /// - /// Return the entity symbol. - /// - /// - public string Symbol() - { - return NativeString.GetString(ecs_get_symbol(World, Id)); - } - - /// - /// Return the entity path. - /// - /// - /// - /// - public string Path(string sep = Ecs.DefaultSeparator, string initSep = Ecs.DefaultSeparator) - { - return PathFrom(0, sep, initSep); - } - - /// - /// Return the entity path relative to a parent. - /// - /// - /// - /// - /// - public string PathFrom(ulong parent, string sep = Ecs.DefaultSeparator, string initSep = Ecs.DefaultSeparator) - { - using NativeString nativeSep = (NativeString)sep; - using NativeString nativeInitSep = (NativeString)initSep; - - return NativeString.GetStringAndFree(ecs_get_path_w_sep(World, parent, Id, nativeSep, nativeInitSep)); - } - - /// - /// Return the entity path relative to a parent. - /// - /// - /// - /// - /// - public string PathFrom(string sep = Ecs.DefaultSeparator, string initSep = Ecs.DefaultSeparator) - { - return PathFrom(Type.Id(World), sep, initSep); - } - - /// - /// Check if entity is enabled. - /// - /// - public bool Enabled() - { - return !ecs_has_id(World, Id, EcsDisabled); - } - - /// - /// Checks if id is enabled. - /// - /// - /// - public bool Enabled(ulong id) - { - return ecs_is_enabled_id(World, Id, id); - } - - /// - /// Checks if pair is enabled. - /// - /// - /// - /// - public bool Enabled(ulong first, ulong second) - { - return Enabled(Ecs.Pair(first, second)); - } - - /// - /// Checks if type is enabled. - /// - /// - /// - public bool Enabled() - { - return Enabled(Type.Id(World)); - } - - /// - /// Checks if type is enabled. - /// - /// - /// - /// - public bool Enabled(T value) where T : Enum - { - return Enabled(Type.Id(World, value)); - } - - /// - /// Checks if pair is enabled. - /// - /// - /// - /// - public bool Enabled(ulong second) - { - return Enabled(Ecs.Pair(second, World)); - } - - /// - /// Checks if pair is enabled. - /// - /// - /// - /// - public bool Enabled() - { - return Enabled(Ecs.Pair(World)); - } - - /// - /// Checks if pair is enabled. - /// - /// - /// - /// - /// - public bool Enabled(TSecond second) where TSecond : Enum - { - return Enabled(Type.Id(World, second)); - } - - /// - /// Checks if pair is enabled. - /// - /// - /// - /// - /// - public bool Enabled(TFirst first) where TFirst : Enum - { - return EnabledSecond(Type.Id(World, first)); - } - - /// - /// Checks if pair is enabled. - /// - /// - /// - /// - public bool EnabledSecond(ulong first) - { - return Enabled(first, Type.Id(World)); - } - - /// - /// Get the entity's type. - /// - /// - public FlecsType Type() - { - return new FlecsType(World, ecs_get_type(World, Id)); - } - - /// - /// Get the entity's table. - /// - /// - public Table Table() - { - return new Table(World, ecs_get_table(World, Id)); - } - - /// - /// Get table range for the entity. - /// - /// - public Table Range() - { - ecs_record_t* r = ecs_record_find(World, Id); - return r != null ? new Table(World, r->table, Ecs.RecordToRow(r->row), 1) : new Table(); - } - - /// - /// Iterate (component) ids of an entity. - /// - /// - public void Each(Ecs.EachIdCallback func) - { - ecs_type_t* type = ecs_get_type(World, Id); - - if (type == null) - return; - - ulong* ids = type->array; - int count = type->count; - - for (int i = 0; i < count; i++) - func(new Id(World, ids[i])); - } - - /// - /// Iterate matching pair ids of an entity. - /// - /// - /// - /// - public void Each(ulong first, ulong second, Ecs.EachIdCallback func) - { - ecs_world_t* realWorld = ecs_get_world(World); - ecs_table_t* table = ecs_get_table(World, Id); - - if (table == null) - return; - - ecs_type_t* type = ecs_table_get_type(table); - - if (type == null) - return; - - ulong pattern = first; - - if (second != 0) - pattern = Ecs.Pair(first, second); - - int cur = 0; - ulong* ids = type->array; - - while (-1 != (cur = ecs_search_offset(realWorld, table, cur, pattern, null))) - { - func(new Id(World, ids[cur])); - cur++; - } - } - - /// - /// Iterate targets for a given relationship. - /// - /// - /// - public void Each(ulong relation, Ecs.EachEntityCallback func) - { - Each(relation, EcsWildcard, id => { func(id.Second()); }); - } - - /// - /// Iterate targets for a given relationship. - /// - /// - /// - public void Each(Ecs.EachEntityCallback func) - { - Each(Type.Id(World), func); - } - - /// - /// Iterate targets for a given relationship. - /// - /// - /// - /// - public void Each(TFirst relation, Ecs.EachEntityCallback callback) where TFirst : Enum - { - Each(Type.Id(World, relation), callback); - } - - /// - /// Iterate children for entity. - /// - /// - /// - public void Children(ulong relation, Ecs.EachEntityCallback callback) - { - if (Id == EcsWildcard || Id == EcsAny) - return; - - ecs_iter_t it = ecs_each_id(World, Ecs.Pair(relation, Id)); - while (ecs_each_next(&it)) - Invoker.Each(&it, callback); - } - - /// - /// Iterate children for entity. - /// - /// - /// - public void Children(Ecs.EachEntityCallback callback) - { - Children(Type.Id(World), callback); - } - - /// - /// Iterate children for entity. - /// - /// - /// - /// - public void Children(TFirst relation, Ecs.EachEntityCallback callback) where TFirst : Enum - { - Children(Type.Id(World, relation), callback); - } - - /// - /// Iterate children for entity. - /// - /// - public void Children(Ecs.EachEntityCallback callback) - { - Children(EcsChildOf, callback); - } - - /// - /// Get pointer to component value. - /// - /// - /// - public void* GetPtr(ulong compId) - { - return ecs_get_id(World, Id, compId); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - public void* GetPtr(ulong first, ulong second) - { - return GetPtr(Ecs.Pair(first, second)); - } - - /// - /// Get pointer to component value. - /// - /// - /// - public T* GetPtr() where T : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (T*)ecs_get_id(World, Id, Type.Id(World)); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - public TFirst* GetPtr(ulong second) where TFirst : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - - if (!typeof(TFirst).IsEnum || (second != Ecs.Wildcard && second != Ecs.Any)) - return (TFirst*)GetPtr(Ecs.Pair(second, World)); - - Entity target = Target(); - return target == 0 ? null : (TFirst*)target.GetPtr(EcsConstant, Type.UnderlyingTypeId); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - /// - public TFirst* GetPtr(TSecond second) - where TFirst : unmanaged - where TSecond : Enum - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TFirst*)GetPtr(Ecs.Pair(second, World)); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - /// - public TSecond* GetPtr(TFirst first) - where TFirst : Enum - where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)GetPtr(Ecs.Pair(first, World)); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - public TFirst* GetFirstPtr() where TFirst : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TFirst*)GetPtr(Ecs.Pair(World)); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - public TSecond* GetSecondPtr() where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)GetPtr(Ecs.Pair(World)); - } - - /// - /// Get pointer to component value from pair. - /// - /// - /// - /// - public TSecond* GetSecondPtr(ulong first) where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)GetPtr(Ecs.PairSecond(first, World)); - } - - /// - /// Get managed reference to component value. - /// - /// - /// - public ref readonly T Get() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(ecs_get_id(World, Id, Type.Id(World))); - } - - /// - /// Get managed reference to component value from pair. - /// - /// - /// - /// - public ref readonly TFirst Get(ulong second) - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - - if (!typeof(TFirst).IsEnum || (second != Ecs.Wildcard && second != Ecs.Any)) - return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(second, World))); - - Entity target = Target(); - return ref target == 0 ? ref Unsafe.NullRef() : ref Managed.GetTypeRef(target.GetPtr(EcsConstant, Type.UnderlyingTypeId)); - } - - /// - /// Get managed reference to component value from pair. - /// - /// - /// - /// - /// - public ref readonly TFirst Get(TSecond second) where TSecond : Enum - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(second, World))); - } - - /// - /// Get managed reference to component value from pair. - /// - /// - /// - /// - /// - public ref readonly TSecond Get(TFirst first) where TFirst : Enum - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(first, World))); - } - - /// - /// Get managed reference to component value from pair. - /// - /// - /// - /// - public ref readonly TFirst GetFirst() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(World))); - } - - /// - /// Get managed reference to component value from pair. - /// - /// - /// - /// - public ref readonly TSecond GetSecond() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(World))); - } - - /// - /// Get managed reference to component value from pair. - /// - /// - /// - /// - public ref readonly TSecond GetSecond(ulong first) - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetPtr(Ecs.PairSecond(first, World))); - } - - /// - /// Get mutable component value (untyped). - /// - /// - /// - public void* GetMutPtr(ulong id) - { - return ecs_get_mut_id(World, Id, id); - } - - /// - /// Get mutable pointer for a pair (untyped). - /// - /// - /// - /// - public void* GetMutPtr(ulong first, ulong second) - { - return GetMutPtr(Ecs.Pair(first, second)); - } - - /// - /// Get mutable component value. - /// - /// - /// - public T* GetMutPtr() where T : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (T*)ecs_get_mut_id(World, Id, Type.Id(World)); - } - - /// - /// Get mutable pointer for the first element of a pair. - /// - /// - /// - /// - public TFirst* GetMutPtr(ulong second) where TFirst : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TFirst*)GetMutPtr(Ecs.Pair(second, World)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - /// - public TFirst* GetMutPtr(TSecond second) - where TFirst : unmanaged - where TSecond : Enum - { - return GetMutPtr(Type.Id(World, second)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - /// - public TSecond* GetMutPtr(TFirst first) - where TFirst : Enum - where TSecond : unmanaged - { - return GetMutSecondPtr(Type.Id(World, first)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - public TFirst* GetMutFirstPtr() where TFirst : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TFirst*)GetMutPtr(Ecs.Pair(World)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - public TSecond* GetMutSecondPtr() where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)GetMutPtr(Ecs.Pair(World)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - public TSecond* GetMutSecondPtr(ulong first) where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)GetMutPtr(Ecs.PairSecond(first, World)); - } - - /// - /// Get mutable managed reference for component. - /// - /// - /// - public ref T GetMut() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(ecs_get_mut_id(World, Id, Type.Id(World))); - } - - /// - /// Get mutable managed reference for the first element of a pair. - /// - /// - /// - /// - public ref TFirst GetMut(ulong second) - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetMutPtr(Ecs.Pair(second, World))); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - /// - public ref TFirst GetMut(TSecond second) where TSecond : Enum - { - return ref GetMut(Type.Id(World, second)); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - /// - public ref TSecond GetMut(TFirst first) where TFirst : Enum - { - return ref GetMutSecond(Type.Id(World, first)); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - public ref TFirst GetMutFirst() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetMutPtr(Ecs.Pair(World))); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - public ref TSecond GetMutSecond() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetMutPtr(Ecs.Pair(World))); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - public ref TSecond GetMutSecond(ulong first) - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(GetMutPtr(Ecs.PairSecond(first, World))); - } - - /// - /// Get target for a given pair. - /// - /// - /// - /// - public Entity Target(ulong relation, int index = 0) - { - return new Entity(World, ecs_get_target(World, Id, relation, index)); - } - - /// - /// Get target for a given pair. - /// - /// - /// - /// - public Entity Target(int index = 0) - { - return new Entity(World, ecs_get_target(World, Id, Type.Id(World), index)); - } - - /// - /// Get the target of a pair for a given relationship id. - /// - /// - /// - /// - public Entity TargetFor(ulong relation, ulong id) - { - return new Entity(World, ecs_get_target_for_id(World, Id, relation, id)); - } - - /// - /// Get the target of a pair for a given relationship id. - /// - /// - /// - /// - public Entity TargetFor(ulong relation) - { - return new Entity(World, TargetFor(relation, Type.Id(World))); - } - - /// - /// Get the target of a pair for a given relationship id. - /// - /// - /// - /// - /// - public Entity TargetFor(ulong relation) - { - ulong pair = Ecs.Pair(World); - return new Entity(World, TargetFor(relation, pair)); - } - - /// - /// Get depth for given relationship. - /// - /// - /// - public int Depth(ulong rel) - { - return ecs_get_depth(World, Id, rel); - } - - /// - /// Get depth for given relationship. - /// - /// - /// - public int Depth() - { - return Depth(Type.Id(World)); - } - - /// - /// Get depth for given relationship. - /// - /// - /// - /// - public int Depth(T value) where T : Enum - { - return Depth(Type.Id(World, value)); - } - - /// - /// Get parent of entity. - /// - /// - public Entity Parent() - { - return Target(EcsChildOf); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// Recursively traverse up the tree until entity is found. - /// True if the entity was found, else false. - public Entity Lookup(string path, bool recursive = false) - { - Ecs.Assert(Id != 0, "Invalid lookup from null handle."); - using NativeString nativePath = (NativeString)path; - ulong id = ecs_lookup_path_w_sep(World, Id, nativePath, - Pointers.DefaultSeparator, Pointers.DefaultSeparator, recursive); - return new Entity(World, id); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, out Entity entity) - { - return TryLookup(path, false, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, bool recursive, out Entity entity) - { - return (entity = Lookup(path, recursive)) != 0; - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, out ulong entity) - { - return TryLookup(path, false, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, bool recursive, out ulong entity) - { - return (entity = Lookup(path, recursive)) != 0; - } - - /// - /// Check if entity has the provided entity. - /// - /// - /// - public bool Has(ulong id) - { - return ecs_has_id(World, Id, id); - } - - /// - /// Check if entity has the provided pair. - /// - /// - /// - /// - public bool Has(ulong first, ulong second) - { - return Has(Ecs.Pair(first, second)); - } - - /// - /// Check if entity has the provided component. - /// - /// - /// - public bool Has() - { - return ecs_has_id(World, Id, Type.Id(World)); - } - - /// - /// Check if entity has the provided enum constant. - /// - /// - /// - /// - public bool Has(T value) where T : Enum - { - return Has(Type.Id(World, value)); - } - - /// - /// Check if entity has the provided pair. - /// - /// - /// - /// - public bool Has(ulong second) - { - return Has(Ecs.Pair(second, World)); - } - - /// - /// Check if entity has the provided pair. - /// - /// - /// - /// - public bool Has() - { - return Has(Ecs.Pair(World)); - } - - /// - /// Check if entity has the provided pair. - /// - /// - /// - /// - /// - public bool Has(TSecond second) where TSecond : Enum - { - return Has(Type.Id(World, second)); - } - - /// - /// Check if entity has the provided pair. - /// - /// - /// - /// - /// - public bool Has(TFirst first) where TFirst : Enum - { - return HasSecond(Type.Id(World, first)); - } - - /// - /// Check if entity has the provided pair. - /// - /// - /// - /// - public bool HasSecond(ulong first) - { - return Has(first, Type.Id(World)); - } - - /// - /// Check if entity owns the provided entity. - /// - /// - /// - public bool Owns(ulong id) - { - return ecs_owns_id(World, Id, id); - } - - /// - /// Check if entity owns the provided pair. - /// - /// - /// - /// - public bool Owns(ulong first, ulong second) - { - return Owns(Ecs.Pair(first, second)); - } - - /// - /// Check if entity owns the provided component. - /// - /// - /// - public bool Owns() - { - return Owns(Type.Id(World)); - } - - /// - /// Check if entity owns the provided component. - /// - /// - /// - /// - public bool Owns(T value) where T : Enum - { - return Owns(Type.Id(World, value)); - } - - /// - /// Check if entity owns the provided pair. - /// - /// - /// - /// - public bool Owns(ulong second) - { - return Owns(Ecs.Pair(second, World)); - } - - /// - /// Check if entity owns the provided pair. - /// - /// - /// - /// - public bool Owns() - { - return Owns(Ecs.Pair(World)); - } - - /// - /// Check if entity owns the provided pair. - /// - /// - /// - /// - /// - public bool Owns(TSecond second) where TSecond : Enum - { - return Owns(Type.Id(World, second)); - } - - /// - /// Check if entity owns the provided pair. - /// - /// - /// - /// - /// - public bool Owns(TFirst first) where TFirst : Enum - { - return OwnsSecond(Type.Id(World, first)); - } - - /// - /// Check if entity owns the provided pair. - /// - /// - /// - /// - public bool OwnsSecond(ulong first) - { - return Owns(first, Type.Id(World)); - } - - /// - /// Clones the entity. - /// - /// - /// - /// - public Entity Clone(bool cloneValue = true, ulong dstId = 0) - { - if (dstId == 0) - dstId = ecs_new(World); - - Entity dst = new Entity(World, dstId); - ecs_clone(World, dstId, Id, cloneValue); - return dst; - } - - /// - /// Return mutable entity handle for current stage. - /// - /// - /// - public Entity Mut(ref World stage) - { - Ecs.Assert(!stage.IsReadOnly(), "Cannot use readonly world/stage to create mutable handle"); - return new Entity(Id).SetStage(stage); - } - - /// - /// Return mutable entity handle for current iter. - /// - /// - /// - public Entity Mut(ref Iter it) - { - Ecs.Assert(!it.World().IsReadOnly(), - "Cannot use iterator created for readonly world/stage to create mutable handle"); - return new Entity(Id).SetStage(it.World()); - } - - /// - /// Return mutable entity handle for current entity. - /// - /// - /// - public Entity Mut(ref Entity entity) - { - Ecs.Assert(!entity.CsWorld().IsReadOnly(), - "Cannot use entity created for readonly world/stage to create mutable handle"); - return new Entity(Id).SetStage(entity.World); - } - - /// - /// Return mutable entity handle for current stage. - /// - /// - /// - public Entity Mut(World stage) - { - return Mut(ref stage); - } - - /// - /// Return mutable entity handle for current iter. - /// - /// - /// - public Entity Mut(Iter it) - { - return Mut(ref it); - } - - /// - /// Return mutable entity handle for current entity. - /// - /// - /// - public Entity Mut(Entity entity) - { - return Mut(ref entity); - } - - private Entity SetStage(ecs_world_t* stage) - { - return new Entity(stage, Id); - } - - /// - /// Serializes the entity to a JSON string using the provided description. - /// - /// The description settings for JSON serialization. - /// A JSON string with the serialized entity data, or an empty string if failed. - public string ToJson(in EntityToJsonDesc desc) - { - fixed (ecs_entity_to_json_desc_t* ptr = &desc.Desc) - { - return NativeString.GetStringAndFree(ecs_entity_to_json(World, Id, ptr)); - } - } - - /// - /// Serializes the entity to a JSON string. - /// - /// A JSON string with the serialized entity data, or an empty string if failed. - public string ToJson() - { - return NativeString.GetStringAndFree(ecs_entity_to_json(World, Id, null)); - } - - /// - /// Returns the entity's doc name. - /// - /// - public string DocName() - { - return NativeString.GetString(ecs_doc_get_name(World, Id)); - } - - /// - /// Returns the entity's doc brief. - /// - /// - public string DocBrief() - { - return NativeString.GetString(ecs_doc_get_brief(World, Id)); - } - - /// - /// Returns the entity's doc detail. - /// - /// - public string DocDetail() - { - return NativeString.GetString(ecs_doc_get_detail(World, Id)); - } - - /// - /// Returns the entity's doc detail. - /// - /// - public string DocLink() - { - return NativeString.GetString(ecs_doc_get_link(World, Id)); - } - - /// - /// Returns the entity's doc color. - /// - /// - public string DocColor() - { - return NativeString.GetString(ecs_doc_get_color(World, Id)); - } - - /// - /// Returns the entity's doc uuid. - /// - /// - public string DocUuid() - { - return NativeString.GetString(ecs_doc_get_uuid(World, Id)); - } - - /// - /// Return number of alerts for entity. - /// - /// - /// - public int AlertCount(ulong alert = 0) - { - return ecs_get_alert_count(World, Id, alert); - } - - /// - /// Convert entity to enum constant. - /// - /// - /// - public T ToConstant() where T : unmanaged, Enum - { - T* ptr = (T*)GetPtr(Ecs.Constant, Type.UnderlyingTypeId); - Ecs.Assert(ptr != null, "Entity is not a constant"); - return *ptr; - } - - /// - /// Emits an event for this entity. - /// - /// - public void Emit(ulong eventId) - { - new World(World) - .Event(eventId) - .Entity(Id) - .Emit(); - } - - /// - /// Emits an event for this entity. - /// - /// - public void Emit(Entity eventId) - { - Emit(eventId.Id.Value); - } - - /// - /// Emits an event for this entity. - /// - /// - public void Emit() - { - Emit(Type.Id(World)); - } - - /// - /// Emits an event for this entity. - /// - /// - public void Emit(T payload) where T : unmanaged - { - new World(World) - .Event(Type.Id(World)) - .Entity(Id) - .Ctx(&payload) - .Emit(); - } - - /// - /// Emits an event for this entity. - /// - /// - /// - public void Emit(ref T payload) - { - fixed (T* ptr = &payload) - { - if (RuntimeHelpers.IsReferenceOrContainsReferences()) - { - Managed.AllocGcHandle(ptr, out GCHandle handle); - - new World(World) - .Event(Type.Id(World)) - .Entity(Id) - .Ctx(&handle) - .Emit(); - - Managed.FreeGcHandle(handle); - } - else - { - new World(World) - .Event(Type.Id(World)) - .Entity(Id) - .Ctx(ptr) - .Emit(); - } - } - } - - /// - /// Enqueues an event for this entity. - /// - /// - public void Enqueue(ulong eventId) - { - new World(World) - .Event(eventId) - .Entity(Id) - .Enqueue(); - } - - /// - /// Enqueues an event for this entity. - /// - /// - public void Enqueue(Entity eventId) - { - Enqueue(eventId.Id.Value); - } - - /// - /// Enqueues an event for this entity. - /// - /// - public void Enqueue() - { - Enqueue(Type.Id(World)); - } - - /// - /// Enqueues an event for this entity. - /// - /// - /// - public void Enqueue(T payload) where T : unmanaged - { - new World(World) - .Event(Type.Id(World)) - .Entity(Id) - .Ctx(&payload) - .Enqueue(); - } - - /// - /// Enqueues an event for this entity. - /// - /// - /// - public void Enqueue(ref T payload) - { - fixed (T* ptr = &payload) - { - if (RuntimeHelpers.IsReferenceOrContainsReferences()) - { - Managed.AllocGcHandle(ptr, out GCHandle handle); - - new World(World) - .Event(Type.Id(World)) - .Entity(Id) - .Ctx(&handle) - .Enqueue(); - - Managed.FreeGcHandle(handle); - } - else - { - new World(World) - .Event(Type.Id(World)) - .Entity(Id) - .Ctx(ptr) - .Enqueue(); - } - } - } - - /// - /// Short for Has(EcsChildOf, entity). - /// - /// - /// - public bool IsChildOf(ulong entity) - { - Ecs.Assert(!Ecs.IsPair(entity), "Cannot use pairs as an argument."); - return Has(EcsChildOf, entity); - } - - /// - /// Short for Has(EcsChildOf, entity). - /// - /// - /// - public bool IsChildOf() - { - return IsChildOf(Type.Id(World)); - } - - /// - /// Short for Has(EcsChildOf, entity). - /// - /// - /// - /// - public bool IsChildOf(T value) where T : Enum - { - return IsChildOf(Type.Id(World, value)); - } - - /// - /// Add an entity to entity. - /// - /// - /// - public ref Entity Add(ulong id) - { - Ecs.Assert(ecs_id_is_valid(World, id), nameof(ECS_INVALID_OPERATION)); - ecs_add_id(World, Id, id); - return ref this; - } - - /// - /// Add pair to entity. - /// - /// - /// - /// - public ref Entity Add(ulong first, ulong second) - { - return ref Add(Ecs.Pair(first, second)); - } - - /// - /// Add a component to entity. - /// - /// - /// - public ref Entity Add() - { - return ref Add(Type.Id(World)); - } - - /// - /// Add a pair to entity. - /// - /// - /// - /// - public ref Entity Add(ulong second) - { - return ref Add(Ecs.Pair(second, World)); - } - - /// - /// Add an enum to entity. - /// - /// - /// - /// - public ref Entity Add(T value) where T : Enum - { - return ref Add(Type.Id(World, value)); - } - - /// - /// Add a pair to entity. - /// - /// - /// - /// - public ref Entity Add() - { - return ref Add(Type.Id(World)); - } - - /// - /// Add a pair to entity. - /// - /// - /// - /// - /// - public ref Entity Add(TSecond second) where TSecond : Enum - { - return ref Add(Type.Id(World, second)); - } - - /// - /// Add a pair to entity. - /// - /// - /// - /// - /// - public ref Entity Add(TFirst first) where TFirst : Enum - { - return ref AddSecond(Type.Id(World, first)); - } - - /// - /// Add a pair to entity. - /// - /// - /// - /// - public ref Entity AddSecond(ulong first) - { - return ref Add(first, Type.Id(World)); - } - - /// - /// Conditionally adds an entity to entity. - /// - /// - /// - /// - public ref Entity AddIf(bool cond, ulong id) - { - return ref cond ? ref Add(id) : ref Remove(id); - } - - /// - /// Conditionally adds a pair to entity. - /// - /// - /// - /// - /// - public ref Entity AddIf(bool cond, ulong first, ulong second) - { - if (cond) - return ref Add(first, second); - - if (second == 0 || ecs_has_id(World, first, EcsExclusive)) - second = EcsWildcard; - - return ref Remove(first, second); - } - - /// - /// Conditionally adds a component to entity. - /// - /// - /// - /// - public ref Entity AddIf(bool cond) - { - return ref cond ? ref Add() : ref Remove(); - } - - /// - /// Conditionally adds an enum to entity. - /// - /// - /// - /// - /// - public ref Entity AddIf(bool cond, T value) where T : Enum - { - return ref AddIf(cond, Type.Id(World, value)); - } - - /// - /// Conditionally adds a pair to entity. - /// - /// - /// - /// - /// - public ref Entity AddIf(bool cond, ulong second) - { - return ref AddIf(cond, Type.Id(World), second); - } - - /// - /// Conditionally adds a pair to entity. - /// - /// - /// - /// - /// - public ref Entity AddIf(bool cond) - { - return ref AddIf(cond, Type.Id(World)); - } - - /// - /// Conditionally adds a pair to entity. - /// - /// - /// - /// - /// - /// - public ref Entity AddIf(bool cond, TSecond second) where TSecond : Enum - { - return ref AddIf(cond, Type.Id(World, second)); - } - - /// - /// Conditionally adds a pair to entity. - /// - /// - /// - /// - /// - /// - public ref Entity AddIf(bool cond, TFirst first) where TFirst : Enum - { - return ref AddIfSecond(cond, Type.Id(World, first)); - } - - /// - /// Conditionally adds a pair to entity. - /// - /// - /// - /// - /// - public ref Entity AddIfSecond(bool cond, ulong first) - { - return ref AddIf(cond, first, Type.Id(World)); - } - - /// - /// Shortcut for Add(EcsIsA, entity). - /// - /// - /// - public ref Entity IsA(ulong id) - { - return ref Add(EcsIsA, id); - } - - /// - /// Shortcut for Add(EcsIsA, entity). - /// - /// - /// - public ref Entity IsA() - { - return ref Add(EcsIsA, Type.Id(World)); - } - - /// - /// Shortcut for Add(EcsIsA, entity). - /// - /// - /// - /// - public ref Entity IsA(T value) where T : Enum - { - return ref IsA(Type.Id(World, value)); - } - - /// - /// Shortcut for Add(EcsChildOf, entity). - /// - /// - /// - public ref Entity ChildOf(ulong second) - { - return ref Add(EcsChildOf, second); - } - - /// - /// Shortcut for Add(EcsChildOf, entity). - /// - /// - /// - public ref Entity ChildOf() - { - return ref Add(EcsChildOf, Type.Id(World)); - } - - /// - /// Shortcut for Add(EcsChildOf, entity). - /// - /// - /// - /// - public ref Entity ChildOf(T value) where T : Enum - { - return ref ChildOf(Type.Id(World, value)); - } - - /// - /// Shortcut for Add(EcDependsOn, entity). - /// - /// - /// - public ref Entity DependsOn(ulong second) - { - return ref Add(EcsDependsOn, second); - } - - /// - /// Shortcut for Add(EcDependsOn, entity). - /// - /// - /// - public ref Entity DependsOn() - { - return ref DependsOn(Type.Id(World)); - } - - /// - /// Shortcut for Add(EcDependsOn, entity). - /// - /// - /// - /// - public ref Entity DependsOn(T value) where T : Enum - { - return ref DependsOn(Type.Id(World, value)); - } - - /// - /// Shortcut for Add(EcsSlotOf, entity). - /// - /// - /// - public ref Entity SlotOf(ulong id) - { - return ref Add(EcsSlotOf, id); - } - - /// - /// Shortcut for Add(EcsSlotOf, entity). - /// - /// - /// - public ref Entity SlotOf() - { - return ref Add(EcsSlotOf, Type.Id(World)); - } - - /// - /// Shortcut for Add(EcsSlotOf, entity). - /// - /// - /// - /// - public ref Entity SlotOf(T value) where T : Enum - { - return ref SlotOf(Type.Id(World, value)); - } - - /// - /// Shortcut for Add(EcsSlotOf, Target(EcsChildOf)). - /// - /// - public ref Entity Slot() - { - Ecs.Assert(ecs_get_target(World, Id, EcsChildOf, 0) != 0, "Add ChildOf pair before using slot()"); - return ref SlotOf(Target(EcsChildOf)); - } - - /// - /// Remove an entity from entity. - /// - /// - /// - public ref Entity Remove(ulong id) - { - ecs_remove_id(World, Id, id); - return ref this; - } - - /// - /// Remove a pair from entity. - /// - /// - /// - /// - public ref Entity Remove(ulong first, ulong second) - { - return ref Remove(Ecs.Pair(first, second)); - } - - /// - /// Remove a component from entity. If the provided type argument is an enum, - /// this operation will remove any (Enum, *) pair from the entity. - /// - /// - /// - public ref Entity Remove() - { - return ref Remove(Type.Id(World)); - } - - /// - /// Remove an enum from entity. - /// - /// - /// - /// - public ref Entity Remove(T value) where T : Enum - { - return ref Remove(Type.Id(World, value)); - } - - /// - /// Remove a pair from entity. - /// - /// - /// - /// - public ref Entity Remove(ulong second) - { - return ref Remove(Ecs.Pair(second, World)); - } - - /// - /// Remove a pair from entity. - /// - /// - /// - /// - public ref Entity Remove() - { - return ref Remove(Ecs.Pair(World)); - } - - /// - /// Remove a pair from entity. - /// - /// - /// - /// - /// - public ref Entity Remove(TSecond second) where TSecond : Enum - { - return ref Remove(Type.Id(World, second)); - } - - /// - /// Remove a pair from entity. - /// - /// - /// - /// - /// - public ref Entity Remove(TFirst first) where TFirst : Enum - { - return ref RemoveSecond(Type.Id(World, first)); - } - - /// - /// Remove a pair from entity. - /// - /// - /// - /// - public ref Entity RemoveSecond(ulong first) - { - return ref Remove(first, Type.Id(World)); - } - - /// - /// Mark id for auto-overriding. - /// - /// - /// - public ref Entity AutoOverride(ulong id) - { - ecs_add_id(World, Id, ECS_AUTO_OVERRIDE | id); - return ref this; - } - - /// - /// Mark a pair for auto-overriding. - /// - /// - /// - /// - public ref Entity AutoOverride(ulong first, ulong second) - { - return ref AutoOverride(Ecs.Pair(first, second)); - } - - /// - /// Mark a component or auto-overriding. - /// - /// - /// - public ref Entity AutoOverride() - { - return ref AutoOverride(Type.Id(World)); - } - - /// - /// Mark a component or auto-overriding. - /// - /// - /// - /// - public ref Entity AutoOverride(T value) where T : Enum - { - return ref AutoOverride(Type.Id(World, value)); - } - - /// - /// Mark a pair for auto-overriding. - /// - /// - /// - /// - public ref Entity AutoOverride(ulong second) - { - return ref AutoOverride(Ecs.Pair(second, World)); - } - - /// - /// Mark a pair for auto-overriding. - /// - /// - /// - /// - public ref Entity AutoOverride() - { - return ref AutoOverride(Ecs.Pair(World)); - } - - /// - /// Mark a pair for auto-overriding. - /// - /// - /// - /// - /// - public ref Entity AutoOverride(TSecond second) where TSecond : Enum - { - return ref AutoOverride(Type.Id(World, second)); - } - - /// - /// Mark a pair for auto-overriding. - /// - /// - /// - /// - /// - public ref Entity AutoOverride(TFirst first) where TFirst : Enum - { - return ref AutoOverrideSecond(Type.Id(World, first)); - } - - /// - /// Mark a pair for auto-overriding. - /// - /// - /// - /// - public ref Entity AutoOverrideSecond(ulong first) - { - return ref AutoOverride(first, Type.Id(World)); - } - - /// - /// Set component, mark component for auto-overriding. - /// - /// The component data. - /// The component type. - /// Reference to self. - public ref Entity SetAutoOverride(in T component) - { - return ref AutoOverride().Set(in component); - } - - /// - /// Set pair, mark component for auto-overriding. - /// - /// The second id of the pair. - /// The component data. - /// The first type of the pair. - /// Reference to self. - public ref Entity SetAutoOverride(ulong second, in TFirst component) - { - return ref AutoOverride(second).Set(second, in component); - } - - /// - /// Set pair, mark component for auto-overriding. - /// - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetAutoOverride(in TFirst component) - { - return ref AutoOverride().Set(in component); - } - - /// - /// Set pair, mark component for auto-overriding. - /// - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetAutoOverride(in TSecond component) - { - return ref AutoOverride().Set(in component); - } - - /// - /// Set pair, mark component for auto-overriding. - /// - /// The second id (enum member) of the pair. - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetAutoOverride(TSecond second, in TFirst component) where TSecond : Enum - { - ulong secondId = Type.Id(World, second); - return ref AutoOverride(secondId).Set(secondId, in component); - } - - /// - /// Set pair, mark component for auto-overriding. - /// - /// The first id (enum member) of the pair. - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetAutoOverride(TFirst first, in TSecond component) where TFirst : Enum - { - ulong firstId = Type.Id(World, first); - return ref AutoOverrideSecond(firstId).SetSecond(firstId, in component); - } - - /// - /// Set pair, mark component for auto-overriding. - /// - /// The first id of the pair. - /// The component data. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetAutoOverrideSecond(ulong first, in TSecond component) - { - return ref AutoOverrideSecond(first).SetSecond(first, in component); - } - - /// - /// Enable this entity. - /// - /// - public ref Entity Enable() - { - ecs_enable(World, Id, true); - return ref this; - } - - /// - /// Enable an id for entity. - /// - /// - /// - public ref Entity Enable(ulong id) - { - ecs_enable_id(World, Id, id, true); - return ref this; - } - - /// - /// Enable pair for entity. - /// - /// - /// - /// - public ref Entity Enable(ulong first, ulong second) - { - return ref Enable(Ecs.Pair(first, second)); - } - - /// - /// Enable component for entity. - /// - /// - /// - public ref Entity Enable() - { - return ref Enable(Type.Id(World)); - } - - /// - /// Enable component for entity. - /// - /// - /// - /// - public ref Entity Enable(T value) where T : Enum - { - return ref Enable(Type.Id(World, value)); - } - - /// - /// Enable pair for entity. - /// - /// - /// - /// - public ref Entity Enable(ulong second) - { - return ref Enable(Ecs.Pair(second, World)); - } - - /// - /// Enable pair for entity. - /// - /// - /// - /// - public ref Entity Enable() - { - return ref Enable(Ecs.Pair(World)); - } - - /// - /// Enable pair for entity. - /// - /// - /// - /// - /// - public ref Entity Enable(TSecond second) where TSecond : Enum - { - return ref Enable(Type.Id(World, second)); - } - - /// - /// Enable pair for entity. - /// - /// - /// - /// - /// - public ref Entity Enable(TFirst first) where TFirst : Enum - { - return ref EnableSecond(Type.Id(World, first)); - } - - /// - /// Enable pair for entity. - /// - /// - /// - /// - public ref Entity EnableSecond(ulong first) - { - return ref Enable(first, Type.Id(World)); - } - - /// - /// Disable this entity. - /// - /// - public ref Entity Disable() - { - ecs_enable(World, Id, false); - return ref this; - } - - /// - /// Disable an id for entity. - /// - /// - /// - public ref Entity Disable(ulong id) - { - ecs_enable_id(World, Id, id, false); - return ref this; - } - - /// - /// Disable pair for entity. - /// - /// - /// - /// - public ref Entity Disable(ulong first, ulong second) - { - return ref Disable(Ecs.Pair(first, second)); - } - - /// - /// Disable component for entity. - /// - /// - /// - public ref Entity Disable() - { - return ref Disable(Type.Id(World)); - } - - /// - /// Disable component for entity. - /// - /// - /// - /// - public ref Entity Disable(T value) where T : Enum - { - return ref Disable(Type.Id(World, value)); - } - - /// - /// Disable pair for entity. - /// - /// - /// - /// - public ref Entity Disable(ulong second) - { - return ref Disable(Ecs.Pair(second, World)); - } - - /// - /// Disable pair for entity. - /// - /// - /// - /// - public ref Entity Disable() - { - return ref Disable(Ecs.Pair(World)); - } - - /// - /// Disable pair for entity. - /// - /// - /// - /// - /// - public ref Entity Disable(TSecond second) where TSecond : Enum - { - return ref Disable(Type.Id(World, second)); - } - - /// - /// Disable pair for entity. - /// - /// - /// - /// - /// - public ref Entity Disable(TFirst first) where TFirst : Enum - { - return ref DisableSecond(Type.Id(World, first)); - } - - /// - /// Disable pair for entity. - /// - /// - /// - /// - public ref Entity DisableSecond(ulong first) - { - return ref Disable(first, Type.Id(World)); - } - - /// - /// Sets the data of a component. - /// - /// The id of the component to set. - /// The size of the pointed-to data. - /// The pointer to the data. - /// Reference to self. - public ref Entity SetUntyped(ulong id, int size, void* data) - { - Ecs.Assert(ecs_get_typeid(World, id) != 0, "Cannot set component data for tag ids."); - ecs_set_id(World, Id, id, size, data); - return ref this; - } - - /// - /// Sets the data of a component. - /// - /// The id of the component to set. - /// The pointer to the data. - /// Reference to self. - public ref Entity SetUntyped(ulong id, void* data) - { - EcsComponent* component = (EcsComponent*)ecs_get_id(World, id, FLECS_IDEcsComponentID_); - Ecs.Assert(component != null, nameof(ECS_INVALID_PARAMETER)); - return ref SetUntyped(id, component->size, data); - } - - /// - /// Sets the data of a pair component. - /// - /// The first id of the pair. - /// The second id of the pair. - /// The size of the pointed-to data. - /// The pointer to the data. - /// Reference to self. - public ref Entity SetUntyped(ulong first, ulong second, int size, void* data) - { - return ref SetUntyped(Ecs.Pair(first, second), size, data); - } - - /// - /// Sets the data of a component. - /// - /// The pointer to the data. - /// The component type. - /// Reference to self. - public ref Entity SetPtr(T* data) - { - return ref SetInternal(Type.Id(World), data); - } - - /// - /// Sets the data of a pair component. - /// - /// The second id of the pair. - /// The pointer to the data. - /// The first type of the pair. - /// Reference to self. - public ref Entity SetPtr(ulong second, TFirst* data) - { - return ref SetInternal(Ecs.Pair(second, World), data); - } - - /// - /// Sets the data of a pair component. - /// - /// The pointer to the data. - /// The first type of a pair. - /// The second type of a pair. - /// Reference to self. - public ref Entity SetPtr(TSecond* data) - { - return ref SetInternal(Ecs.Pair(World), data); - } - - /// - /// Sets the data of a pair component. - /// - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetPtr(TFirst* data) - { - return ref SetInternal(Ecs.Pair(World), data); - } - - /// - /// Sets the data of a pair component. - /// - /// The second id (enum member) of the pair. - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetPtr(TSecond second, TFirst* data) where TSecond : Enum - { - return ref SetPtr(Type.Id(World, second), data); - } - - /// - /// Sets the data of a pair component. - /// - /// The first id (enum member) of the pair. - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetPtr(TFirst first, TSecond* data) where TFirst : Enum - { - return ref SetPtrSecond(Type.Id(World, first), data); - } - - /// - /// Sets the data of a pair component. - /// - /// The first id of the pair. - /// The pointer to the data. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetPtrSecond(ulong first, TSecond* data) - { - return ref SetInternal(Ecs.PairSecond(first, World), data); - } - - /// - /// Sets the data of a component. - /// - /// The component data. - /// The component type. - /// Reference to self. - public ref Entity Set(in T data) - { - return ref SetInternal(Type.Id(World), in data); - } - - /// - /// Sets the data of a pair component. - /// - /// The second id of the pair. - /// The component data. - /// The first type of the pair. - /// Reference to self. - public ref Entity Set(ulong second, in TFirst data) - { - return ref SetInternal(Ecs.Pair(second, World), in data); - } - - /// - /// Sets the data of a pair component. - /// - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity Set(in TSecond data) - { - return ref SetInternal(Ecs.Pair(World), in data); - } - - /// - /// Sets the data of a pair component. - /// - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity Set(in TFirst data) - { - return ref SetInternal(Ecs.Pair(World), in data); - } - - /// - /// Sets the data of a pair component. - /// - /// The second id (enum member) of the pair. - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity Set(TSecond second, in TFirst data) where TSecond : Enum - { - return ref Set(Type.Id(World, second), in data); - } - - /// - /// Sets the data of a pair component. - /// - /// The first id (enum member) of the pair. - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public ref Entity Set(TFirst first, in TSecond data) where TFirst : Enum - { - return ref SetSecond(Type.Id(World, first), in data); - } - - /// - /// Sets the data of a pair component. - /// - /// The first id of the pair. - /// The component data. - /// The second type of the pair. - /// Reference to self. - public ref Entity SetSecond(ulong first, in TSecond data) - { - return ref SetInternal(Ecs.PairSecond(first, World), in data); - } - - /// - /// Entities created in function will have the current entity. - /// - /// The callback. - /// Reference to self. - public ref Entity With(Action callback) - { - ulong prev = ecs_set_with(World, Id); - callback(); - ecs_set_with(World, prev); - return ref this; - } - - /// - /// Entities created in function will have (first, this). - /// - /// The id. - /// The callback. - /// Reference to self. - public ref Entity With(ulong first, Action callback) - { - ulong prev = ecs_set_with(World, Ecs.Pair(first, Id)); - callback(); - ecs_set_with(World, prev); - return ref this; - } - - /// - /// Entities created in function will have (TFirst, this). - /// - /// The callback. - /// The component id. - /// Reference to self. - public ref Entity With(Action callback) - { - return ref With(Type.Id(World), callback); - } - - /// - /// Entities created in function will have the current entity. - /// - /// The callback. - /// Reference to self. - public ref Entity With(Ecs.WorldCallback callback) - { - ulong prev = ecs_set_with(World, Id); - callback(World); - ecs_set_with(World, prev); - return ref this; - } - - /// - /// Entities created in function will have (first, this). - /// - /// The id. - /// The callback. - /// Reference to self. - public ref Entity With(ulong first, Ecs.WorldCallback callback) - { - ulong prev = ecs_set_with(World, Ecs.Pair(first, Id)); - callback(World); - ecs_set_with(World, prev); - return ref this; - } - - /// - /// Entities created in function will have (TFirst, this). - /// - /// The callback. - /// The component id. - /// Reference to self. - public ref Entity With(Ecs.WorldCallback callback) - { - return ref With(Type.Id(World), callback); - } - - /// - /// The function will be run with the scope set to the current entity. - /// - /// The callback. - /// Reference to self. - public ref Entity Scope(Action callback) - { - ulong prev = ecs_set_scope(World, Id); - callback(); - ecs_set_scope(World, prev); - return ref this; - } - - /// - /// The function will be run with the scope set to the current entity. - /// - /// The callback. - /// Reference to self. - public ref Entity Scope(Ecs.WorldCallback callback) - { - ulong prev = ecs_set_scope(World, Id); - callback(World); - ecs_set_scope(World, prev); - return ref this; - } - - /// - /// Set the entity name. - /// - /// - /// - public ref Entity SetName(string name) - { - using NativeString nativeName = (NativeString)name; - ecs_set_name(World, Id, nativeName); - return ref this; - } - - /// - /// Set entity alias. - /// - /// - /// - public ref Entity SetAlias(string alias) - { - using NativeString nativeAlias = (NativeString)alias; - ecs_set_alias(World, Id, nativeAlias); - return ref this; - } - - /// - /// Set doc name. - /// - /// - /// - public ref Entity SetDocName(string name) - { - using NativeString nativeName = (NativeString)name; - ecs_doc_set_name(World, Id, nativeName); - return ref this; - } - - /// - /// Set doc brief. - /// - /// - /// - public ref Entity SetDocBrief(string brief) - { - using NativeString nativeBrief = (NativeString)brief; - ecs_doc_set_brief(World, Id, nativeBrief); - return ref this; - } - - /// - /// Set doc detailed description. - /// - /// - /// - public ref Entity SetDocDetail(string detail) - { - using NativeString nativeDetail = (NativeString)detail; - ecs_doc_set_detail(World, Id, nativeDetail); - return ref this; - } - - /// - /// Set doc link. - /// - /// - /// - public ref Entity SetDocLink(string link) - { - using NativeString nativeLink = (NativeString)link; - ecs_doc_set_link(World, Id, nativeLink); - return ref this; - } - - /// - /// Set doc color. - /// - /// - /// - public ref Entity SetDocColor(string color) - { - using NativeString nativeColor = (NativeString)color; - ecs_doc_set_color(World, Id, nativeColor); - return ref this; - } - - /// - /// Set doc uuid. - /// - /// The uuid string. - /// - public ref Entity SetDocUuid(string uuid) - { - using NativeString nativeUuid = (NativeString)uuid; - ecs_doc_set_uuid(World, Id, nativeUuid); - return ref this; - } - - /// - /// Make entity a unit. - /// - /// - /// - /// - /// - /// - /// - /// - public ref Entity Unit( - string symbol, - ulong prefix = 0, - ulong @base = 0, - ulong over = 0, - int factor = 0, - int power = 0) - { - using NativeString nativeSymbol = (NativeString)symbol; - - ecs_unit_desc_t desc = default; - desc.symbol = nativeSymbol; - desc.entity = Id; - desc.@base = @base; - desc.over = over; - desc.prefix = prefix; - desc.translation.factor = factor; - desc.translation.power = power; - ecs_unit_init(World, &desc); - - return ref this; - } - - /// - /// Make entity a derived unit. - /// - /// - /// - /// - /// - /// - /// - public ref Entity Unit( - ulong prefix = 0, - ulong @base = 0, - ulong over = 0, - int factor = 0, - int power = 0) - { - ecs_unit_desc_t desc = default; - desc.entity = Id; - desc.@base = @base; - desc.over = over; - desc.prefix = prefix; - desc.translation.factor = factor; - desc.translation.power = power; - ecs_unit_init(World, &desc); - - return ref this; - } - - /// - /// Make unit a prefix. - /// - /// - /// - /// - /// - public ref Entity UnitPrefix(string symbol, int factor = 0, int power = 0) - { - using NativeString nativeSymbol = (NativeString)symbol; - - ecs_unit_prefix_desc_t desc = default; - desc.entity = Id; - desc.symbol = nativeSymbol; - desc.translation.factor = factor; - desc.translation.power = power; - ecs_unit_prefix_init(World, &desc); - - return ref this; - } - - /// - /// Add quantity to unit. - /// - /// - /// - public ref Entity Quantity(ulong quantity) - { - ecs_add_id(World, Id, Ecs.Pair(EcsQuantity, quantity)); - return ref this; - } - - /// - /// Make entity a quantity. - /// - /// - /// - public ref Entity Quantity() - { - return ref Quantity(Type.Id(World)); - } - - /// - /// Make entity a quantity. - /// - /// - public ref Entity Quantity() - { - ecs_add_id(World, Id, EcsQuantity); - return ref this; - } - - /// - /// Set component from JSON. - /// - /// - /// - /// - /// - public ref Entity SetJson(ulong e, string json, ecs_from_json_desc_t* desc = null) - { - ulong type = ecs_get_typeid(World, e); - - if (type == 0) - { - Ecs.Error("Id is not a type"); - return ref this; - } - - void* ptr = ecs_ensure_id(World, Id, e); - Ecs.Assert(ptr != null, nameof(ECS_INTERNAL_ERROR)); - - using NativeString nativeJson = (NativeString)json; - - ecs_ptr_from_json(World, type, ptr, nativeJson, desc); - ecs_modified_id(World, Id, e); - - return ref this; - } - - /// - /// Set pair from JSON. - /// - /// - /// - /// - /// - /// - public ref Entity SetJson(ulong first, ulong second, string json, ecs_from_json_desc_t* desc = null) - { - return ref SetJson(Ecs.Pair(first, second), json, desc); - } - - /// - /// Set component from JSON. - /// - /// - /// - /// - /// - public ref Entity SetJson(string json, ecs_from_json_desc_t* desc = null) - { - return ref SetJson(Type.Id(World), json, desc); - } - - /// - /// Set pair from JSON. - /// - /// - /// - /// - /// - /// - public ref Entity SetJson(ulong second, string json, ecs_from_json_desc_t* desc = null) - { - return ref SetJson(Ecs.Pair(second, World), json, desc); - } - - /// - /// Set pair from JSON. - /// - /// - /// - /// - /// - /// - public ref Entity SetJson(string json, ecs_from_json_desc_t* desc = null) - { - return ref SetJson(Ecs.Pair(World), json, desc); - } - - /// - /// Set pair from JSON. - /// - /// - /// - /// - /// - /// - /// - public ref Entity SetJson(TSecond second, string json, ecs_from_json_desc_t* desc = null) - where TSecond : Enum - { - return ref SetJson(Type.Id(World, second), json, desc); - } - - /// - /// Set pair from JSON. - /// - /// - /// - /// - /// - /// - /// - public ref Entity SetJson(TFirst first, string json, ecs_from_json_desc_t* desc = null) - where TFirst : Enum - { - return ref SetJsonSecond(Type.Id(World, first), json, desc); - } - - /// - /// Set pair from JSON. - /// - /// - /// - /// - /// - /// - public ref Entity SetJsonSecond(ulong first, string json, ecs_from_json_desc_t* desc = null) - { - return ref SetJson(first, Type.Id(World), json, desc); - } - - /// - /// Observe an event on this entity. - /// - /// - /// - /// - public ref Entity Observe(ulong eventId, Action callback) - { - return ref ObserveInternal(eventId, callback, (delegate*)&Functions.ActionCallbackDelegate); - } - - /// - /// Observe an event on this entity. - /// - /// - /// - /// - public ref Entity Observe(ulong eventId, Ecs.ObserveEntityCallback callback) - { - return ref ObserveInternal(eventId, callback, (delegate*)&Functions.ObserveEntityCallbackDelegate); - } - - /// - /// Observe an event on this entity. - /// - /// - /// - /// - public ref Entity Observe(Action callback) - { - return ref Observe(Type.Id(World), callback); - } - - /// - /// Observe an event on this entity. - /// - /// - /// - /// - public ref Entity Observe(Ecs.ObserveEntityCallback callback) - { - return ref Observe(Type.Id(World), callback); - } - - /// - /// Observe an event on this entity. - /// - /// - /// - /// - public ref Entity Observe(Ecs.ObserveRefCallback callback) - { - return ref ObserveInternal(Type.Id(World), callback, (delegate*)&Functions.ObserveRefCallbackDelegate); - } - - /// - /// Observe an event on this entity. - /// - /// - /// - /// - public ref Entity Observe(Ecs.ObserveEntityRefCallback callback) - { - return ref ObserveInternal(Type.Id(World), callback, (delegate*)&Functions.ObserveEntityRefCallbackDelegate); - } - - /// - /// Get mutable component value (untyped). - /// - /// - /// - public void* EnsurePtr(ulong id) - { - return ecs_ensure_id(World, Id, id); - } - - /// - /// Get mutable pointer for a pair (untyped). - /// - /// - /// - /// - public void* EnsurePtr(ulong first, ulong second) - { - return EnsurePtr(Ecs.Pair(first, second)); - } - - /// - /// Get mutable component value. - /// - /// - /// - public T* EnsurePtr() where T : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (T*)ecs_ensure_id(World, Id, Type.Id(World)); - } - - /// - /// Get mutable pointer for the first element of a pair. - /// - /// - /// - /// - public TFirst* EnsurePtr(ulong second) where TFirst : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TFirst*)EnsurePtr(Ecs.Pair(second, World)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - /// - public TFirst* EnsurePtr(TSecond second) - where TFirst : unmanaged - where TSecond : Enum - { - return EnsurePtr(Type.Id(World, second)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - /// - public TSecond* EnsurePtr(TFirst first) - where TFirst : Enum - where TSecond : unmanaged - { - return EnsureSecondPtr(Type.Id(World, first)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - public TFirst* EnsureFirstPtr() where TFirst : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TFirst*)EnsurePtr(Ecs.Pair(World)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - public TSecond* EnsureSecondPtr() where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)EnsurePtr(Ecs.Pair(World)); - } - - /// - /// Get mutable pointer for a pair. - /// - /// - /// - /// - public TSecond* EnsureSecondPtr(ulong first) where TSecond : unmanaged - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return (TSecond*)EnsurePtr(Ecs.PairSecond(first, World)); - } - - /// - /// Get mutable managed reference for component. - /// - /// - /// - public ref T Ensure() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(ecs_ensure_id(World, Id, Type.Id(World))); - } - - /// - /// Get mutable managed reference for the first element of a pair. - /// - /// - /// - /// - public ref TFirst Ensure(ulong second) - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(EnsurePtr(Ecs.Pair(second, World))); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - /// - public ref TFirst Ensure(TSecond second) where TSecond : Enum - { - return ref Ensure(Type.Id(World, second)); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - /// - public ref TSecond Ensure(TFirst first) where TFirst : Enum - { - return ref EnsureSecond(Type.Id(World, first)); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - public ref TFirst EnsureFirst() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(EnsurePtr(Ecs.Pair(World))); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - public ref TSecond EnsureSecond() - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(EnsurePtr(Ecs.Pair(World))); - } - - /// - /// Get mutable managed reference for pair. - /// - /// - /// - /// - public ref TSecond EnsureSecond(ulong first) - { - Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); - return ref Managed.GetTypeRef(EnsurePtr(Ecs.PairSecond(first, World))); - } - - /// - /// Signal that component was modified. - /// - /// - public void Modified(ulong id) - { - ecs_modified_id(World, Id, id); - } - - /// - /// Signal that pair was modified. - /// - /// - /// - public void Modified(ulong first, ulong second) - { - Modified(Ecs.Pair(first, second)); - } - - /// - /// Signal that component was modified. - /// - /// - public void Modified() - { - Modified(Type.Id(World)); - } - - /// - /// Signal that component was modified. - /// - /// - public void Modified(T value) where T : Enum - { - Modified(Type.Id(World, value)); - } - - /// - /// Signal that a pair was modified. - /// - /// - /// - public void Modified(ulong second) - { - Modified(Ecs.Pair(second, World)); - } - - /// - /// Signal that a pair was modified. - /// - /// - /// - public void Modified() - { - Modified(Ecs.Pair(World)); - } - - /// - /// Signal that a pair was modified. - /// - /// - /// - /// - public void Modified(TSecond second) where TSecond : Enum - { - Modified(Type.Id(World, second)); - } - - /// - /// Signal that a pair was modified. - /// - /// - /// - /// - public void Modified(TFirst first) where TFirst : Enum - { - ModifiedSecond(Type.Id(World, first)); - } - - /// - /// Signal that a pair was modified. - /// - /// - /// - public void ModifiedSecond(ulong first) - { - Modified(first, Type.Id(World)); - } - - /// - /// Get reference to component. - /// - /// - /// - public Ref GetRef() - { - return new Ref(World, Id); - } - - /// - /// Get ref to pair component. - /// - /// - /// - /// - public Ref GetRef(ulong second) - { - return new Ref(World, Id, Ecs.Pair(second, World)); - } - - /// - /// Get ref to pair component. - /// - /// - /// - /// - /// - public Ref GetRef(TSecond second) where TSecond : Enum - { - return GetRef(Type.Id(World, second)); - } - - /// - /// Get ref to pair component. - /// - /// - /// - /// - /// - public Ref GetRef(TFirst first) where TFirst : Enum - { - return GetRefSecond(Type.Id(World, first)); - } - - /// - /// Get ref to pair component. - /// - /// - /// - /// - public Ref GetRefFirst() - { - return new Ref(World, Id, Ecs.Pair(World)); - } - - /// - /// Get ref to pair component. - /// - /// - /// - /// - public Ref GetRefSecond() - { - return new Ref(World, Id, Ecs.Pair(World)); - } - - /// - /// Get ref to pair component. - /// - /// - /// - /// - public Ref GetRefSecond(ulong first) - { - return new Ref(World, Id, Ecs.PairSecond(first, World)); - } - - /// - /// Clear an entity. - /// - public void Clear() - { - ecs_clear(World, Id); - } - - /// - /// Delete an entity. - /// - public void Destruct() - { - ecs_delete(World, Id); - } - - /// - /// Deserialize entity to JSON. - /// - /// - /// - public string FromJson(string json) - { - using NativeString nativeJson = (NativeString)json; - return NativeString.GetString(ecs_entity_from_json(World, Id, nativeJson, null)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private ref Entity SetInternal(ulong id, in T component) - { - fixed (T* ptr = &component) - return ref SetInternal(id, ptr); - } - - private ref Entity SetInternal(ulong id, T* component) - { - Ecs.Assert(!Type.IsTag, "Empty structs can't be used as components. Use .Add() to add them as tags instead."); - -#if DEBUG - if (Ecs.IsPair(id) && !Ecs.TypeIdIs(World, id)) - { - Id pair = new Id(World, id); - Entity expected = new Entity(World, ecs_get_typeid(World, id)); - Entity provided = new Entity(World, Type.Id(World)); - - Ecs.Error(expected == 0 - ? $"Attempted to set component data for tag pair.\n[Pair]: {pair}" - : $"Attempted to set component data for incorrect pair type.\n[Pair]: {pair}\n[Expected Type]: {expected}\n[Provided Type]: {provided}"); - - return ref this; - } -#endif - - if (RuntimeHelpers.IsReferenceOrContainsReferences()) - { - Managed.AllocGcHandle(component, out GCHandle handle); - ecs_set_id(World, Id, id, sizeof(GCHandle), &handle); - Managed.FreeGcHandle(handle); - } - else - { - ecs_set_id(World, Id, id, sizeof(T), component); - } - - return ref this; - } - - private ref Entity ObserveInternal(ulong eventId, T callback, void* invoker) where T : Delegate - { - IteratorContext* iteratorContext = Memory.AllocZeroed(1); - iteratorContext->Callback.Set(callback, invoker); - - ecs_observer_desc_t desc = default; - desc.events[0] = eventId; - desc.query.terms[0].id = EcsAny; - desc.query.terms[0].src.id = Id; - desc.callback = &Functions.IteratorCallback; - desc.callback_ctx = iteratorContext; - desc.callback_ctx_free = &Functions.IteratorContextFree; - - ulong observer = ecs_observer_init(World, &desc); - ecs_add_id(World, observer, Ecs.Pair(EcsChildOf, Id)); - - return ref this; - } - - private ref Entity ObserveInternal(ulong eventId, void* callback, void* invoker) where T : Delegate - { - IteratorContext* iteratorContext = Memory.AllocZeroed(1); - iteratorContext->Callback.Set(callback, invoker); - - ecs_observer_desc_t desc = default; - desc.events[0] = eventId; - desc.query.terms[0].id = EcsAny; - desc.query.terms[0].src.id = Id; - desc.callback = &Functions.IteratorCallback; - desc.callback_ctx = iteratorContext; - desc.callback_ctx_free = &Functions.IteratorContextFree; - - ulong observer = ecs_observer_init(World, &desc); - ecs_add_id(World, observer, Ecs.Pair(EcsChildOf, Id)); - - return ref this; - } - - /// - /// Converts an instance to its integer id. - /// - /// - /// - public static implicit operator ulong(Entity entity) - { - return ToUInt64(entity); - } - - /// - /// Converts an instance to its id. - /// - /// - /// - public static implicit operator Id(Entity entity) - { - return ToId(entity); - } - - /// - /// Converts an instance to its integer id. - /// - /// - /// - public static ulong ToUInt64(Entity entity) - { - return entity.Id.Value; - } - - /// - /// Converts an instance to its id. - /// - /// - /// - public static Id ToId(Entity entity) - { - return entity.Id; - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public bool Equals(Entity other) - { - return Id.Value == other.Id.Value; - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Entity entity && Equals(entity); - } - - /// - /// Returns the hash code of the . - /// - /// - public override int GetHashCode() - { - return Id.Value.GetHashCode(); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - /// - public static bool operator ==(Entity left, Entity right) - { - return left.Equals(right); - } - - /// - /// Checks if two instances are not equal. - /// - /// - /// - /// - public static bool operator !=(Entity left, Entity right) - { - return !(left == right); - } - - /// - /// Returns the entity's name if it has one, otherwise return its id. - /// - /// - public override string ToString() - { - return Id.ToString(); - } -} +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Flecs.NET.Core.BindingContext; +using Flecs.NET.Utilities; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// A wrapper for working with entities. +/// +public unsafe partial struct Entity : IEquatable, IEntity +{ + private Id _id; + + /// + /// Reference to world. + /// + public ref ecs_world_t* World => ref _id.World; + + /// + /// Reference to id. + /// + public ref Id Id => ref _id; + + ref Entity IEntity.Entity => ref this; + + /// + /// Returns a null entity. + /// + /// + public static Entity Null() + { + return default; + } + + /// + /// Returns a null entity for the provided world. + /// + /// + /// + public static Entity Null(ecs_world_t* world) + { + return new Entity(world, 0); + } + + /// + /// Creates an entity with the provided id. + /// + /// + public Entity(ulong id) + { + _id = id; + } + + /// + /// Creates an entity for the provided world. + /// + /// + public Entity(ecs_world_t* world) + { + if (ecs_get_scope(world) == 0 && ecs_get_with(world) == 0) + { + _id = new Id(world, ecs_new(world)); + } + else + { + ecs_entity_desc_t desc = default; + _id = new Id(world, ecs_entity_init(world, &desc)); + } + } + + /// + /// Creates an entity from the provided world and id. + /// + /// + /// + public Entity(ecs_world_t* world, ulong id) + { + _id = new Id(world, id); + } + + /// + /// Creates an entity from the provided world and name. + /// + /// + /// + public Entity(ecs_world_t* world, string name) + { + using NativeString nativeName = (NativeString)name; + + ecs_entity_desc_t desc = default; + desc.name = nativeName; + desc.sep = Pointers.DefaultSeparator; + desc.root_sep = Pointers.DefaultSeparator; + + _id = new Id(world, ecs_entity_init(world, &desc)); + } + + /// + /// Check if entity is valid. + /// + /// + public bool IsValid() + { + return World != null && ecs_is_valid(World, Id); + } + + /// + /// Check if entity is alive. + /// + /// + public bool IsAlive() + { + return World != null && ecs_is_alive(World, Id); + } + + /// + /// Return the entity name. + /// + /// + public string Name() + { + return NativeString.GetString(ecs_get_name(World, Id)); + } + + /// + /// Return the entity symbol. + /// + /// + public string Symbol() + { + return NativeString.GetString(ecs_get_symbol(World, Id)); + } + + /// + /// Return the entity path. + /// + /// + /// + /// + public string Path(string sep = Ecs.DefaultSeparator, string initSep = Ecs.DefaultSeparator) + { + return PathFrom(0, sep, initSep); + } + + /// + /// Return the entity path relative to a parent. + /// + /// + /// + /// + /// + public string PathFrom(ulong parent, string sep = Ecs.DefaultSeparator, string initSep = Ecs.DefaultSeparator) + { + using NativeString nativeSep = (NativeString)sep; + using NativeString nativeInitSep = (NativeString)initSep; + + return NativeString.GetStringAndFree(ecs_get_path_w_sep(World, parent, Id, nativeSep, nativeInitSep)); + } + + /// + /// Return the entity path relative to a parent. + /// + /// + /// + /// + /// + public string PathFrom(string sep = Ecs.DefaultSeparator, string initSep = Ecs.DefaultSeparator) + { + return PathFrom(Type.Id(World), sep, initSep); + } + + /// + /// Check if entity is enabled. + /// + /// + public bool Enabled() + { + return !ecs_has_id(World, Id, EcsDisabled); + } + + /// + /// Checks if id is enabled. + /// + /// + /// + public bool Enabled(ulong id) + { + return ecs_is_enabled_id(World, Id, id); + } + + /// + /// Checks if pair is enabled. + /// + /// + /// + /// + public bool Enabled(ulong first, ulong second) + { + return Enabled(Ecs.Pair(first, second)); + } + + /// + /// Checks if type is enabled. + /// + /// + /// + public bool Enabled() + { + return Enabled(Type.Id(World)); + } + + /// + /// Checks if type is enabled. + /// + /// + /// + /// + public bool Enabled(T value) where T : Enum + { + return Enabled(Type.Id(World, value)); + } + + /// + /// Checks if pair is enabled. + /// + /// + /// + /// + public bool Enabled(ulong second) + { + return Enabled(Ecs.Pair(second, World)); + } + + /// + /// Checks if pair is enabled. + /// + /// + /// + /// + public bool Enabled() + { + return Enabled(Ecs.Pair(World)); + } + + /// + /// Checks if pair is enabled. + /// + /// + /// + /// + /// + public bool Enabled(TSecond second) where TSecond : Enum + { + return Enabled(Type.Id(World, second)); + } + + /// + /// Checks if pair is enabled. + /// + /// + /// + /// + /// + public bool Enabled(TFirst first) where TFirst : Enum + { + return EnabledSecond(Type.Id(World, first)); + } + + /// + /// Checks if pair is enabled. + /// + /// + /// + /// + public bool EnabledSecond(ulong first) + { + return Enabled(first, Type.Id(World)); + } + + /// + /// Get the entity's type. + /// + /// + public FlecsType Type() + { + return new FlecsType(World, ecs_get_type(World, Id)); + } + + /// + /// Get the entity's table. + /// + /// + public Table Table() + { + return new Table(World, ecs_get_table(World, Id)); + } + + /// + /// Get table range for the entity. + /// + /// + public Table Range() + { + ecs_record_t* r = ecs_record_find(World, Id); + return r != null ? new Table(World, r->table, Ecs.RecordToRow(r->row), 1) : new Table(); + } + + /// + /// Iterate (component) ids of an entity. + /// + /// + public void Each(Ecs.EachIdCallback func) + { + ecs_type_t* type = ecs_get_type(World, Id); + + if (type == null) + return; + + ulong* ids = type->array; + int count = type->count; + + for (int i = 0; i < count; i++) + func(new Id(World, ids[i])); + } + + /// + /// Iterate matching pair ids of an entity. + /// + /// + /// + /// + public void Each(ulong first, ulong second, Ecs.EachIdCallback func) + { + ecs_world_t* realWorld = ecs_get_world(World); + ecs_table_t* table = ecs_get_table(World, Id); + + if (table == null) + return; + + ecs_type_t* type = ecs_table_get_type(table); + + if (type == null) + return; + + ulong pattern = first; + + if (second != 0) + pattern = Ecs.Pair(first, second); + + int cur = 0; + ulong* ids = type->array; + + while (-1 != (cur = ecs_search_offset(realWorld, table, cur, pattern, null))) + { + func(new Id(World, ids[cur])); + cur++; + } + } + + /// + /// Iterate targets for a given relationship. + /// + /// + /// + public void Each(ulong relation, Ecs.EachEntityCallback func) + { + Each(relation, EcsWildcard, id => { func(id.Second()); }); + } + + /// + /// Iterate targets for a given relationship. + /// + /// + /// + public void Each(Ecs.EachEntityCallback func) + { + Each(Type.Id(World), func); + } + + /// + /// Iterate targets for a given relationship. + /// + /// + /// + /// + public void Each(TFirst relation, Ecs.EachEntityCallback callback) where TFirst : Enum + { + Each(Type.Id(World, relation), callback); + } + + /// + /// Iterate children for entity. + /// + /// + /// + public void Children(ulong relation, Ecs.EachEntityCallback callback) + { + if (Id == EcsWildcard || Id == EcsAny) + return; + + ecs_iter_t it = ecs_each_id(World, Ecs.Pair(relation, Id)); + while (ecs_each_next(&it)) + Invoker.Each(&it, callback); + } + + /// + /// Iterate children for entity. + /// + /// + /// + public void Children(Ecs.EachEntityCallback callback) + { + Children(Type.Id(World), callback); + } + + /// + /// Iterate children for entity. + /// + /// + /// + /// + public void Children(TFirst relation, Ecs.EachEntityCallback callback) where TFirst : Enum + { + Children(Type.Id(World, relation), callback); + } + + /// + /// Iterate children for entity. + /// + /// + public void Children(Ecs.EachEntityCallback callback) + { + Children(EcsChildOf, callback); + } + + /// + /// Get pointer to component value. + /// + /// + /// + public void* GetPtr(ulong compId) + { + return ecs_get_id(World, Id, compId); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + public void* GetPtr(ulong first, ulong second) + { + return GetPtr(Ecs.Pair(first, second)); + } + + /// + /// Get pointer to component value. + /// + /// + /// + public T* GetPtr() where T : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (T*)ecs_get_id(World, Id, Type.Id(World)); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + public TFirst* GetPtr(ulong second) where TFirst : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + + if (!typeof(TFirst).IsEnum || (second != Ecs.Wildcard && second != Ecs.Any)) + return (TFirst*)GetPtr(Ecs.Pair(second, World)); + + Entity target = Target(); + return target == 0 ? null : (TFirst*)target.GetPtr(EcsConstant, Type.UnderlyingTypeId); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + /// + public TFirst* GetPtr(TSecond second) + where TFirst : unmanaged + where TSecond : Enum + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TFirst*)GetPtr(Ecs.Pair(second, World)); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + /// + public TSecond* GetPtr(TFirst first) + where TFirst : Enum + where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)GetPtr(Ecs.Pair(first, World)); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + public TFirst* GetFirstPtr() where TFirst : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TFirst*)GetPtr(Ecs.Pair(World)); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + public TSecond* GetSecondPtr() where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)GetPtr(Ecs.Pair(World)); + } + + /// + /// Get pointer to component value from pair. + /// + /// + /// + /// + public TSecond* GetSecondPtr(ulong first) where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)GetPtr(Ecs.PairSecond(first, World)); + } + + /// + /// Get managed reference to component value. + /// + /// + /// + public ref readonly T Get() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(ecs_get_id(World, Id, Type.Id(World))); + } + + /// + /// Get managed reference to component value from pair. + /// + /// + /// + /// + public ref readonly TFirst Get(ulong second) + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + + if (!typeof(TFirst).IsEnum || (second != Ecs.Wildcard && second != Ecs.Any)) + return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(second, World))); + + Entity target = Target(); + return ref target == 0 ? ref Unsafe.NullRef() : ref Managed.GetTypeRef(target.GetPtr(EcsConstant, Type.UnderlyingTypeId)); + } + + /// + /// Get managed reference to component value from pair. + /// + /// + /// + /// + /// + public ref readonly TFirst Get(TSecond second) where TSecond : Enum + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(second, World))); + } + + /// + /// Get managed reference to component value from pair. + /// + /// + /// + /// + /// + public ref readonly TSecond Get(TFirst first) where TFirst : Enum + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(first, World))); + } + + /// + /// Get managed reference to component value from pair. + /// + /// + /// + /// + public ref readonly TFirst GetFirst() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(World))); + } + + /// + /// Get managed reference to component value from pair. + /// + /// + /// + /// + public ref readonly TSecond GetSecond() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetPtr(Ecs.Pair(World))); + } + + /// + /// Get managed reference to component value from pair. + /// + /// + /// + /// + public ref readonly TSecond GetSecond(ulong first) + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetPtr(Ecs.PairSecond(first, World))); + } + + /// + /// Get mutable component value (untyped). + /// + /// + /// + public void* GetMutPtr(ulong id) + { + return ecs_get_mut_id(World, Id, id); + } + + /// + /// Get mutable pointer for a pair (untyped). + /// + /// + /// + /// + public void* GetMutPtr(ulong first, ulong second) + { + return GetMutPtr(Ecs.Pair(first, second)); + } + + /// + /// Get mutable component value. + /// + /// + /// + public T* GetMutPtr() where T : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (T*)ecs_get_mut_id(World, Id, Type.Id(World)); + } + + /// + /// Get mutable pointer for the first element of a pair. + /// + /// + /// + /// + public TFirst* GetMutPtr(ulong second) where TFirst : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TFirst*)GetMutPtr(Ecs.Pair(second, World)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + /// + public TFirst* GetMutPtr(TSecond second) + where TFirst : unmanaged + where TSecond : Enum + { + return GetMutPtr(Type.Id(World, second)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + /// + public TSecond* GetMutPtr(TFirst first) + where TFirst : Enum + where TSecond : unmanaged + { + return GetMutSecondPtr(Type.Id(World, first)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + public TFirst* GetMutFirstPtr() where TFirst : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TFirst*)GetMutPtr(Ecs.Pair(World)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + public TSecond* GetMutSecondPtr() where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)GetMutPtr(Ecs.Pair(World)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + public TSecond* GetMutSecondPtr(ulong first) where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)GetMutPtr(Ecs.PairSecond(first, World)); + } + + /// + /// Get mutable managed reference for component. + /// + /// + /// + public ref T GetMut() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(ecs_get_mut_id(World, Id, Type.Id(World))); + } + + /// + /// Get mutable managed reference for the first element of a pair. + /// + /// + /// + /// + public ref TFirst GetMut(ulong second) + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetMutPtr(Ecs.Pair(second, World))); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + /// + public ref TFirst GetMut(TSecond second) where TSecond : Enum + { + return ref GetMut(Type.Id(World, second)); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + /// + public ref TSecond GetMut(TFirst first) where TFirst : Enum + { + return ref GetMutSecond(Type.Id(World, first)); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + public ref TFirst GetMutFirst() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetMutPtr(Ecs.Pair(World))); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + public ref TSecond GetMutSecond() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetMutPtr(Ecs.Pair(World))); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + public ref TSecond GetMutSecond(ulong first) + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(GetMutPtr(Ecs.PairSecond(first, World))); + } + + /// + /// Get target for a given pair. + /// + /// + /// + /// + public Entity Target(ulong relation, int index = 0) + { + return new Entity(World, ecs_get_target(World, Id, relation, index)); + } + + /// + /// Get target for a given pair. + /// + /// + /// + /// + public Entity Target(int index = 0) + { + return new Entity(World, ecs_get_target(World, Id, Type.Id(World), index)); + } + + /// + /// Get the target of a pair for a given relationship id. + /// + /// + /// + /// + public Entity TargetFor(ulong relation, ulong id) + { + return new Entity(World, ecs_get_target_for_id(World, Id, relation, id)); + } + + /// + /// Get the target of a pair for a given relationship id. + /// + /// + /// + /// + public Entity TargetFor(ulong relation) + { + return new Entity(World, TargetFor(relation, Type.Id(World))); + } + + /// + /// Get the target of a pair for a given relationship id. + /// + /// + /// + /// + /// + public Entity TargetFor(ulong relation) + { + ulong pair = Ecs.Pair(World); + return new Entity(World, TargetFor(relation, pair)); + } + + /// + /// Get depth for given relationship. + /// + /// + /// + public int Depth(ulong rel) + { + return ecs_get_depth(World, Id, rel); + } + + /// + /// Get depth for given relationship. + /// + /// + /// + public int Depth() + { + return Depth(Type.Id(World)); + } + + /// + /// Get depth for given relationship. + /// + /// + /// + /// + public int Depth(T value) where T : Enum + { + return Depth(Type.Id(World, value)); + } + + /// + /// Get parent of entity. + /// + /// + public Entity Parent() + { + return Target(EcsChildOf); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// Recursively traverse up the tree until entity is found. + /// True if the entity was found, else false. + public Entity Lookup(string path, bool recursive = false) + { + Ecs.Assert(Id != 0, "Invalid lookup from null handle."); + using NativeString nativePath = (NativeString)path; + ulong id = ecs_lookup_path_w_sep(World, Id, nativePath, + Pointers.DefaultSeparator, Pointers.DefaultSeparator, recursive); + return new Entity(World, id); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, out Entity entity) + { + return TryLookup(path, false, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, bool recursive, out Entity entity) + { + return (entity = Lookup(path, recursive)) != 0; + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, out ulong entity) + { + return TryLookup(path, false, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, bool recursive, out ulong entity) + { + return (entity = Lookup(path, recursive)) != 0; + } + + /// + /// Check if entity has the provided entity. + /// + /// + /// + public bool Has(ulong id) + { + return ecs_has_id(World, Id, id); + } + + /// + /// Check if entity has the provided pair. + /// + /// + /// + /// + public bool Has(ulong first, ulong second) + { + return Has(Ecs.Pair(first, second)); + } + + /// + /// Check if entity has the provided component. + /// + /// + /// + public bool Has() + { + return ecs_has_id(World, Id, Type.Id(World)); + } + + /// + /// Check if entity has the provided enum constant. + /// + /// + /// + /// + public bool Has(T value) where T : Enum + { + return Has(Type.Id(World, value)); + } + + /// + /// Check if entity has the provided pair. + /// + /// + /// + /// + public bool Has(ulong second) + { + return Has(Ecs.Pair(second, World)); + } + + /// + /// Check if entity has the provided pair. + /// + /// + /// + /// + public bool Has() + { + return Has(Ecs.Pair(World)); + } + + /// + /// Check if entity has the provided pair. + /// + /// + /// + /// + /// + public bool Has(TSecond second) where TSecond : Enum + { + return Has(Type.Id(World, second)); + } + + /// + /// Check if entity has the provided pair. + /// + /// + /// + /// + /// + public bool Has(TFirst first) where TFirst : Enum + { + return HasSecond(Type.Id(World, first)); + } + + /// + /// Check if entity has the provided pair. + /// + /// + /// + /// + public bool HasSecond(ulong first) + { + return Has(first, Type.Id(World)); + } + + /// + /// Check if entity owns the provided entity. + /// + /// + /// + public bool Owns(ulong id) + { + return ecs_owns_id(World, Id, id); + } + + /// + /// Check if entity owns the provided pair. + /// + /// + /// + /// + public bool Owns(ulong first, ulong second) + { + return Owns(Ecs.Pair(first, second)); + } + + /// + /// Check if entity owns the provided component. + /// + /// + /// + public bool Owns() + { + return Owns(Type.Id(World)); + } + + /// + /// Check if entity owns the provided component. + /// + /// + /// + /// + public bool Owns(T value) where T : Enum + { + return Owns(Type.Id(World, value)); + } + + /// + /// Check if entity owns the provided pair. + /// + /// + /// + /// + public bool Owns(ulong second) + { + return Owns(Ecs.Pair(second, World)); + } + + /// + /// Check if entity owns the provided pair. + /// + /// + /// + /// + public bool Owns() + { + return Owns(Ecs.Pair(World)); + } + + /// + /// Check if entity owns the provided pair. + /// + /// + /// + /// + /// + public bool Owns(TSecond second) where TSecond : Enum + { + return Owns(Type.Id(World, second)); + } + + /// + /// Check if entity owns the provided pair. + /// + /// + /// + /// + /// + public bool Owns(TFirst first) where TFirst : Enum + { + return OwnsSecond(Type.Id(World, first)); + } + + /// + /// Check if entity owns the provided pair. + /// + /// + /// + /// + public bool OwnsSecond(ulong first) + { + return Owns(first, Type.Id(World)); + } + + /// + /// Clones the entity. + /// + /// + /// + /// + public Entity Clone(bool cloneValue = true, ulong dstId = 0) + { + if (dstId == 0) + dstId = ecs_new(World); + + Entity dst = new Entity(World, dstId); + ecs_clone(World, dstId, Id, cloneValue); + return dst; + } + + /// + /// Return mutable entity handle for current stage. + /// + /// + /// + public Entity Mut(ref World stage) + { + Ecs.Assert(!stage.IsReadOnly(), "Cannot use readonly world/stage to create mutable handle"); + return new Entity(Id).SetStage(stage); + } + + /// + /// Return mutable entity handle for current iter. + /// + /// + /// + public Entity Mut(ref Iter it) + { + Ecs.Assert(!it.World().IsReadOnly(), + "Cannot use iterator created for readonly world/stage to create mutable handle"); + return new Entity(Id).SetStage(it.World()); + } + + /// + /// Return mutable entity handle for current entity. + /// + /// + /// + public Entity Mut(ref Entity entity) + { + Ecs.Assert(!entity.CsWorld().IsReadOnly(), + "Cannot use entity created for readonly world/stage to create mutable handle"); + return new Entity(Id).SetStage(entity.World); + } + + /// + /// Return mutable entity handle for current stage. + /// + /// + /// + public Entity Mut(World stage) + { + return Mut(ref stage); + } + + /// + /// Return mutable entity handle for current iter. + /// + /// + /// + public Entity Mut(Iter it) + { + return Mut(ref it); + } + + /// + /// Return mutable entity handle for current entity. + /// + /// + /// + public Entity Mut(Entity entity) + { + return Mut(ref entity); + } + + private Entity SetStage(ecs_world_t* stage) + { + return new Entity(stage, Id); + } + + /// + /// Serializes the entity to a JSON string using the provided description. + /// + /// The description settings for JSON serialization. + /// A JSON string with the serialized entity data, or an empty string if failed. + public string ToJson(in EntityToJsonDesc desc) + { + fixed (ecs_entity_to_json_desc_t* ptr = &desc.Desc) + { + return NativeString.GetStringAndFree(ecs_entity_to_json(World, Id, ptr)); + } + } + + /// + /// Serializes the entity to a JSON string. + /// + /// A JSON string with the serialized entity data, or an empty string if failed. + public string ToJson() + { + return NativeString.GetStringAndFree(ecs_entity_to_json(World, Id, null)); + } + + /// + /// Returns the entity's doc name. + /// + /// + public string DocName() + { + return NativeString.GetString(ecs_doc_get_name(World, Id)); + } + + /// + /// Returns the entity's doc brief. + /// + /// + public string DocBrief() + { + return NativeString.GetString(ecs_doc_get_brief(World, Id)); + } + + /// + /// Returns the entity's doc detail. + /// + /// + public string DocDetail() + { + return NativeString.GetString(ecs_doc_get_detail(World, Id)); + } + + /// + /// Returns the entity's doc detail. + /// + /// + public string DocLink() + { + return NativeString.GetString(ecs_doc_get_link(World, Id)); + } + + /// + /// Returns the entity's doc color. + /// + /// + public string DocColor() + { + return NativeString.GetString(ecs_doc_get_color(World, Id)); + } + + /// + /// Returns the entity's doc uuid. + /// + /// + public string DocUuid() + { + return NativeString.GetString(ecs_doc_get_uuid(World, Id)); + } + + /// + /// Return number of alerts for entity. + /// + /// + /// + public int AlertCount(ulong alert = 0) + { + return ecs_get_alert_count(World, Id, alert); + } + + /// + /// Convert entity to enum constant. + /// + /// + /// + public T ToConstant() where T : unmanaged, Enum + { + T* ptr = (T*)GetPtr(Ecs.Constant, Type.UnderlyingTypeId); + Ecs.Assert(ptr != null, "Entity is not a constant"); + return *ptr; + } + + /// + /// Emits an event for this entity. + /// + /// + public void Emit(ulong eventId) + { + new World(World) + .Event(eventId) + .Entity(Id) + .Emit(); + } + + /// + /// Emits an event for this entity. + /// + /// + public void Emit(Entity eventId) + { + Emit(eventId.Id.Value); + } + + /// + /// Emits an event for this entity. + /// + /// + public void Emit() + { + Emit(Type.Id(World)); + } + + /// + /// Emits an event for this entity. + /// + /// + public void Emit(T payload) where T : unmanaged + { + new World(World) + .Event(Type.Id(World)) + .Entity(Id) + .Ctx(&payload) + .Emit(); + } + + /// + /// Emits an event for this entity. + /// + /// + /// + public void Emit(ref T payload) + { + fixed (T* ptr = &payload) + { + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + Managed.AllocGcHandle(ptr, out GCHandle handle); + + new World(World) + .Event(Type.Id(World)) + .Entity(Id) + .Ctx(&handle) + .Emit(); + + Managed.FreeGcHandle(handle); + } + else + { + new World(World) + .Event(Type.Id(World)) + .Entity(Id) + .Ctx(ptr) + .Emit(); + } + } + } + + /// + /// Enqueues an event for this entity. + /// + /// + public void Enqueue(ulong eventId) + { + new World(World) + .Event(eventId) + .Entity(Id) + .Enqueue(); + } + + /// + /// Enqueues an event for this entity. + /// + /// + public void Enqueue(Entity eventId) + { + Enqueue(eventId.Id.Value); + } + + /// + /// Enqueues an event for this entity. + /// + /// + public void Enqueue() + { + Enqueue(Type.Id(World)); + } + + /// + /// Enqueues an event for this entity. + /// + /// + /// + public void Enqueue(T payload) where T : unmanaged + { + new World(World) + .Event(Type.Id(World)) + .Entity(Id) + .Ctx(&payload) + .Enqueue(); + } + + /// + /// Enqueues an event for this entity. + /// + /// + /// + public void Enqueue(ref T payload) + { + fixed (T* ptr = &payload) + { + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + Managed.AllocGcHandle(ptr, out GCHandle handle); + + new World(World) + .Event(Type.Id(World)) + .Entity(Id) + .Ctx(&handle) + .Enqueue(); + + Managed.FreeGcHandle(handle); + } + else + { + new World(World) + .Event(Type.Id(World)) + .Entity(Id) + .Ctx(ptr) + .Enqueue(); + } + } + } + + /// + /// Short for Has(EcsChildOf, entity). + /// + /// + /// + public bool IsChildOf(ulong entity) + { + Ecs.Assert(!Ecs.IsPair(entity), "Cannot use pairs as an argument."); + return Has(EcsChildOf, entity); + } + + /// + /// Short for Has(EcsChildOf, entity). + /// + /// + /// + public bool IsChildOf() + { + return IsChildOf(Type.Id(World)); + } + + /// + /// Short for Has(EcsChildOf, entity). + /// + /// + /// + /// + public bool IsChildOf(T value) where T : Enum + { + return IsChildOf(Type.Id(World, value)); + } + + /// + /// Add an entity to entity. + /// + /// + /// + public ref Entity Add(ulong id) + { + Ecs.Assert(ecs_id_is_valid(World, id), nameof(ECS_INVALID_OPERATION)); + ecs_add_id(World, Id, id); + return ref this; + } + + /// + /// Add pair to entity. + /// + /// + /// + /// + public ref Entity Add(ulong first, ulong second) + { + return ref Add(Ecs.Pair(first, second)); + } + + /// + /// Add a component to entity. + /// + /// + /// + public ref Entity Add() + { + return ref Add(Type.Id(World)); + } + + /// + /// Add a pair to entity. + /// + /// + /// + /// + public ref Entity Add(ulong second) + { + return ref Add(Ecs.Pair(second, World)); + } + + /// + /// Add an enum to entity. + /// + /// + /// + /// + public ref Entity Add(T value) where T : Enum + { + return ref Add(Type.Id(World, value)); + } + + /// + /// Add a pair to entity. + /// + /// + /// + /// + public ref Entity Add() + { + return ref Add(Type.Id(World)); + } + + /// + /// Add a pair to entity. + /// + /// + /// + /// + /// + public ref Entity Add(TSecond second) where TSecond : Enum + { + return ref Add(Type.Id(World, second)); + } + + /// + /// Add a pair to entity. + /// + /// + /// + /// + /// + public ref Entity Add(TFirst first) where TFirst : Enum + { + return ref AddSecond(Type.Id(World, first)); + } + + /// + /// Add a pair to entity. + /// + /// + /// + /// + public ref Entity AddSecond(ulong first) + { + return ref Add(first, Type.Id(World)); + } + + /// + /// Conditionally adds an entity to entity. + /// + /// + /// + /// + public ref Entity AddIf(bool cond, ulong id) + { + return ref cond ? ref Add(id) : ref Remove(id); + } + + /// + /// Conditionally adds a pair to entity. + /// + /// + /// + /// + /// + public ref Entity AddIf(bool cond, ulong first, ulong second) + { + if (cond) + return ref Add(first, second); + + if (second == 0 || ecs_has_id(World, first, EcsExclusive)) + second = EcsWildcard; + + return ref Remove(first, second); + } + + /// + /// Conditionally adds a component to entity. + /// + /// + /// + /// + public ref Entity AddIf(bool cond) + { + return ref cond ? ref Add() : ref Remove(); + } + + /// + /// Conditionally adds an enum to entity. + /// + /// + /// + /// + /// + public ref Entity AddIf(bool cond, T value) where T : Enum + { + return ref AddIf(cond, Type.Id(World, value)); + } + + /// + /// Conditionally adds a pair to entity. + /// + /// + /// + /// + /// + public ref Entity AddIf(bool cond, ulong second) + { + return ref AddIf(cond, Type.Id(World), second); + } + + /// + /// Conditionally adds a pair to entity. + /// + /// + /// + /// + /// + public ref Entity AddIf(bool cond) + { + return ref AddIf(cond, Type.Id(World)); + } + + /// + /// Conditionally adds a pair to entity. + /// + /// + /// + /// + /// + /// + public ref Entity AddIf(bool cond, TSecond second) where TSecond : Enum + { + return ref AddIf(cond, Type.Id(World, second)); + } + + /// + /// Conditionally adds a pair to entity. + /// + /// + /// + /// + /// + /// + public ref Entity AddIf(bool cond, TFirst first) where TFirst : Enum + { + return ref AddIfSecond(cond, Type.Id(World, first)); + } + + /// + /// Conditionally adds a pair to entity. + /// + /// + /// + /// + /// + public ref Entity AddIfSecond(bool cond, ulong first) + { + return ref AddIf(cond, first, Type.Id(World)); + } + + /// + /// Shortcut for Add(EcsIsA, entity). + /// + /// + /// + public ref Entity IsA(ulong id) + { + return ref Add(EcsIsA, id); + } + + /// + /// Shortcut for Add(EcsIsA, entity). + /// + /// + /// + public ref Entity IsA() + { + return ref Add(EcsIsA, Type.Id(World)); + } + + /// + /// Shortcut for Add(EcsIsA, entity). + /// + /// + /// + /// + public ref Entity IsA(T value) where T : Enum + { + return ref IsA(Type.Id(World, value)); + } + + /// + /// Shortcut for Add(EcsChildOf, entity). + /// + /// + /// + public ref Entity ChildOf(ulong second) + { + return ref Add(EcsChildOf, second); + } + + /// + /// Shortcut for Add(EcsChildOf, entity). + /// + /// + /// + public ref Entity ChildOf() + { + return ref Add(EcsChildOf, Type.Id(World)); + } + + /// + /// Shortcut for Add(EcsChildOf, entity). + /// + /// + /// + /// + public ref Entity ChildOf(T value) where T : Enum + { + return ref ChildOf(Type.Id(World, value)); + } + + /// + /// Shortcut for Add(EcDependsOn, entity). + /// + /// + /// + public ref Entity DependsOn(ulong second) + { + return ref Add(EcsDependsOn, second); + } + + /// + /// Shortcut for Add(EcDependsOn, entity). + /// + /// + /// + public ref Entity DependsOn() + { + return ref DependsOn(Type.Id(World)); + } + + /// + /// Shortcut for Add(EcDependsOn, entity). + /// + /// + /// + /// + public ref Entity DependsOn(T value) where T : Enum + { + return ref DependsOn(Type.Id(World, value)); + } + + /// + /// Shortcut for Add(EcsSlotOf, entity). + /// + /// + /// + public ref Entity SlotOf(ulong id) + { + return ref Add(EcsSlotOf, id); + } + + /// + /// Shortcut for Add(EcsSlotOf, entity). + /// + /// + /// + public ref Entity SlotOf() + { + return ref Add(EcsSlotOf, Type.Id(World)); + } + + /// + /// Shortcut for Add(EcsSlotOf, entity). + /// + /// + /// + /// + public ref Entity SlotOf(T value) where T : Enum + { + return ref SlotOf(Type.Id(World, value)); + } + + /// + /// Shortcut for Add(EcsSlotOf, Target(EcsChildOf)). + /// + /// + public ref Entity Slot() + { + Ecs.Assert(ecs_get_target(World, Id, EcsChildOf, 0) != 0, "Add ChildOf pair before using slot()"); + return ref SlotOf(Target(EcsChildOf)); + } + + /// + /// Remove an entity from entity. + /// + /// + /// + public ref Entity Remove(ulong id) + { + ecs_remove_id(World, Id, id); + return ref this; + } + + /// + /// Remove a pair from entity. + /// + /// + /// + /// + public ref Entity Remove(ulong first, ulong second) + { + return ref Remove(Ecs.Pair(first, second)); + } + + /// + /// Remove a component from entity. If the provided type argument is an enum, + /// this operation will remove any (Enum, *) pair from the entity. + /// + /// + /// + public ref Entity Remove() + { + return ref Remove(Type.Id(World)); + } + + /// + /// Remove an enum from entity. + /// + /// + /// + /// + public ref Entity Remove(T value) where T : Enum + { + return ref Remove(Type.Id(World, value)); + } + + /// + /// Remove a pair from entity. + /// + /// + /// + /// + public ref Entity Remove(ulong second) + { + return ref Remove(Ecs.Pair(second, World)); + } + + /// + /// Remove a pair from entity. + /// + /// + /// + /// + public ref Entity Remove() + { + return ref Remove(Ecs.Pair(World)); + } + + /// + /// Remove a pair from entity. + /// + /// + /// + /// + /// + public ref Entity Remove(TSecond second) where TSecond : Enum + { + return ref Remove(Type.Id(World, second)); + } + + /// + /// Remove a pair from entity. + /// + /// + /// + /// + /// + public ref Entity Remove(TFirst first) where TFirst : Enum + { + return ref RemoveSecond(Type.Id(World, first)); + } + + /// + /// Remove a pair from entity. + /// + /// + /// + /// + public ref Entity RemoveSecond(ulong first) + { + return ref Remove(first, Type.Id(World)); + } + + /// + /// Mark id for auto-overriding. + /// + /// + /// + public ref Entity AutoOverride(ulong id) + { + ecs_add_id(World, Id, ECS_AUTO_OVERRIDE | id); + return ref this; + } + + /// + /// Mark a pair for auto-overriding. + /// + /// + /// + /// + public ref Entity AutoOverride(ulong first, ulong second) + { + return ref AutoOverride(Ecs.Pair(first, second)); + } + + /// + /// Mark a component or auto-overriding. + /// + /// + /// + public ref Entity AutoOverride() + { + return ref AutoOverride(Type.Id(World)); + } + + /// + /// Mark a component or auto-overriding. + /// + /// + /// + /// + public ref Entity AutoOverride(T value) where T : Enum + { + return ref AutoOverride(Type.Id(World, value)); + } + + /// + /// Mark a pair for auto-overriding. + /// + /// + /// + /// + public ref Entity AutoOverride(ulong second) + { + return ref AutoOverride(Ecs.Pair(second, World)); + } + + /// + /// Mark a pair for auto-overriding. + /// + /// + /// + /// + public ref Entity AutoOverride() + { + return ref AutoOverride(Ecs.Pair(World)); + } + + /// + /// Mark a pair for auto-overriding. + /// + /// + /// + /// + /// + public ref Entity AutoOverride(TSecond second) where TSecond : Enum + { + return ref AutoOverride(Type.Id(World, second)); + } + + /// + /// Mark a pair for auto-overriding. + /// + /// + /// + /// + /// + public ref Entity AutoOverride(TFirst first) where TFirst : Enum + { + return ref AutoOverrideSecond(Type.Id(World, first)); + } + + /// + /// Mark a pair for auto-overriding. + /// + /// + /// + /// + public ref Entity AutoOverrideSecond(ulong first) + { + return ref AutoOverride(first, Type.Id(World)); + } + + /// + /// Set component, mark component for auto-overriding. + /// + /// The component data. + /// The component type. + /// Reference to self. + public ref Entity SetAutoOverride(in T component) + { + return ref AutoOverride().Set(in component); + } + + /// + /// Set pair, mark component for auto-overriding. + /// + /// The second id of the pair. + /// The component data. + /// The first type of the pair. + /// Reference to self. + public ref Entity SetAutoOverride(ulong second, in TFirst component) + { + return ref AutoOverride(second).Set(second, in component); + } + + /// + /// Set pair, mark component for auto-overriding. + /// + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetAutoOverride(in TFirst component) + { + return ref AutoOverride().Set(in component); + } + + /// + /// Set pair, mark component for auto-overriding. + /// + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetAutoOverride(in TSecond component) + { + return ref AutoOverride().Set(in component); + } + + /// + /// Set pair, mark component for auto-overriding. + /// + /// The second id (enum member) of the pair. + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetAutoOverride(TSecond second, in TFirst component) where TSecond : Enum + { + ulong secondId = Type.Id(World, second); + return ref AutoOverride(secondId).Set(secondId, in component); + } + + /// + /// Set pair, mark component for auto-overriding. + /// + /// The first id (enum member) of the pair. + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetAutoOverride(TFirst first, in TSecond component) where TFirst : Enum + { + ulong firstId = Type.Id(World, first); + return ref AutoOverrideSecond(firstId).SetSecond(firstId, in component); + } + + /// + /// Set pair, mark component for auto-overriding. + /// + /// The first id of the pair. + /// The component data. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetAutoOverrideSecond(ulong first, in TSecond component) + { + return ref AutoOverrideSecond(first).SetSecond(first, in component); + } + + /// + /// Enable this entity. + /// + /// + public ref Entity Enable() + { + ecs_enable(World, Id, true); + return ref this; + } + + /// + /// Enable an id for entity. + /// + /// + /// + public ref Entity Enable(ulong id) + { + ecs_enable_id(World, Id, id, true); + return ref this; + } + + /// + /// Enable pair for entity. + /// + /// + /// + /// + public ref Entity Enable(ulong first, ulong second) + { + return ref Enable(Ecs.Pair(first, second)); + } + + /// + /// Enable component for entity. + /// + /// + /// + public ref Entity Enable() + { + return ref Enable(Type.Id(World)); + } + + /// + /// Enable component for entity. + /// + /// + /// + /// + public ref Entity Enable(T value) where T : Enum + { + return ref Enable(Type.Id(World, value)); + } + + /// + /// Enable pair for entity. + /// + /// + /// + /// + public ref Entity Enable(ulong second) + { + return ref Enable(Ecs.Pair(second, World)); + } + + /// + /// Enable pair for entity. + /// + /// + /// + /// + public ref Entity Enable() + { + return ref Enable(Ecs.Pair(World)); + } + + /// + /// Enable pair for entity. + /// + /// + /// + /// + /// + public ref Entity Enable(TSecond second) where TSecond : Enum + { + return ref Enable(Type.Id(World, second)); + } + + /// + /// Enable pair for entity. + /// + /// + /// + /// + /// + public ref Entity Enable(TFirst first) where TFirst : Enum + { + return ref EnableSecond(Type.Id(World, first)); + } + + /// + /// Enable pair for entity. + /// + /// + /// + /// + public ref Entity EnableSecond(ulong first) + { + return ref Enable(first, Type.Id(World)); + } + + /// + /// Disable this entity. + /// + /// + public ref Entity Disable() + { + ecs_enable(World, Id, false); + return ref this; + } + + /// + /// Disable an id for entity. + /// + /// + /// + public ref Entity Disable(ulong id) + { + ecs_enable_id(World, Id, id, false); + return ref this; + } + + /// + /// Disable pair for entity. + /// + /// + /// + /// + public ref Entity Disable(ulong first, ulong second) + { + return ref Disable(Ecs.Pair(first, second)); + } + + /// + /// Disable component for entity. + /// + /// + /// + public ref Entity Disable() + { + return ref Disable(Type.Id(World)); + } + + /// + /// Disable component for entity. + /// + /// + /// + /// + public ref Entity Disable(T value) where T : Enum + { + return ref Disable(Type.Id(World, value)); + } + + /// + /// Disable pair for entity. + /// + /// + /// + /// + public ref Entity Disable(ulong second) + { + return ref Disable(Ecs.Pair(second, World)); + } + + /// + /// Disable pair for entity. + /// + /// + /// + /// + public ref Entity Disable() + { + return ref Disable(Ecs.Pair(World)); + } + + /// + /// Disable pair for entity. + /// + /// + /// + /// + /// + public ref Entity Disable(TSecond second) where TSecond : Enum + { + return ref Disable(Type.Id(World, second)); + } + + /// + /// Disable pair for entity. + /// + /// + /// + /// + /// + public ref Entity Disable(TFirst first) where TFirst : Enum + { + return ref DisableSecond(Type.Id(World, first)); + } + + /// + /// Disable pair for entity. + /// + /// + /// + /// + public ref Entity DisableSecond(ulong first) + { + return ref Disable(first, Type.Id(World)); + } + + /// + /// Sets the data of a component. + /// + /// The id of the component to set. + /// The size of the pointed-to data. + /// The pointer to the data. + /// Reference to self. + public ref Entity SetUntyped(ulong id, int size, void* data) + { + Ecs.Assert(ecs_get_typeid(World, id) != 0, "Cannot set component data for tag ids."); + ecs_set_id(World, Id, id, size, data); + return ref this; + } + + /// + /// Sets the data of a component. + /// + /// The id of the component to set. + /// The pointer to the data. + /// Reference to self. + public ref Entity SetUntyped(ulong id, void* data) + { + EcsComponent* component = (EcsComponent*)ecs_get_id(World, id, FLECS_IDEcsComponentID_); + Ecs.Assert(component != null, nameof(ECS_INVALID_PARAMETER)); + return ref SetUntyped(id, component->size, data); + } + + /// + /// Sets the data of a pair component. + /// + /// The first id of the pair. + /// The second id of the pair. + /// The size of the pointed-to data. + /// The pointer to the data. + /// Reference to self. + public ref Entity SetUntyped(ulong first, ulong second, int size, void* data) + { + return ref SetUntyped(Ecs.Pair(first, second), size, data); + } + + /// + /// Sets the data of a component. + /// + /// The pointer to the data. + /// The component type. + /// Reference to self. + public ref Entity SetPtr(T* data) + { + return ref SetInternal(Type.Id(World), data); + } + + /// + /// Sets the data of a pair component. + /// + /// The second id of the pair. + /// The pointer to the data. + /// The first type of the pair. + /// Reference to self. + public ref Entity SetPtr(ulong second, TFirst* data) + { + return ref SetInternal(Ecs.Pair(second, World), data); + } + + /// + /// Sets the data of a pair component. + /// + /// The pointer to the data. + /// The first type of a pair. + /// The second type of a pair. + /// Reference to self. + public ref Entity SetPtr(TSecond* data) + { + return ref SetInternal(Ecs.Pair(World), data); + } + + /// + /// Sets the data of a pair component. + /// + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetPtr(TFirst* data) + { + return ref SetInternal(Ecs.Pair(World), data); + } + + /// + /// Sets the data of a pair component. + /// + /// The second id (enum member) of the pair. + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetPtr(TSecond second, TFirst* data) where TSecond : Enum + { + return ref SetPtr(Type.Id(World, second), data); + } + + /// + /// Sets the data of a pair component. + /// + /// The first id (enum member) of the pair. + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetPtr(TFirst first, TSecond* data) where TFirst : Enum + { + return ref SetPtrSecond(Type.Id(World, first), data); + } + + /// + /// Sets the data of a pair component. + /// + /// The first id of the pair. + /// The pointer to the data. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetPtrSecond(ulong first, TSecond* data) + { + return ref SetInternal(Ecs.PairSecond(first, World), data); + } + + /// + /// Sets the data of a component. + /// + /// The component data. + /// The component type. + /// Reference to self. + public ref Entity Set(in T data) + { + return ref SetInternal(Type.Id(World), in data); + } + + /// + /// Sets the data of a pair component. + /// + /// The second id of the pair. + /// The component data. + /// The first type of the pair. + /// Reference to self. + public ref Entity Set(ulong second, in TFirst data) + { + return ref SetInternal(Ecs.Pair(second, World), in data); + } + + /// + /// Sets the data of a pair component. + /// + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity Set(in TSecond data) + { + return ref SetInternal(Ecs.Pair(World), in data); + } + + /// + /// Sets the data of a pair component. + /// + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity Set(in TFirst data) + { + return ref SetInternal(Ecs.Pair(World), in data); + } + + /// + /// Sets the data of a pair component. + /// + /// The second id (enum member) of the pair. + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity Set(TSecond second, in TFirst data) where TSecond : Enum + { + return ref Set(Type.Id(World, second), in data); + } + + /// + /// Sets the data of a pair component. + /// + /// The first id (enum member) of the pair. + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public ref Entity Set(TFirst first, in TSecond data) where TFirst : Enum + { + return ref SetSecond(Type.Id(World, first), in data); + } + + /// + /// Sets the data of a pair component. + /// + /// The first id of the pair. + /// The component data. + /// The second type of the pair. + /// Reference to self. + public ref Entity SetSecond(ulong first, in TSecond data) + { + return ref SetInternal(Ecs.PairSecond(first, World), in data); + } + + /// + /// Entities created in function will have the current entity. + /// + /// The callback. + /// Reference to self. + public ref Entity With(Action callback) + { + ulong prev = ecs_set_with(World, Id); + callback(); + ecs_set_with(World, prev); + return ref this; + } + + /// + /// Entities created in function will have (first, this). + /// + /// The id. + /// The callback. + /// Reference to self. + public ref Entity With(ulong first, Action callback) + { + ulong prev = ecs_set_with(World, Ecs.Pair(first, Id)); + callback(); + ecs_set_with(World, prev); + return ref this; + } + + /// + /// Entities created in function will have (TFirst, this). + /// + /// The callback. + /// The component id. + /// Reference to self. + public ref Entity With(Action callback) + { + return ref With(Type.Id(World), callback); + } + + /// + /// Entities created in function will have the current entity. + /// + /// The callback. + /// Reference to self. + public ref Entity With(Ecs.WorldCallback callback) + { + ulong prev = ecs_set_with(World, Id); + callback(World); + ecs_set_with(World, prev); + return ref this; + } + + /// + /// Entities created in function will have (first, this). + /// + /// The id. + /// The callback. + /// Reference to self. + public ref Entity With(ulong first, Ecs.WorldCallback callback) + { + ulong prev = ecs_set_with(World, Ecs.Pair(first, Id)); + callback(World); + ecs_set_with(World, prev); + return ref this; + } + + /// + /// Entities created in function will have (TFirst, this). + /// + /// The callback. + /// The component id. + /// Reference to self. + public ref Entity With(Ecs.WorldCallback callback) + { + return ref With(Type.Id(World), callback); + } + + /// + /// The function will be run with the scope set to the current entity. + /// + /// The callback. + /// Reference to self. + public ref Entity Scope(Action callback) + { + ulong prev = ecs_set_scope(World, Id); + callback(); + ecs_set_scope(World, prev); + return ref this; + } + + /// + /// The function will be run with the scope set to the current entity. + /// + /// The callback. + /// Reference to self. + public ref Entity Scope(Ecs.WorldCallback callback) + { + ulong prev = ecs_set_scope(World, Id); + callback(World); + ecs_set_scope(World, prev); + return ref this; + } + + /// + /// Set the entity name. + /// + /// + /// + public ref Entity SetName(string name) + { + using NativeString nativeName = (NativeString)name; + ecs_set_name(World, Id, nativeName); + return ref this; + } + + /// + /// Set entity alias. + /// + /// + /// + public ref Entity SetAlias(string alias) + { + using NativeString nativeAlias = (NativeString)alias; + ecs_set_alias(World, Id, nativeAlias); + return ref this; + } + + /// + /// Set doc name. + /// + /// + /// + public ref Entity SetDocName(string name) + { + using NativeString nativeName = (NativeString)name; + ecs_doc_set_name(World, Id, nativeName); + return ref this; + } + + /// + /// Set doc brief. + /// + /// + /// + public ref Entity SetDocBrief(string brief) + { + using NativeString nativeBrief = (NativeString)brief; + ecs_doc_set_brief(World, Id, nativeBrief); + return ref this; + } + + /// + /// Set doc detailed description. + /// + /// + /// + public ref Entity SetDocDetail(string detail) + { + using NativeString nativeDetail = (NativeString)detail; + ecs_doc_set_detail(World, Id, nativeDetail); + return ref this; + } + + /// + /// Set doc link. + /// + /// + /// + public ref Entity SetDocLink(string link) + { + using NativeString nativeLink = (NativeString)link; + ecs_doc_set_link(World, Id, nativeLink); + return ref this; + } + + /// + /// Set doc color. + /// + /// + /// + public ref Entity SetDocColor(string color) + { + using NativeString nativeColor = (NativeString)color; + ecs_doc_set_color(World, Id, nativeColor); + return ref this; + } + + /// + /// Set doc uuid. + /// + /// The uuid string. + /// + public ref Entity SetDocUuid(string uuid) + { + using NativeString nativeUuid = (NativeString)uuid; + ecs_doc_set_uuid(World, Id, nativeUuid); + return ref this; + } + + /// + /// Make entity a unit. + /// + /// + /// + /// + /// + /// + /// + /// + public ref Entity Unit( + string symbol, + ulong prefix = 0, + ulong @base = 0, + ulong over = 0, + int factor = 0, + int power = 0) + { + using NativeString nativeSymbol = (NativeString)symbol; + + ecs_unit_desc_t desc = default; + desc.symbol = nativeSymbol; + desc.entity = Id; + desc.@base = @base; + desc.over = over; + desc.prefix = prefix; + desc.translation.factor = factor; + desc.translation.power = power; + ecs_unit_init(World, &desc); + + return ref this; + } + + /// + /// Make entity a derived unit. + /// + /// + /// + /// + /// + /// + /// + public ref Entity Unit( + ulong prefix = 0, + ulong @base = 0, + ulong over = 0, + int factor = 0, + int power = 0) + { + ecs_unit_desc_t desc = default; + desc.entity = Id; + desc.@base = @base; + desc.over = over; + desc.prefix = prefix; + desc.translation.factor = factor; + desc.translation.power = power; + ecs_unit_init(World, &desc); + + return ref this; + } + + /// + /// Make unit a prefix. + /// + /// + /// + /// + /// + public ref Entity UnitPrefix(string symbol, int factor = 0, int power = 0) + { + using NativeString nativeSymbol = (NativeString)symbol; + + ecs_unit_prefix_desc_t desc = default; + desc.entity = Id; + desc.symbol = nativeSymbol; + desc.translation.factor = factor; + desc.translation.power = power; + ecs_unit_prefix_init(World, &desc); + + return ref this; + } + + /// + /// Add quantity to unit. + /// + /// + /// + public ref Entity Quantity(ulong quantity) + { + ecs_add_id(World, Id, Ecs.Pair(EcsQuantity, quantity)); + return ref this; + } + + /// + /// Make entity a quantity. + /// + /// + /// + public ref Entity Quantity() + { + return ref Quantity(Type.Id(World)); + } + + /// + /// Make entity a quantity. + /// + /// + public ref Entity Quantity() + { + ecs_add_id(World, Id, EcsQuantity); + return ref this; + } + + /// + /// Set component from JSON. + /// + /// + /// + /// + /// + public ref Entity SetJson(ulong e, string json, ecs_from_json_desc_t* desc = null) + { + ulong type = ecs_get_typeid(World, e); + + if (type == 0) + { + Ecs.Error("Id is not a type"); + return ref this; + } + + void* ptr = ecs_ensure_id(World, Id, e); + Ecs.Assert(ptr != null, nameof(ECS_INTERNAL_ERROR)); + + using NativeString nativeJson = (NativeString)json; + + ecs_ptr_from_json(World, type, ptr, nativeJson, desc); + ecs_modified_id(World, Id, e); + + return ref this; + } + + /// + /// Set pair from JSON. + /// + /// + /// + /// + /// + /// + public ref Entity SetJson(ulong first, ulong second, string json, ecs_from_json_desc_t* desc = null) + { + return ref SetJson(Ecs.Pair(first, second), json, desc); + } + + /// + /// Set component from JSON. + /// + /// + /// + /// + /// + public ref Entity SetJson(string json, ecs_from_json_desc_t* desc = null) + { + return ref SetJson(Type.Id(World), json, desc); + } + + /// + /// Set pair from JSON. + /// + /// + /// + /// + /// + /// + public ref Entity SetJson(ulong second, string json, ecs_from_json_desc_t* desc = null) + { + return ref SetJson(Ecs.Pair(second, World), json, desc); + } + + /// + /// Set pair from JSON. + /// + /// + /// + /// + /// + /// + public ref Entity SetJson(string json, ecs_from_json_desc_t* desc = null) + { + return ref SetJson(Ecs.Pair(World), json, desc); + } + + /// + /// Set pair from JSON. + /// + /// + /// + /// + /// + /// + /// + public ref Entity SetJson(TSecond second, string json, ecs_from_json_desc_t* desc = null) + where TSecond : Enum + { + return ref SetJson(Type.Id(World, second), json, desc); + } + + /// + /// Set pair from JSON. + /// + /// + /// + /// + /// + /// + /// + public ref Entity SetJson(TFirst first, string json, ecs_from_json_desc_t* desc = null) + where TFirst : Enum + { + return ref SetJsonSecond(Type.Id(World, first), json, desc); + } + + /// + /// Set pair from JSON. + /// + /// + /// + /// + /// + /// + public ref Entity SetJsonSecond(ulong first, string json, ecs_from_json_desc_t* desc = null) + { + return ref SetJson(first, Type.Id(World), json, desc); + } + + /// + /// Observe an event on this entity. + /// + /// + /// + /// + public ref Entity Observe(ulong eventId, Action callback) + { + return ref ObserveInternal(eventId, callback, (delegate*)&Functions.ActionCallbackDelegate); + } + + /// + /// Observe an event on this entity. + /// + /// + /// + /// + public ref Entity Observe(ulong eventId, Ecs.ObserveEntityCallback callback) + { + return ref ObserveInternal(eventId, callback, (delegate*)&Functions.ObserveEntityCallbackDelegate); + } + + /// + /// Observe an event on this entity. + /// + /// + /// + /// + public ref Entity Observe(Action callback) + { + return ref Observe(Type.Id(World), callback); + } + + /// + /// Observe an event on this entity. + /// + /// + /// + /// + public ref Entity Observe(Ecs.ObserveEntityCallback callback) + { + return ref Observe(Type.Id(World), callback); + } + + /// + /// Observe an event on this entity. + /// + /// + /// + /// + public ref Entity Observe(Ecs.ObserveRefCallback callback) + { + return ref ObserveInternal(Type.Id(World), callback, (delegate*)&Functions.ObserveRefCallbackDelegate); + } + + /// + /// Observe an event on this entity. + /// + /// + /// + /// + public ref Entity Observe(Ecs.ObserveEntityRefCallback callback) + { + return ref ObserveInternal(Type.Id(World), callback, (delegate*)&Functions.ObserveEntityRefCallbackDelegate); + } + + /// + /// Get mutable component value (untyped). + /// + /// + /// + public void* EnsurePtr(ulong id) + { + return ecs_ensure_id(World, Id, id); + } + + /// + /// Get mutable pointer for a pair (untyped). + /// + /// + /// + /// + public void* EnsurePtr(ulong first, ulong second) + { + return EnsurePtr(Ecs.Pair(first, second)); + } + + /// + /// Get mutable component value. + /// + /// + /// + public T* EnsurePtr() where T : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (T*)ecs_ensure_id(World, Id, Type.Id(World)); + } + + /// + /// Get mutable pointer for the first element of a pair. + /// + /// + /// + /// + public TFirst* EnsurePtr(ulong second) where TFirst : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TFirst*)EnsurePtr(Ecs.Pair(second, World)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + /// + public TFirst* EnsurePtr(TSecond second) + where TFirst : unmanaged + where TSecond : Enum + { + return EnsurePtr(Type.Id(World, second)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + /// + public TSecond* EnsurePtr(TFirst first) + where TFirst : Enum + where TSecond : unmanaged + { + return EnsureSecondPtr(Type.Id(World, first)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + public TFirst* EnsureFirstPtr() where TFirst : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TFirst*)EnsurePtr(Ecs.Pair(World)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + public TSecond* EnsureSecondPtr() where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)EnsurePtr(Ecs.Pair(World)); + } + + /// + /// Get mutable pointer for a pair. + /// + /// + /// + /// + public TSecond* EnsureSecondPtr(ulong first) where TSecond : unmanaged + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return (TSecond*)EnsurePtr(Ecs.PairSecond(first, World)); + } + + /// + /// Get mutable managed reference for component. + /// + /// + /// + public ref T Ensure() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(ecs_ensure_id(World, Id, Type.Id(World))); + } + + /// + /// Get mutable managed reference for the first element of a pair. + /// + /// + /// + /// + public ref TFirst Ensure(ulong second) + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(EnsurePtr(Ecs.Pair(second, World))); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + /// + public ref TFirst Ensure(TSecond second) where TSecond : Enum + { + return ref Ensure(Type.Id(World, second)); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + /// + public ref TSecond Ensure(TFirst first) where TFirst : Enum + { + return ref EnsureSecond(Type.Id(World, first)); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + public ref TFirst EnsureFirst() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(EnsurePtr(Ecs.Pair(World))); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + public ref TSecond EnsureSecond() + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(EnsurePtr(Ecs.Pair(World))); + } + + /// + /// Get mutable managed reference for pair. + /// + /// + /// + /// + public ref TSecond EnsureSecond(ulong first) + { + Ecs.Assert(Type.Size != 0, nameof(ECS_INVALID_PARAMETER)); + return ref Managed.GetTypeRef(EnsurePtr(Ecs.PairSecond(first, World))); + } + + /// + /// Signal that component was modified. + /// + /// + public void Modified(ulong id) + { + ecs_modified_id(World, Id, id); + } + + /// + /// Signal that pair was modified. + /// + /// + /// + public void Modified(ulong first, ulong second) + { + Modified(Ecs.Pair(first, second)); + } + + /// + /// Signal that component was modified. + /// + /// + public void Modified() + { + Modified(Type.Id(World)); + } + + /// + /// Signal that component was modified. + /// + /// + public void Modified(T value) where T : Enum + { + Modified(Type.Id(World, value)); + } + + /// + /// Signal that a pair was modified. + /// + /// + /// + public void Modified(ulong second) + { + Modified(Ecs.Pair(second, World)); + } + + /// + /// Signal that a pair was modified. + /// + /// + /// + public void Modified() + { + Modified(Ecs.Pair(World)); + } + + /// + /// Signal that a pair was modified. + /// + /// + /// + /// + public void Modified(TSecond second) where TSecond : Enum + { + Modified(Type.Id(World, second)); + } + + /// + /// Signal that a pair was modified. + /// + /// + /// + /// + public void Modified(TFirst first) where TFirst : Enum + { + ModifiedSecond(Type.Id(World, first)); + } + + /// + /// Signal that a pair was modified. + /// + /// + /// + public void ModifiedSecond(ulong first) + { + Modified(first, Type.Id(World)); + } + + /// + /// Get reference to component. + /// + /// + /// + public Ref GetRef() + { + return new Ref(World, Id); + } + + /// + /// Get ref to pair component. + /// + /// + /// + /// + public Ref GetRef(ulong second) + { + return new Ref(World, Id, Ecs.Pair(second, World)); + } + + /// + /// Get ref to pair component. + /// + /// + /// + /// + /// + public Ref GetRef(TSecond second) where TSecond : Enum + { + return GetRef(Type.Id(World, second)); + } + + /// + /// Get ref to pair component. + /// + /// + /// + /// + /// + public Ref GetRef(TFirst first) where TFirst : Enum + { + return GetRefSecond(Type.Id(World, first)); + } + + /// + /// Get ref to pair component. + /// + /// + /// + /// + public Ref GetRefFirst() + { + return new Ref(World, Id, Ecs.Pair(World)); + } + + /// + /// Get ref to pair component. + /// + /// + /// + /// + public Ref GetRefSecond() + { + return new Ref(World, Id, Ecs.Pair(World)); + } + + /// + /// Get ref to pair component. + /// + /// + /// + /// + public Ref GetRefSecond(ulong first) + { + return new Ref(World, Id, Ecs.PairSecond(first, World)); + } + + /// + /// Clear an entity. + /// + public void Clear() + { + ecs_clear(World, Id); + } + + /// + /// Delete an entity. + /// + public void Destruct() + { + ecs_delete(World, Id); + } + + /// + /// Deserialize entity to JSON. + /// + /// + /// + public string FromJson(string json) + { + using NativeString nativeJson = (NativeString)json; + return NativeString.GetString(ecs_entity_from_json(World, Id, nativeJson, null)); + } + + public void SetChildOrder(ulong[] children) + { + fixed (ulong* childrenPtr = children) + { + ecs_set_child_order(World, Id, childrenPtr, children.Length); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private ref Entity SetInternal(ulong id, in T component) + { + fixed (T* ptr = &component) + return ref SetInternal(id, ptr); + } + + private ref Entity SetInternal(ulong id, T* component) + { + Ecs.Assert(!Type.IsTag, "Empty structs can't be used as components. Use .Add() to add them as tags instead."); + +#if DEBUG + if (Ecs.IsPair(id) && !Ecs.TypeIdIs(World, id)) + { + Id pair = new Id(World, id); + Entity expected = new Entity(World, ecs_get_typeid(World, id)); + Entity provided = new Entity(World, Type.Id(World)); + + Ecs.Error(expected == 0 + ? $"Attempted to set component data for tag pair.\n[Pair]: {pair}" + : $"Attempted to set component data for incorrect pair type.\n[Pair]: {pair}\n[Expected Type]: {expected}\n[Provided Type]: {provided}"); + + return ref this; + } +#endif + + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + Managed.AllocGcHandle(component, out GCHandle handle); + ecs_set_id(World, Id, id, sizeof(GCHandle), &handle); + Managed.FreeGcHandle(handle); + } + else + { + ecs_set_id(World, Id, id, sizeof(T), component); + } + + return ref this; + } + + private ref Entity ObserveInternal(ulong eventId, T callback, void* invoker) where T : Delegate + { + IteratorContext* iteratorContext = Memory.AllocZeroed(1); + iteratorContext->Callback.Set(callback, invoker); + + ecs_observer_desc_t desc = default; + desc.events[0] = eventId; + desc.query.terms[0].id = EcsAny; + desc.query.terms[0].src.id = Id; + desc.callback = &Functions.IteratorCallback; + desc.callback_ctx = iteratorContext; + desc.callback_ctx_free = &Functions.IteratorContextFree; + + ulong observer = ecs_observer_init(World, &desc); + ecs_add_id(World, observer, Ecs.Pair(EcsChildOf, Id)); + + return ref this; + } + + private ref Entity ObserveInternal(ulong eventId, void* callback, void* invoker) where T : Delegate + { + IteratorContext* iteratorContext = Memory.AllocZeroed(1); + iteratorContext->Callback.Set(callback, invoker); + + ecs_observer_desc_t desc = default; + desc.events[0] = eventId; + desc.query.terms[0].id = EcsAny; + desc.query.terms[0].src.id = Id; + desc.callback = &Functions.IteratorCallback; + desc.callback_ctx = iteratorContext; + desc.callback_ctx_free = &Functions.IteratorContextFree; + + ulong observer = ecs_observer_init(World, &desc); + ecs_add_id(World, observer, Ecs.Pair(EcsChildOf, Id)); + + return ref this; + } + + /// + /// Converts an instance to its integer id. + /// + /// + /// + public static implicit operator ulong(Entity entity) + { + return ToUInt64(entity); + } + + /// + /// Converts an instance to its id. + /// + /// + /// + public static implicit operator Id(Entity entity) + { + return ToId(entity); + } + + /// + /// Converts an instance to its integer id. + /// + /// + /// + public static ulong ToUInt64(Entity entity) + { + return entity.Id.Value; + } + + /// + /// Converts an instance to its id. + /// + /// + /// + public static Id ToId(Entity entity) + { + return entity.Id; + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public bool Equals(Entity other) + { + return Id.Value == other.Id.Value; + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Entity entity && Equals(entity); + } + + /// + /// Returns the hash code of the . + /// + /// + public override int GetHashCode() + { + return Id.Value.GetHashCode(); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + /// + public static bool operator ==(Entity left, Entity right) + { + return left.Equals(right); + } + + /// + /// Checks if two instances are not equal. + /// + /// + /// + /// + public static bool operator !=(Entity left, Entity right) + { + return !(left == right); + } + + /// + /// Returns the entity's name if it has one, otherwise return its id. + /// + /// + public override string ToString() + { + return Id.ToString(); + } +} diff --git a/src/Flecs.NET/Core/IQueryBuilder.cs b/src/Flecs.NET/Core/IQueryBuilder.cs index 94aa9271..47d28e6c 100644 --- a/src/Flecs.NET/Core/IQueryBuilder.cs +++ b/src/Flecs.NET/Core/IQueryBuilder.cs @@ -1,461 +1,463 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// Query builder interface. -/// -/// -/// -[SuppressMessage("Naming", "CA1716:Identifiers should not match keywords")] -public unsafe interface IQueryBuilder : IQueryBuilderBase -{ - /// - /// Builds the query and returns the newly created TResult object. - /// - /// The created TResult object. - public TResult Build(); - - /// - public ref TBuilder Self(); - - /// - public ref TBuilder Id(ulong id); - - /// - public ref TBuilder Entity(ulong entity); - - /// - public ref TBuilder Name(string name); - - /// - public ref TBuilder Var(string name); - - /// - public ref TBuilder Term(ulong id); - - /// - public ref TBuilder Src(); - - /// - public ref TBuilder First(); - - /// - public ref TBuilder Second(); - - /// - public ref TBuilder Src(ulong srcId); - - /// - public ref TBuilder Src(); - - /// - public ref TBuilder Src(T value) where T : Enum; - - /// - public ref TBuilder Src(string name); - - /// - public ref TBuilder First(ulong firstId); - - /// - public ref TBuilder First(); - - /// - public ref TBuilder First(T value) where T : Enum; - - /// - public ref TBuilder First(string name); - - /// - public ref TBuilder Second(ulong secondId); - - /// - public ref TBuilder Second(); - - /// - public ref TBuilder Second(T value) where T : Enum; - - /// - public ref TBuilder Second(string secondName); - - /// - public ref TBuilder Up(ulong traverse = 0); - - /// - public ref TBuilder Up(); - - /// - public ref TBuilder Up(T value) where T : Enum; - - /// - public ref TBuilder Cascade(ulong traverse = 0); - - /// - public ref TBuilder Cascade(); - - /// - public ref TBuilder Cascade(T value) where T : Enum; - - /// - public ref TBuilder Descend(); - - /// - public ref TBuilder Parent(); - - /// - public ref TBuilder Trav(ulong traverse, uint flags = 0); - - /// - public ref TBuilder Trav(uint flags = 0); - - /// - public ref TBuilder Trav(T value, uint flags = 0) where T : Enum; - - /// - public ref TBuilder Flags(ulong flags); - - /// - public ref TBuilder InOut(ecs_inout_kind_t inOut); - - /// - public ref TBuilder InOutStage(ecs_inout_kind_t inOut); - - /// - public ref TBuilder Write(); - - /// - public ref TBuilder Read(); - - /// - public ref TBuilder ReadWrite(); - - /// - public ref TBuilder In(); - - /// - public ref TBuilder Out(); - - /// - public ref TBuilder InOut(); - - /// - public ref TBuilder InOutNone(); - - /// - public ref TBuilder Oper(ecs_oper_kind_t oper); - - /// - public ref TBuilder And(); - - /// - public ref TBuilder Or(); - - /// - public ref TBuilder Not(); - - /// - public ref TBuilder Optional(); - - /// - public ref TBuilder AndFrom(); - - /// - public ref TBuilder OrFrom(); - - /// - public ref TBuilder NotFrom(); - - /// - public ref TBuilder Singleton(); - - /// - public ref TBuilder Filter(); - - /// - public ref TBuilder QueryFlags(uint flags); - - /// - public ref TBuilder CacheKind(ecs_query_cache_kind_t kind); - - /// - public ref TBuilder Cached(); - - /// - public ref TBuilder Expr(string expr); - - /// - public ref TBuilder With(Term term); - - /// - public ref TBuilder With(ulong id); - - /// - public ref TBuilder With(string name); - - /// - public ref TBuilder With(ulong first, ulong second); - - /// - public ref TBuilder With(ulong first, string second); - - /// - public ref TBuilder With(string first, ulong second); - - /// - public ref TBuilder With(string first, string second); - - /// - public ref TBuilder With(); - - /// - public ref TBuilder With(T value) where T : Enum; - - /// - public ref TBuilder With(ulong second); - - /// - public ref TBuilder With(string second); - - /// - public ref TBuilder With(); - - /// - public ref TBuilder With(TSecond second) where TSecond : Enum; - - /// - public ref TBuilder With(TFirst first) where TFirst : Enum; - - /// - public ref TBuilder With(TFirst first, string second) where TFirst : Enum; - - /// - public ref TBuilder With(string first, TSecond second) where TSecond : Enum; - - /// - public ref TBuilder WithSecond(ulong first); - - /// - public ref TBuilder WithSecond(string first); - - /// - public ref TBuilder Without(Term term); - - /// - public ref TBuilder Without(ulong id); - - /// - public ref TBuilder Without(string name); - - /// - public ref TBuilder Without(ulong first, ulong second); - - /// - public ref TBuilder Without(ulong first, string second); - - /// - public ref TBuilder Without(string first, ulong second); - - /// - public ref TBuilder Without(string first, string second); - - /// - public ref TBuilder Without(); - - /// - public ref TBuilder Without(T value) where T : Enum; - - /// - public ref TBuilder Without(ulong second); - - /// - public ref TBuilder Without(string second); - - /// - public ref TBuilder Without(); - - /// - public ref TBuilder Without(TSecond second) where TSecond : Enum; - - /// - public ref TBuilder Without(TFirst first) where TFirst : Enum; - - /// - public ref TBuilder Without(TFirst first, string second) where TFirst : Enum; - - /// - public ref TBuilder Without(string first, TSecond second) where TSecond : Enum; - - /// - public ref TBuilder WithoutSecond(ulong first); - - /// - public ref TBuilder WithoutSecond(string first); - - /// - public ref TBuilder Write(Term term); - - /// - public ref TBuilder Write(ulong id); - - /// - public ref TBuilder Write(string name); - - /// - public ref TBuilder Write(ulong first, ulong second); - - /// - public ref TBuilder Write(ulong first, string second); - - /// - public ref TBuilder Write(string first, ulong second); - - /// - public ref TBuilder Write(string first, string second); - - /// - public ref TBuilder Write(); - - /// - public ref TBuilder Write(T value) where T : Enum; - - /// - public ref TBuilder Write(ulong second); - - /// - public ref TBuilder Write(string second); - - /// - public ref TBuilder Write(); - - /// - public ref TBuilder Write(TSecond second) where TSecond : Enum; - - /// - public ref TBuilder Write(TFirst first) where TFirst : Enum; - - /// - public ref TBuilder Write(TFirst first, string second) where TFirst : Enum; - - /// - public ref TBuilder Write(string first, TSecond second) where TSecond : Enum; - - /// - public ref TBuilder WriteSecond(ulong first); - - /// - public ref TBuilder WriteSecond(string first); - - /// - public ref TBuilder Read(Term term); - - /// - public ref TBuilder Read(ulong id); - - /// - public ref TBuilder Read(string name); - - /// - public ref TBuilder Read(ulong first, ulong second); - - /// - public ref TBuilder Read(ulong first, string second); - - /// - public ref TBuilder Read(string first, ulong second); - - /// - public ref TBuilder Read(string first, string second); - - /// - public ref TBuilder Read(); - - /// - public ref TBuilder Read(T value) where T : Enum; - - /// - public ref TBuilder Read(ulong second); - - /// - public ref TBuilder Read(string second); - - /// - public ref TBuilder Read(); - - /// - public ref TBuilder Read(TSecond second) where TSecond : Enum; - - /// - public ref TBuilder Read(TFirst first) where TFirst : Enum; - - /// - public ref TBuilder Read(TFirst first, string second) where TFirst : Enum; - - /// - public ref TBuilder Read(string first, TSecond second) where TSecond : Enum; - - /// - public ref TBuilder ReadSecond(ulong first); - - /// - public ref TBuilder ReadSecond(string first); - - /// - public ref TBuilder ScopeOpen(); - - /// - public ref TBuilder ScopeClose(); - - /// - public ref TBuilder Term(); - - /// - public ref TBuilder TermAt(int termIndex); - - /// - public ref TBuilder OrderBy(ulong component, Ecs.OrderByCallback callback); - - /// - public ref TBuilder OrderBy(Ecs.OrderByCallback callback); - - /// - public ref TBuilder GroupBy(ulong component); - - /// - public ref TBuilder GroupBy(ulong component, Ecs.GroupByCallback callback); - - /// - public ref TBuilder GroupBy(ulong component, Ecs.GroupByCallback callback); - - /// - public ref TBuilder GroupBy(); - - /// - public ref TBuilder GroupBy(Ecs.GroupByCallback callback); - - /// - public ref TBuilder GroupBy(Ecs.GroupByCallback callback); - - /// - public ref TBuilder GroupByCtx(T value); - - /// - public ref TBuilder GroupByCtx(T value, Ecs.UserContextFinish callback); - - /// - public ref TBuilder GroupByCtx(T value, delegate* callback); - - /// - public ref TBuilder OnGroupCreate(Ecs.GroupCreateCallback callback); - - /// - public ref TBuilder OnGroupCreate(Ecs.GroupCreateCallback callback); - - /// - public ref TBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback); - - /// - public ref TBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback); -} +using System; +using System.Diagnostics.CodeAnalysis; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// Query builder interface. +/// +/// +/// +[SuppressMessage("Naming", "CA1716:Identifiers should not match keywords")] +public unsafe interface IQueryBuilder : IQueryBuilderBase +{ + /// + /// Builds the query and returns the newly created TResult object. + /// + /// The created TResult object. + public TResult Build(); + + /// + public ref TBuilder Self(); + + /// + public ref TBuilder Id(ulong id); + + /// + public ref TBuilder Entity(ulong entity); + + /// + public ref TBuilder Name(string name); + + /// + public ref TBuilder Var(string name); + + /// + public ref TBuilder Term(ulong id); + + /// + public ref TBuilder Src(); + + /// + public ref TBuilder First(); + + /// + public ref TBuilder Second(); + + /// + public ref TBuilder Src(ulong srcId); + + /// + public ref TBuilder Src(); + + /// + public ref TBuilder Src(T value) where T : Enum; + + /// + public ref TBuilder Src(string name); + + /// + public ref TBuilder First(ulong firstId); + + /// + public ref TBuilder First(); + + /// + public ref TBuilder First(T value) where T : Enum; + + /// + public ref TBuilder First(string name); + + /// + public ref TBuilder Second(ulong secondId); + + /// + public ref TBuilder Second(); + + /// + public ref TBuilder Second(T value) where T : Enum; + + /// + public ref TBuilder Second(string secondName); + + /// + public ref TBuilder Up(ulong traverse = 0); + + /// + public ref TBuilder Up(); + + /// + public ref TBuilder Up(T value) where T : Enum; + + /// + public ref TBuilder Cascade(ulong traverse = 0); + + /// + public ref TBuilder Cascade(); + + /// + public ref TBuilder Cascade(T value) where T : Enum; + + /// + public ref TBuilder Descend(); + + /// + public ref TBuilder Parent(); + + /// + public ref TBuilder Trav(ulong traverse, uint flags = 0); + + /// + public ref TBuilder Trav(uint flags = 0); + + /// + public ref TBuilder Trav(T value, uint flags = 0) where T : Enum; + + /// + public ref TBuilder Flags(ulong flags); + + /// + public ref TBuilder InOut(ecs_inout_kind_t inOut); + + /// + public ref TBuilder InOutStage(ecs_inout_kind_t inOut); + + /// + public ref TBuilder Write(); + + /// + public ref TBuilder Read(); + + /// + public ref TBuilder ReadWrite(); + + /// + public ref TBuilder In(); + + /// + public ref TBuilder Out(); + + /// + public ref TBuilder InOut(); + + /// + public ref TBuilder InOutNone(); + + /// + public ref TBuilder Oper(ecs_oper_kind_t oper); + + /// + public ref TBuilder And(); + + /// + public ref TBuilder Or(); + + /// + public ref TBuilder Not(); + + /// + public ref TBuilder Optional(); + + /// + public ref TBuilder AndFrom(); + + /// + public ref TBuilder OrFrom(); + + /// + public ref TBuilder NotFrom(); + + /// + public ref TBuilder Singleton(); + + /// + public ref TBuilder Filter(); + + /// + public ref TBuilder QueryFlags(uint flags); + + /// + public ref TBuilder CacheKind(ecs_query_cache_kind_t kind); + + /// + public ref TBuilder Cached(); + + /// + public ref TBuilder Expr(string expr); + + /// + public ref TBuilder With(Term term); + + /// + public ref TBuilder With(ulong id); + + /// + public ref TBuilder With(string name); + + /// + public ref TBuilder With(ulong first, ulong second); + + /// + public ref TBuilder With(ulong first, string second); + + /// + public ref TBuilder With(string first, ulong second); + + /// + public ref TBuilder With(string first, string second); + + /// + public ref TBuilder With(); + + /// + public ref TBuilder With(T value) where T : Enum; + + /// + public ref TBuilder With(ulong second); + + /// + public ref TBuilder With(string second); + + /// + public ref TBuilder With(); + + /// + public ref TBuilder With(TSecond second) where TSecond : Enum; + + /// + public ref TBuilder With(TFirst first) where TFirst : Enum; + + /// + public ref TBuilder With(TFirst first, string second) where TFirst : Enum; + + /// + public ref TBuilder With(string first, TSecond second) where TSecond : Enum; + + /// + public ref TBuilder WithSecond(ulong first); + + /// + public ref TBuilder WithSecond(string first); + + /// + public ref TBuilder Without(Term term); + + /// + public ref TBuilder Without(ulong id); + + /// + public ref TBuilder Without(string name); + + /// + public ref TBuilder Without(ulong first, ulong second); + + /// + public ref TBuilder Without(ulong first, string second); + + /// + public ref TBuilder Without(string first, ulong second); + + /// + public ref TBuilder Without(string first, string second); + + /// + public ref TBuilder Without(); + + /// + public ref TBuilder Without(T value) where T : Enum; + + /// + public ref TBuilder Without(ulong second); + + /// + public ref TBuilder Without(string second); + + /// + public ref TBuilder Without(); + + /// + public ref TBuilder Without(TSecond second) where TSecond : Enum; + + /// + public ref TBuilder Without(TFirst first) where TFirst : Enum; + + /// + public ref TBuilder Without(TFirst first, string second) where TFirst : Enum; + + /// + public ref TBuilder Without(string first, TSecond second) where TSecond : Enum; + + /// + public ref TBuilder WithoutSecond(ulong first); + + /// + public ref TBuilder WithoutSecond(string first); + + /// + public ref TBuilder Write(Term term); + + /// + public ref TBuilder Write(ulong id); + + /// + public ref TBuilder Write(string name); + + /// + public ref TBuilder Write(ulong first, ulong second); + + /// + public ref TBuilder Write(ulong first, string second); + + /// + public ref TBuilder Write(string first, ulong second); + + /// + public ref TBuilder Write(string first, string second); + + /// + public ref TBuilder Write(); + + /// + public ref TBuilder Write(T value) where T : Enum; + + /// + public ref TBuilder Write(ulong second); + + /// + public ref TBuilder Write(string second); + + /// + public ref TBuilder Write(); + + /// + public ref TBuilder Write(TSecond second) where TSecond : Enum; + + /// + public ref TBuilder Write(TFirst first) where TFirst : Enum; + + /// + public ref TBuilder Write(TFirst first, string second) where TFirst : Enum; + + /// + public ref TBuilder Write(string first, TSecond second) where TSecond : Enum; + + /// + public ref TBuilder WriteSecond(ulong first); + + /// + public ref TBuilder WriteSecond(string first); + + /// + public ref TBuilder Read(Term term); + + /// + public ref TBuilder Read(ulong id); + + /// + public ref TBuilder Read(string name); + + /// + public ref TBuilder Read(ulong first, ulong second); + + /// + public ref TBuilder Read(ulong first, string second); + + /// + public ref TBuilder Read(string first, ulong second); + + /// + public ref TBuilder Read(string first, string second); + + /// + public ref TBuilder Read(); + + /// + public ref TBuilder Read(T value) where T : Enum; + + /// + public ref TBuilder Read(ulong second); + + /// + public ref TBuilder Read(string second); + + /// + public ref TBuilder Read(); + + /// + public ref TBuilder Read(TSecond second) where TSecond : Enum; + + /// + public ref TBuilder Read(TFirst first) where TFirst : Enum; + + /// + public ref TBuilder Read(TFirst first, string second) where TFirst : Enum; + + /// + public ref TBuilder Read(string first, TSecond second) where TSecond : Enum; + + /// + public ref TBuilder ReadSecond(ulong first); + + /// + public ref TBuilder ReadSecond(string first); + + /// + public ref TBuilder ScopeOpen(); + + /// + public ref TBuilder ScopeClose(); + + /// + public ref TBuilder Term(); + + /// + public ref TBuilder TermAt(int termIndex); + + /// + public ref TBuilder OrderBy(ulong component, Ecs.OrderByCallback callback); + + /// + public ref TBuilder OrderBy(Ecs.OrderByCallback callback); + + /// + public ref TBuilder GroupBy(ulong component); + + /// + public ref TBuilder GroupBy(ulong component, Ecs.GroupByCallback callback); + + /// + public ref TBuilder GroupBy(ulong component, Ecs.GroupByCallback callback); + + /// + public ref TBuilder GroupBy(); + + /// + public ref TBuilder GroupBy(Ecs.GroupByCallback callback); + + /// + public ref TBuilder GroupBy(Ecs.GroupByCallback callback); + + /// + public ref TBuilder GroupByCtx(T value); + + /// + public ref TBuilder GroupByCtx(T value, Ecs.UserContextFinish callback); + + /// + public ref TBuilder GroupByCtx(T value, delegate* callback); + + /// + public ref TBuilder OnGroupCreate(Ecs.GroupCreateCallback callback); + + /// + public ref TBuilder OnGroupCreate(Ecs.GroupCreateCallback callback); + + /// + public ref TBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback); + + /// + public ref TBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback); + + public ref TBuilder DetectChanges(); +} diff --git a/src/Flecs.NET/Core/Iter.cs b/src/Flecs.NET/Core/Iter.cs index 92b383c2..59fb239e 100644 --- a/src/Flecs.NET/Core/Iter.cs +++ b/src/Flecs.NET/Core/Iter.cs @@ -1,871 +1,872 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using Flecs.NET.Core.BindingContext; -using Flecs.NET.Utilities; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// Class for iterating over query results. -/// -public unsafe partial struct Iter : IEnumerable, IEquatable, IDisposable -{ - private ecs_iter_t* _handle; - - /// - /// Reference to handle. - /// - public ref ecs_iter_t* Handle => ref _handle; - - /// - /// Creates an iter wrapper using the provided handle. - /// - /// - public Iter(ecs_iter_t* iter) - { - _handle = iter; - } - - /// - /// Free iterator resources. - /// - public void Dispose() - { - Fini(); - } - - /// - /// Returns entity id of system. - /// - /// - public Entity System() - { - return new Entity(Handle->world, Handle->system); - } - - /// - /// Returns entity id of event. - /// - /// - public Entity Event() - { - return new Entity(Handle->world, Handle->@event); - } - - /// - /// Returns the entity id of the event id. - /// - /// - public Id EventId() - { - return new Id(Handle->world, Handle->event_id); - } - - /// - /// Returns staged C# world. - /// - /// - public World World() - { - return new World(Handle->world); - } - - /// - /// Returns the number of entities to iterate. - /// - /// Number of entities to iterate. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public int Count() - { - return Handle->count; - } - - /// - /// Returns the time elapsed since last frame. - /// - /// Time elapsed since last frame - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public float DeltaTime() - { - return Handle->delta_time; - } - - /// - /// Returns the time elapsed since last system invocation. - /// - /// Time elapsed since last system invocation. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public float DeltaSystemTime() - { - return Handle->delta_system_time; - } - - /// - /// Returns the type of the iterated table. - /// - /// - public FlecsType Type() - { - return new FlecsType(Handle->world, ecs_table_get_type(Handle->table)); - } - - /// - /// Returns the table of the iter. - /// - /// - public Table Table() - { - return new Table(Handle->real_world, Handle->table); - } - - /// - /// Returns the other table of the iter. - /// - /// - public Table OtherTable() - { - return new Table(Handle->real_world, Handle->other_table); - } - - /// - /// Returns table range of the iter. - /// - /// - public Table Range() - { - return new Table(Handle->real_world, Handle->table, Handle->offset, Handle->count); - } - - /// - /// Returns context pointer. - /// - /// - public void* CtxPtr() - { - return Handle->ctx; - } - - /// - /// Returns context pointer. - /// - /// - /// - public T* CtxPtr() where T : unmanaged - { - return (T*)Handle->ctx; - } - - /// - /// Returns context ref. - /// - /// - /// - public ref T Ctx() - { - UserContext* context = (UserContext*)Handle->ctx; - return ref context->Get(); - } - - /// - /// Returns param pointer. - /// - /// - public void* ParamPtr() - { - return Handle->param; - } - - /// - /// Returns param pointer. - /// - /// - /// - public T* ParamPtr() where T : unmanaged - { - return (T*)Handle->param; - } - - /// - /// Returns param ref. - /// - /// - /// - public ref T Param() where T : unmanaged - { - return ref *ParamPtr(); - } - - /// - /// Obtain mutable handle to entity being iterated over. - /// - /// - /// - public Entity Entity(int row) - { - Ecs.Assert(row < Handle->count, nameof(ECS_COLUMN_INDEX_OUT_OF_RANGE)); - return new Entity(Handle->world, Handle->entities[row]); - } - - /// - /// Returns whether field is matched on self. - /// - /// - /// - public bool IsSelf(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return ecs_field_is_self(Handle, (byte)index); - } - - /// - /// Returns whether field is set. - /// - /// - /// - public bool IsSet(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return ecs_field_is_set(Handle, (byte)index); - } - - /// - /// Returns whether field is readonly. - /// - /// - /// - public bool IsReadonly(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return ecs_field_is_readonly(Handle, (byte)index); - } - - /// - /// Number of fields in iterator. - /// - /// - public int FieldCount() - { - return Handle->field_count; - } - - /// - /// Size of field data type. - /// - /// - /// - public ulong Size(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return (ulong)ecs_field_size(Handle, (byte)index); - } - - /// - /// Obtain field source (0 if This). - /// - /// - /// - public Entity Src(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return new Entity(Handle->world, ecs_field_src(Handle, (byte)index)); - } - - /// - /// Obtain id matched for field. - /// - /// - /// - public Id Id(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return new Id(Handle->world, ecs_field_id(Handle, (byte)index)); - } - - /// - /// Obtain pair id matched for field. - /// This operation will fail if the id is not a pair. - /// - /// - /// - public Id Pair(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - ulong id = ecs_field_id(Handle, (byte)index); - Ecs.Assert(Ecs.EntityHasIdFlag(id, ECS_PAIR) != 0, nameof(ECS_INVALID_PARAMETER)); - return new Id(Handle->world, id); - } - - /// - /// Obtain column index for field. - /// - /// - /// - public int ColumnIndex(int index) - { - Ecs.Assert(index < Handle->field_count, "Field index out of range."); - return ecs_field_column(Handle, (byte)index); - } - - /// - /// Convert current iterator result to string. - /// - /// - public string Str() - { - return NativeString.GetStringAndFree(ecs_iter_str(Handle)); - } - - /// - /// Retrieves an untyped field at the provided index. - /// - /// The field index. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public UntypedField Field(int index) - { - return GetUntypedField(index); - } - - /// - /// Retrieves a pointer to untyped field at row. - /// - /// The field index. - /// The field row. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void* FieldAt(int index, int row) - { - return Utils.IsBitSet(Handle->row_fields, index) - ? GetUntypedFieldAt(index, row)[0] - : GetUntypedField(index)[row]; - } - - /// - /// Retrieves a field at the provided index. - /// - /// The field index. - /// The field type. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Field Field(int index) - { - return GetField(index); - } - - /// - /// Retrieves a managed reference to field at row. - /// - /// The field index. - /// The field row. - /// The field type. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ref T FieldAt(int index, int row) - { - return ref Utils.IsBitSet(Handle->row_fields, index) - ? ref GetFieldAt(index, row)[0] - : ref GetField(index)[row]; - } - - /// - /// Get access to entity ids. - /// - /// - public Field Entities() - { - return new Field(Handle->entities, Handle->count); - } - - /// - /// Check if the current table has changed since the last iteration. - /// Can only be used when iterating queries and/or systems. - /// - /// - public bool Changed() - { - return ecs_iter_changed(Handle); - } - - /// - /// Skip current table. - /// This indicates to the query that the data in the current table is not - /// modified. By default, iterating a table with a query will mark the - /// iterated components as dirty if they are annotated with InOut or Out. - /// - public void Skip() - { - ecs_iter_skip(Handle); - } - - /// - /// Return group id for current table (grouped queries only) - /// - /// - public ulong GroupId() - { - return Handle->group_id; - } - - /// - /// Get value of variable by id. - /// - /// - /// - public Entity GetVar(int varId) - { - Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); - return new Entity(Handle->world, ecs_iter_get_var(Handle, varId)); - } - - /// - /// Get value of variable by name. - /// - /// - /// - public Entity GetVar(string name) - { - ecs_query_t* query = Handle->query; - - using NativeString nativeName = (NativeString)name; - int varId = ecs_query_find_var(query, nativeName); - Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); - - return new Entity(Handle->world, ecs_iter_get_var(Handle, varId)); - } - - /// - /// Iterate targets for pair field. - /// - /// The field index. - /// The callback. - public void Targets(int index, Ecs.EachEntityCallback callback) - { - Ecs.Assert(Handle->table != null, nameof(ECS_INVALID_OPERATION)); - Ecs.Assert(index < Handle->field_count, nameof(ECS_INVALID_PARAMETER)); - Ecs.Assert(ecs_field_is_set(Handle, (byte)index), nameof(ECS_INVALID_PARAMETER)); - - ecs_type_t* tableType = ecs_table_get_type(Handle->table); - ecs_table_record_t *tr = Handle->trs[index]; - - int end = tr->index + tr->count; - for (int i = tr->index; i < end; i++) - { - ulong id = tableType->array[i]; - Ecs.Assert(Ecs.IsPair(id), "Field must be a pair."); - callback(new Entity(Handle->world, Ecs.PairSecond(Handle->real_world, id))); - } - } - - /// - /// Iterate targets for pair field. - /// - /// The field index. - /// The callback. - public void Targets(int index, delegate* callback) - { - Ecs.Assert(Handle->table != null, nameof(ECS_INVALID_OPERATION)); - Ecs.Assert(index < Handle->field_count, nameof(ECS_INVALID_PARAMETER)); - Ecs.Assert(ecs_field_is_set(Handle, (byte)index), nameof(ECS_INVALID_PARAMETER)); - - ecs_type_t* tableType = ecs_table_get_type(Handle->table); - ecs_table_record_t *tr = Handle->trs[index]; - - int end = tr->index + tr->count; - for (int i = tr->index; i < end; i++) - { - ulong id = tableType->array[i]; - Ecs.Assert(Ecs.IsPair(id), "Field must be a pair."); - callback(new Entity(Handle->world, Ecs.PairSecond(Handle->real_world, id))); - } - } - - /// - /// Progress iterator. - /// - /// The result. - public bool Next() - { - if ((Handle->flags & EcsIterIsValid) != 0 && Handle->table != null) - Ecs.TableUnlock(Handle->world, Handle->table); - - bool result = ((delegate* unmanaged)Handle->next)(Handle) != 0; - - Handle->flags |= EcsIterIsValid; - - if (result && Handle->table != null) - Ecs.TableLock(Handle->world, Handle->table); - - return result; - } - - /// - /// Forward to Each callback. - /// - public void Each() - { - Callback(); - } - - /// - /// Forward to callback. - /// - public void Callback() - { - Ecs.Assert(Handle->callback != default, "Iter/Each callback is not set."); - ((delegate* unmanaged)Handle->callback)(Handle); - } - - /// - /// Free iterator resources. - /// - public void Fini() - { - if (Handle == null) - return; - - if ((Handle->flags & EcsIterIsValid) != 0 && Handle->table != null) - Ecs.TableUnlock(Handle->world, Handle->table); - - ecs_iter_fini(Handle); - Handle = null; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal UntypedField GetUntypedField(int index) - { - return new UntypedField( - ecs_field_w_size(Handle, 0, (byte)index), - (int)ecs_field_size(Handle, (byte)index), - ecs_field_is_self(Handle, (byte)index) ? Handle->count : 1 - ); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal UntypedField GetUntypedFieldAt(int index, int row) - { - return new UntypedField( - ecs_field_at_w_size(Handle, 0, (byte)index, row), - (int)ecs_field_size(Handle, (byte)index), - 1 - ); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal Field GetField(int index) - { - AssertField(Handle, index); - UntypedField field = GetUntypedField(index); - return new Field(field.Data, field.Length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal Field GetFieldAt(int index, int row) - { - AssertField(Handle, index); - UntypedField field = GetUntypedFieldAt(index, row); - return new Field(field.Data, 1); - } - - [Conditional("DEBUG")] - internal static void AssertField(ecs_iter_t* iter, int index) - { - Ecs.Assert(index >= 0 && index < iter->field_count, "Field index out of range."); - - if (ecs_id_is_tag(iter->world, iter->ids[index]) || ecs_id_is_wildcard(iter->ids[index])) - { - Ecs.Error($$""" - Invalid type argument "{{new Entity(iter->world, iter->ids[index])}}" at field index {{index}}. Component data cannot be retrieved for tag types. - [Query Name]: {{new Entity(iter->world, iter->system)}} - [Query Fields]: {{new Query(iter->query).Str()}} - """ - ); - } - - if (Ecs.TypeIdIs(iter->world, iter->ids[index])) - return; - - Ecs.Error($$""" - Type argument mismatch at field index {{index}}. - [Query Name]: {{new Entity(iter->world, iter->system)}} - [Query Fields]: {{new Query(iter->query).Str()}} - [Expected Type]: {{new Entity(iter->world, iter->ids[index])}} - [Provided Type]: {{new Entity(iter->world, Type.Id(iter->world))}} - """ - ); - } - - /// - /// Gets an enumerator for iter. - /// - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - /// - /// Gets an enumerator for iter. - /// - /// - public IterEnumerator GetEnumerator() - { - return new IterEnumerator(Handle->count); - } - - /// - /// Converts a instance to a *. - /// - /// - /// - public static ecs_iter_t* To(Iter iter) - { - return iter.Handle; - } - - /// - /// Converts a * instance to a . - /// - /// - /// - public static Iter From(ecs_iter_t* iter) - { - return new Iter(iter); - } - - /// - /// Converts a instance to a *. - /// - /// - /// - public static implicit operator ecs_iter_t*(Iter iter) - { - return To(iter); - } - - /// - /// Converts a * instance to a . - /// - /// - /// - public static implicit operator Iter(ecs_iter_t* iter) - { - return From(iter); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public bool Equals(Iter other) - { - return Handle == other.Handle; - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Iter other && Equals(other); - } - - /// - /// Returns the hash code of te . - /// - /// - public override int GetHashCode() - { - return Handle->GetHashCode(); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - /// - public static bool operator ==(Iter left, Iter right) - { - return left.Equals(right); - } - - /// - /// Checks if two instances are not equal. - /// - /// - /// - /// - public static bool operator !=(Iter left, Iter right) - { - return !(left == right); - } -} - -// Flecs.NET Extensions -public unsafe partial struct Iter -{ - /// - /// Returns the query being evaluated. - /// - /// The query. - public Query Query() - { - return new Query(Handle->query); - } - - /// - /// Get managed ref to the first element in a field. - /// - /// The index of the field in the iterator. - /// The field type. - /// Reference to first component of field. - [SuppressMessage("Usage", "CA1720")] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ref T Single(int index) - { - return ref GetField(index)[0]; - } - - /// - /// Obtain span for a query field. - /// - /// The index of the field in the iterator. - /// The field type. - /// A span to the data of the field. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public Span Span(int index) where T : unmanaged - { - return GetSpan(index); - } - - /// - /// Obtain pointer to a query field. - /// - /// The index of the field in the iterator. - /// The field type. - /// A pointer to the data of the field. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public T* Pointer(int index) where T : unmanaged - { - return GetPointer(index); - } - - /// - /// Get pointer to field at row. - /// - /// The index of the field in the iterator. - /// The row. - /// The field type. - /// A pointer to the data of the field. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public T* PointerAt(int index, int row) where T : unmanaged - { - return &Pointer(index)[row]; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal Span GetSpan(int index) - { - Field field = GetField(index); - return new Span(field.Data, field.Length); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal T* GetPointer(int index) - { - AssertField(Handle, index); - return (T*)ecs_field_w_size(Handle, Type.Size, (byte)index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal FieldData GetFieldData(byte index) - { - AssertField(Handle, index); - return new FieldData(Handle, index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal IterationTechnique GetIterationTechnique(int fieldCount) - { - IterationTechnique flags = default; - - int mask = (1 << fieldCount) - 1; - - if ((Handle->row_fields & mask) != 0) - flags |= IterationTechnique.Sparse; - - if (((Handle->ref_fields & mask) != 0 && Handle->ref_fields != Handle->row_fields) || (Handle->up_fields & mask) != 0 || (Handle->set_fields & mask) != mask) - flags |= IterationTechnique.Shared; - - return flags; - } -} - -/// -/// Enumerator for iters. -/// -public struct IterEnumerator : IEnumerator -{ - /// - /// Length of the iter. - /// - public int Length { get; } - - /// - /// Current index of the iter. - /// - public int Current { get; private set; } - - /// - /// Current index of the iter. - /// - readonly object IEnumerator.Current => Current; - - /// - /// Create a new iter with the provided length. - /// - /// - public IterEnumerator(int length) - { - Length = length; - Current = -1; - } - - /// - /// Moves to the next index of the iter. - /// - /// - public bool MoveNext() - { - Current++; - return Current < Length; - } - - /// - /// Resets the index of the enumerator. - /// - public void Reset() - { - Current = -1; - } - - /// - /// Disposes of resources. - /// - public void Dispose() - { - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using Flecs.NET.Core.BindingContext; +using Flecs.NET.Utilities; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// Class for iterating over query results. +/// +public unsafe partial struct Iter : IEnumerable, IEquatable, IDisposable +{ + private ecs_iter_t* _handle; + + /// + /// Reference to handle. + /// + public ref ecs_iter_t* Handle => ref _handle; + + /// + /// Creates an iter wrapper using the provided handle. + /// + /// + public Iter(ecs_iter_t* iter) + { + _handle = iter; + } + + /// + /// Free iterator resources. + /// + public void Dispose() + { + Fini(); + } + + /// + /// Returns entity id of system. + /// + /// + public Entity System() + { + return new Entity(Handle->world, Handle->system); + } + + /// + /// Returns entity id of event. + /// + /// + public Entity Event() + { + return new Entity(Handle->world, Handle->@event); + } + + /// + /// Returns the entity id of the event id. + /// + /// + public Id EventId() + { + return new Id(Handle->world, Handle->event_id); + } + + /// + /// Returns staged C# world. + /// + /// + public World World() + { + return new World(Handle->world); + } + + /// + /// Returns the number of entities to iterate. + /// + /// Number of entities to iterate. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int Count() + { + return Handle->count; + } + + /// + /// Returns the time elapsed since last frame. + /// + /// Time elapsed since last frame + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float DeltaTime() + { + return Handle->delta_time; + } + + /// + /// Returns the time elapsed since last system invocation. + /// + /// Time elapsed since last system invocation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float DeltaSystemTime() + { + return Handle->delta_system_time; + } + + /// + /// Returns the type of the iterated table. + /// + /// + public FlecsType Type() + { + return new FlecsType(Handle->world, ecs_table_get_type(Handle->table)); + } + + /// + /// Returns the table of the iter. + /// + /// + public Table Table() + { + return new Table(Handle->real_world, Handle->table); + } + + /// + /// Returns the other table of the iter. + /// + /// + public Table OtherTable() + { + return new Table(Handle->real_world, Handle->other_table); + } + + /// + /// Returns table range of the iter. + /// + /// + public Table Range() + { + return new Table(Handle->real_world, Handle->table, Handle->offset, Handle->count); + } + + /// + /// Returns context pointer. + /// + /// + public void* CtxPtr() + { + return Handle->ctx; + } + + /// + /// Returns context pointer. + /// + /// + /// + public T* CtxPtr() where T : unmanaged + { + return (T*)Handle->ctx; + } + + /// + /// Returns context ref. + /// + /// + /// + public ref T Ctx() + { + UserContext* context = (UserContext*)Handle->ctx; + return ref context->Get(); + } + + /// + /// Returns param pointer. + /// + /// + public void* ParamPtr() + { + return Handle->param; + } + + /// + /// Returns param pointer. + /// + /// + /// + public T* ParamPtr() where T : unmanaged + { + return (T*)Handle->param; + } + + /// + /// Returns param ref. + /// + /// + /// + public ref T Param() where T : unmanaged + { + return ref *ParamPtr(); + } + + /// + /// Obtain mutable handle to entity being iterated over. + /// + /// + /// + public Entity Entity(int row) + { + Ecs.Assert(row < Handle->count, nameof(ECS_COLUMN_INDEX_OUT_OF_RANGE)); + return new Entity(Handle->world, Handle->entities[row]); + } + + /// + /// Returns whether field is matched on self. + /// + /// + /// + public bool IsSelf(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return ecs_field_is_self(Handle, (byte)index); + } + + /// + /// Returns whether field is set. + /// + /// + /// + public bool IsSet(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return ecs_field_is_set(Handle, (byte)index); + } + + /// + /// Returns whether field is readonly. + /// + /// + /// + public bool IsReadonly(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return ecs_field_is_readonly(Handle, (byte)index); + } + + /// + /// Number of fields in iterator. + /// + /// + public int FieldCount() + { + return Handle->field_count; + } + + /// + /// Size of field data type. + /// + /// + /// + public ulong Size(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return (ulong)ecs_field_size(Handle, (byte)index); + } + + /// + /// Obtain field source (0 if This). + /// + /// + /// + public Entity Src(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return new Entity(Handle->world, ecs_field_src(Handle, (byte)index)); + } + + /// + /// Obtain id matched for field. + /// + /// + /// + public Id Id(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return new Id(Handle->world, ecs_field_id(Handle, (byte)index)); + } + + /// + /// Obtain pair id matched for field. + /// This operation will fail if the id is not a pair. + /// + /// + /// + public Id Pair(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + ulong id = ecs_field_id(Handle, (byte)index); + Ecs.Assert(Ecs.EntityHasIdFlag(id, ECS_PAIR) != 0, nameof(ECS_INVALID_PARAMETER)); + return new Id(Handle->world, id); + } + + /// + /// Obtain column index for field. + /// + /// + /// + public int ColumnIndex(int index) + { + Ecs.Assert(index < Handle->field_count, "Field index out of range."); + return ecs_field_column(Handle, (byte)index); + } + + /// + /// Convert current iterator result to string. + /// + /// + public string Str() + { + return NativeString.GetStringAndFree(ecs_iter_str(Handle)); + } + + /// + /// Retrieves an untyped field at the provided index. + /// + /// The field index. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public UntypedField Field(int index) + { + return GetUntypedField(index); + } + + /// + /// Retrieves a pointer to untyped field at row. + /// + /// The field index. + /// The field row. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void* FieldAt(int index, int row) + { + return Utils.IsBitSet(Handle->row_fields, index) + ? GetUntypedFieldAt(index, row)[0] + : GetUntypedField(index)[row]; + } + + /// + /// Retrieves a field at the provided index. + /// + /// The field index. + /// The field type. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Field Field(int index) + { + return GetField(index); + } + + /// + /// Retrieves a managed reference to field at row. + /// + /// The field index. + /// The field row. + /// The field type. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ref T FieldAt(int index, int row) + { + return ref Utils.IsBitSet(Handle->row_fields, index) + ? ref GetFieldAt(index, row)[0] + : ref GetField(index)[row]; + } + + /// + /// Get access to entity ids. + /// + /// + public Field Entities() + { + return new Field(Handle->entities, Handle->count); + } + + /// + /// Check if the current table has changed since the last iteration. + /// Can only be used when iterating queries and/or systems. + /// + /// + public bool Changed() + { + return ecs_iter_changed(Handle); + } + + /// + /// Skip current table. + /// This indicates to the query that the data in the current table is not + /// modified. By default, iterating a table with a query will mark the + /// iterated components as dirty if they are annotated with InOut or Out. + /// + public void Skip() + { + ecs_iter_skip(Handle); + } + + /// + /// Return group id for current table (grouped queries only) + /// + /// + public ulong GroupId() + { + return ecs_iter_get_group(Handle); + } + + /// + /// Get value of variable by id. + /// + /// + /// + public Entity GetVar(int varId) + { + Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); + return new Entity(Handle->world, ecs_iter_get_var(Handle, varId)); + } + + /// + /// Get value of variable by name. + /// + /// + /// + public Entity GetVar(string name) + { + ecs_query_t* query = Handle->query; + + using NativeString nativeName = (NativeString)name; + int varId = ecs_query_find_var(query, nativeName); + Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); + + return new Entity(Handle->world, ecs_iter_get_var(Handle, varId)); + } + + /// + /// Iterate targets for pair field. + /// + /// The field index. + /// The callback. + public void Targets(int index, Ecs.EachEntityCallback callback) + { + Ecs.Assert(Handle->table != null, nameof(ECS_INVALID_OPERATION)); + Ecs.Assert(index < Handle->field_count, nameof(ECS_INVALID_PARAMETER)); + Ecs.Assert(ecs_field_is_set(Handle, (byte)index), nameof(ECS_INVALID_PARAMETER)); + + ecs_type_t* tableType = ecs_table_get_type(Handle->table); + ecs_table_record_t *tr = Handle->trs[index]; + + int end = tr->index + tr->count; + for (int i = tr->index; i < end; i++) + { + ulong id = tableType->array[i]; + Ecs.Assert(Ecs.IsPair(id), "Field must be a pair."); + callback(new Entity(Handle->world, Ecs.PairSecond(Handle->real_world, id))); + } + } + + /// + /// Iterate targets for pair field. + /// + /// The field index. + /// The callback. + public void Targets(int index, delegate* callback) + { + Ecs.Assert(Handle->table != null, nameof(ECS_INVALID_OPERATION)); + Ecs.Assert(index < Handle->field_count, nameof(ECS_INVALID_PARAMETER)); + Ecs.Assert(ecs_field_is_set(Handle, (byte)index), nameof(ECS_INVALID_PARAMETER)); + + ecs_type_t* tableType = ecs_table_get_type(Handle->table); + ecs_table_record_t *tr = Handle->trs[index]; + + int end = tr->index + tr->count; + for (int i = tr->index; i < end; i++) + { + ulong id = tableType->array[i]; + Ecs.Assert(Ecs.IsPair(id), "Field must be a pair."); + callback(new Entity(Handle->world, Ecs.PairSecond(Handle->real_world, id))); + } + } + + /// + /// Progress iterator. + /// + /// The result. + public bool Next() + { + if ((Handle->flags & EcsIterIsValid) != 0 && Handle->table != null) + Ecs.TableUnlock(Handle->world, Handle->table); + + bool result = ((delegate* unmanaged)Handle->next)(Handle) != 0; + + Handle->flags |= EcsIterIsValid; + + if (result && Handle->table != null) + Ecs.TableLock(Handle->world, Handle->table); + + return result; + } + + /// + /// Forward to Each callback. + /// + public void Each() + { + Callback(); + } + + /// + /// Forward to callback. + /// + public void Callback() + { + Ecs.Assert(Handle->callback != default, "Iter/Each callback is not set."); + ((delegate* unmanaged)Handle->callback)(Handle); + } + + /// + /// Free iterator resources. + /// + public void Fini() + { + if (Handle == null) + return; + + if ((Handle->flags & EcsIterIsValid) != 0 && Handle->table != null) + Ecs.TableUnlock(Handle->world, Handle->table); + + ecs_iter_fini(Handle); + Handle = null; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal UntypedField GetUntypedField(int index) + { + var size = (int)ecs_field_size(Handle, (byte)index); + return new UntypedField( + ecs_field_w_size(Handle, size, (byte)index), + size, + ecs_field_is_self(Handle, (byte)index) ? Handle->count : 1 + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal UntypedField GetUntypedFieldAt(int index, int row) + { + return new UntypedField( + ecs_field_at_w_size(Handle, 0, (byte)index, row), + (int)ecs_field_size(Handle, (byte)index), + 1 + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal Field GetField(int index) + { + AssertField(Handle, index); + UntypedField field = GetUntypedField(index); + return new Field(field.Data, field.Length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal Field GetFieldAt(int index, int row) + { + AssertField(Handle, index); + UntypedField field = GetUntypedFieldAt(index, row); + return new Field(field.Data, 1); + } + + [Conditional("DEBUG")] + internal static void AssertField(ecs_iter_t* iter, int index) + { + Ecs.Assert(index >= 0 && index < iter->field_count, "Field index out of range."); + + if (ecs_id_is_tag(iter->world, iter->ids[index]) || ecs_id_is_wildcard(iter->ids[index])) + { + Ecs.Error($$""" + Invalid type argument "{{new Entity(iter->world, iter->ids[index])}}" at field index {{index}}. Component data cannot be retrieved for tag types. + [Query Name]: {{new Entity(iter->world, iter->system)}} + [Query Fields]: {{new Query(iter->query).Str()}} + """ + ); + } + + if (Ecs.TypeIdIs(iter->world, iter->ids[index])) + return; + + Ecs.Error($$""" + Type argument mismatch at field index {{index}}. + [Query Name]: {{new Entity(iter->world, iter->system)}} + [Query Fields]: {{new Query(iter->query).Str()}} + [Expected Type]: {{new Entity(iter->world, iter->ids[index])}} + [Provided Type]: {{new Entity(iter->world, Type.Id(iter->world))}} + """ + ); + } + + /// + /// Gets an enumerator for iter. + /// + /// + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + /// Gets an enumerator for iter. + /// + /// + public IterEnumerator GetEnumerator() + { + return new IterEnumerator(Handle->count); + } + + /// + /// Converts a instance to a *. + /// + /// + /// + public static ecs_iter_t* To(Iter iter) + { + return iter.Handle; + } + + /// + /// Converts a * instance to a . + /// + /// + /// + public static Iter From(ecs_iter_t* iter) + { + return new Iter(iter); + } + + /// + /// Converts a instance to a *. + /// + /// + /// + public static implicit operator ecs_iter_t*(Iter iter) + { + return To(iter); + } + + /// + /// Converts a * instance to a . + /// + /// + /// + public static implicit operator Iter(ecs_iter_t* iter) + { + return From(iter); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public bool Equals(Iter other) + { + return Handle == other.Handle; + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Iter other && Equals(other); + } + + /// + /// Returns the hash code of te . + /// + /// + public override int GetHashCode() + { + return Handle->GetHashCode(); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + /// + public static bool operator ==(Iter left, Iter right) + { + return left.Equals(right); + } + + /// + /// Checks if two instances are not equal. + /// + /// + /// + /// + public static bool operator !=(Iter left, Iter right) + { + return !(left == right); + } +} + +// Flecs.NET Extensions +public unsafe partial struct Iter +{ + /// + /// Returns the query being evaluated. + /// + /// The query. + public Query Query() + { + return new Query(Handle->query); + } + + /// + /// Get managed ref to the first element in a field. + /// + /// The index of the field in the iterator. + /// The field type. + /// Reference to first component of field. + [SuppressMessage("Usage", "CA1720")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ref T Single(int index) + { + return ref GetField(index)[0]; + } + + /// + /// Obtain span for a query field. + /// + /// The index of the field in the iterator. + /// The field type. + /// A span to the data of the field. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span Span(int index) where T : unmanaged + { + return GetSpan(index); + } + + /// + /// Obtain pointer to a query field. + /// + /// The index of the field in the iterator. + /// The field type. + /// A pointer to the data of the field. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T* Pointer(int index) where T : unmanaged + { + return GetPointer(index); + } + + /// + /// Get pointer to field at row. + /// + /// The index of the field in the iterator. + /// The row. + /// The field type. + /// A pointer to the data of the field. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T* PointerAt(int index, int row) where T : unmanaged + { + return &Pointer(index)[row]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal Span GetSpan(int index) + { + Field field = GetField(index); + return new Span(field.Data, field.Length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal T* GetPointer(int index) + { + AssertField(Handle, index); + return (T*)ecs_field_w_size(Handle, Type.Size, (byte)index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal FieldData GetFieldData(byte index) + { + AssertField(Handle, index); + return new FieldData(Handle, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal IterationTechnique GetIterationTechnique(int fieldCount) + { + IterationTechnique flags = default; + + int mask = (1 << fieldCount) - 1; + + if ((Handle->row_fields & mask) != 0) + flags |= IterationTechnique.Sparse; + + if (((Handle->ref_fields & mask) != 0 && Handle->ref_fields != Handle->row_fields) || (Handle->up_fields & mask) != 0 || (Handle->set_fields & mask) != mask) + flags |= IterationTechnique.Shared; + + return flags; + } +} + +/// +/// Enumerator for iters. +/// +public struct IterEnumerator : IEnumerator +{ + /// + /// Length of the iter. + /// + public int Length { get; } + + /// + /// Current index of the iter. + /// + public int Current { get; private set; } + + /// + /// Current index of the iter. + /// + readonly object IEnumerator.Current => Current; + + /// + /// Create a new iter with the provided length. + /// + /// + public IterEnumerator(int length) + { + Length = length; + Current = -1; + } + + /// + /// Moves to the next index of the iter. + /// + /// + public bool MoveNext() + { + Current++; + return Current < Length; + } + + /// + /// Resets the index of the enumerator. + /// + public void Reset() + { + Current = -1; + } + + /// + /// Disposes of resources. + /// + public void Dispose() + { + } +} diff --git a/src/Flecs.NET/Core/IterIterable.cs b/src/Flecs.NET/Core/IterIterable.cs index eb3ae4dc..8d71cb0b 100644 --- a/src/Flecs.NET/Core/IterIterable.cs +++ b/src/Flecs.NET/Core/IterIterable.cs @@ -1,449 +1,446 @@ -using System; -using System.Runtime.CompilerServices; -using Flecs.NET.Utilities; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// An iterator object that can be modified before iterating. -/// -public unsafe partial struct IterIterable : IEquatable -{ - /// - /// The iterator instance. - /// - public ecs_iter_t Iterator; - - /// - /// The iterable type. - /// - public readonly IterableType IterableType; - - /// - /// Creates an iter iterable. - /// - /// The iterator source. - /// The iterator type. - public IterIterable(ecs_iter_t iterator, IterableType iterableType) - { - Iterator = iterator; - IterableType = iterableType; - } - - /// - /// Set value for iterator variable. - /// - /// The variable id. - /// The entity variable value. - /// Reference to self. - public ref IterIterable SetVar(int varId, ulong value) - { - fixed (ecs_iter_t* it = &Iterator) - { - Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); - ecs_iter_set_var(it, varId, value); - return ref this; - } - } - - /// - /// Set value for iterator variable. - /// - /// The variable name. - /// The entity variable value. - /// Reference to self. - public ref IterIterable SetVar(string name, ulong value) - { - fixed (ecs_iter_t* it = &Iterator) - { - using NativeString nativeName = (NativeString)name; - - ecs_query_iter_t* iter = &it->priv_.iter.query; - int varId = ecs_query_find_var(iter->query, nativeName); - - Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); - ecs_iter_set_var(it, varId, value); - - return ref this; - } - } - - /// - /// Set value for iterator variable. - /// - /// The variable name. - /// The table variable value. - /// Reference to self. - public ref IterIterable SetVar(string name, ecs_table_t* value) - { - fixed (ecs_iter_t* it = &Iterator) - { - using NativeString nativeName = (NativeString)name; - - ecs_query_iter_t* iter = &it->priv_.iter.query; - int varId = ecs_query_find_var(iter->query, nativeName); - - Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); - ecs_iter_set_var_as_table(it, varId, value); - - return ref this; - } - } - - /// - /// Set value for iterator variable. - /// - /// The variable name. - /// The table variable value. - /// Reference to self. - public ref IterIterable SetVar(string name, ecs_table_range_t value) - { - fixed (ecs_iter_t* it = &Iterator) - { - using NativeString nativeName = (NativeString)name; - - ecs_query_iter_t* iter = &it->priv_.iter.query; - int varId = ecs_query_find_var(iter->query, nativeName); - - Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); - ecs_iter_set_var_as_range(it, varId, &value); - - return ref this; - } - } - - /// - /// Set value for iterator variable. - /// - /// The variable name. - /// The table variable value. - /// Reference to self. - public ref IterIterable SetVar(string name, Table value) - { - ecs_table_range_t range; - range.table = value.GetTable(); - range.offset = value.Offset; - range.count = value.Count; - return ref SetVar(name, range); - } - - /// - /// Serializes the iterator to a JSON string using the provided description. - /// - /// The description settings for JSON serialization. - /// A JSON string with the serialized iterator data, or an empty string if failed. - public string ToJson(in IterToJsonDesc desc) - { - fixed (ecs_iter_t* it = &Iterator) - fixed (ecs_iter_to_json_desc_t* ptr = &desc.Desc) - { - return NativeString.GetStringAndFree(ecs_iter_to_json(it, ptr)); - } - } - - /// - /// Serializes the iterator to a JSON string. - /// - /// A JSON string with the serialized iterator data, or an empty string if failed. - public string ToJson() - { - fixed (ecs_iter_t* it = &Iterator) - { - return NativeString.GetStringAndFree(ecs_iter_to_json(it, null)); - } - } - - /// - /// Returns total number of entities in result. - /// - /// - public int Count() - { - fixed (ecs_iter_t* it = &Iterator) - { - int result = 0; - while (this.GetNext(it)) - result += Iterator.count; - return result; - } - } - - /// - /// Returns true if iterator yields at least once result. - /// - /// - public bool IsTrue() - { - fixed (ecs_iter_t* it = &Iterator) - { - bool result = this.GetNext(it); - if (result) - ecs_iter_fini(it); - return result; - } - } - - /// - /// Return first matching entity. - /// - /// - public Entity First() - { - fixed (ecs_iter_t* it = &Iterator) - { - Entity result = default; - - if (this.GetNext(it) && it->count != 0) - { - result = new Entity(it->world, it->entities[0]); - ecs_iter_fini(it); - } - - return result; - } - } - - /// - /// Limit results to tables with specified group id (grouped queries only) - /// - /// The group id. - /// Reference to self. - public ref IterIterable SetGroup(ulong groupId) - { - fixed (ecs_iter_t* it = &Iterator) - { - ecs_iter_set_group(it, groupId); - return ref this; - } - } - - /// - /// Limit results to tables with specified group id (grouped queries only) - /// - /// The group type. - /// Reference to self. - public ref IterIterable SetGroup() - { - fixed (ecs_iter_t* it = &Iterator) - { - ecs_iter_set_group(it, Type.Id(it->real_world)); - return ref this; - } - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public bool Equals(IterIterable other) - { - return Iterator == other.Iterator && IterableType == other.IterableType; - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is IterIterable other && Equals(other); - } - - /// - /// Returns the hash code of the . - /// - /// - public override int GetHashCode() - { - return HashCode.Combine(Iterator.GetHashCode(), IterableType.GetHashCode()); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - /// - public static bool operator ==(IterIterable left, IterIterable right) - { - return left.Equals(right); - } - - /// - /// Checks if two instances are not equal. - /// - /// - /// - /// - public static bool operator !=(IterIterable left, IterIterable right) - { - return !(left == right); - } -} - -// IIterIterable Interface -public unsafe partial struct IterIterable : IIterIterable -{ - ref IterIterable IIterIterable.Underlying => ref this; - ref ecs_iter_t IIterIterable.Iterator => ref Iterator; - IterableType IIterIterable.IterableType => IterableType; -} - -// IIterableBase Interface -public unsafe partial struct IterIterable : IIterableBase -{ - /// - ecs_world_t* IIterableBase.World => Iterator.world; - - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ecs_iter_t GetIter(World world = default) - { - if (world == null) - return Iterator; - - return world == null - ? Iterator - : Iterator with { world = world }; - } - - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool GetNext(Iter it) - { - return IterableType switch - { - IterableType.Query => ecs_query_next(it), - IterableType.Worker => ecs_worker_next(it), - IterableType.Page => ecs_page_next(it), - _ => throw new Ecs.ErrorException() - }; - } -} - -// IIterable Interface -public unsafe partial struct IterIterable : IIterable -{ - /// - public void Run(Ecs.RunCallback callback) - { - Invoker.Run(ref this, callback); - } - - /// - public void Run(delegate* callback) - { - Invoker.Run(ref this, callback); - } - - /// - public void Iter(Ecs.IterCallback callback) - { - Invoker.Iter(ref this, callback); - } - - /// - public void Iter(delegate* callback) - { - Invoker.Iter(ref this, callback); - } - - /// - public void Each(Ecs.EachEntityCallback callback) - { - Invoker.Each(ref this, callback); - } - - /// - public void Each(delegate* callback) - { - Invoker.Each(ref this, callback); - } - - /// - public void Each(Ecs.EachIterCallback callback) - { - Invoker.Each(ref this, callback); - } - - /// - public void Each(delegate* callback) - { - Invoker.Each(ref this, callback); - } - - /// - public PageIterable Page(int offset, int limit) - { - return new PageIterable(GetIter(), offset, limit); - } - - /// - public WorkerIterable Worker(int index, int count) - { - return new WorkerIterable(GetIter(), index, count); - } - - /// - public IterIterable Iter(World world = default) - { - return new IterIterable(GetIter(world), IterableType); - } - - /// - public IterIterable Iter(Iter it) - { - return Iter(it.World()); - } - - /// - public IterIterable Iter(Entity entity) - { - return Iter(entity.CsWorld()); - } - - /// - IterIterable IIterable.SetVar(int varId, ulong value) - { - return Iter().SetVar(varId, value); - } - - /// - IterIterable IIterable.SetVar(string name, ulong value) - { - return Iter().SetVar(name, value); - } - - /// - IterIterable IIterable.SetVar(string name, ecs_table_t* value) - { - return Iter().SetVar(name, value); - } - - /// - IterIterable IIterable.SetVar(string name, ecs_table_range_t value) - { - return Iter().SetVar(name, value); - } - - /// - IterIterable IIterable.SetVar(string name, Table value) - { - return Iter().SetVar(name, value); - } - - /// - IterIterable IIterable.SetGroup(ulong groupId) - { - return Iter().SetGroup(groupId); - } - - /// - IterIterable IIterable.SetGroup() - { - return Iter().SetGroup(); - } -} +using System; +using System.Runtime.CompilerServices; +using Flecs.NET.Utilities; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// An iterator object that can be modified before iterating. +/// +public unsafe partial struct IterIterable : IEquatable +{ + /// + /// The iterator instance. + /// + public ecs_iter_t Iterator; + + /// + /// The iterable type. + /// + public readonly IterableType IterableType; + + /// + /// Creates an iter iterable. + /// + /// The iterator source. + /// The iterator type. + public IterIterable(ecs_iter_t iterator, IterableType iterableType) + { + Iterator = iterator; + IterableType = iterableType; + } + + /// + /// Set value for iterator variable. + /// + /// The variable id. + /// The entity variable value. + /// Reference to self. + public ref IterIterable SetVar(int varId, ulong value) + { + fixed (ecs_iter_t* it = &Iterator) + { + Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); + ecs_iter_set_var(it, varId, value); + return ref this; + } + } + + /// + /// Set value for iterator variable. + /// + /// The variable name. + /// The entity variable value. + /// Reference to self. + public ref IterIterable SetVar(string name, ulong value) + { + fixed (ecs_iter_t* it = &Iterator) + { + using NativeString nativeName = (NativeString)name; + + int varId = ecs_query_find_var(it->query, nativeName); + + Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); + ecs_iter_set_var(it, varId, value); + + return ref this; + } + } + + /// + /// Set value for iterator variable. + /// + /// The variable name. + /// The table variable value. + /// Reference to self. + public ref IterIterable SetVar(string name, ecs_table_t* value) + { + fixed (ecs_iter_t* it = &Iterator) + { + using NativeString nativeName = (NativeString)name; + + int varId = ecs_query_find_var(it->query, nativeName); + + Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); + ecs_iter_set_var_as_table(it, varId, value); + + return ref this; + } + } + + /// + /// Set value for iterator variable. + /// + /// The variable name. + /// The table variable value. + /// Reference to self. + public ref IterIterable SetVar(string name, ecs_table_range_t value) + { + fixed (ecs_iter_t* it = &Iterator) + { + using NativeString nativeName = (NativeString)name; + + int varId = ecs_query_find_var(it->query, nativeName); + + Ecs.Assert(varId != -1, nameof(ECS_INVALID_PARAMETER)); + ecs_iter_set_var_as_range(it, varId, &value); + + return ref this; + } + } + + /// + /// Set value for iterator variable. + /// + /// The variable name. + /// The table variable value. + /// Reference to self. + public ref IterIterable SetVar(string name, Table value) + { + ecs_table_range_t range; + range.table = value.GetTable(); + range.offset = value.Offset; + range.count = value.Count; + return ref SetVar(name, range); + } + + /// + /// Serializes the iterator to a JSON string using the provided description. + /// + /// The description settings for JSON serialization. + /// A JSON string with the serialized iterator data, or an empty string if failed. + public string ToJson(in IterToJsonDesc desc) + { + fixed (ecs_iter_t* it = &Iterator) + fixed (ecs_iter_to_json_desc_t* ptr = &desc.Desc) + { + return NativeString.GetStringAndFree(ecs_iter_to_json(it, ptr)); + } + } + + /// + /// Serializes the iterator to a JSON string. + /// + /// A JSON string with the serialized iterator data, or an empty string if failed. + public string ToJson() + { + fixed (ecs_iter_t* it = &Iterator) + { + return NativeString.GetStringAndFree(ecs_iter_to_json(it, null)); + } + } + + /// + /// Returns total number of entities in result. + /// + /// + public int Count() + { + fixed (ecs_iter_t* it = &Iterator) + { + int result = 0; + while (this.GetNext(it)) + result += Iterator.count; + return result; + } + } + + /// + /// Returns true if iterator yields at least once result. + /// + /// + public bool IsTrue() + { + fixed (ecs_iter_t* it = &Iterator) + { + bool result = this.GetNext(it); + if (result) + ecs_iter_fini(it); + return result; + } + } + + /// + /// Return first matching entity. + /// + /// + public Entity First() + { + fixed (ecs_iter_t* it = &Iterator) + { + Entity result = default; + + if (this.GetNext(it) && it->count != 0) + { + result = new Entity(it->world, it->entities[0]); + ecs_iter_fini(it); + } + + return result; + } + } + + /// + /// Limit results to tables with specified group id (grouped queries only) + /// + /// The group id. + /// Reference to self. + public ref IterIterable SetGroup(ulong groupId) + { + fixed (ecs_iter_t* it = &Iterator) + { + ecs_iter_set_group(it, groupId); + return ref this; + } + } + + /// + /// Limit results to tables with specified group id (grouped queries only) + /// + /// The group type. + /// Reference to self. + public ref IterIterable SetGroup() + { + fixed (ecs_iter_t* it = &Iterator) + { + ecs_iter_set_group(it, Type.Id(it->real_world)); + return ref this; + } + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public bool Equals(IterIterable other) + { + return Iterator == other.Iterator && IterableType == other.IterableType; + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is IterIterable other && Equals(other); + } + + /// + /// Returns the hash code of the . + /// + /// + public override int GetHashCode() + { + return HashCode.Combine(Iterator.GetHashCode(), IterableType.GetHashCode()); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + /// + public static bool operator ==(IterIterable left, IterIterable right) + { + return left.Equals(right); + } + + /// + /// Checks if two instances are not equal. + /// + /// + /// + /// + public static bool operator !=(IterIterable left, IterIterable right) + { + return !(left == right); + } +} + +// IIterIterable Interface +public unsafe partial struct IterIterable : IIterIterable +{ + ref IterIterable IIterIterable.Underlying => ref this; + ref ecs_iter_t IIterIterable.Iterator => ref Iterator; + IterableType IIterIterable.IterableType => IterableType; +} + +// IIterableBase Interface +public unsafe partial struct IterIterable : IIterableBase +{ + /// + ecs_world_t* IIterableBase.World => Iterator.world; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ecs_iter_t GetIter(World world = default) + { + if (world == null) + return Iterator; + + return world == null + ? Iterator + : Iterator with { world = world }; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool GetNext(Iter it) + { + return IterableType switch + { + IterableType.Query => ecs_query_next(it), + IterableType.Worker => ecs_worker_next(it), + IterableType.Page => ecs_page_next(it), + _ => throw new Ecs.ErrorException() + }; + } +} + +// IIterable Interface +public unsafe partial struct IterIterable : IIterable +{ + /// + public void Run(Ecs.RunCallback callback) + { + Invoker.Run(ref this, callback); + } + + /// + public void Run(delegate* callback) + { + Invoker.Run(ref this, callback); + } + + /// + public void Iter(Ecs.IterCallback callback) + { + Invoker.Iter(ref this, callback); + } + + /// + public void Iter(delegate* callback) + { + Invoker.Iter(ref this, callback); + } + + /// + public void Each(Ecs.EachEntityCallback callback) + { + Invoker.Each(ref this, callback); + } + + /// + public void Each(delegate* callback) + { + Invoker.Each(ref this, callback); + } + + /// + public void Each(Ecs.EachIterCallback callback) + { + Invoker.Each(ref this, callback); + } + + /// + public void Each(delegate* callback) + { + Invoker.Each(ref this, callback); + } + + /// + public PageIterable Page(int offset, int limit) + { + return new PageIterable(GetIter(), offset, limit); + } + + /// + public WorkerIterable Worker(int index, int count) + { + return new WorkerIterable(GetIter(), index, count); + } + + /// + public IterIterable Iter(World world = default) + { + return new IterIterable(GetIter(world), IterableType); + } + + /// + public IterIterable Iter(Iter it) + { + return Iter(it.World()); + } + + /// + public IterIterable Iter(Entity entity) + { + return Iter(entity.CsWorld()); + } + + /// + IterIterable IIterable.SetVar(int varId, ulong value) + { + return Iter().SetVar(varId, value); + } + + /// + IterIterable IIterable.SetVar(string name, ulong value) + { + return Iter().SetVar(name, value); + } + + /// + IterIterable IIterable.SetVar(string name, ecs_table_t* value) + { + return Iter().SetVar(name, value); + } + + /// + IterIterable IIterable.SetVar(string name, ecs_table_range_t value) + { + return Iter().SetVar(name, value); + } + + /// + IterIterable IIterable.SetVar(string name, Table value) + { + return Iter().SetVar(name, value); + } + + /// + IterIterable IIterable.SetGroup(ulong groupId) + { + return Iter().SetGroup(groupId); + } + + /// + IterIterable IIterable.SetGroup() + { + return Iter().SetGroup(); + } +} diff --git a/src/Flecs.NET/Core/QueryBuilder.cs b/src/Flecs.NET/Core/QueryBuilder.cs index 5052a390..7f8d503a 100644 --- a/src/Flecs.NET/Core/QueryBuilder.cs +++ b/src/Flecs.NET/Core/QueryBuilder.cs @@ -1,1959 +1,1965 @@ -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Flecs.NET.Core.BindingContext; -using Flecs.NET.Utilities; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// A wrapper around . -/// -public unsafe struct QueryBuilder : IDisposable, IEquatable, IQueryBuilder -{ - private ecs_world_t* _world; - private ecs_query_desc_t _desc; - private int _termIndex; - private int _termCount; - private TermIdType _termIdType; - private ref ecs_term_t CurrentTerm => ref Desc.terms[_termIndex]; - private ref ecs_term_ref_t CurrentTermId - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - switch (_termIdType) - { - case TermIdType.First: - return ref CurrentTerm.first; - case TermIdType.Second: - return ref CurrentTerm.second; - case TermIdType.Src: - return ref CurrentTerm.src; - default: - return ref Unsafe.NullRef(); - } - } - } - - internal ref QueryContext QueryContext => ref *EnsureQueryContext(); - internal ref GroupByContext GroupByContext => ref *EnsureGroupByContext(); - - ref QueryBuilder IQueryBuilderBase.QueryBuilder => ref this; - - /// - /// A reference to the world. - /// - public ref ecs_world_t* World => ref _world; - - /// - /// A reference to the query description. - /// - public ref ecs_query_desc_t Desc => ref _desc; - - /// - /// Creates a query builder for the provided world. - /// - /// The world. - public QueryBuilder(ecs_world_t* world) - { - _world = world; - _desc = default; - _termIndex = default; - _termCount = default; - _termIdType = TermIdType.Src; - QueryContext = default; - } - - /// - /// Creates a query builder for the provided world. - /// - /// The world. - /// The query entity. - public QueryBuilder(ecs_world_t* world, ulong entity) : this(world) - { - Desc.entity = entity; - } - - /// - /// Creates a query builder for the provided world. - /// - /// The world. - /// The query name. - public QueryBuilder(ecs_world_t* world, string name) : this(world) - { - if (string.IsNullOrEmpty(name)) - return; - - using NativeString nativeName = (NativeString)name; - - ecs_entity_desc_t desc = default; - desc.name = nativeName; - desc.sep = Pointers.DefaultSeparator; - desc.root_sep = Pointers.DefaultSeparator; - Desc.entity = ecs_entity_init(World, &desc); - } - - /// - /// Cleans up native resources. This should be called if the query builder - /// will be discarded and .Build() isn't called. - /// - public void Dispose() - { - QueryContext.Free(ref QueryContext); - GroupByContext.Free(ref GroupByContext); - this = default; - } - - /// - /// Builds a new Query. - /// - /// - public Query Build() - { - fixed (ecs_query_desc_t* ptr = &Desc) - return new Query(ecs_query_init(World, ptr)); - } - - /// - /// The self flags indicates the term identifier itself is used. - /// - /// - public ref QueryBuilder Self() - { - AssertTermId(); - CurrentTermId.id |= EcsSelf; - return ref this; - } - - /// - /// Specify value of identifier by id. - /// - /// - /// - public ref QueryBuilder Id(ulong id) - { - AssertTermId(); - CurrentTermId.id = id; - return ref this; - } - - /// - /// Specify value of identifier by id. Almost the same as id(entity), but this - /// operation explicitly sets the EcsIsEntity flag. This forces the id to - /// be interpreted as entity, whereas not setting the flag would implicitly - /// convert ids for builtin variables such as EcsThis to a variable. - /// - /// - /// - public ref QueryBuilder Entity(ulong entity) - { - AssertTermId(); - CurrentTermId.id = entity | EcsIsEntity; - return ref this; - } - - /// - /// Specify value of identifier by name. - /// - /// - /// - public ref QueryBuilder Name(string name) - { - AssertTermId(); - - NativeString nativeName = (NativeString)name; - QueryContext.Strings.Add(nativeName); - - CurrentTermId.id |= EcsIsEntity; - CurrentTermId.name = nativeName; - - return ref this; - } - - /// - /// Specify identifier is a variable (resolved at query evaluation time). - /// - /// - /// - public ref QueryBuilder Var(string name) - { - AssertTermId(); - - NativeString nativeName = (NativeString)name; - QueryContext.Strings.Add(nativeName); - - CurrentTermId.id |= EcsIsVariable; - CurrentTermId.name = nativeName; - return ref this; - } - - /// - /// Sets term id. - /// - /// - /// - public ref QueryBuilder Term(ulong id) - { - return ref Id(id); - } - - /// - /// Call prior to setting values for src identifier. - /// - /// - public ref QueryBuilder Src() - { - AssertTerm(); - _termIdType = TermIdType.Src; - return ref this; - } - - /// - /// Call prior to setting values for first identifier. This is either the - /// component identifier, or first element of a pair (in case second is - /// populated as well). - /// - /// - public ref QueryBuilder First() - { - AssertTerm(); - _termIdType = TermIdType.First; - return ref this; - } - - /// - /// Call prior to setting values for second identifier. This is the second - /// element of a pair. Requires that First() is populated as well. - /// - /// - public ref QueryBuilder Second() - { - AssertTerm(); - _termIdType = TermIdType.Second; - return ref this; - } - - /// - /// Select src identifier, initialize it with entity id. - /// - /// - /// - public ref QueryBuilder Src(ulong srcId) - { - return ref Src().Id(srcId); - } - - /// - /// Select src identifier, initialize it with id associated with type. - /// - /// - /// - public ref QueryBuilder Src() - { - return ref Src(Type.Id(World)); - } - - /// - /// Select src identifier, initialize it with id associated with enum member. - /// - /// - /// - /// - public ref QueryBuilder Src(T value) where T : Enum - { - return ref Src(Type.Id(World, value)); - } - - /// - /// Select src identifier, initialize it with name. If name starts with a $ - /// the name is interpreted as a variable. - /// - /// - /// - public ref QueryBuilder Src(string name) - { - Src(); - return ref name[0] == '$' ? ref Var(name[1..]) : ref Name(name); - } - - /// - /// Select first identifier, initialize it with entity id. - /// - /// - /// - public ref QueryBuilder First(ulong firstId) - { - return ref First().Id(firstId); - } - - /// - /// Select first identifier, initialize it with id associated with type. - /// - /// - /// - public ref QueryBuilder First() - { - return ref First(Type.Id(World)); - } - - /// - /// Select first identifier, initialize it with id associated with enum member. - /// - /// - /// - /// - public ref QueryBuilder First(T value) where T : Enum - { - return ref First(Type.Id(World, value)); - } - - /// - /// Select first identifier, initialize it with name. If name starts with a $ - /// the name is interpreted as a variable. - /// - /// - /// - public ref QueryBuilder First(string name) - { - First(); - return ref name[0] == '$' ? ref Var(name[1..]) : ref Name(name); - } - - /// - /// Select second identifier, initialize it with entity id. - /// - /// - /// - public ref QueryBuilder Second(ulong secondId) - { - return ref Second().Id(secondId); - } - - /// - /// Select second identifier, initialize it with id associated with type. - /// - /// - /// - public ref QueryBuilder Second() - { - return ref Second(Type.Id(World)); - } - - /// - /// Select second identifier, initialize it with id associated with enum member. - /// - /// - /// - /// - public ref QueryBuilder Second(T value) where T : Enum - { - return ref Second(Type.Id(World, value)); - } - - /// - /// Select second identifier, initialize it with name. If name starts with a $ - /// the name is interpreted as a variable. - /// - /// - /// - public ref QueryBuilder Second(string secondName) - { - Second(); - return ref secondName[0] == '$' ? ref Var(secondName[1..]) : ref Name(secondName); - } - - /// - /// The up flag indicates that the term identifier may be substituted by - /// traversing a relationship upwards. For example: substitute the identifier - /// with its parent by traversing the ChildOf relationship. - /// - /// - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - AssertTermId(); - Ecs.Assert(_termIdType == TermIdType.Src, "Up traversal can only be applied to term source."); - - CurrentTermId.id |= EcsUp; - - if (traverse != 0) - CurrentTerm.trav = traverse; - - return ref this; - } - - /// - /// The up flag indicates that the term identifier may be substituted by - /// traversing a relationship upwards. For example: substitute the identifier - /// with its parent by traversing the ChildOf relationship. - /// - /// - /// - public ref QueryBuilder Up() - { - return ref Up(Type.Id(World)); - } - - /// - /// The up flag indicates that the term identifier may be substituted by - /// traversing a relationship upwards. For example: substitute the identifier - /// with its parent by traversing the ChildOf relationship. - /// - /// - /// - /// - public ref QueryBuilder Up(T value) where T : Enum - { - return ref Up(Type.Id(World, value)); - } - - /// - /// The cascade flag is like up, but returns results in breadth-first order. - /// Only supported for Query. - /// - /// - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - AssertTermId(); - - Up(); - CurrentTermId.id |= EcsCascade; - - if (traverse != 0) - CurrentTerm.trav = traverse; - - return ref this; - } - - /// - /// The cascade flag is like up, but returns results in breadth-first order. - /// Only supported for Query. - /// - /// - /// - public ref QueryBuilder Cascade() - { - return ref Cascade(Type.Id(World)); - } - - /// - /// The cascade flag is like up, but returns results in breadth-first order. - /// Only supported for Query. - /// - /// - /// - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - return ref Cascade(Type.Id(World, value)); - } - - /// - /// Use with cascade to iterate results in descending (bottom -> top) order - /// - /// - public ref QueryBuilder Descend() - { - AssertTermId(); - CurrentTermId.id |= EcsDesc; - return ref this; - } - - /// - /// Same as up(), exists for backwards compatibility. - /// - /// - public ref QueryBuilder Parent() - { - return ref Up(); - } - - /// - /// Specify relationship to traverse, and flags to indicate direction. - /// - /// - /// - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - AssertTermId(); - CurrentTerm.trav = traverse; - CurrentTermId.id |= flags; - return ref this; - } - - /// - /// Specify relationship to traverse, and flags to indicate direction. - /// - /// - /// - /// - public ref QueryBuilder Trav(uint flags = 0) - { - return ref Trav(Type.Id(World), flags); - } - - /// - /// Specify relationship to traverse, and flags to indicate direction. - /// - /// - /// - /// - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - return ref Trav(Type.Id(World, value), flags); - } - - /// - /// Set id flags for term. - /// - /// - /// - public ref QueryBuilder Flags(ulong flags) - { - AssertTerm(); - CurrentTerm.id |= flags; - return ref this; - } - - /// - /// Set read/write access of term. - /// - /// - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - AssertTerm(); - CurrentTerm.inout = (short)inOut; - return ref this; - } - - /// - /// Set read/write access for stage. Use this when a system reads or writes - /// components other than the ones provided by the query. This information - /// can be used by schedulers to insert sync/merge points between systems - /// where deferred operations are flushed. - /// Setting this is optional. If not set, the value of the accessed component - /// may be out of sync for at most one frame. - /// - /// - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - AssertTerm(); - CurrentTerm.inout = (short)inOut; - if (CurrentTerm.oper != (short)EcsNot) - Src().Entity(0); - - return ref this; - } - - /// - /// Short for InOutStage(EcsOut). - /// Use when system uses add, remove or set. - /// - /// - public ref QueryBuilder Write() - { - return ref InOutStage(EcsOut); - } - - /// - /// Short for InOutStage(EcsIn). - /// Use when system uses get. - /// - /// - public ref QueryBuilder Read() - { - return ref InOutStage(EcsIn); - } - - /// - /// Short for InOutStage(EcsInOut). - /// Use when system uses get_mut. - /// - /// - public ref QueryBuilder ReadWrite() - { - return ref InOutStage(EcsInOut); - } - - /// - /// Short for InOut(EcsIn) - /// - /// - public ref QueryBuilder In() - { - return ref InOut(EcsIn); - } - - /// - /// Short for InOut(EcsOut) - /// - /// - public ref QueryBuilder Out() - { - return ref InOut(EcsOut); - } - - /// - /// Short for InOut(EcsInOut) - /// - /// - public ref QueryBuilder InOut() - { - return ref InOut(EcsInOut); - } - - /// - /// Short for InOut(EcsInOutNone) - /// - /// - public ref QueryBuilder InOutNone() - { - return ref InOut(EcsInOutNone); - } - - /// - /// Set operator of term. - /// - /// - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - AssertTerm(); - CurrentTerm.oper = (short)oper; - return ref this; - } - - /// - /// Short for Oper(EcsAnd). - /// - /// - public ref QueryBuilder And() - { - return ref Oper(EcsAnd); - } - - /// - /// Short for Oper(EcsOr). - /// - /// - public ref QueryBuilder Or() - { - return ref Oper(EcsOr); - } - - /// - /// Short for Oper(EcsNot). - /// - /// - public ref QueryBuilder Not() - { - return ref Oper(EcsNot); - } - - /// - /// Short for Oper(EcsOptional). - /// - /// - public ref QueryBuilder Optional() - { - return ref Oper(EcsOptional); - } - - - /// - /// Short for Oper(EcsAndFrom). - /// - /// - public ref QueryBuilder AndFrom() - { - return ref Oper(EcsAndFrom); - } - - /// - /// Short for Oper(EcsOFrom). - /// - /// - public ref QueryBuilder OrFrom() - { - return ref Oper(EcsOrFrom); - } - - /// - /// Short for Oper(EcsNotFrom). - /// - /// - public ref QueryBuilder NotFrom() - { - return ref Oper(EcsNotFrom); - } - - /// - /// Match singleton. - /// - /// - public ref QueryBuilder Singleton() - { - AssertTerm(); - Ecs.Assert(CurrentTerm.id != 0 || CurrentTerm.first.id != 0, "no component specified for singleton"); - - ulong singletonId = CurrentTerm.id; - - if (singletonId == 0) - singletonId = CurrentTerm.first.id; - - Ecs.Assert(singletonId != 0, nameof(ECS_INVALID_PARAMETER)); - CurrentTerm.src.id = !Ecs.IsPair(singletonId) ? singletonId : Ecs.PairFirst(World, singletonId); - - return ref this; - } - - /// - /// Filter terms are not triggered on by observers. - /// - /// - public ref QueryBuilder Filter() - { - CurrentTerm.inout = (short)EcsInOutFilter; - return ref this; - } - - /// - /// Set query flags for advanced usage - /// - /// - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Desc.flags |= flags; - return ref this; - } - - /// - /// Sets the cache kind. - /// - /// - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Desc.cache_kind = kind; - return ref this; - } - - /// - /// Cache query terms that are cacheable. - /// - /// - public ref QueryBuilder Cached() - { - return ref CacheKind(EcsQueryCacheAuto); - } - - /// - /// Query expression. Should not be set at the same time as terms array. - /// - /// - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.Assert(Desc.expr == null, "QueryBuilder.Expr() cannot be called more than once"); - - NativeString nativeExpr = (NativeString)expr; - QueryContext.Strings.Add(nativeExpr); - - Desc.expr = nativeExpr; - - return ref this; - } - - /// - /// Increments to the next term with the provided value. - /// - /// - /// - public ref QueryBuilder With(Term term) - { - Term(); - CurrentTerm = term.Value; - return ref this; - } - - /// - /// Increments to the next term with the provided id. - /// - /// - /// - public ref QueryBuilder With(ulong id) - { - Term(); - SetTermId(id); - return ref this; - } - - /// - /// Increments to the next term with the provided name. - /// - /// - /// - public ref QueryBuilder With(string name) - { - Term(); - SetTermId(); - First(name); - return ref this; - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Term(); - SetTermId(first, second); - return ref this; - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With(ulong first, string second) - { - Term(); - SetTermId(first); - Second(second); - return ref this; - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With(string first, ulong second) - { - Term(); - SetTermId(); - First(first); - Second(second); - return ref this; - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With(string first, string second) - { - Term(); - SetTermId(); - First(first); - Second(second); - return ref this; - } - - /// - /// Increments to the next term with the provided type. - /// - /// - /// - public ref QueryBuilder With() - { - Term(); - SetTermId(Type.Id(World)); - return ref this; - } - - /// - /// Increments to the next term with the provided enum. - /// - /// - /// - /// - public ref QueryBuilder With(T value) where T : Enum - { - return ref With(Type.Id(World, value)); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With(ulong second) - { - return ref With(Type.Id(World), second); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With(string second) - { - return ref With(Type.Id(World)).Second(second); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder With() - { - return ref With(Type.Id(World)); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - return ref With(Type.Id(World, second)); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - return ref WithSecond(Type.Id(World, first)); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - return ref With(Type.Id(World, first), second); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - return ref With(first, Type.Id(World, second)); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder WithSecond(ulong first) - { - ulong pair = Ecs.PairSecond(first, World); - return ref With(pair); - } - - /// - /// Increments to the next term with the provided pair. - /// - /// - /// - /// - public ref QueryBuilder WithSecond(string first) - { - return ref With(first, Type.Id(World)); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - public ref QueryBuilder Without(Term term) - { - return ref With(term).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - public ref QueryBuilder Without(ulong id) - { - return ref With(id).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - public ref QueryBuilder Without(string name) - { - return ref With(name).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - return ref With(first, second).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(ulong first, string second) - { - return ref With(first, second).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(string first, ulong second) - { - return ref With(first, second).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(string first, string second) - { - return ref With(first, second).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - public ref QueryBuilder Without() - { - return ref With().Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(T value) where T : Enum - { - return ref With(value).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(ulong second) - { - return ref With(second).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without(string second) - { - return ref With(second).Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - public ref QueryBuilder Without() - { - return ref With().Not(); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - return ref Without(Type.Id(World, second)); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - return ref WithoutSecond(Type.Id(World, first)); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - return ref Without(Type.Id(World, first), second); - } - - /// - /// Alternative form of With().Not(). - /// - /// - /// - /// - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - return ref Without(first, Type.Id(World, second)); - } - - /// - /// Alternative form of WithSecond().Not(). - /// - /// - /// - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - return ref WithSecond(first).Not(); - } - - /// - /// Alternative form of WithSecond().Not(). - /// - /// - /// - /// - public ref QueryBuilder WithoutSecond(string first) - { - return ref WithSecond(first).Not(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - public ref QueryBuilder Write(Term term) - { - return ref With(term).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - public ref QueryBuilder Write(ulong id) - { - return ref With(id).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - public ref QueryBuilder Write(string name) - { - return ref With(name).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - return ref With(first, second).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(ulong first, string second) - { - return ref With(first, second).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(string first, ulong second) - { - return ref With(first, second).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(string first, string second) - { - return ref With(first, second).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - public ref QueryBuilder Write() - { - return ref With().Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(T value) where T : Enum - { - return ref With(value).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(ulong second) - { - return ref With(second).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write(string second) - { - return ref With(second).Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - public ref QueryBuilder Write() - { - return ref With().Write(); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - return ref Write(Type.Id(World, second)); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - return ref WriteSecond(Type.Id(World, first)); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - return ref Write(Type.Id(World, first), second); - } - - /// - /// Alternative form of With().Write(). - /// - /// - /// - /// - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - return ref Write(first, Type.Id(World, second)); - } - - /// - /// Alternative form of WithSecond().Write(). - /// - /// - /// - /// - public ref QueryBuilder WriteSecond(ulong first) - { - return ref WithSecond(first).Write(); - } - - /// - /// Alternative form of WithSecond().Write(). - /// - /// - /// - /// - public ref QueryBuilder WriteSecond(string first) - { - return ref WithSecond(first).Write(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - public ref QueryBuilder Read(Term term) - { - return ref With(term).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - public ref QueryBuilder Read(ulong id) - { - return ref With(id).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - public ref QueryBuilder Read(string name) - { - return ref With(name).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - return ref With(first, second).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(ulong first, string second) - { - return ref With(first, second).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(string first, ulong second) - { - return ref With(first, second).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(string first, string second) - { - return ref With(first, second).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - public ref QueryBuilder Read() - { - return ref With().Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(T value) where T : Enum - { - return ref With(value).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(ulong second) - { - return ref With(second).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read(string second) - { - return ref With(second).Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - public ref QueryBuilder Read() - { - return ref With().Read(); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - return ref Read(Type.Id(World, second)); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - return ref ReadSecond(Type.Id(World, first)); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - return ref Read(Type.Id(World, first), second); - } - - /// - /// Alternative form of With().Read(). - /// - /// - /// - /// - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - return ref Read(first, Type.Id(World, second)); - } - - /// - /// Alternative form of WithSecond().Read(). - /// - /// - /// - /// - public ref QueryBuilder ReadSecond(ulong first) - { - return ref WithSecond(first).Read(); - } - - /// - /// Alternative form of WithSecond().Read(). - /// - /// - /// - /// - public ref QueryBuilder ReadSecond(string first) - { - return ref WithSecond(first).Read(); - } - - /// - /// Alternative form of With(EcsScopeOpen).Entity(0) - /// - /// - public ref QueryBuilder ScopeOpen() - { - return ref With(EcsScopeOpen).Entity(0); - } - - /// - /// Alternative form of With(EcsScopeClose).Entity(0) - /// - /// - public ref QueryBuilder ScopeClose() - { - return ref With(EcsScopeClose).Entity(0); - } - - /// - /// Term notation for more complex query features. - /// - /// - public ref QueryBuilder Term() - { - Ecs.Assert(_termIndex < FLECS_TERM_COUNT_MAX, "Cannot have more than 32 terms."); - _termIndex = _termCount++; - return ref this; - } - - /// - /// Sets the current term to the one with the provided type. - /// - /// - /// - public ref QueryBuilder TermAt() - { - for (int i = 0; i < _termCount; i++) - { - ecs_term_t term = _desc.terms[i]; - if (Ecs.TypeIdIs(World, term.id) || Ecs.TypeIdIs(World, Ecs.Pair(term.first.id, term.second.id))) - return ref TermAt(i); - } - Ecs.Error("Term not found."); - return ref this; - } - - /// - /// Sets the current term to the one at the provided index. - /// - /// - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.Assert(termIndex >= 0 && termIndex < FLECS_TERM_COUNT_MAX, "TermIndex argument must be between 0-31."); - - _termIndex = termIndex; - _termIdType = TermIdType.Src; - - fixed (ecs_term_t* ptr = &CurrentTerm) - Ecs.Assert(ecs_term_is_initialized(ptr), "Term is not initialized."); - - return ref this; - } - - /// - /// Sets the current term to the one at the provided index and asserts that the type matches. - /// - /// - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.Assert(Ecs.TypeIdIs(World, CurrentTerm.id) || Ecs.TypeIdIs(World, Ecs.Pair(CurrentTerm.first.id, CurrentTerm.second.id)), "Term type does not match."); - return ref TermAt(termIndex); - } - - /// - /// Sort the output of a query. - /// - /// - /// - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - QueryContext.OrderBy.Set(callback, null); - Desc.order_by_callback = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(callback); - Desc.order_by = component; - return ref this; - } - - /// - /// Sort the output of a query. - /// - /// - /// - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - return ref OrderBy(Type.Id(World), callback); - } - - /// - /// Group and sort matched tables. - /// - /// The id to be used for grouping. - /// - public ref QueryBuilder GroupBy(ulong component) - { - Desc.group_by_callback = default; - Desc.group_by = component; - return ref this; - } - - /// - /// Group and sort matched tables. - /// - /// The id to be used for grouping. - /// The callback. - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - GroupByContext.GroupBy.Set(callback, (delegate*)&Functions.GroupByCallbackDelegate); - Desc.group_by_callback = &Functions.GroupByCallback; - Desc.group_by = component; - return ref this; - } - - /// - /// Group and sort matched tables. - /// - /// The id to be used for grouping - /// The callback. - /// The user context type. - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - GroupByContext.GroupBy.Set(callback, (delegate*)&Functions.GroupByCallbackDelegate); - Desc.group_by_callback = &Functions.GroupByCallback; - Desc.group_by = component; - return ref this; - } - - /// - /// Group and sort matched tables. - /// - /// The component to be used for grouping. - /// - public ref QueryBuilder GroupBy() - { - return ref GroupBy(Type.Id(World)); - } - - /// - /// Group and sort matched tables. - /// - /// The callback. - /// The component to be used for grouping. - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - return ref GroupBy(Type.Id(World), callback); - } - - /// - /// Group and sort matched tables. - /// - /// The callback. - /// The component to be used for grouping. - /// The user context type. - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - return ref GroupBy(Type.Id(World), callback); - } - - /// - /// Sets the group by user context object. - /// - /// The user context object. - /// The user context type. - /// - public ref QueryBuilder GroupByCtx(T value) - { - GroupByContext.GroupByUserContext.Set(ref value); - return ref this; - } - - /// - /// Sets the group by user context object. The provided callback will be run before the - /// user context object is released by flecs. - /// - /// The user context object. - /// The callback. - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - GroupByContext.GroupByUserContext.Set(ref value, callback); - return ref this; - } - - /// - /// Sets the group by user context object. The provided callback will be run before the - /// user context object is released by flecs. - /// - /// The user context object. - /// The callback. - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - GroupByContext.GroupByUserContext.Set(ref value, callback); - return ref this; - } - - /// - /// Specify callback to run when a group is created. - /// - /// The callback. - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - GroupByContext.GroupCreate.Set(callback, (delegate*)&Functions.GroupCreateCallbackDelegate); - Desc.on_group_create = &Functions.GroupCreateCallback; - return ref this; - } - - /// - /// Specify callback to run when a group is created. - /// - /// The callback. - /// The user context type. - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - GroupByContext.GroupCreate.Set(callback, (delegate*)&Functions.GroupCreateCallbackDelegate); - Desc.on_group_create = &Functions.GroupCreateCallback; - return ref this; - } - - /// - /// Specify callback to run when a group is deleted. - /// - /// The callback. - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - GroupByContext.GroupDelete.Set(callback, (delegate*)&Functions.GroupDeleteCallbackDelegate); - Desc.on_group_delete = &Functions.GroupDeleteCallback; - return ref this; - } - - /// - /// Specify callback to run when a group is deleted. - /// - /// The callback. - /// The user context type. - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - GroupByContext.GroupDelete.Set(callback, (delegate*)&Functions.GroupDeleteCallbackDelegate); - Desc.on_group_delete = &Functions.GroupDeleteCallback; - return ref this; - } - - private QueryContext* EnsureQueryContext() - { - if (_desc.binding_ctx != null) - return (QueryContext*)_desc.binding_ctx; - - _desc.binding_ctx = Memory.AllocZeroed(1); - _desc.binding_ctx_free = &Functions.QueryContextFree; - return (QueryContext*)_desc.binding_ctx; - } - - private GroupByContext* EnsureGroupByContext() - { - if (_desc.group_by_ctx != null) - return (GroupByContext*)_desc.group_by_ctx; - - _desc.group_by_ctx = Memory.AllocZeroed(1); - _desc.group_by_ctx_free = &Functions.GroupByContextFree; - return (GroupByContext*)_desc.group_by_ctx; - } - - [Conditional("DEBUG")] - private void AssertTermId() - { - Ecs.Assert(!Unsafe.IsNullRef(ref CurrentTermId), "No active term (call .Term() first)"); - } - - [Conditional("DEBUG")] - private void AssertTerm() - { - Ecs.Assert(!Unsafe.IsNullRef(ref CurrentTermId), "No active term (call .term() first)"); - } - - private void SetTermId() - { - CurrentTerm = default; - } - - private void SetTermId(ulong id) - { - CurrentTerm = (id & ECS_ID_FLAGS_MASK) == 0 - ? new ecs_term_t { first = new ecs_term_ref_t { id = id } } - : new ecs_term_t { id = id }; - } - - private void SetTermId(ulong first, ulong second) - { - CurrentTerm = new ecs_term_t { id = Ecs.Pair(first, second) }; - } - - private enum TermIdType - { - Src, - First, - Second - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public bool Equals(QueryBuilder other) - { - return Desc == other.Desc; - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is QueryBuilder other && Equals(other); - } - - /// - /// Returns the hash code for the . - /// - /// - public override int GetHashCode() - { - return Desc.GetHashCode(); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - /// - public static bool operator ==(QueryBuilder left, QueryBuilder right) - { - return left.Equals(right); - } - - /// - /// Checks if two instances are not equal. - /// - /// - /// - /// - public static bool operator !=(QueryBuilder left, QueryBuilder right) - { - return !(left == right); - } -} +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Flecs.NET.Core.BindingContext; +using Flecs.NET.Utilities; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// A wrapper around . +/// +public unsafe struct QueryBuilder : IDisposable, IEquatable, IQueryBuilder +{ + private ecs_world_t* _world; + private ecs_query_desc_t _desc; + private int _termIndex; + private int _termCount; + private TermIdType _termIdType; + private ref ecs_term_t CurrentTerm => ref Desc.terms[_termIndex]; + private ref ecs_term_ref_t CurrentTermId + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + switch (_termIdType) + { + case TermIdType.First: + return ref CurrentTerm.first; + case TermIdType.Second: + return ref CurrentTerm.second; + case TermIdType.Src: + return ref CurrentTerm.src; + default: + return ref Unsafe.NullRef(); + } + } + } + + internal ref QueryContext QueryContext => ref *EnsureQueryContext(); + internal ref GroupByContext GroupByContext => ref *EnsureGroupByContext(); + + ref QueryBuilder IQueryBuilderBase.QueryBuilder => ref this; + + /// + /// A reference to the world. + /// + public ref ecs_world_t* World => ref _world; + + /// + /// A reference to the query description. + /// + public ref ecs_query_desc_t Desc => ref _desc; + + /// + /// Creates a query builder for the provided world. + /// + /// The world. + public QueryBuilder(ecs_world_t* world) + { + _world = world; + _desc = default; + _termIndex = default; + _termCount = default; + _termIdType = TermIdType.Src; + QueryContext = default; + } + + /// + /// Creates a query builder for the provided world. + /// + /// The world. + /// The query entity. + public QueryBuilder(ecs_world_t* world, ulong entity) : this(world) + { + Desc.entity = entity; + } + + /// + /// Creates a query builder for the provided world. + /// + /// The world. + /// The query name. + public QueryBuilder(ecs_world_t* world, string name) : this(world) + { + if (string.IsNullOrEmpty(name)) + return; + + using NativeString nativeName = (NativeString)name; + + ecs_entity_desc_t desc = default; + desc.name = nativeName; + desc.sep = Pointers.DefaultSeparator; + desc.root_sep = Pointers.DefaultSeparator; + Desc.entity = ecs_entity_init(World, &desc); + } + + /// + /// Cleans up native resources. This should be called if the query builder + /// will be discarded and .Build() isn't called. + /// + public void Dispose() + { + QueryContext.Free(ref QueryContext); + GroupByContext.Free(ref GroupByContext); + this = default; + } + + /// + /// Builds a new Query. + /// + /// + public Query Build() + { + fixed (ecs_query_desc_t* ptr = &Desc) + return new Query(ecs_query_init(World, ptr)); + } + + /// + /// The self flags indicates the term identifier itself is used. + /// + /// + public ref QueryBuilder Self() + { + AssertTermId(); + CurrentTermId.id |= EcsSelf; + return ref this; + } + + /// + /// Specify value of identifier by id. + /// + /// + /// + public ref QueryBuilder Id(ulong id) + { + AssertTermId(); + CurrentTermId.id = id; + return ref this; + } + + /// + /// Specify value of identifier by id. Almost the same as id(entity), but this + /// operation explicitly sets the EcsIsEntity flag. This forces the id to + /// be interpreted as entity, whereas not setting the flag would implicitly + /// convert ids for builtin variables such as EcsThis to a variable. + /// + /// + /// + public ref QueryBuilder Entity(ulong entity) + { + AssertTermId(); + CurrentTermId.id = entity | EcsIsEntity; + return ref this; + } + + /// + /// Specify value of identifier by name. + /// + /// + /// + public ref QueryBuilder Name(string name) + { + AssertTermId(); + + NativeString nativeName = (NativeString)name; + QueryContext.Strings.Add(nativeName); + + CurrentTermId.id |= EcsIsEntity; + CurrentTermId.name = nativeName; + + return ref this; + } + + /// + /// Specify identifier is a variable (resolved at query evaluation time). + /// + /// + /// + public ref QueryBuilder Var(string name) + { + AssertTermId(); + + NativeString nativeName = (NativeString)name; + QueryContext.Strings.Add(nativeName); + + CurrentTermId.id |= EcsIsVariable; + CurrentTermId.name = nativeName; + return ref this; + } + + /// + /// Sets term id. + /// + /// + /// + public ref QueryBuilder Term(ulong id) + { + return ref Id(id); + } + + /// + /// Call prior to setting values for src identifier. + /// + /// + public ref QueryBuilder Src() + { + AssertTerm(); + _termIdType = TermIdType.Src; + return ref this; + } + + /// + /// Call prior to setting values for first identifier. This is either the + /// component identifier, or first element of a pair (in case second is + /// populated as well). + /// + /// + public ref QueryBuilder First() + { + AssertTerm(); + _termIdType = TermIdType.First; + return ref this; + } + + /// + /// Call prior to setting values for second identifier. This is the second + /// element of a pair. Requires that First() is populated as well. + /// + /// + public ref QueryBuilder Second() + { + AssertTerm(); + _termIdType = TermIdType.Second; + return ref this; + } + + /// + /// Select src identifier, initialize it with entity id. + /// + /// + /// + public ref QueryBuilder Src(ulong srcId) + { + return ref Src().Id(srcId); + } + + /// + /// Select src identifier, initialize it with id associated with type. + /// + /// + /// + public ref QueryBuilder Src() + { + return ref Src(Type.Id(World)); + } + + /// + /// Select src identifier, initialize it with id associated with enum member. + /// + /// + /// + /// + public ref QueryBuilder Src(T value) where T : Enum + { + return ref Src(Type.Id(World, value)); + } + + /// + /// Select src identifier, initialize it with name. If name starts with a $ + /// the name is interpreted as a variable. + /// + /// + /// + public ref QueryBuilder Src(string name) + { + Src(); + return ref name[0] == '$' ? ref Var(name[1..]) : ref Name(name); + } + + /// + /// Select first identifier, initialize it with entity id. + /// + /// + /// + public ref QueryBuilder First(ulong firstId) + { + return ref First().Id(firstId); + } + + /// + /// Select first identifier, initialize it with id associated with type. + /// + /// + /// + public ref QueryBuilder First() + { + return ref First(Type.Id(World)); + } + + /// + /// Select first identifier, initialize it with id associated with enum member. + /// + /// + /// + /// + public ref QueryBuilder First(T value) where T : Enum + { + return ref First(Type.Id(World, value)); + } + + /// + /// Select first identifier, initialize it with name. If name starts with a $ + /// the name is interpreted as a variable. + /// + /// + /// + public ref QueryBuilder First(string name) + { + First(); + return ref name[0] == '$' ? ref Var(name[1..]) : ref Name(name); + } + + /// + /// Select second identifier, initialize it with entity id. + /// + /// + /// + public ref QueryBuilder Second(ulong secondId) + { + return ref Second().Id(secondId); + } + + /// + /// Select second identifier, initialize it with id associated with type. + /// + /// + /// + public ref QueryBuilder Second() + { + return ref Second(Type.Id(World)); + } + + /// + /// Select second identifier, initialize it with id associated with enum member. + /// + /// + /// + /// + public ref QueryBuilder Second(T value) where T : Enum + { + return ref Second(Type.Id(World, value)); + } + + /// + /// Select second identifier, initialize it with name. If name starts with a $ + /// the name is interpreted as a variable. + /// + /// + /// + public ref QueryBuilder Second(string secondName) + { + Second(); + return ref secondName[0] == '$' ? ref Var(secondName[1..]) : ref Name(secondName); + } + + /// + /// The up flag indicates that the term identifier may be substituted by + /// traversing a relationship upwards. For example: substitute the identifier + /// with its parent by traversing the ChildOf relationship. + /// + /// + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + AssertTermId(); + Ecs.Assert(_termIdType == TermIdType.Src, "Up traversal can only be applied to term source."); + + CurrentTermId.id |= EcsUp; + + if (traverse != 0) + CurrentTerm.trav = traverse; + + return ref this; + } + + /// + /// The up flag indicates that the term identifier may be substituted by + /// traversing a relationship upwards. For example: substitute the identifier + /// with its parent by traversing the ChildOf relationship. + /// + /// + /// + public ref QueryBuilder Up() + { + return ref Up(Type.Id(World)); + } + + /// + /// The up flag indicates that the term identifier may be substituted by + /// traversing a relationship upwards. For example: substitute the identifier + /// with its parent by traversing the ChildOf relationship. + /// + /// + /// + /// + public ref QueryBuilder Up(T value) where T : Enum + { + return ref Up(Type.Id(World, value)); + } + + /// + /// The cascade flag is like up, but returns results in breadth-first order. + /// Only supported for Query. + /// + /// + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + AssertTermId(); + + Up(); + CurrentTermId.id |= EcsCascade; + + if (traverse != 0) + CurrentTerm.trav = traverse; + + return ref this; + } + + /// + /// The cascade flag is like up, but returns results in breadth-first order. + /// Only supported for Query. + /// + /// + /// + public ref QueryBuilder Cascade() + { + return ref Cascade(Type.Id(World)); + } + + /// + /// The cascade flag is like up, but returns results in breadth-first order. + /// Only supported for Query. + /// + /// + /// + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + return ref Cascade(Type.Id(World, value)); + } + + /// + /// Use with cascade to iterate results in descending (bottom -> top) order + /// + /// + public ref QueryBuilder Descend() + { + AssertTermId(); + CurrentTermId.id |= EcsDesc; + return ref this; + } + + /// + /// Same as up(), exists for backwards compatibility. + /// + /// + public ref QueryBuilder Parent() + { + return ref Up(); + } + + /// + /// Specify relationship to traverse, and flags to indicate direction. + /// + /// + /// + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + AssertTermId(); + CurrentTerm.trav = traverse; + CurrentTermId.id |= flags; + return ref this; + } + + /// + /// Specify relationship to traverse, and flags to indicate direction. + /// + /// + /// + /// + public ref QueryBuilder Trav(uint flags = 0) + { + return ref Trav(Type.Id(World), flags); + } + + /// + /// Specify relationship to traverse, and flags to indicate direction. + /// + /// + /// + /// + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + return ref Trav(Type.Id(World, value), flags); + } + + /// + /// Set id flags for term. + /// + /// + /// + public ref QueryBuilder Flags(ulong flags) + { + AssertTerm(); + CurrentTerm.id |= flags; + return ref this; + } + + /// + /// Set read/write access of term. + /// + /// + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + AssertTerm(); + CurrentTerm.inout = (short)inOut; + return ref this; + } + + /// + /// Set read/write access for stage. Use this when a system reads or writes + /// components other than the ones provided by the query. This information + /// can be used by schedulers to insert sync/merge points between systems + /// where deferred operations are flushed. + /// Setting this is optional. If not set, the value of the accessed component + /// may be out of sync for at most one frame. + /// + /// + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + AssertTerm(); + CurrentTerm.inout = (short)inOut; + if (CurrentTerm.oper != (short)EcsNot) + Src().Entity(0); + + return ref this; + } + + /// + /// Short for InOutStage(EcsOut). + /// Use when system uses add, remove or set. + /// + /// + public ref QueryBuilder Write() + { + return ref InOutStage(EcsOut); + } + + /// + /// Short for InOutStage(EcsIn). + /// Use when system uses get. + /// + /// + public ref QueryBuilder Read() + { + return ref InOutStage(EcsIn); + } + + /// + /// Short for InOutStage(EcsInOut). + /// Use when system uses get_mut. + /// + /// + public ref QueryBuilder ReadWrite() + { + return ref InOutStage(EcsInOut); + } + + /// + /// Short for InOut(EcsIn) + /// + /// + public ref QueryBuilder In() + { + return ref InOut(EcsIn); + } + + /// + /// Short for InOut(EcsOut) + /// + /// + public ref QueryBuilder Out() + { + return ref InOut(EcsOut); + } + + /// + /// Short for InOut(EcsInOut) + /// + /// + public ref QueryBuilder InOut() + { + return ref InOut(EcsInOut); + } + + /// + /// Short for InOut(EcsInOutNone) + /// + /// + public ref QueryBuilder InOutNone() + { + return ref InOut(EcsInOutNone); + } + + /// + /// Set operator of term. + /// + /// + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + AssertTerm(); + CurrentTerm.oper = (short)oper; + return ref this; + } + + /// + /// Short for Oper(EcsAnd). + /// + /// + public ref QueryBuilder And() + { + return ref Oper(EcsAnd); + } + + /// + /// Short for Oper(EcsOr). + /// + /// + public ref QueryBuilder Or() + { + return ref Oper(EcsOr); + } + + /// + /// Short for Oper(EcsNot). + /// + /// + public ref QueryBuilder Not() + { + return ref Oper(EcsNot); + } + + /// + /// Short for Oper(EcsOptional). + /// + /// + public ref QueryBuilder Optional() + { + return ref Oper(EcsOptional); + } + + + /// + /// Short for Oper(EcsAndFrom). + /// + /// + public ref QueryBuilder AndFrom() + { + return ref Oper(EcsAndFrom); + } + + /// + /// Short for Oper(EcsOFrom). + /// + /// + public ref QueryBuilder OrFrom() + { + return ref Oper(EcsOrFrom); + } + + /// + /// Short for Oper(EcsNotFrom). + /// + /// + public ref QueryBuilder NotFrom() + { + return ref Oper(EcsNotFrom); + } + + /// + /// Match singleton. + /// + /// + public ref QueryBuilder Singleton() + { + AssertTerm(); + Ecs.Assert(CurrentTerm.id != 0 || CurrentTerm.first.id != 0, "no component specified for singleton"); + + ulong singletonId = CurrentTerm.id; + + if (singletonId == 0) + singletonId = CurrentTerm.first.id; + + Ecs.Assert(singletonId != 0, nameof(ECS_INVALID_PARAMETER)); + CurrentTerm.src.id = !Ecs.IsPair(singletonId) ? singletonId : Ecs.PairFirst(World, singletonId); + + return ref this; + } + + /// + /// Filter terms are not triggered on by observers. + /// + /// + public ref QueryBuilder Filter() + { + CurrentTerm.inout = (short)EcsInOutFilter; + return ref this; + } + + /// + /// Set query flags for advanced usage + /// + /// + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Desc.flags |= flags; + return ref this; + } + + /// + /// Sets the cache kind. + /// + /// + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Desc.cache_kind = kind; + return ref this; + } + + /// + /// Cache query terms that are cacheable. + /// + /// + public ref QueryBuilder Cached() + { + return ref CacheKind(EcsQueryCacheAuto); + } + + /// + /// Query expression. Should not be set at the same time as terms array. + /// + /// + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.Assert(Desc.expr == null, "QueryBuilder.Expr() cannot be called more than once"); + + NativeString nativeExpr = (NativeString)expr; + QueryContext.Strings.Add(nativeExpr); + + Desc.expr = nativeExpr; + + return ref this; + } + + /// + /// Increments to the next term with the provided value. + /// + /// + /// + public ref QueryBuilder With(Term term) + { + Term(); + CurrentTerm = term.Value; + return ref this; + } + + /// + /// Increments to the next term with the provided id. + /// + /// + /// + public ref QueryBuilder With(ulong id) + { + Term(); + SetTermId(id); + return ref this; + } + + /// + /// Increments to the next term with the provided name. + /// + /// + /// + public ref QueryBuilder With(string name) + { + Term(); + SetTermId(); + First(name); + return ref this; + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Term(); + SetTermId(first, second); + return ref this; + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With(ulong first, string second) + { + Term(); + SetTermId(first); + Second(second); + return ref this; + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With(string first, ulong second) + { + Term(); + SetTermId(); + First(first); + Second(second); + return ref this; + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With(string first, string second) + { + Term(); + SetTermId(); + First(first); + Second(second); + return ref this; + } + + /// + /// Increments to the next term with the provided type. + /// + /// + /// + public ref QueryBuilder With() + { + Term(); + SetTermId(Type.Id(World)); + return ref this; + } + + /// + /// Increments to the next term with the provided enum. + /// + /// + /// + /// + public ref QueryBuilder With(T value) where T : Enum + { + return ref With(Type.Id(World, value)); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With(ulong second) + { + return ref With(Type.Id(World), second); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With(string second) + { + return ref With(Type.Id(World)).Second(second); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder With() + { + return ref With(Type.Id(World)); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + return ref With(Type.Id(World, second)); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + return ref WithSecond(Type.Id(World, first)); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + return ref With(Type.Id(World, first), second); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + return ref With(first, Type.Id(World, second)); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder WithSecond(ulong first) + { + ulong pair = Ecs.PairSecond(first, World); + return ref With(pair); + } + + /// + /// Increments to the next term with the provided pair. + /// + /// + /// + /// + public ref QueryBuilder WithSecond(string first) + { + return ref With(first, Type.Id(World)); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + public ref QueryBuilder Without(Term term) + { + return ref With(term).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + public ref QueryBuilder Without(ulong id) + { + return ref With(id).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + public ref QueryBuilder Without(string name) + { + return ref With(name).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + return ref With(first, second).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(ulong first, string second) + { + return ref With(first, second).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(string first, ulong second) + { + return ref With(first, second).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(string first, string second) + { + return ref With(first, second).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + public ref QueryBuilder Without() + { + return ref With().Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(T value) where T : Enum + { + return ref With(value).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(ulong second) + { + return ref With(second).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without(string second) + { + return ref With(second).Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + public ref QueryBuilder Without() + { + return ref With().Not(); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + return ref Without(Type.Id(World, second)); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + return ref WithoutSecond(Type.Id(World, first)); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + return ref Without(Type.Id(World, first), second); + } + + /// + /// Alternative form of With().Not(). + /// + /// + /// + /// + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + return ref Without(first, Type.Id(World, second)); + } + + /// + /// Alternative form of WithSecond().Not(). + /// + /// + /// + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + return ref WithSecond(first).Not(); + } + + /// + /// Alternative form of WithSecond().Not(). + /// + /// + /// + /// + public ref QueryBuilder WithoutSecond(string first) + { + return ref WithSecond(first).Not(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + public ref QueryBuilder Write(Term term) + { + return ref With(term).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + public ref QueryBuilder Write(ulong id) + { + return ref With(id).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + public ref QueryBuilder Write(string name) + { + return ref With(name).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + return ref With(first, second).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(ulong first, string second) + { + return ref With(first, second).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(string first, ulong second) + { + return ref With(first, second).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(string first, string second) + { + return ref With(first, second).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + public ref QueryBuilder Write() + { + return ref With().Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(T value) where T : Enum + { + return ref With(value).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(ulong second) + { + return ref With(second).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write(string second) + { + return ref With(second).Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + public ref QueryBuilder Write() + { + return ref With().Write(); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + return ref Write(Type.Id(World, second)); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + return ref WriteSecond(Type.Id(World, first)); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + return ref Write(Type.Id(World, first), second); + } + + /// + /// Alternative form of With().Write(). + /// + /// + /// + /// + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + return ref Write(first, Type.Id(World, second)); + } + + /// + /// Alternative form of WithSecond().Write(). + /// + /// + /// + /// + public ref QueryBuilder WriteSecond(ulong first) + { + return ref WithSecond(first).Write(); + } + + /// + /// Alternative form of WithSecond().Write(). + /// + /// + /// + /// + public ref QueryBuilder WriteSecond(string first) + { + return ref WithSecond(first).Write(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + public ref QueryBuilder Read(Term term) + { + return ref With(term).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + public ref QueryBuilder Read(ulong id) + { + return ref With(id).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + public ref QueryBuilder Read(string name) + { + return ref With(name).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + return ref With(first, second).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(ulong first, string second) + { + return ref With(first, second).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(string first, ulong second) + { + return ref With(first, second).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(string first, string second) + { + return ref With(first, second).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + public ref QueryBuilder Read() + { + return ref With().Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(T value) where T : Enum + { + return ref With(value).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(ulong second) + { + return ref With(second).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read(string second) + { + return ref With(second).Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + public ref QueryBuilder Read() + { + return ref With().Read(); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + return ref Read(Type.Id(World, second)); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + return ref ReadSecond(Type.Id(World, first)); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + return ref Read(Type.Id(World, first), second); + } + + /// + /// Alternative form of With().Read(). + /// + /// + /// + /// + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + return ref Read(first, Type.Id(World, second)); + } + + /// + /// Alternative form of WithSecond().Read(). + /// + /// + /// + /// + public ref QueryBuilder ReadSecond(ulong first) + { + return ref WithSecond(first).Read(); + } + + /// + /// Alternative form of WithSecond().Read(). + /// + /// + /// + /// + public ref QueryBuilder ReadSecond(string first) + { + return ref WithSecond(first).Read(); + } + + /// + /// Alternative form of With(EcsScopeOpen).Entity(0) + /// + /// + public ref QueryBuilder ScopeOpen() + { + return ref With(EcsScopeOpen).Entity(0); + } + + /// + /// Alternative form of With(EcsScopeClose).Entity(0) + /// + /// + public ref QueryBuilder ScopeClose() + { + return ref With(EcsScopeClose).Entity(0); + } + + /// + /// Term notation for more complex query features. + /// + /// + public ref QueryBuilder Term() + { + Ecs.Assert(_termIndex < FLECS_TERM_COUNT_MAX, "Cannot have more than 32 terms."); + _termIndex = _termCount++; + return ref this; + } + + /// + /// Sets the current term to the one with the provided type. + /// + /// + /// + public ref QueryBuilder TermAt() + { + for (int i = 0; i < _termCount; i++) + { + ecs_term_t term = _desc.terms[i]; + if (Ecs.TypeIdIs(World, term.id) || Ecs.TypeIdIs(World, Ecs.Pair(term.first.id, term.second.id))) + return ref TermAt(i); + } + Ecs.Error("Term not found."); + return ref this; + } + + /// + /// Sets the current term to the one at the provided index. + /// + /// + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.Assert(termIndex >= 0 && termIndex < FLECS_TERM_COUNT_MAX, "TermIndex argument must be between 0-31."); + + _termIndex = termIndex; + _termIdType = TermIdType.Src; + + fixed (ecs_term_t* ptr = &CurrentTerm) + Ecs.Assert(ecs_term_is_initialized(ptr), "Term is not initialized."); + + return ref this; + } + + /// + /// Sets the current term to the one at the provided index and asserts that the type matches. + /// + /// + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.Assert(Ecs.TypeIdIs(World, CurrentTerm.id) || Ecs.TypeIdIs(World, Ecs.Pair(CurrentTerm.first.id, CurrentTerm.second.id)), "Term type does not match."); + return ref TermAt(termIndex); + } + + /// + /// Sort the output of a query. + /// + /// + /// + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + QueryContext.OrderBy.Set(callback, null); + Desc.order_by_callback = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(callback); + Desc.order_by = component; + return ref this; + } + + /// + /// Sort the output of a query. + /// + /// + /// + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + return ref OrderBy(Type.Id(World), callback); + } + + /// + /// Group and sort matched tables. + /// + /// The id to be used for grouping. + /// + public ref QueryBuilder GroupBy(ulong component) + { + Desc.group_by_callback = default; + Desc.group_by = component; + return ref this; + } + + /// + /// Group and sort matched tables. + /// + /// The id to be used for grouping. + /// The callback. + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + GroupByContext.GroupBy.Set(callback, (delegate*)&Functions.GroupByCallbackDelegate); + Desc.group_by_callback = &Functions.GroupByCallback; + Desc.group_by = component; + return ref this; + } + + /// + /// Group and sort matched tables. + /// + /// The id to be used for grouping + /// The callback. + /// The user context type. + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + GroupByContext.GroupBy.Set(callback, (delegate*)&Functions.GroupByCallbackDelegate); + Desc.group_by_callback = &Functions.GroupByCallback; + Desc.group_by = component; + return ref this; + } + + /// + /// Group and sort matched tables. + /// + /// The component to be used for grouping. + /// + public ref QueryBuilder GroupBy() + { + return ref GroupBy(Type.Id(World)); + } + + /// + /// Group and sort matched tables. + /// + /// The callback. + /// The component to be used for grouping. + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + return ref GroupBy(Type.Id(World), callback); + } + + /// + /// Group and sort matched tables. + /// + /// The callback. + /// The component to be used for grouping. + /// The user context type. + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + return ref GroupBy(Type.Id(World), callback); + } + + /// + /// Sets the group by user context object. + /// + /// The user context object. + /// The user context type. + /// + public ref QueryBuilder GroupByCtx(T value) + { + GroupByContext.GroupByUserContext.Set(ref value); + return ref this; + } + + /// + /// Sets the group by user context object. The provided callback will be run before the + /// user context object is released by flecs. + /// + /// The user context object. + /// The callback. + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + GroupByContext.GroupByUserContext.Set(ref value, callback); + return ref this; + } + + /// + /// Sets the group by user context object. The provided callback will be run before the + /// user context object is released by flecs. + /// + /// The user context object. + /// The callback. + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + GroupByContext.GroupByUserContext.Set(ref value, callback); + return ref this; + } + + /// + /// Specify callback to run when a group is created. + /// + /// The callback. + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + GroupByContext.GroupCreate.Set(callback, (delegate*)&Functions.GroupCreateCallbackDelegate); + Desc.on_group_create = &Functions.GroupCreateCallback; + return ref this; + } + + /// + /// Specify callback to run when a group is created. + /// + /// The callback. + /// The user context type. + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + GroupByContext.GroupCreate.Set(callback, (delegate*)&Functions.GroupCreateCallbackDelegate); + Desc.on_group_create = &Functions.GroupCreateCallback; + return ref this; + } + + /// + /// Specify callback to run when a group is deleted. + /// + /// The callback. + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + GroupByContext.GroupDelete.Set(callback, (delegate*)&Functions.GroupDeleteCallbackDelegate); + Desc.on_group_delete = &Functions.GroupDeleteCallback; + return ref this; + } + + /// + /// Specify callback to run when a group is deleted. + /// + /// The callback. + /// The user context type. + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + GroupByContext.GroupDelete.Set(callback, (delegate*)&Functions.GroupDeleteCallbackDelegate); + Desc.on_group_delete = &Functions.GroupDeleteCallback; + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Desc.flags |= EcsQueryDetectChanges; + return ref this; + } + + private QueryContext* EnsureQueryContext() + { + if (_desc.binding_ctx != null) + return (QueryContext*)_desc.binding_ctx; + + _desc.binding_ctx = Memory.AllocZeroed(1); + _desc.binding_ctx_free = &Functions.QueryContextFree; + return (QueryContext*)_desc.binding_ctx; + } + + private GroupByContext* EnsureGroupByContext() + { + if (_desc.group_by_ctx != null) + return (GroupByContext*)_desc.group_by_ctx; + + _desc.group_by_ctx = Memory.AllocZeroed(1); + _desc.group_by_ctx_free = &Functions.GroupByContextFree; + return (GroupByContext*)_desc.group_by_ctx; + } + + [Conditional("DEBUG")] + private void AssertTermId() + { + Ecs.Assert(!Unsafe.IsNullRef(ref CurrentTermId), "No active term (call .Term() first)"); + } + + [Conditional("DEBUG")] + private void AssertTerm() + { + Ecs.Assert(!Unsafe.IsNullRef(ref CurrentTermId), "No active term (call .term() first)"); + } + + private void SetTermId() + { + CurrentTerm = default; + } + + private void SetTermId(ulong id) + { + CurrentTerm = (id & ECS_ID_FLAGS_MASK) == 0 + ? new ecs_term_t { first = new ecs_term_ref_t { id = id } } + : new ecs_term_t { id = id }; + } + + private void SetTermId(ulong first, ulong second) + { + CurrentTerm = new ecs_term_t { id = Ecs.Pair(first, second) }; + } + + private enum TermIdType + { + Src, + First, + Second + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public bool Equals(QueryBuilder other) + { + return Desc == other.Desc; + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is QueryBuilder other && Equals(other); + } + + /// + /// Returns the hash code for the . + /// + /// + public override int GetHashCode() + { + return Desc.GetHashCode(); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + /// + public static bool operator ==(QueryBuilder left, QueryBuilder right) + { + return left.Equals(right); + } + + /// + /// Checks if two instances are not equal. + /// + /// + /// + /// + public static bool operator !=(QueryBuilder left, QueryBuilder right) + { + return !(left == right); + } +} diff --git a/src/Flecs.NET/Core/Type.cs b/src/Flecs.NET/Core/Type.cs index fb491f4c..09df067b 100644 --- a/src/Flecs.NET/Core/Type.cs +++ b/src/Flecs.NET/Core/Type.cs @@ -1,797 +1,799 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; -using Flecs.NET.Collections; -using Flecs.NET.Core.BindingContext; -using Flecs.NET.Core.Hooks; -using Flecs.NET.Utilities; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// Static class that registers and stores information about types. -/// -/// -[SuppressMessage("ReSharper", "StaticMemberInGenericType")] -public static unsafe class Type -{ - /// - /// The index that corresponds to its location in a world's type id cache. - /// - public static readonly int CacheIndex = Interlocked.Increment(ref Ecs.CacheIndexCount); - - /// - /// The full name of this type. - /// - public static readonly string FullName = GetFullName(); - - /// - /// The name of this type. - /// - public static readonly string Name = GetName(); - - /// - /// The size of the type. - /// - public static readonly int Size = SizeOf(); - - /// - /// The alignment of the type. - /// - public static readonly int Alignment = AlignOf(); - - /// - /// Whether the type is a tag. - /// - public static readonly bool IsTag = Size == 0 && Alignment == 0; - - /// - /// Whether the type is an enum. - /// - public static readonly bool IsEnum = typeof(T).IsEnum; - - /// - /// Whether the type is a native flecs type. - /// - public static readonly bool IsFlecsType = typeof(T).ToString().StartsWith(Ecs.NativeNamespace, StringComparison.Ordinal); - - /// - /// The underlying integer type if this type is an enum. - /// - public static readonly IntegerType UnderlyingType = GetUnderlyingType(); - - /// - /// The underlying integer type id if this type is an enum. - /// - public static readonly ulong UnderlyingTypeId = GetUnderlyingTypeId(); - - /// - /// The cache indexes of all enum members if this type is an enum. - /// - private static readonly NativeArray Constants = InitEnumCacheIndexes(); - - /// - /// Returns the id for this type with the provided world. Registers a new component id if it doesn't exist. - /// - /// The world. - /// The id of the type in the world. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Id(ecs_world_t* world) - { - ref ulong cachedId = ref LookupCacheIndex(world); - return Unsafe.IsNullRef(ref cachedId) || !ecs_is_alive(world, cachedId) - ? RegisterComponent(world, true, true, 0, "") - : cachedId; - } - - /// - /// Returns the id for this type with the provided world. Registers a new component id if it doesn't exist. - /// - /// The world. - /// If true, the type will be registered in the root scope with it's full type name. - /// If true, type will be created with full component registration. (size, alignment, enums, hooks) - /// If an existing entity is found with this id, attempt to alias it. Otherwise, register new entity with this id. - /// The id of the type in the world. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Id(ecs_world_t* world, bool ignoreScope, bool isComponent, ulong id) - { - ref ulong cachedId = ref LookupCacheIndex(world); - return Unsafe.IsNullRef(ref cachedId) || !ecs_is_alive(world, cachedId) - ? RegisterComponent(world, ignoreScope, isComponent, id, "") - : cachedId; - } - - /// - /// Returns the id for this type with the provided world. Registers a new component id if it doesn't exist. - /// - /// The world. - /// If true, the type will be registered in the root scope with it's full type name. - /// If true, type will be created with full component registration. (size, alignment, enums, hooks) - /// If an existing entity is found with this id, attempt to alias it. Otherwise, register new entity with this id. - /// If an existing entity is found with this name, attempt to alias it. Otherwise, register new entity with this name. - /// The id of the type in the world. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Id(ecs_world_t* world, bool ignoreScope, bool isComponent, ulong id, string name) - { - ref ulong cachedId = ref LookupCacheIndex(world); - return Unsafe.IsNullRef(ref cachedId) || !ecs_is_alive(world, cachedId) - ? RegisterComponent(world, ignoreScope, isComponent, id, name) - : cachedId; - } - - /// - /// Returns the id for this enum member in the provided world. Registers a new id if it doesn't exist. - /// - /// The world. - /// The enum member. - /// The enum type. - /// The id of the enum member in the world. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Id(ecs_world_t* world, TEnum constant) where TEnum : Enum, T - { - Id(world); // Ensures that component ids are registered for enum members. - return LookupCacheIndex(world, GetEnumCacheIndex(constant)); - } - - /// - /// Ensures that the world has memory allocated at the provided cache index. - /// - /// The world. - /// Reference to the id at the provided cache index. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref ulong EnsureCacheIndex(ecs_world_t* world) - { - return ref EnsureCacheIndex(world, CacheIndex); - } - - /// - /// Ensures that the world has memory allocated at the provided cache index. - /// - /// The world. - /// The type cache index. - /// Reference to the id at the provided cache index. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref ulong EnsureCacheIndex(ecs_world_t* world, int index) - { - WorldContext* context = (WorldContext*)ecs_get_binding_ctx_fast(world); - Ecs.Assert(context != null, "World pointer must be created or passed into World.Create() to initialize binding context."); - ref NativeList cache = ref context->TypeCache; - cache.EnsureCount(index + 1); - return ref cache.Data[index]; - } - - /// - /// Gets a reference to the id occupying the provided cache index for this world. - /// - /// The world. - /// Reference to the id at the provided cache index. Returns a null reference if the index does not have a registered id yet. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref ulong LookupCacheIndex(ecs_world_t* world) - { - return ref LookupCacheIndex(world, CacheIndex); - } - - /// - /// Gets a reference to the id occupying the provided cache index for this world. - /// - /// The world. - /// The type cache index. - /// Reference to the id at the provided cache index. Returns a null reference if the index does not have a registered id yet. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref ulong LookupCacheIndex(ecs_world_t* world, int index) - { - WorldContext* context = (WorldContext*)ecs_get_binding_ctx_fast(world); - Ecs.Assert(context != null, "World pointer must be created or passed into World.Create() to initialize binding context."); - ref NativeList cache = ref context->TypeCache; - return ref index >= cache.Count || cache.Data[index] == 0 - ? ref Unsafe.NullRef() - : ref cache.Data[index]; - } - - /// - /// Checks if the type is registered in the provided world. - /// - /// The world. - /// True if the type is registered in the world. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsRegistered(ecs_world_t* world) - { - ref ulong cachedId = ref LookupCacheIndex(world); - return !Unsafe.IsNullRef(ref cachedId) && cachedId != 0 && ecs_is_alive(world, cachedId); - } - - /// - /// Checks if the type is registered in the provided world. - /// - /// The world. - /// The id of the type if registered, else 0. - /// True if the type was registered. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsRegistered(ecs_world_t* world, out ulong id) - { - ref ulong cachedId = ref LookupCacheIndex(world); - - id = !Unsafe.IsNullRef(ref cachedId) && cachedId != 0 && ecs_is_alive(world, cachedId) - ? cachedId - : 0; - - return id != 0; - } - - /// - /// Checks if the type is registered in the provided world. - /// - /// The world. - /// The id of the type if registered, else 0. - /// True if the type was registered. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsRegistered(ecs_world_t* world, out Entity id) - { - ref ulong cachedId = ref LookupCacheIndex(world); - - id = !Unsafe.IsNullRef(ref cachedId) && cachedId != 0 && ecs_is_alive(world, cachedId) - ? new Entity(world, cachedId) - : default; - - return id != 0; - } - - /// - /// Registers this type with the provided world. - /// - /// The ECS world. - /// If true, the type will be registered in the root scope with it's full type name. - /// If true, type will be created with full component registration. (size, alignment, enums, hooks) - /// If an existing entity is found with this id, attempt to alias it. Otherwise, register new entity with this id. - /// If an existing entity is found with this name, attempt to alias it. Otherwise, register new entity with this name. - /// The registered id of this type. - public static ulong RegisterComponent(World world, bool ignoreScope, bool isComponent, ulong id, string name) - { - Ecs.Assert(!world.GetWorld().IsReadOnly() || world.GetWorld().GetStageCount() <= 1, - "Cannot register component while multithreaded world is progressing/readonly."); - - // If a name or id is provided, the type is being used to alias an already existing entity. - Entity existingEntity = id != 0 ? new Entity(world, id) : world.Lookup(name, false); - - // If an existing entity is found, ensure that the size and alignment match the entity and return its id. - if (isComponent && existingEntity != 0 || world.TryLookupSymbol(FullName, out existingEntity)) - { - if (IsFlecsType) - return EnsureCacheIndex(world) = existingEntity; - - ref EcsComponent info = ref existingEntity.GetMut(); - - if (Unsafe.IsNullRef(ref info)) - Ecs.Assert(IsTag, $"Cannot alias '{existingEntity.Path()}' with a '{FullName}'. '{FullName}' must be a zero-sized struct"); - else - Ecs.Assert(info.size == Size && info.alignment == Alignment, $"Layout of type '{FullName}' (Size: {Size}, Alignment: {Alignment}) does not match currently registered layout (Size: {info.size}, Alignment: {info.alignment})"); - - return EnsureCacheIndex(world) = existingEntity; - } - - Entity prevScope = world.SetScope(ignoreScope ? 0ul : world.GetScope()); - Entity prevWith = world.SetWith(ignoreScope ? 0ul : world.GetWith()); - - using NativeString nativeSymbol = (NativeString)FullName; - using NativeString nativeName = string.IsNullOrEmpty(name) - ? (NativeString)GetTrimmedTypeName(world) - : (NativeString)name; - - ecs_entity_desc_t entityDesc = default; - entityDesc.id = id; - entityDesc.use_low_id = true; - entityDesc.name = nativeName; - entityDesc.symbol = nativeSymbol; - entityDesc.sep = Pointers.DefaultSeparator; - entityDesc.root_sep = Pointers.DefaultSeparator; - ulong entity = ecs_entity_init(world, &entityDesc); - Ecs.Assert(entity != 0, $"Failed to register entity for type '{FullName}'"); - - EnsureCacheIndex(world) = entity; - - if (!isComponent) - return entity; - - ecs_component_desc_t componentDesc = default; - componentDesc.entity = entity; - componentDesc.type.size = Size; - componentDesc.type.alignment = Alignment; - ulong component = ecs_component_init(world, &componentDesc); - Ecs.Assert(component != 0, $"Failed to register component for type '{FullName}'"); - - world.SetWith(prevWith); - world.SetScope(prevScope); - - // Store the type in the component. - if (typeof(T) != typeof(Type)) - RegisterDotnetType(world, world.Entity(component)); - - if (typeof(T).IsEnum) - RegisterConstants(world, world.Entity(component)); - - if (IsTag) - return component; - - // Register type hooks. - TypeHooksContext hooksContext = TypeHooksContext.Default; - - if (RuntimeHelpers.IsReferenceOrContainsReferences()) - { - hooksContext.Ctor.Invoker = (delegate*)&Functions.DefaultManagedCtorCallback; - hooksContext.Dtor.Invoker = (delegate*)&Functions.DefaultManagedDtorCallback; - hooksContext.Copy.Invoker = (delegate*)&Functions.DefaultManagedCopyCallback; - hooksContext.Move.Invoker = (delegate*)&Functions.DefaultManagedMoveCallback; - } - - if (typeof(ICtorHook).IsAssignableFrom(typeof(T))) - { - hooksContext.Ctor.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() - ? (delegate*)&Functions.ManagedCtorCallbackPointer - : (delegate*)&Functions.UnmanagedCtorCallbackPointer; - - hooksContext.Ctor.Pointer = (void*)(nint)typeof(ICtorHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - if (typeof(IDtorHook).IsAssignableFrom(typeof(T))) - { - hooksContext.Dtor.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() - ? (delegate*)&Functions.ManagedDtorCallbackPointer - : (delegate*)&Functions.UnmanagedDtorCallbackPointer; - - hooksContext.Dtor.Pointer = (void*)(nint)typeof(IDtorHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - if (typeof(ICopyHook).IsAssignableFrom(typeof(T))) - { - hooksContext.Copy.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() - ? (delegate*)&Functions.ManagedCopyCallbackPointer - : (delegate*)&Functions.UnmanagedCopyCallbackPointer; - - hooksContext.Copy.Pointer = (void*)(nint)typeof(ICopyHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - if (typeof(IMoveHook).IsAssignableFrom(typeof(T))) - { - hooksContext.Move.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() - ? (delegate*)&Functions.ManagedMoveCallbackPointer - : (delegate*)&Functions.UnmanagedMoveCallbackPointer; - - hooksContext.Move.Pointer = (void*)(nint)typeof(IMoveHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - if (typeof(IOnAddHook).IsAssignableFrom(typeof(T))) - { - hooksContext.OnAdd.Invoker = (delegate*)&Functions.OnAddEachIterRefCallbackPointer; - hooksContext.OnAdd.Pointer = (void*)(nint)typeof(IOnAddHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - if (typeof(IOnRemoveHook).IsAssignableFrom(typeof(T))) - { - hooksContext.OnRemove.Invoker = (delegate*)&Functions.OnRemoveEachIterRefCallbackPointer; - hooksContext.OnRemove.Pointer = (void*)(nint)typeof(IOnRemoveHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - if (typeof(IOnSetHook).IsAssignableFrom(typeof(T))) - { - hooksContext.OnSet.Invoker = (delegate*)&Functions.OnSetEachIterRefCallbackPointer; - hooksContext.OnSet.Pointer = (void*)(nint)typeof(IOnSetHook<>.FunctionPointer<>) - .MakeGenericType(typeof(T), typeof(T)) - .GetMethod("Get")! - .Invoke(null, null)!; - } - - ecs_type_hooks_t hooks = default; - hooks.ctor = hooksContext.Ctor == default ? default : &Functions.CtorCallback; - hooks.dtor = hooksContext.Dtor == default ? default : &Functions.DtorCallback; - hooks.copy = hooksContext.Copy == default ? default : &Functions.CopyCallback; - hooks.move = hooksContext.Move == default ? default : &Functions.MoveCallback; - hooks.on_add = hooksContext.OnAdd == default ? default : &Functions.OnAddCallback; - hooks.on_remove = hooksContext.OnRemove == default ? default : &Functions.OnRemoveCallback; - hooks.on_set = hooksContext.OnSet == default ? default : &Functions.OnSetCallback; - hooks.binding_ctx = Memory.Alloc(hooksContext); - hooks.binding_ctx_free = &Functions.TypeHooksContextFree; - - ecs_set_hooks_id(world, component, &hooks); - - return component; - } - - /// - /// Returns a trimmed version of this type's full name with respect to the current scope of the world. - /// - /// The world. - public static string GetTrimmedTypeName(World world) - { - Entity scope = world.GetScope(); - - if (scope == 0) - return FullName; - - string scopePath = scope.Path(initSep: ""); - - // If the the start of the type's full name matches the current scope's path, trim the scope's path - // from the full type name and return. Otherwise return only the name of the type. - return FullName.StartsWith(scopePath, StringComparison.Ordinal) - ? FullName[(scopePath.Length + 1)..] - : Name; - } - - private static NativeArray InitEnumCacheIndexes() - { - if (!IsEnum) - return default; - - Array values = typeof(T).GetEnumValuesAsUnderlyingType(); - NativeArray constants = new NativeArray(values.Length); - - for (int i = 0; i < values.Length; i++) - { - long value = UnderlyingType switch - { - IntegerType.SByte => (sbyte)values.GetValue(i)!, - IntegerType.Byte => (byte)values.GetValue(i)!, - IntegerType.Int16 => (short)values.GetValue(i)!, - IntegerType.UInt16 => (ushort)values.GetValue(i)!, - IntegerType.Int32 => (int)values.GetValue(i)!, - IntegerType.UInt32 => (uint)values.GetValue(i)!, - IntegerType.Int64 => (long)values.GetValue(i)!, - IntegerType.UInt64 => (long)(ulong)values.GetValue(i)!, - _ => throw new Ecs.ErrorException("Type is not an enum.") - }; - constants[i] = new EnumMember(value, Interlocked.Increment(ref Ecs.CacheIndexCount)); - } - - return constants; - } - - private static void RegisterDotnetType(World world, Entity type) - { - ecs_suspend_readonly_state_t state = default; - world = flecs_suspend_readonly(world, &state); - type.Set(typeof(T)); - flecs_resume_readonly(world, &state); - } - - private static void RegisterConstants(World world, Entity type) - { - ecs_suspend_readonly_state_t state = default; - world = flecs_suspend_readonly(world, &state); - - type.Set(new EcsEnum { underlying_type = UnderlyingTypeId }); - - Entity prevScope = world.SetScope(type); - - for (int i = 0; i < Constants.Length; i++) - { - long value = Constants[i].Value; - string name = Unsafe.As(ref value)!.ToString()!; - EnsureCacheIndex(world, Constants[i].CacheIndex) = - world.Entity(name).SetUntyped(EcsConstant, UnderlyingTypeId, sizeof(T), &value); - } - - world.SetScope(prevScope); - - flecs_resume_readonly(world, &state); - } - - // Binary search enum list for enum constant's cache index. - private static int GetEnumCacheIndex(TEnum constant) where TEnum : Enum, T - { - long value = GetEnumConstantAsLong(constant); - - int left = 0; - int right = Constants.Length - 1; - - while (left <= right) - { - int mid = left + (right - left) / 2; - - ref EnumMember data = ref Constants.Data[mid]; - - if (data.Value == value) - return data.CacheIndex; - - if (data.Value < value) - left = ++mid; - else - right = --mid; - } - - Ecs.Assert(false, $"No id registered for '{constant}'"); - return 0; - } - - private static long GetEnumConstantAsLong(TEnum constant) where TEnum : Enum, T - { - return UnderlyingType switch - { - IntegerType.SByte => Unsafe.As(ref constant), - IntegerType.Byte => Unsafe.As(ref constant), - IntegerType.Int16 => Unsafe.As(ref constant), - IntegerType.UInt16 => Unsafe.As(ref constant), - IntegerType.Int32 => Unsafe.As(ref constant), - IntegerType.UInt32 => Unsafe.As(ref constant), - IntegerType.Int64 => Unsafe.As(ref constant), - IntegerType.UInt64 => (long)Unsafe.As(ref constant), - _ => throw new Ecs.ErrorException("Type is not an enum.") - }; - } - - private static IntegerType GetUnderlyingType() - { - if (!IsEnum) - return IntegerType.None; - - Type underlyingType = typeof(T).GetEnumUnderlyingType(); - - if (underlyingType == typeof(sbyte)) - return IntegerType.SByte; - - if (underlyingType == typeof(byte)) - return IntegerType.Byte; - - if (underlyingType == typeof(short)) - return IntegerType.Int16; - - if (underlyingType == typeof(ushort)) - return IntegerType.UInt16; - - if (underlyingType == typeof(int)) - return IntegerType.Int32; - - if (underlyingType == typeof(uint)) - return IntegerType.UInt32; - - if (underlyingType == typeof(long)) - return IntegerType.Int64; - - if (underlyingType == typeof(ulong)) - return IntegerType.UInt64; - - return IntegerType.None; - } - - private static ulong GetUnderlyingTypeId() - { - return UnderlyingType switch - { - IntegerType.SByte => FLECS_IDecs_i8_tID_, - IntegerType.Byte => FLECS_IDecs_u8_tID_, - IntegerType.Int16 => FLECS_IDecs_i16_tID_, - IntegerType.UInt16 => FLECS_IDecs_u16_tID_, - IntegerType.Int32 => FLECS_IDecs_i32_tID_, - IntegerType.UInt32 => FLECS_IDecs_u32_tID_, - IntegerType.Int64 => FLECS_IDecs_i64_tID_, - IntegerType.UInt64 => FLECS_IDecs_u64_tID_, - _ => 0 - }; - } - - private static string GetName() - { - string fullname = GetFullName(); - - int trimEnd; - - if (fullname.Contains('<', StringComparison.Ordinal)) - trimEnd = fullname.LastIndexOf('.', fullname.IndexOf('<', StringComparison.Ordinal)) + 1; - else - trimEnd = fullname.LastIndexOf('.') + 1; - - return fullname[trimEnd..]; - } - - private static string GetFullName() - { - string name = typeof(T).ToString(); - - // File-local types are prefixed with a file name + GUID. - if (Ecs.StripFileLocalTypeNameGuid) - { - int start = 0; - bool skip = false; - - StringBuilder stringBuilder = new StringBuilder(); - - for (int current = 0; current < name.Length;) - { - char c = name[current]; - - if (skip && c == '_') - { - skip = false; - start = current + 2; - } - else if (!skip && c == '<') - { - skip = true; - stringBuilder.Append(name.AsSpan(start, current - start)); - current = name.IndexOf('>', current) + 1; - continue; - } - - current++; - } - - stringBuilder.Append(name.AsSpan(start)); - name = stringBuilder.ToString(); - } - - { - name = name - .Replace(Ecs.NativeNamespace, string.Empty, StringComparison.Ordinal) - .Replace('+', '.') - .Replace('[', '<') - .Replace(']', '>'); - - int start = 0; - int current = 0; - bool skip = false; - - StringBuilder stringBuilder = new StringBuilder(); - - foreach (char c in name) - { - if (skip && (c == '<' || c == '.')) - { - start = current; - skip = false; - } - else if (!skip && c == '`') - { - stringBuilder.Append(name.AsSpan(start, current - start)); - skip = true; - } - - current++; - } - - return stringBuilder.Append(name.AsSpan(start)).ToString(); - } - } - - private static int SizeOf() - { - NativeLayout(out int size, out int _); - return size; - } - - private static int AlignOf() - { - NativeLayout(out int _, out int alignment); - return alignment; - } - - [SuppressMessage("Usage", "CA1508")] - private static void NativeLayout(out int size, out int alignment) - { - Type type = typeof(T); - StructLayoutAttribute attribute = type.StructLayoutAttribute!; - - if (RuntimeHelpers.IsReferenceOrContainsReferences()) - { - size = sizeof(GCHandle); - alignment = sizeof(GCHandle); - return; - } - - if (attribute.Value == LayoutKind.Explicit) - { - size = attribute.Size == 0 ? sizeof(T) : attribute.Size; - alignment = attribute.Pack == 0 ? sizeof(AlignOfHelper) - sizeof(T) : attribute.Pack; - } - else - { - size = sizeof(T); - alignment = sizeof(AlignOfHelper) - sizeof(T); - } - - if (RuntimeFeature.IsDynamicCodeSupported) - { - FieldInfo[] fields = - type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - size = fields.Length == 0 ? 0 : size; - alignment = size == 0 ? 0 : alignment; - } - else if (sizeof(T) == 1) - { - // Structs containing zero non-static fields will always return true when compared using .Equals(). - // Test for tags by changing the underlying byte and checking equality. - // If the structs always return true, it's likely that the struct is a tag. - - T aInstance = default!; - T bInstance = default!; - - for (byte i = 0; i < 16; i++) - { - *(byte*)&bInstance = i; - if (!Equals(aInstance, bInstance)) - return; - } - - size = 0; - alignment = 0; - } - } - - [SuppressMessage("ReSharper", "PrivateFieldCanBeConvertedToLocalVariable")] - [SuppressMessage("ReSharper", "NotAccessedPositionalProperty.Local")] - private readonly record struct AlignOfHelper(byte Dummy, T Data); - - [SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")] - private readonly record struct EnumMember(long Value, int CacheIndex); - - /// - /// Represents the underlying integer type of an enum. - /// - public enum IntegerType - { - /// - /// This type is not an enum. - /// - None, - - /// - /// - /// - SByte, - - /// - /// - /// - Byte, - - /// - /// - /// - Int16, - - /// - /// - /// - UInt16, - - /// - /// - /// - Int32, - - /// - /// - /// - UInt32, - - /// - /// - /// - Int64, - - /// - /// - /// - UInt64 - } -} +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using Flecs.NET.Collections; +using Flecs.NET.Core.BindingContext; +using Flecs.NET.Core.Hooks; +using Flecs.NET.Utilities; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// Static class that registers and stores information about types. +/// +/// +[SuppressMessage("ReSharper", "StaticMemberInGenericType")] +public static unsafe class Type +{ + /// + /// The index that corresponds to its location in a world's type id cache. + /// + public static readonly int CacheIndex = Interlocked.Increment(ref Ecs.CacheIndexCount); + + /// + /// The full name of this type. + /// + public static readonly string FullName = GetFullName(); + + /// + /// The name of this type. + /// + public static readonly string Name = GetName(); + + /// + /// The size of the type. + /// + public static readonly int Size = SizeOf(); + + /// + /// The alignment of the type. + /// + public static readonly int Alignment = AlignOf(); + + /// + /// Whether the type is a tag. + /// + public static readonly bool IsTag = Size == 0 && Alignment == 0; + + /// + /// Whether the type is an enum. + /// + public static readonly bool IsEnum = typeof(T).IsEnum; + + /// + /// Whether the type is a native flecs type. + /// + public static readonly bool IsFlecsType = typeof(T).ToString().StartsWith(Ecs.NativeNamespace, StringComparison.Ordinal); + + /// + /// The underlying integer type if this type is an enum. + /// + public static readonly IntegerType UnderlyingType = GetUnderlyingType(); + + /// + /// The underlying integer type id if this type is an enum. + /// + public static readonly ulong UnderlyingTypeId = GetUnderlyingTypeId(); + + /// + /// The cache indexes of all enum members if this type is an enum. + /// + private static readonly NativeArray Constants = InitEnumCacheIndexes(); + + /// + /// Returns the id for this type with the provided world. Registers a new component id if it doesn't exist. + /// + /// The world. + /// The id of the type in the world. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Id(ecs_world_t* world) + { + ref ulong cachedId = ref LookupCacheIndex(world); + return Unsafe.IsNullRef(ref cachedId) || !ecs_is_alive(world, cachedId) + ? RegisterComponent(world, true, true, 0, "") + : cachedId; + } + + /// + /// Returns the id for this type with the provided world. Registers a new component id if it doesn't exist. + /// + /// The world. + /// If true, the type will be registered in the root scope with it's full type name. + /// If true, type will be created with full component registration. (size, alignment, enums, hooks) + /// If an existing entity is found with this id, attempt to alias it. Otherwise, register new entity with this id. + /// The id of the type in the world. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Id(ecs_world_t* world, bool ignoreScope, bool isComponent, ulong id) + { + ref ulong cachedId = ref LookupCacheIndex(world); + return Unsafe.IsNullRef(ref cachedId) || !ecs_is_alive(world, cachedId) + ? RegisterComponent(world, ignoreScope, isComponent, id, "") + : cachedId; + } + + /// + /// Returns the id for this type with the provided world. Registers a new component id if it doesn't exist. + /// + /// The world. + /// If true, the type will be registered in the root scope with it's full type name. + /// If true, type will be created with full component registration. (size, alignment, enums, hooks) + /// If an existing entity is found with this id, attempt to alias it. Otherwise, register new entity with this id. + /// If an existing entity is found with this name, attempt to alias it. Otherwise, register new entity with this name. + /// The id of the type in the world. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Id(ecs_world_t* world, bool ignoreScope, bool isComponent, ulong id, string name) + { + ref ulong cachedId = ref LookupCacheIndex(world); + return Unsafe.IsNullRef(ref cachedId) || !ecs_is_alive(world, cachedId) + ? RegisterComponent(world, ignoreScope, isComponent, id, name) + : cachedId; + } + + /// + /// Returns the id for this enum member in the provided world. Registers a new id if it doesn't exist. + /// + /// The world. + /// The enum member. + /// The enum type. + /// The id of the enum member in the world. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Id(ecs_world_t* world, TEnum constant) where TEnum : Enum, T + { + Id(world); // Ensures that component ids are registered for enum members. + return LookupCacheIndex(world, GetEnumCacheIndex(constant)); + } + + /// + /// Ensures that the world has memory allocated at the provided cache index. + /// + /// The world. + /// Reference to the id at the provided cache index. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref ulong EnsureCacheIndex(ecs_world_t* world) + { + return ref EnsureCacheIndex(world, CacheIndex); + } + + /// + /// Ensures that the world has memory allocated at the provided cache index. + /// + /// The world. + /// The type cache index. + /// Reference to the id at the provided cache index. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref ulong EnsureCacheIndex(ecs_world_t* world, int index) + { + WorldContext* context = (WorldContext*)ecs_get_binding_ctx_fast(world); + Ecs.Assert(context != null, "World pointer must be created or passed into World.Create() to initialize binding context."); + ref NativeList cache = ref context->TypeCache; + cache.EnsureCount(index + 1); + return ref cache.Data[index]; + } + + /// + /// Gets a reference to the id occupying the provided cache index for this world. + /// + /// The world. + /// Reference to the id at the provided cache index. Returns a null reference if the index does not have a registered id yet. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref ulong LookupCacheIndex(ecs_world_t* world) + { + return ref LookupCacheIndex(world, CacheIndex); + } + + /// + /// Gets a reference to the id occupying the provided cache index for this world. + /// + /// The world. + /// The type cache index. + /// Reference to the id at the provided cache index. Returns a null reference if the index does not have a registered id yet. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref ulong LookupCacheIndex(ecs_world_t* world, int index) + { + WorldContext* context = (WorldContext*)ecs_get_binding_ctx_fast(world); + Ecs.Assert(context != null, "World pointer must be created or passed into World.Create() to initialize binding context."); + ref NativeList cache = ref context->TypeCache; + return ref index >= cache.Count || cache.Data[index] == 0 + ? ref Unsafe.NullRef() + : ref cache.Data[index]; + } + + /// + /// Checks if the type is registered in the provided world. + /// + /// The world. + /// True if the type is registered in the world. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsRegistered(ecs_world_t* world) + { + ref ulong cachedId = ref LookupCacheIndex(world); + return !Unsafe.IsNullRef(ref cachedId) && cachedId != 0 && ecs_is_alive(world, cachedId); + } + + /// + /// Checks if the type is registered in the provided world. + /// + /// The world. + /// The id of the type if registered, else 0. + /// True if the type was registered. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsRegistered(ecs_world_t* world, out ulong id) + { + ref ulong cachedId = ref LookupCacheIndex(world); + + id = !Unsafe.IsNullRef(ref cachedId) && cachedId != 0 && ecs_is_alive(world, cachedId) + ? cachedId + : 0; + + return id != 0; + } + + /// + /// Checks if the type is registered in the provided world. + /// + /// The world. + /// The id of the type if registered, else 0. + /// True if the type was registered. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsRegistered(ecs_world_t* world, out Entity id) + { + ref ulong cachedId = ref LookupCacheIndex(world); + + id = !Unsafe.IsNullRef(ref cachedId) && cachedId != 0 && ecs_is_alive(world, cachedId) + ? new Entity(world, cachedId) + : default; + + return id != 0; + } + + /// + /// Registers this type with the provided world. + /// + /// The ECS world. + /// If true, the type will be registered in the root scope with it's full type name. + /// If true, type will be created with full component registration. (size, alignment, enums, hooks) + /// If an existing entity is found with this id, attempt to alias it. Otherwise, register new entity with this id. + /// If an existing entity is found with this name, attempt to alias it. Otherwise, register new entity with this name. + /// The registered id of this type. + public static ulong RegisterComponent(World world, bool ignoreScope, bool isComponent, ulong id, string name) + { + Ecs.Assert(!world.GetWorld().IsReadOnly() || world.GetWorld().GetStageCount() <= 1, + "Cannot register component while multithreaded world is progressing/readonly."); + + // If a name or id is provided, the type is being used to alias an already existing entity. + Entity existingEntity = id != 0 ? new Entity(world, id) : world.Lookup(name, false); + + // If an existing entity is found, ensure that the size and alignment match the entity and return its id. + if (isComponent && existingEntity != 0 || world.TryLookupSymbol(FullName, out existingEntity)) + { + if (IsFlecsType) + return EnsureCacheIndex(world) = existingEntity; + + ref EcsComponent info = ref existingEntity.GetMut(); + + if (Unsafe.IsNullRef(ref info)) + Ecs.Assert(IsTag, $"Cannot alias '{existingEntity.Path()}' with a '{FullName}'. '{FullName}' must be a zero-sized struct"); + else + Ecs.Assert(info.size == Size && info.alignment == Alignment, $"Layout of type '{FullName}' (Size: {Size}, Alignment: {Alignment}) does not match currently registered layout (Size: {info.size}, Alignment: {info.alignment})"); + + return EnsureCacheIndex(world) = existingEntity; + } + + Entity prevScope = world.SetScope(ignoreScope ? 0ul : world.GetScope()); + Entity prevWith = world.SetWith(ignoreScope ? 0ul : world.GetWith()); + + using NativeString nativeSymbol = (NativeString)FullName; + using NativeString nativeName = string.IsNullOrEmpty(name) + ? (NativeString)GetTrimmedTypeName(world) + : (NativeString)name; + + ecs_entity_desc_t entityDesc = default; + entityDesc.id = id; + entityDesc.use_low_id = true; + entityDesc.name = nativeName; + entityDesc.symbol = nativeSymbol; + entityDesc.sep = Pointers.DefaultSeparator; + entityDesc.root_sep = Pointers.DefaultSeparator; + ulong entity = ecs_entity_init(world, &entityDesc); + Ecs.Assert(entity != 0, $"Failed to register entity for type '{FullName}'"); + + EnsureCacheIndex(world) = entity; + + if (!isComponent) + return entity; + + ecs_component_desc_t componentDesc = default; + componentDesc.entity = entity; + componentDesc.type.size = Size; + componentDesc.type.alignment = Alignment; + ulong component = ecs_component_init(world, &componentDesc); + Ecs.Assert(component != 0, $"Failed to register component for type '{FullName}'"); + Ecs.Assert(component == entity, $"Registered component ID wasn't the same as its entity for type '{FullName}'"); + + world.SetWith(prevWith); + world.SetScope(prevScope); + + // Store the type in the component. + if (typeof(T) != typeof(Type)) + RegisterDotnetType(world, world.Entity(component)); + + if (typeof(T).IsEnum) + RegisterConstants(world, world.Entity(component)); + + if (IsTag) + return component; + + // Register type hooks. + TypeHooksContext hooksContext = TypeHooksContext.Default; + + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + hooksContext.Ctor.Invoker = (delegate*)&Functions.DefaultManagedCtorCallback; + hooksContext.Dtor.Invoker = (delegate*)&Functions.DefaultManagedDtorCallback; + hooksContext.Copy.Invoker = (delegate*)&Functions.DefaultManagedCopyCallback; + hooksContext.Move.Invoker = (delegate*)&Functions.DefaultManagedMoveCallback; + } + + if (typeof(ICtorHook).IsAssignableFrom(typeof(T))) + { + hooksContext.Ctor.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() + ? (delegate*)&Functions.ManagedCtorCallbackPointer + : (delegate*)&Functions.UnmanagedCtorCallbackPointer; + + hooksContext.Ctor.Pointer = (void*)(nint)typeof(ICtorHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + if (typeof(IDtorHook).IsAssignableFrom(typeof(T))) + { + hooksContext.Dtor.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() + ? (delegate*)&Functions.ManagedDtorCallbackPointer + : (delegate*)&Functions.UnmanagedDtorCallbackPointer; + + hooksContext.Dtor.Pointer = (void*)(nint)typeof(IDtorHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + if (typeof(ICopyHook).IsAssignableFrom(typeof(T))) + { + hooksContext.Copy.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() + ? (delegate*)&Functions.ManagedCopyCallbackPointer + : (delegate*)&Functions.UnmanagedCopyCallbackPointer; + + hooksContext.Copy.Pointer = (void*)(nint)typeof(ICopyHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + if (typeof(IMoveHook).IsAssignableFrom(typeof(T))) + { + hooksContext.Move.Invoker = RuntimeHelpers.IsReferenceOrContainsReferences() + ? (delegate*)&Functions.ManagedMoveCallbackPointer + : (delegate*)&Functions.UnmanagedMoveCallbackPointer; + + hooksContext.Move.Pointer = (void*)(nint)typeof(IMoveHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + if (typeof(IOnAddHook).IsAssignableFrom(typeof(T))) + { + hooksContext.OnAdd.Invoker = (delegate*)&Functions.OnAddEachIterRefCallbackPointer; + hooksContext.OnAdd.Pointer = (void*)(nint)typeof(IOnAddHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + if (typeof(IOnRemoveHook).IsAssignableFrom(typeof(T))) + { + hooksContext.OnRemove.Invoker = (delegate*)&Functions.OnRemoveEachIterRefCallbackPointer; + hooksContext.OnRemove.Pointer = (void*)(nint)typeof(IOnRemoveHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + if (typeof(IOnSetHook).IsAssignableFrom(typeof(T))) + { + hooksContext.OnSet.Invoker = (delegate*)&Functions.OnSetEachIterRefCallbackPointer; + hooksContext.OnSet.Pointer = (void*)(nint)typeof(IOnSetHook<>.FunctionPointer<>) + .MakeGenericType(typeof(T), typeof(T)) + .GetMethod("Get")! + .Invoke(null, null)!; + } + + ecs_type_hooks_t hooks = default; + hooks.ctor = hooksContext.Ctor == default ? default : &Functions.CtorCallback; + hooks.dtor = hooksContext.Dtor == default ? default : &Functions.DtorCallback; + hooks.copy = hooksContext.Copy == default ? default : &Functions.CopyCallback; + hooks.move = hooksContext.Move == default ? default : &Functions.MoveCallback; + hooks.on_add = hooksContext.OnAdd == default ? default : &Functions.OnAddCallback; + hooks.on_remove = hooksContext.OnRemove == default ? default : &Functions.OnRemoveCallback; + hooks.on_set = hooksContext.OnSet == default ? default : &Functions.OnSetCallback; + hooks.binding_ctx = Memory.Alloc(hooksContext); + hooks.binding_ctx_free = &Functions.TypeHooksContextFree; + + ecs_set_hooks_id(world, component, &hooks); + + return component; + } + + /// + /// Returns a trimmed version of this type's full name with respect to the current scope of the world. + /// + /// The world. + public static string GetTrimmedTypeName(World world) + { + Entity scope = world.GetScope(); + + if (scope == 0) + return FullName; + + string scopePath = scope.Path(initSep: ""); + + // If the the start of the type's full name matches the current scope's path, trim the scope's path + // from the full type name and return. Otherwise return only the name of the type. + return FullName.StartsWith(scopePath, StringComparison.Ordinal) + ? FullName[(scopePath.Length + 1)..] + : Name; + } + + private static NativeArray InitEnumCacheIndexes() + { + if (!IsEnum) + return default; + + Array values = typeof(T).GetEnumValuesAsUnderlyingType(); + NativeArray constants = new NativeArray(values.Length); + + for (int i = 0; i < values.Length; i++) + { + long value = UnderlyingType switch + { + IntegerType.SByte => (sbyte)values.GetValue(i)!, + IntegerType.Byte => (byte)values.GetValue(i)!, + IntegerType.Int16 => (short)values.GetValue(i)!, + IntegerType.UInt16 => (ushort)values.GetValue(i)!, + IntegerType.Int32 => (int)values.GetValue(i)!, + IntegerType.UInt32 => (uint)values.GetValue(i)!, + IntegerType.Int64 => (long)values.GetValue(i)!, + IntegerType.UInt64 => (long)(ulong)values.GetValue(i)!, + _ => throw new Ecs.ErrorException("Type is not an enum.") + }; + constants[i] = new EnumMember(value, Interlocked.Increment(ref Ecs.CacheIndexCount)); + } + + return constants; + } + + private static void RegisterDotnetType(World world, Entity type) + { + ecs_suspend_readonly_state_t state = default; + world = flecs_suspend_readonly(world, &state); + type.Set(typeof(T)); + flecs_resume_readonly(world, &state); + } + + private static void RegisterConstants(World world, Entity type) + { + ecs_suspend_readonly_state_t state = default; + world = flecs_suspend_readonly(world, &state); + + type.Set(new EcsEnum { underlying_type = UnderlyingTypeId }); + + Entity prevScope = world.SetScope(type); + + for (int i = 0; i < Constants.Length; i++) + { + long value = Constants[i].Value; + string name = Unsafe.As(ref value)!.ToString()!; + EnsureCacheIndex(world, Constants[i].CacheIndex) = + world.Entity(name).SetUntyped(EcsConstant, UnderlyingTypeId, sizeof(T), &value); + } + + world.SetScope(prevScope); + + flecs_resume_readonly(world, &state); + } + + // Binary search enum list for enum constant's cache index. + private static int GetEnumCacheIndex(TEnum constant) where TEnum : Enum, T + { + long value = GetEnumConstantAsLong(constant); + + int left = 0; + int right = Constants.Length - 1; + + while (left <= right) + { + int mid = left + (right - left) / 2; + + ref EnumMember data = ref Constants.Data[mid]; + + if (data.Value == value) + return data.CacheIndex; + + if (data.Value < value) + left = ++mid; + else + right = --mid; + } + + Ecs.Assert(false, $"No id registered for '{constant}'"); + return 0; + } + + private static long GetEnumConstantAsLong(TEnum constant) where TEnum : Enum, T + { + return UnderlyingType switch + { + IntegerType.SByte => Unsafe.As(ref constant), + IntegerType.Byte => Unsafe.As(ref constant), + IntegerType.Int16 => Unsafe.As(ref constant), + IntegerType.UInt16 => Unsafe.As(ref constant), + IntegerType.Int32 => Unsafe.As(ref constant), + IntegerType.UInt32 => Unsafe.As(ref constant), + IntegerType.Int64 => Unsafe.As(ref constant), + IntegerType.UInt64 => (long)Unsafe.As(ref constant), + _ => throw new Ecs.ErrorException("Type is not an enum.") + }; + } + + private static IntegerType GetUnderlyingType() + { + if (!IsEnum) + return IntegerType.None; + + Type underlyingType = typeof(T).GetEnumUnderlyingType(); + + if (underlyingType == typeof(sbyte)) + return IntegerType.SByte; + + if (underlyingType == typeof(byte)) + return IntegerType.Byte; + + if (underlyingType == typeof(short)) + return IntegerType.Int16; + + if (underlyingType == typeof(ushort)) + return IntegerType.UInt16; + + if (underlyingType == typeof(int)) + return IntegerType.Int32; + + if (underlyingType == typeof(uint)) + return IntegerType.UInt32; + + if (underlyingType == typeof(long)) + return IntegerType.Int64; + + if (underlyingType == typeof(ulong)) + return IntegerType.UInt64; + + return IntegerType.None; + } + + private static ulong GetUnderlyingTypeId() + { + return UnderlyingType switch + { + IntegerType.SByte => FLECS_IDecs_i8_tID_, + IntegerType.Byte => FLECS_IDecs_u8_tID_, + IntegerType.Int16 => FLECS_IDecs_i16_tID_, + IntegerType.UInt16 => FLECS_IDecs_u16_tID_, + IntegerType.Int32 => FLECS_IDecs_i32_tID_, + IntegerType.UInt32 => FLECS_IDecs_u32_tID_, + IntegerType.Int64 => FLECS_IDecs_i64_tID_, + IntegerType.UInt64 => FLECS_IDecs_u64_tID_, + _ => 0 + }; + } + + private static string GetName() + { + string fullname = GetFullName(); + + int trimEnd; + + if (fullname.Contains('<', StringComparison.Ordinal)) + trimEnd = fullname.LastIndexOf('.', fullname.IndexOf('<', StringComparison.Ordinal)) + 1; + else + trimEnd = fullname.LastIndexOf('.') + 1; + + return fullname[trimEnd..]; + } + + private static string GetFullName() + { + string name = typeof(T).ToString(); + + // File-local types are prefixed with a file name + GUID. + if (Ecs.StripFileLocalTypeNameGuid) + { + int start = 0; + bool skip = false; + + StringBuilder stringBuilder = new StringBuilder(); + + for (int current = 0; current < name.Length;) + { + char c = name[current]; + + if (skip && c == '_') + { + skip = false; + start = current + 2; + } + else if (!skip && c == '<') + { + skip = true; + stringBuilder.Append(name.AsSpan(start, current - start)); + current = name.IndexOf('>', current) + 1; + continue; + } + + current++; + } + + stringBuilder.Append(name.AsSpan(start)); + name = stringBuilder.ToString(); + } + + { + name = name + .Replace(Ecs.NativeNamespace, string.Empty, StringComparison.Ordinal) + .Replace('+', '.') + .Replace('[', '<') + .Replace(']', '>'); + + int start = 0; + int current = 0; + bool skip = false; + + StringBuilder stringBuilder = new StringBuilder(); + + foreach (char c in name) + { + if (skip && (c == '<' || c == '.')) + { + start = current; + skip = false; + } + else if (!skip && c == '`') + { + stringBuilder.Append(name.AsSpan(start, current - start)); + skip = true; + } + + current++; + } + + return stringBuilder.Append(name.AsSpan(start)).ToString(); + } + } + + // TODO: Change back to private when done debugging + public static int SizeOf() + { + NativeLayout(out int size, out int _); + return size; + } + + private static int AlignOf() + { + NativeLayout(out int _, out int alignment); + return alignment; + } + + [SuppressMessage("Usage", "CA1508")] + private static void NativeLayout(out int size, out int alignment) + { + Type type = typeof(T); + StructLayoutAttribute attribute = type.StructLayoutAttribute!; + + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + size = sizeof(GCHandle); + alignment = sizeof(GCHandle); + return; + } + + if (attribute.Value == LayoutKind.Explicit) + { + size = attribute.Size == 0 ? sizeof(T) : attribute.Size; + alignment = attribute.Pack == 0 ? sizeof(AlignOfHelper) - sizeof(T) : attribute.Pack; + } + else + { + size = sizeof(T); + alignment = sizeof(AlignOfHelper) - sizeof(T); + } + + if (RuntimeFeature.IsDynamicCodeSupported) + { + FieldInfo[] fields = + type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + size = fields.Length == 0 ? 0 : size; + alignment = size == 0 ? 0 : alignment; + } + else if (sizeof(T) == 1) + { + // Structs containing zero non-static fields will always return true when compared using .Equals(). + // Test for tags by changing the underlying byte and checking equality. + // If the structs always return true, it's likely that the struct is a tag. + + T aInstance = default!; + T bInstance = default!; + + for (byte i = 0; i < 16; i++) + { + *(byte*)&bInstance = i; + if (!Equals(aInstance, bInstance)) + return; + } + + size = 0; + alignment = 0; + } + } + + [SuppressMessage("ReSharper", "PrivateFieldCanBeConvertedToLocalVariable")] + [SuppressMessage("ReSharper", "NotAccessedPositionalProperty.Local")] + private readonly record struct AlignOfHelper(byte Dummy, T Data); + + [SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")] + private readonly record struct EnumMember(long Value, int CacheIndex); + + /// + /// Represents the underlying integer type of an enum. + /// + public enum IntegerType + { + /// + /// This type is not an enum. + /// + None, + + /// + /// + /// + SByte, + + /// + /// + /// + Byte, + + /// + /// + /// + Int16, + + /// + /// + /// + UInt16, + + /// + /// + /// + Int32, + + /// + /// + /// + UInt32, + + /// + /// + /// + Int64, + + /// + /// + /// + UInt64 + } +} diff --git a/src/Flecs.NET/Core/World.cs b/src/Flecs.NET/Core/World.cs index cf3d1e1b..5fd2d10f 100644 --- a/src/Flecs.NET/Core/World.cs +++ b/src/Flecs.NET/Core/World.cs @@ -1,4324 +1,4466 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using Flecs.NET.Core.BindingContext; -using Flecs.NET.Utilities; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -/// -/// The world is the container of all ECS data and systems. If the world is deleted, all data in the world will be -/// deleted as well. -/// -public readonly unsafe partial struct World : IDisposable, IEquatable -{ - private readonly ecs_world_t* _handle; - - internal ref WorldContext WorldContext => ref *EnsureBindingContext(); - - /// - /// The handle to the C world. - /// - public ref readonly ecs_world_t* Handle => ref _handle; - - /// - /// Constructs a world from an pointer. - /// - /// The world handle. - public World(ecs_world_t* handle) - { - _handle = handle; - } - - /// - /// Creates a flecs world that is owned. - /// - /// - public static World Create() - { - Ecs.Os.OverrideOsApi(); - - World w = new World(ecs_init()); - w.EnsureBindingContext(); - w.InitBuiltinComponents(); - - return w; - } - - /// - /// Creates a flecs world from an pointer that is not owned. - /// - /// A C world. - /// A newly created world. - public static World Create(ecs_world_t* world) - { - Ecs.Os.OverrideOsApi(); - - World w = new World(world); - w.EnsureBindingContext(); - w.InitBuiltinComponents(); - - return w; - } - - /// - /// Creates world from command line arguments. - /// - /// Command line arguments. - /// - public static World Create(params Span args) - { - NativeString* nativeStrings = Memory.AllocZeroed(args.Length); - - for (int i = 0; i < args.Length; i++) - nativeStrings[i] = (NativeString)args[i]; - - Ecs.Os.OverrideOsApi(); - - World w = new World(ecs_init_w_args(args.Length, (byte**)nativeStrings)); - w.EnsureBindingContext(); - w.InitBuiltinComponents(); - - for (int i = 0; i < args.Length; i++) - nativeStrings[i].Dispose(); - - Memory.Free(nativeStrings); - - return w; - } - - /// - /// Calls and cleans up resources. - /// - public void Dispose() - { - if (Handle == null || !Ecs.IsStageOrWorld(Handle)) - return; - - _ = ecs_fini(Handle); - } - - /// - /// Signals that the application should quit. The next call to returns false. - /// - public void Quit() - { - ecs_quit(Handle); - } - - /// - /// Register action to be executed when world is destroyed. - /// - /// The callback. - public void AtFini(Ecs.WorldFinishCallback callback) - { - WorldFinishContext* context = AllocateWorldFinishContext(); - context->Callback.Set(callback, (delegate*)&Functions.WorldFinishCallbackDelegate); - ecs_atfini(Handle, &Functions.WorldFinishCallback, context); - } - - /// - /// Register action to be executed when world is destroyed. - /// - /// The callback. - public void AtFini(delegate* callback) - { - WorldFinishContext* context = AllocateWorldFinishContext(); - context->Callback.Set(callback, (delegate*)&Functions.WorldFinishCallbackPointer); - ecs_atfini(Handle, &Functions.WorldFinishCallback, context); - } - - /// - /// Test if Quit() has been called. - /// - /// - public bool ShouldQuit() - { - return ecs_should_quit(Handle); - } - - /// - /// Begin frame. - /// - /// - /// - public float FrameBegin(float deltaTime = 0) - { - return ecs_frame_begin(Handle, deltaTime); - } - - /// - /// End frame. - /// - public void FrameEnd() - { - ecs_frame_end(Handle); - } - - /// - /// Begin staging. - /// - /// - public bool ReadonlyBegin(bool multiThreaded = false) - { - return ecs_readonly_begin(Handle, multiThreaded); - } - - /// - /// End staging. - /// - public void ReadonlyEnd() - { - ecs_readonly_end(Handle); - } - - /// - /// Defer operations until end end of frame, or until DeferEnd() is called. - /// - /// - public bool DeferBegin() - { - return ecs_defer_begin(Handle); - } - - /// - /// End block of operations to defer. - /// - /// - public bool DeferEnd() - { - return ecs_defer_end(Handle); - } - - /// - /// Test whether deferring is enabled. - /// - /// - public bool IsDeferred() - { - return ecs_is_deferred(Handle); - } - - /// - /// Configure world to have N stages. - /// - /// - public void SetStageCount(int stages) - { - ecs_set_stage_count(Handle, stages); - } - - /// - /// Get number of configured stages. - /// - /// - public int GetStageCount() - { - return ecs_get_stage_count(Handle); - } - - /// - /// Get current stage id. - /// - /// - public int GetStageId() - { - return ecs_stage_get_id(Handle); - } - - /// - /// Test if is a stage. - /// - /// - public bool IsStage() - { - Ecs.Assert( - flecs_poly_is_(Handle, ecs_world_t_magic) || - flecs_poly_is_(Handle, ecs_stage_t_magic), - nameof(ECS_INVALID_PARAMETER) - ); - return flecs_poly_is_(Handle, ecs_stage_t_magic); - } - - /// - /// Merge world or stage. - /// - public void Merge() - { - ecs_merge(Handle); - } - - /// - /// Get stage-specific world pointer. - /// - /// - /// - public World GetStage(int stageId) - { - return new World(ecs_get_stage(Handle, stageId)); - } - - /// - /// Creates asynchronous stage. - /// - /// - public World AsyncStage() - { - return new World(ecs_stage_new(Handle)); - } - - /// - /// Get actual world. - /// - /// - public World GetWorld() - { - return new World(Handle == null ? null : ecs_get_world(Handle)); - } - - /// - /// Test whether the current world object is readonly. - /// - /// - public bool IsReadOnly() - { - return ecs_stage_is_readonly(Handle); - } - - /// - /// Sets the user context object for the world. - /// - /// The user context object. - /// The user context type. - public void SetCtx(T value) - { - WorldContext.UserContext.Set(ref value); - } - - /// - /// Sets the user context object for the world. The provided callback will be run before the - /// user context object is released by flecs. - /// - /// The user context object. - /// The callback. - /// The user context type. - public void SetCtx(T value, Ecs.UserContextFinish callback) - { - WorldContext.UserContext.Set(ref value, callback); - } - - /// - /// Sets the user context object for the world. The provided callback will be run before the - /// user context object is released by flecs. - /// - /// The user context object. - /// The callback. - /// The user context type. - public void SetCtx(T value, delegate* callback) - { - WorldContext.UserContext.Set(ref value, callback); - } - - /// - /// Gets the user context object for the world. - /// - /// The user context type. - /// - public ref T GetCtx() - { - return ref WorldContext.UserContext.Get(); - } - - /// - /// Preallocate memory for number of entities. - /// - /// - public void Dim(int entityCount) - { - ecs_dim(Handle, entityCount); - } - - /// - /// Set entity range. - /// - /// - /// - public void SetEntityRange(ulong min, ulong max) - { - ecs_set_entity_range(Handle, min, max); - } - - /// - /// Enforce that operations cannot modify entities outside of range. - /// - /// - public void EnableRangeCheck(bool enabled = true) - { - ecs_enable_range_check(Handle, enabled); - } - - /// - /// Set the current scope. - /// - /// The entity to use as scope. - /// The previous scope. - public Entity SetScope(ulong scope) - { - return new Entity(Handle, ecs_set_scope(Handle, scope)); - } - - /// - /// Set the current scope. - /// - /// The entity to use as scope. - /// The previous scope. - public Entity SetScope() - { - return SetScope(Type.Id(Handle)); - } - - /// - /// Set the current scope. - /// - /// The entity to use as scope. - /// The enum. - /// The previous scope. - public Entity SetScope(T value) where T : Enum - { - return SetScope(Type.Id(Handle, value)); - } - - /// - /// Get the current scope. - /// - /// The current scope. - public Entity GetScope() - { - return new Entity(Handle, ecs_get_scope(Handle)); - } - - /// - /// Set search path. - /// - /// - /// - public ulong* SetLookupPath(ulong* searchPath) - { - return ecs_set_lookup_path(Handle, searchPath); - } - - /// - /// Lookup entity by name. - /// - /// The path to resolve. - /// The separator. - /// The root separator. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - public Entity Lookup( - string path, - string separator = Ecs.DefaultSeparator, - string rootSeparator = Ecs.DefaultSeparator, - bool recursive = true) - { - if (string.IsNullOrEmpty(path)) - return new Entity(Handle, 0); - - using NativeString nativePath = (NativeString)path; - using NativeString nativeSeparator = (NativeString)separator; - using NativeString nativeRootSeparator = (NativeString)rootSeparator; - - return new Entity( - Handle, - ecs_lookup_path_w_sep(Handle, 0, nativePath, nativeSeparator, nativeRootSeparator, recursive) - ); - } - - /// - /// Sets the data of a component. - /// - /// The id of the component to set. - /// The size of the pointed-to data. - /// The pointer to the data. - /// Reference to self. - public World SetUntyped(ulong id, int size, void* data) - { - Entity(id).SetUntyped(id, size, data); - return this; - } - - /// - /// Sets the data of a component. - /// - /// The id of the component to set. - /// The pointer to the data. - /// Reference to self. - public World SetUntyped(ulong id, void* data) - { - Entity(id).SetUntyped(id, data); - return this; - } - - /// - /// Sets the data of a pair component. - /// - /// The first id of the pair. - /// The second id of the pair. - /// The size of the pointed-to data. - /// The pointer to the data. - /// Reference to self. - public World SetUntyped(ulong first, ulong second, int size, void* data) - { - Entity(first).SetUntyped(first, second, size, data); - return this; - } - - /// - /// Sets the data of a singleton component. - /// - /// The pointer to the data. - /// The component type. - /// Reference to self. - public World SetPtr(T* data) - { - Entity().SetPtr(data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The second id of the pair. - /// The pointer to the data. - /// The first type of the pair. - /// Reference to self. - public World SetPtr(ulong second, TFirst* data) - { - Entity().SetPtr(second, data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World SetPtr(TFirst* data) - { - Entity().SetPtr(data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World SetPtr(TSecond* data) - { - Entity().SetPtr(data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The second id (enum member) of the pair. - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World SetPtr(TSecond second, TFirst* data) where TSecond : Enum - { - return SetPtr(Type.Id(Handle, second), data); - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The first id (enum member) of the pair. - /// The pointer to the data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World SetPtr(TFirst first, TSecond* data) where TFirst : Enum - { - return SetPtrSecond(Type.Id(Handle, first), data); - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The first id of the pair. - /// The pointer to the data. - /// The second type of the pair. - /// Reference to self. - public World SetPtrSecond(ulong first, TSecond* data) - { - Entity(first).SetPtrSecond(first, data); - return this; - } - - /// - /// Sets the data of a singleton component. - /// - /// The component data. - /// The component type. - /// Reference to self. - public World Set(in T data) - { - Entity().Set(in data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The second id of the pair. - /// The component data. - /// The first type of the pair. - /// Reference to self. - public World Set(ulong second, in TFirst data) - { - Entity().Set(second, in data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World Set(in TFirst data) - { - Entity().Set(in data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World Set(in TSecond data) - { - Entity().Set(in data); - return this; - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The second id (enum member) of the pair. - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World Set(TSecond second, in TFirst data) where TSecond : Enum - { - return Set(Type.Id(Handle, second), in data); - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The first id (enum member) of the pair. - /// The component data. - /// The first type of the pair. - /// The second type of the pair. - /// Reference to self. - public World Set(TFirst first, in TSecond data) where TFirst : Enum - { - return SetSecond(Type.Id(Handle, first), in data); - } - - /// - /// Sets the data of a singleton pair component. - /// - /// The first id of the pair. - /// The component data. - /// The second type of the pair. - /// Reference to self. - public World SetSecond(ulong first, in TSecond data) - { - Entity(first).SetSecond(first, in data); - return this; - } - - /// - /// Ensure singleton component inside a callback. - /// - /// - /// - /// - public void Insert(Ecs.InsertRefCallback callback) - { - Invoker.Insert(Handle, Type.Id(Handle), callback); - } - - /// - /// Get mutable pointer to singleton component. - /// - /// - /// - public T* EnsurePtr() where T : unmanaged - { - return Entity().EnsurePtr(); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TFirst* EnsurePtr(ulong second) where TFirst : unmanaged - { - return Entity().EnsurePtr(second); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - /// - public TFirst* EnsurePtr(TSecond second) - where TFirst : unmanaged - where TSecond : Enum - { - return EnsurePtr(Type.Id(Handle, second)); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - /// - public TSecond* EnsurePtr(TFirst first) - where TFirst : Enum - where TSecond : unmanaged - { - return EnsureSecondPtr(Type.Id(Handle, first)); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TFirst* EnsureFirstPtr() where TFirst : unmanaged - { - return Entity().EnsureFirstPtr(); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TSecond* EnsureSecondPtr() where TSecond : unmanaged - { - return Entity().EnsureSecondPtr(); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TSecond* EnsureSecondPtr(ulong first) where TSecond : unmanaged - { - return Entity(first).EnsureSecondPtr(first); - } - - /// - /// Get managed mutable reference to singleton component. - /// - /// - /// - public ref T Ensure() - { - return ref Entity().Ensure(); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TFirst Ensure(ulong second) - { - return ref Entity().Ensure(second); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - /// - public ref TFirst Ensure(TSecond second) where TSecond : Enum - { - return ref Ensure(Type.Id(Handle, second)); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - /// - public ref TSecond Ensure(TFirst first) where TFirst : Enum - { - return ref EnsureSecond(Type.Id(Handle, first)); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TFirst EnsureFirst() - { - return ref Entity().EnsureFirst(); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TSecond EnsureSecond() - { - return ref Entity().EnsureSecond(); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TSecond EnsureSecond(ulong first) - { - return ref Entity(first).EnsureSecond(first); - } - - /// - /// Mark singleton component as modified. - /// - /// - public void Modified() - { - Entity().Modified(); - } - - /// - /// Mark singleton pair as modified. - /// - /// - /// - public void Modified(ulong second) - { - Entity().Modified(second); - } - - /// - /// Mark singleton pair as modified. - /// - /// - /// - public void Modified() - { - Entity().Modified(); - } - - /// - /// Mark singleton pair as modified. - /// - /// - /// - /// - public void Modified(TSecond second) where TSecond : Enum - { - Modified(Type.Id(Handle, second)); - } - - /// - /// Mark singleton pair as modified. - /// - /// - /// - /// - public void Modified(TFirst first) where TFirst : Enum - { - ModifiedSecond(Type.Id(Handle, first)); - } - - /// - /// Mark singleton pair as modified. - /// - /// - /// - public void ModifiedSecond(ulong first) - { - Entity(first).ModifiedSecond(first); - } - - /// - /// Gets ref to singleton component. - /// - /// - /// - public Ref GetRef() - { - return Entity().GetRef(); - } - - /// - /// Gets ref to singleton pair. - /// - /// - /// - /// - public Ref GetRef(ulong second) - { - return Entity().GetRef(second); - } - - /// - /// Gets ref to singleton pair. - /// - /// - /// - /// - /// - public Ref GetRef(TSecond second) where TSecond : Enum - { - return GetRef(Type.Id(Handle, second)); - } - - /// - /// Gets ref to singleton pair. - /// - /// - /// - /// - /// - public Ref GetRef(TFirst first) where TFirst : Enum - { - return GetRefSecond(Type.Id(Handle, first)); - } - - /// - /// Gets ref to singleton pair. - /// - /// - /// - /// - public Ref GetRefFirst() - { - return Entity().GetRefFirst(); - } - - /// - /// Gets ref to singleton pair. - /// - /// - /// - /// - public Ref GetRefSecond() - { - return Entity().GetRefSecond(); - } - - /// - /// Gets ref to singleton pair. - /// - /// - /// - /// - public Ref GetRefSecond(ulong first) - { - return Entity(first).GetRefSecond(first); - } - - /// - /// Gets pointer to singleton component. - /// - /// - /// - public T* GetPtr() where T : unmanaged - { - return Entity().GetPtr(); - } - - /// - /// Gets pointer to singleton pair. - /// - /// - /// - /// - public TFirst* GetPtr(ulong second) where TFirst : unmanaged - { - return Entity().GetPtr(second); - } - - /// - /// Gets pointer to singleton pair. - /// - /// - /// - /// - /// - public TFirst* GetPtr(TSecond second) - where TFirst : unmanaged - where TSecond : Enum - { - return GetPtr(Type.Id(Handle, second)); - } - - /// - /// Gets pointer to singleton pair. - /// - /// - /// - /// - /// - public TSecond* GetPtr(TFirst first) - where TFirst : Enum - where TSecond : unmanaged - { - return GetSecondPtr(Type.Id(Handle, first)); - } - - /// - /// Gets pointer to singleton pair. - /// - /// - /// - /// - public TFirst* GetFirstPtr() where TFirst : unmanaged - { - return Entity().GetFirstPtr(); - } - - - /// - /// Gets pointer to singleton pair. - /// - /// - /// - /// - public TSecond* GetSecondPtr() where TSecond : unmanaged - { - return Entity().GetSecondPtr(); - } - - /// - /// Gets pointer to singleton pair. - /// - /// - /// - /// - public TSecond* GetSecondPtr(ulong first) where TSecond : unmanaged - { - return Entity(first).GetSecondPtr(first); - } - - /// - /// Gets managed reference to singleton component. - /// - /// - /// - public ref readonly T Get() - { - return ref Entity().Get(); - } - - /// - /// Gets managed reference to singleton pair. - /// - /// - /// - /// - public ref readonly TFirst Get(ulong second) - { - return ref Entity().Get(second); - } - - /// - /// Gets managed reference to singleton pair. - /// - /// - /// - /// - /// - public ref readonly TFirst Get(TSecond second) where TSecond : Enum - { - return ref Get(Type.Id(Handle, second)); - } - - /// - /// Gets managed reference to singleton pair. - /// - /// - /// - /// - /// - public ref readonly TSecond Get(TFirst first) where TFirst : Enum - { - return ref GetSecond(Type.Id(Handle, first)); - } - - /// - /// Gets managed reference to singleton pair. - /// - /// - /// - /// - public ref readonly TFirst GetFirst() - { - return ref Entity().GetFirst(); - } - - /// - /// Gets managed reference to singleton pair. - /// - /// - /// - /// - public ref readonly TSecond GetSecond() - { - return ref Entity().GetSecond(); - } - - /// - /// Gets managed reference to singleton pair. - /// - /// - /// - /// - public ref readonly TSecond GetSecond(ulong first) - { - return ref Entity(first).GetSecond(first); - } - - /// - /// Get mutable pointer to singleton component. - /// - /// - /// - public T* GetMutPtr() where T : unmanaged - { - return Entity().GetMutPtr(); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TFirst* GetMutPtr(ulong second) where TFirst : unmanaged - { - return Entity().GetMutPtr(second); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - /// - public TFirst* GetMutPtr(TSecond second) - where TFirst : unmanaged - where TSecond : Enum - { - return GetMutPtr(Type.Id(Handle, second)); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - /// - public TSecond* GetMutPtr(TFirst first) - where TFirst : Enum - where TSecond : unmanaged - { - return GetMutSecondPtr(Type.Id(Handle, first)); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TFirst* GetMutFirstPtr() where TFirst : unmanaged - { - return Entity().GetMutFirstPtr(); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TSecond* GetMutSecondPtr() where TSecond : unmanaged - { - return Entity().GetMutSecondPtr(); - } - - /// - /// Get mutable pointer to singleton pair. - /// - /// - /// - /// - public TSecond* GetMutSecondPtr(ulong first) where TSecond : unmanaged - { - return Entity(first).GetMutSecondPtr(first); - } - - /// - /// Get managed mutable reference to singleton component. - /// - /// - /// - public ref T GetMut() - { - return ref Entity().GetMut(); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TFirst GetMut(ulong second) - { - return ref Entity().GetMut(second); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - /// - public ref TFirst GetMut(TSecond second) where TSecond : Enum - { - return ref GetMut(Type.Id(Handle, second)); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - /// - public ref TSecond GetMut(TFirst first) where TFirst : Enum - { - return ref GetMutSecond(Type.Id(Handle, first)); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TFirst GetMutFirst() - { - return ref Entity().GetMutFirst(); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TSecond GetMutSecond() - { - return ref Entity().GetMutSecond(); - } - - /// - /// Get managed mutable reference to singleton pair. - /// - /// - /// - /// - public ref TSecond GetMutSecond(ulong first) - { - return ref Entity(first).GetMutSecond(first); - } - - /// - /// Get a readonly singleton component inside a callback. - /// - /// - /// - public void Read(Ecs.ReadRefCallback callback) - { - Invoker.Read(Handle, Type.Id(Handle), callback); - } - - /// - /// Get a mutable singleton component inside a callback. - /// - /// - /// - public void Write(Ecs.WriteRefCallback callback) - { - Invoker.Write(Handle, Type.Id(Handle), callback); - } - - /// - /// Test if world has singleton component. - /// - /// - /// - public bool Has(ulong id) - { - return Entity(id).Has(id); - } - - /// - /// Test if world has singleton pair. - /// - /// - /// - /// - public bool Has(ulong first, ulong second) - { - return Entity(first).Has(first, second); - } - - /// - /// Test if world has singleton component. - /// - /// - /// - public bool Has() - { - return Entity().Has(); - } - - /// - /// Test if world has singleton component. - /// - /// - /// - /// - public bool Has(T value) where T : Enum - { - return Entity().Has(value); - } - - /// - /// Test if world has singleton pair. - /// - /// - /// - /// - public bool Has(ulong second) - { - return Entity().Has(second); - } - - /// - /// Test if world has singleton pair. - /// - /// - /// - /// - public bool Has() - { - return Entity().Has(); - } - - /// - /// Test if world has singleton pair. - /// - /// - /// - /// - /// - public bool Has(TSecond second) where TSecond : Enum - { - return Has(Type.Id(Handle, second)); - } - - /// - /// Test if world has singleton pair. - /// - /// - /// - /// - /// - public bool Has(TFirst first) where TFirst : Enum - { - return HasSecond(Type.Id(Handle, first)); - } - - /// - /// Test if world has singleton pair. - /// - /// - /// - /// - public bool HasSecond(ulong first) - { - return Entity(first).Has(first, Type.Id(Handle)); - } - - /// - /// Add singleton component. - /// - /// - public void Add(ulong id) - { - Entity(id).Add(id); - } - - /// - /// Add singleton pair. - /// - /// - /// - public void Add(ulong first, ulong second) - { - Entity(first).Add(first, second); - } - - /// - /// Add singleton component. - /// - /// - public void Add() - { - Entity().Add(); - } - - /// - /// Add singleton component. - /// - /// - /// - public void Add(T value) where T : Enum - { - Entity().Add(value); - } - - /// - /// Add singleton pair. - /// - /// - /// - public void Add(ulong second) - { - Entity().Add(second); - } - - /// - /// Add singleton pair. - /// - /// - /// - public void Add() - { - Entity().Add(); - } - - /// - /// Add singleton pair. - /// - /// - /// - /// - public void Add(TSecond second) where TSecond : Enum - { - Add(Type.Id(Handle, second)); - } - - /// - /// Add singleton pair. - /// - /// - /// - /// - public void Add(TFirst first) where TFirst : Enum - { - AddSecond(Type.Id(Handle, first)); - } - - /// - /// Add singleton pair. - /// - /// - /// - public void AddSecond(ulong first) - { - Entity(first).AddSecond(first); - } - - /// - /// Remove singleton id. - /// - /// - public void Remove(ulong id) - { - Entity(id).Remove(id); - } - - /// - /// Remove singleton pair. - /// - /// - /// - public void Remove(ulong first, ulong second) - { - Entity(first).Remove(first, second); - } - - /// - /// Remove singleton component. - /// - /// - public void Remove() - { - Entity().Remove(); - } - - /// - /// Remove singleton id. - /// - /// - /// - public void Remove(T value) where T : Enum - { - Entity().Remove(value); - } - - /// - /// Remove singleton pair. - /// - /// - /// - public void Remove(ulong second) - { - Entity().Remove(second); - } - - /// - /// Remove singleton pair. - /// - /// - /// - public void Remove() - { - Entity().Remove(); - } - - /// - /// Remove singleton pair. - /// - /// - /// - /// - public void Remove(TSecond second) where TSecond : Enum - { - Remove(Type.Id(Handle, second)); - } - - /// - /// Remove singleton pair. - /// - /// - /// - /// - public void Remove(TFirst first) where TFirst : Enum - { - RemoveSecond(Type.Id(Handle, first)); - } - - /// - /// Remove singleton pair. - /// - /// - /// - public void RemoveSecond(ulong first) - { - Entity(first).Remove(first); - } - - /// - /// Iterate entities in root of world - /// - /// - public void Children(Ecs.EachEntityCallback func) - { - Entity(0).Children(func); - } - - /// - /// Get singleton entity for type. - /// - /// - /// - public Entity Singleton() - { - return Entity(); - } - - /// - /// Get target for a given pair from a singleton entity. - /// - /// - /// - /// - public Entity Target(ulong id, int index = 0) - { - return Entity(ecs_get_target(Handle, id, id, index)); - } - - /// - /// Get target for a given pair from a singleton entity. - /// - /// - /// - /// - /// - public Entity Target(ulong id, ulong rel, int index = 0) - { - return Entity(ecs_get_target(Handle, id, rel, index)); - } - - /// - /// Get target for a given pair from a singleton entity. - /// - /// - /// - /// - public Entity Target(int index = 0) - { - return Entity(ecs_get_target(Handle, Type.Id(Handle), Type.Id(Handle), index)); - } - - /// - /// Get target for a given pair from a singleton entity. - /// - /// - /// - /// - /// - public Entity Target(ulong rel, int index = 0) - { - return Entity(ecs_get_target(Handle, Type.Id(Handle), rel, index)); - } - - /// - /// Get target for a given pair from a singleton entity. - /// - /// - /// - /// - /// - public Entity Target(T value, int index = 0) where T : Enum - { - return Entity(ecs_get_target(Handle, Entity(value), Entity(value), index)); - } - - /// - /// Get target for a given pair from a singleton entity. - /// - /// - /// - /// - /// - /// - public Entity Target(T value, ulong rel, int index = 0) where T : Enum - { - return Entity(ecs_get_target(Handle, Entity(value), rel, index)); - } - - /// - /// Creates alias for component. - /// - /// - /// - public Entity Use(ulong entity, string alias = "") - { - if (string.IsNullOrEmpty(alias)) - alias = NativeString.GetString(ecs_get_name(Handle, entity)); - - using NativeString nativeAlias = (NativeString)alias; - ecs_set_alias(Handle, entity, nativeAlias); - return Entity(entity); - } - - /// - /// Creates alias for component. - /// - /// - /// - /// - public Entity Use(string alias = "") - { - ulong entity = Type.Id(Handle); - - if (string.IsNullOrEmpty(alias)) - alias = NativeString.GetString(ecs_get_name(Handle, entity)); - - using NativeString nativeAlias = (NativeString)alias; - - ecs_set_alias(Handle, entity, nativeAlias); - return Entity(entity); - } - - /// - /// Creates alias for component. - /// - /// - /// - /// - /// - public Entity Use(T value, string alias = "") where T : Enum - { - return Use(Type.Id(Handle, value), alias); - } - - /// - /// Creates alias for component. - /// - /// - /// - /// - public Entity Use(string name, string alias = "") - { - using NativeString nativeName = (NativeString)name; - - ulong entity = ecs_lookup_path_w_sep(Handle, 0, nativeName, - Pointers.DefaultSeparator, Pointers.DefaultSeparator, true); - - Ecs.Assert(entity != 0, nameof(ECS_INVALID_PARAMETER)); - - using NativeString nativeAlias = (NativeString)alias; - - ecs_set_alias(Handle, entity, nativeAlias); - return Entity(entity); - } - - /// - /// Count entities matching a component. - /// - /// - /// - public int Count(ulong id) - { - return ecs_count_id(Handle, id); - } - - /// - /// Count entities matching a pair. - /// - /// - /// - /// - public int Count(ulong first, ulong second) - { - return Count(Ecs.Pair(first, second)); - } - - /// - /// Count entities matching a component. - /// - /// - /// - public int Count() - { - return Count(Type.Id(Handle)); - } - - /// - /// Count entities matching a component. - /// - /// - /// - /// - public int Count(T value) where T : Enum - { - return Count(Type.Id(Handle, value)); - } - - /// - /// Count entities matching a pair. - /// - /// - /// - /// - public int Count(ulong second) - { - return Count(Ecs.Pair(second, Handle)); - } - - /// - /// Count entities matching a pair. - /// - /// - /// - /// - public int Count() - { - return Count(Ecs.Pair(Handle)); - } - - /// - /// Count entities matching a pair. - /// - /// - /// - /// - /// - public int Count(TSecond second) where TSecond : Enum - { - return Count(Type.Id(Handle, second)); - } - - /// - /// Count entities matching a pair. - /// - /// - /// - /// - /// - public int Count(TFirst first) where TFirst : Enum - { - return CountSecond(Type.Id(Handle, first)); - } - - /// - /// Count entities matching a pair. - /// - /// - /// - /// - public int CountSecond(ulong first) - { - return Count(first, Type.Id(Handle)); - } - - /// - /// All entities created in function are created with id. - /// - /// Id to be added to the created entities. - /// The callback. - public void With(ulong id, Action callback) - { - ulong prev = ecs_set_with(Handle, id); - callback(); - ecs_set_with(Handle, prev); - } - - /// - /// All entities created in function are created with pair. - /// - /// The first id. - /// The second id. - /// The callback. - public void With(ulong first, ulong second, Action callback) - { - With(Ecs.Pair(first, second), callback); - } - - /// - /// All entities created in function are created with type. - /// - /// The callback. - /// The component. - public void With(Action callback) - { - With(Type.Id(Handle), callback); - } - - /// - /// All entities created in function are created with enum. - /// - /// The enum constant. - /// The callback. - /// The enum. - public void With(T value, Action callback) where T : Enum - { - With(Type.Id(Handle, value), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The second id. - /// The callback. - /// The first component. - public void With(ulong second, Action callback) - { - With(Ecs.Pair(second, Handle), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The callback. - /// The first component. - /// The second component. - public void With(Action callback) - { - With(Ecs.Pair(Handle), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The second enum constant id. - /// The callback. - /// The first component. - /// The second enum. - public void With(TSecond second, Action callback) where TSecond : Enum - { - With(Type.Id(Handle, second), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The first enum constant. - /// The callback. - /// The first enum. - /// The second component. - public void With(TFirst first, Action callback) where TFirst : Enum - { - WithSecond(Type.Id(Handle, first), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The first id. - /// The callback. - /// The second component. - public void WithSecond(ulong first, Action callback) - { - With(first, Type.Id(Handle), callback); - } - - /// - /// All entities created in function are created in scope. All operations - /// called in function (such as lookup) are relative to scope. - /// - /// The entity to use as scope. - /// The callback. - public void Scope(ulong parent, Action callback) - { - ulong prev = ecs_set_scope(Handle, parent); - callback(); - ecs_set_scope(Handle, prev); - } - - /// - /// Same as Scope(parent, callback), but with T as parent. - /// - /// The callback. - /// The entity to use as scope. - public void Scope(Action callback) - { - Scope(Type.Id(Handle), callback); - } - - /// - /// Same as Scope(parent, callback), but with enum as parent. - /// - /// The entity to use as scope. - /// The callback. - /// The enum. - public void Scope(T value, Action callback) where T : Enum - { - Scope(Type.Id(Handle, value), callback); - } - - /// - /// Use provided scope for operations ran on returned world. - /// - /// - /// - public ScopedWorld Scope(ulong parent) - { - return new ScopedWorld(Handle, parent); - } - - /// - /// Use provided scope for operations ran on returned world. - /// - /// - /// - public ScopedWorld Scope() - { - return Scope(Type.Id(Handle)); - } - - /// - /// Use provided scope for operations ran on returned world. - /// - /// - /// - /// - public ScopedWorld Scope(T value) where T : Enum - { - return Scope(Type.Id(Handle, value)); - } - - /// - /// Use provided scope for operations ran on returned world. - /// - /// - /// - public ScopedWorld Scope(string name) - { - return Scope(Entity(name)); - } - - /// - /// Delete all entities with specified id. - /// - /// - public void DeleteWith(ulong id) - { - ecs_delete_with(Handle, id); - } - - /// - /// Delete all entities with specified pair. - /// - /// - /// - public void DeleteWith(ulong first, ulong second) - { - DeleteWith(Ecs.Pair(first, second)); - } - - /// - /// Delete all entities with specified component. - /// - /// - public void DeleteWith() - { - DeleteWith(Type.Id(Handle)); - } - - /// - /// Delete all entities with specified enum. - /// - /// - /// - public void DeleteWith(T value) where T : Enum - { - DeleteWith(Type.Id(Handle, value)); - } - - /// - /// Delete all entities with specified pair. - /// - /// - /// - public void DeleteWith(ulong second) - { - DeleteWith(Ecs.Pair(second, Handle)); - } - - /// - /// Delete all entities with specified pair. - /// - /// - /// - public void DeleteWith() - { - DeleteWith(Ecs.Pair(Handle)); - } - - /// - /// Delete all entities with specified pair. - /// - /// - /// - /// - public void DeleteWith(TSecond second) where TSecond : Enum - { - DeleteWith(Type.Id(Handle, second)); - } - - /// - /// Delete all entities with specified pair. - /// - /// - /// - /// - public void DeleteWith(TFirst first) where TFirst : Enum - { - DeleteWithSecond(Type.Id(Handle, first)); - } - - /// - /// Delete all entities with specified pair. - /// - /// - /// - public void DeleteWithSecond(ulong first) - { - DeleteWith(Ecs.PairSecond(first, Handle)); - } - - /// - /// Remove all instances of specified id. - /// - /// - public void RemoveAll(ulong id) - { - ecs_remove_all(Handle, id); - } - - /// - /// Remove all instances of specified pair. - /// - /// - /// - public void RemoveAll(ulong first, ulong second) - { - RemoveAll(Ecs.Pair(first, second)); - } - - /// - /// Remove all instances of specified component. - /// - /// - public void RemoveAll() - { - RemoveAll(Type.Id(Handle)); - } - - /// - /// Remove all instances of specified enum. - /// - /// - /// - public void RemoveAll(T value) where T : Enum - { - RemoveAll(Type.Id(Handle, value)); - } - - /// - /// Remove all instances of specified pair. - /// - /// - /// - public void RemoveAll(ulong second) - { - RemoveAll(Ecs.Pair(second, Handle)); - } - - /// - /// Remove all instances of specified pair. - /// - /// - /// - public void RemoveAll() - { - RemoveAll(Ecs.Pair(Handle)); - } - - /// - /// Remove all instances of specified pair. - /// - /// - /// - /// - public void RemoveAll(TSecond second) where TSecond : Enum - { - RemoveAll(Type.Id(Handle, second)); - } - - /// - /// Remove all instances of specified pair. - /// - /// - /// - /// - public void RemoveAll(TFirst first) where TFirst : Enum - { - RemoveAllSecond(Type.Id(Handle, first)); - } - - /// - /// Remove all instances of specified pair. - /// - /// - /// - public void RemoveAllSecond(ulong first) - { - RemoveAll(Ecs.PairSecond(first, Handle)); - } - - /// - /// Defer all operations called in function. If the world is already in - /// deferred mode, do nothing. - /// - /// The callback. - public void Defer(Action callback) - { - ecs_defer_begin(Handle); - callback(); - ecs_defer_end(Handle); - } - - /// - /// Suspend deferring operations. - /// - public void DeferSuspend() - { - ecs_defer_suspend(Handle); - } - - /// - /// Resume deferring operations. - /// - public void DeferResume() - { - ecs_defer_resume(Handle); - } - - /// - /// Check if entity id exists in the world. - /// - /// - /// - public bool Exists(ulong entity) - { - return ecs_exists(Handle, entity); - } - - /// - /// Check if entity id exists in the world. - /// - /// - /// - public bool IsAlive(ulong entity) - { - return ecs_is_alive(Handle, entity); - } - - /// - /// Check if entity id is valid. - /// - /// - /// - public bool IsValid(ulong entity) - { - return ecs_is_valid(Handle, entity); - } - - /// - /// Get alive entity for id. - /// - /// - /// - public Entity GetAlive(ulong entity) - { - return Entity(ecs_get_alive(Handle, entity)); - } - - /// - /// Ensures that entity with provided generation is alive. - /// - /// - /// - public Entity MakeAlive(ulong entity) - { - ecs_make_alive(Handle, entity); - return Entity(entity); - } - - /// - /// Override the generation of an entity. - /// - /// The entity for which to set the generation with the new generation. - public void SetVersion(ulong entity) - { - ecs_set_version(Handle, entity); - } - - /// - /// Run callback after completing frame. - /// - /// The callback. - public void RunPostFrame(Ecs.PostFrameCallback callback) - { - PostFrameContext* postFrameContext = AllocatePostFrameContext(); - postFrameContext->Callback.Set(callback, (delegate*)&Functions.PostFrameCallbackDelegate); - ecs_run_post_frame(Handle, &Functions.PostFrameCallback, postFrameContext); - } - - /// - /// Run callback after completing frame. - /// - /// The callback. - public void RunPostFrame(delegate* callback) - { - PostFrameContext* postFrameContext = AllocatePostFrameContext(); - postFrameContext->Callback.Set(callback, (delegate*)&Functions.PostFrameCallbackPointer); - ecs_run_post_frame(Handle, &Functions.PostFrameCallback, postFrameContext); - } - - /// - /// Get the world info. - /// - /// - public WorldInfo GetInfo() - { - return new WorldInfo(ecs_get_world_info(Handle)); - } - - /// - /// Get delta time. - /// - /// - public float DeltaTime() - { - return ecs_get_world_info(Handle)->delta_time; - } - - /// - /// Get default id. - /// - /// - [SuppressMessage("Usage", "CA1822")] - public Id Id() - { - return default; - } - - /// - /// Get id from string expression. - /// - /// The string expression. - /// - public Id Id(string expr) - { - return new Id(Handle, expr); - } - - /// - /// Get id from id value. - /// - /// - /// - public Id Id(ulong id) - { - return new Id(Handle, id); - } - - /// - /// Get pair from id values. - /// - /// - /// - /// - public Id Id(ulong first, ulong second) - { - return new Id(Handle, first, second); - } - - /// - /// Get id from a type. - /// - /// - /// - public Id Id() - { - return new Id(Handle, Type.Id(Handle)); - } - - /// - /// Get id from an enum. - /// - /// - /// - /// - public Id Id(T value) where T : Enum - { - return new Id(Handle, Type.Id(Handle, value)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id Id(ulong second) - { - return Id(Type.Id(Handle), second); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id Id() - { - return Id(Type.Id(Handle), Type.Id(Handle)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - /// - public Id Id(TSecond second) where TSecond : Enum - { - return Id(Type.Id(Handle, second)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - /// - public Id Id(TFirst first) where TFirst : Enum - { - return IdSecond(Type.Id(Handle, first)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id IdSecond(ulong first) - { - return Id(first, Type.Id(Handle)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id Pair(ulong first, ulong second) - { - return Id(first, second); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id Pair(T value) where T : Enum - { - return Id(Type.Id(Handle, value)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id Pair(ulong second) - { - return Id(second); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id Pair() - { - return Id(); - } - - /// - /// Get pair id. - /// - /// - /// - /// - /// - public Id Pair(TSecond second) where TSecond : Enum - { - return Pair(Type.Id(Handle, second)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - /// - public Id Pair(TFirst first) where TFirst : Enum - { - return PairSecond(Type.Id(Handle, first)); - } - - /// - /// Get pair id. - /// - /// - /// - /// - public Id PairSecond(ulong first) - { - return IdSecond(first); - } - - /// - /// Creates an . - /// - /// - public UntypedComponent Component() - { - return new UntypedComponent(Handle); - } - - /// - /// Creates an from id. - /// - /// - /// - public UntypedComponent Component(ulong id) - { - return new UntypedComponent(Handle, id); - } - - /// - /// Creates an from name. - /// - /// - /// - public UntypedComponent Component(string name) - { - return new UntypedComponent(Handle, name); - } - - /// - /// Find or register component. - /// - /// - /// - public Component Component() - { - return new Component(Handle); - } - - /// - /// Get component associated with name. - /// - /// - /// - /// - public Component Component(string name) - { - return new Component(Handle, name); - } - - /// - /// Get component with associated with id. - /// - /// - /// - /// - public Component Component(ulong id) - { - return new Component(Handle, id); - } - - /// - /// Creates an entity. - /// - /// - public Entity Entity() - { - return new Entity(Handle); - } - - /// - /// Creates an entity from id. - /// - /// - /// - public Entity Entity(ulong id) - { - return new Entity(Handle, id); - } - - /// - /// Creates an entity from name. - /// - /// - /// - public Entity Entity(string name) - { - return new Entity(Handle, name); - } - - /// - /// Creates an entity from type. - /// - /// - /// - public Entity Entity() - { - return new Entity(Handle, Type.Id(Handle)); - } - - /// - /// Creates an entity that's associated with a type. - /// - /// - /// - /// - public Entity Entity(string name) - { - return new Entity(Handle, Type.Id(Handle, false, false, 0, name)); - } - - /// - /// Convert enum constant to entity. - /// - /// - /// - /// - public Entity Entity(T value) where T : Enum - { - return new Entity(Handle, Type.Id(Handle, value)); - } - - /// - /// Creates a prefab. - /// - /// - public Entity Prefab() - { - return new Entity(Handle).Add(EcsPrefab); - } - - /// - /// Creates a prefab with the provided name. - /// - /// - public Entity Prefab(string name) - { - return new Entity(Handle, name).Add(EcsPrefab); - } - - /// - /// Creates a prefab that's associated with a type. - /// - /// - /// - public Entity Prefab() - { - return new Component(Handle).Add(EcsPrefab); - } - - /// - /// Creates a prefab that's associated with a type. - /// - /// - /// - /// - public Entity Prefab(string name) - { - return new Component(Handle, name).Add(EcsPrefab); - } - - /// - /// Creates a new event. - /// - /// - /// - public EventBuilder Event(ulong eventId) - { - return new EventBuilder(Handle, eventId); - } - - /// - /// Creates a new event. - /// - /// - /// - public EventBuilder Event() - { - return new EventBuilder(Handle, Type.Id(Handle)); - } - - /// - /// Creates a new event. - /// - /// - /// - /// - public EventBuilder Event(T value) where T : Enum - { - return new EventBuilder(Handle, Type.Id(Handle, value)); - } - - /// - /// Creates a new term. - /// - /// - public Term Term() - { - return new Term(Handle); - } - - /// - /// Creates a new term. - /// - /// - /// - public Term Term(ecs_term_t value) - { - return new Term(Handle, value); - } - - /// - /// Creates a new term. - /// - /// - /// - public Term Term(ulong id) - { - return new Term(Handle, id); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - public Term Term(ulong first, ulong second) - { - return new Term(Handle, first, second); - } - - /// - /// Creates a new term. - /// - /// - /// - public Term Term() - { - return new Term(Handle, Type.Id(Handle)); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - public Term Term(T value) where T : Enum - { - return Term(Type.Id(Handle, value)); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - public Term Term(ulong second) - { - return new Term(Handle, Ecs.Pair(second, Handle)); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - public Term Term() - { - return new Term(Handle, Ecs.Pair(Handle)); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - /// - public Term Term(TSecond second) where TSecond : Enum - { - return Term(Type.Id(Handle, second)); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - /// - public Term Term(TFirst first) where TFirst : Enum - { - return TermSecond(Type.Id(Handle, first)); - } - - /// - /// Creates a new term. - /// - /// - /// - /// - public Term TermSecond(ulong first) - { - return new Term(Handle, Ecs.PairSecond(first, Handle)); - } - - /// - /// Iterate over all entities with the provided (component) id. - /// - /// - /// - public void Each(ulong id, Ecs.EachEntityCallback callback) - { - ecs_iter_t it = ecs_each_id(Handle, id); - while (ecs_each_next(&it)) - Invoker.Each(&it, callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void Each(ulong first, ulong second, Ecs.EachEntityCallback callback) - { - Each(Ecs.Pair(first, second), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void Each(T value, Ecs.EachEntityRefCallback callback) where T : Enum - { - Each(Type.Id(Handle, value), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void Each(ulong second, Ecs.EachEntityRefCallback callback) - { - ecs_iter_t it = ecs_each_id(Handle, Ecs.Pair(second, Handle)); - while (ecs_each_next(&it)) - Invoker.Each(&it, callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void Each(Ecs.EachEntityCallback callback) - { - Each(Pair(), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void Each(Ecs.EachEntityRefCallback callback) - { - Each(Type.Id(Handle), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void Each(Ecs.EachEntityRefCallback callback) - { - EachSecond(Type.Id(Handle), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - /// - public void Each(TSecond second, Ecs.EachEntityRefCallback callback) where TSecond : Enum - { - Each(Type.Id(Handle, second), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - /// - public void Each(TFirst first, Ecs.EachEntityRefCallback callback) where TFirst : Enum - { - EachSecond(Type.Id(Handle, first), callback); - } - - /// - /// Iterate over all entities with the provided pair. - /// - /// - /// - /// - public void EachSecond(ulong first, Ecs.EachEntityRefCallback callback) - { - ecs_iter_t it = ecs_each_id(Handle, Ecs.PairSecond(first, Handle)); - while (ecs_each_next(&it)) - Invoker.Each(&it, callback); - } - - /// - /// Convert enum constant to entity. - /// - /// - /// - /// - public Entity ToEntity(T value) where T : Enum - { - return Entity(value); - } - - /// - /// Define a module. - /// - /// - /// - /// - public Entity Module(string name = "") where TModule : IFlecsModule, new() - { - Entity result = Entity(Type.Id(Handle)); - - if (string.IsNullOrEmpty(name)) - return Entity(result); - - using NativeString nativeName = (NativeString)name; - - Entity prevParent = result.Parent(); - ecs_add_path_w_sep(Handle, result, 0, nativeName, Pointers.DefaultSeparator, Pointers.DefaultSeparator); - Entity parent = result.Parent(); - - if (prevParent == parent) - return Entity(result); - - if (parent != 0) - parent.Add(Ecs.Module); - - // Module was reparented, cleanup old parent(s) - Entity current = prevParent; - - while (current != 0) - { - Entity next = current.Parent(); - - ecs_iter_t it = ecs_each_id(Handle, Pair(Ecs.ChildOf, current)); - - if (!ecs_iter_is_true(&it)) - { - current.Destruct(); - SetVersion(current); - } - - current = next; - } - - return Entity(result); - } - - /// - /// Imports a module. - /// - /// The module type. - /// The module entity. - public Entity Import() where T : IFlecsModule, new() - { - return Ecs.Import(this); - } - - /// - /// Set pipeline. - /// - /// - public void SetPipeline(ulong pipeline) - { - ecs_set_pipeline(Handle, pipeline); - } - - /// - /// Set pipeline. - /// - /// - public void SetPipeline() - { - SetPipeline(Type.Id(Handle)); - } - - /// - /// Set pipeline. - /// - /// - /// - public void SetPipeline(T value) where T : Enum - { - SetPipeline(Type.Id(Handle, value)); - } - - /// - /// Get pipeline. - /// - /// - public Entity GetPipeline() - { - return Entity(ecs_get_pipeline(Handle)); - } - - /// - /// Progress world one tick. - /// - /// - public bool Progress(float deltaTime = 0) - { - return ecs_progress(Handle, deltaTime); - } - - /// - /// Run pipeline. - /// - /// - /// - public void RunPipeline(ulong pipeline, float deltaTime = 0) - { - ecs_run_pipeline(Handle, pipeline, deltaTime); - } - - /// - /// Run pipeline. - /// - /// - /// - public void RunPipeline(float deltaTime = 0) - { - ecs_run_pipeline(Handle, Type.Id(Handle), deltaTime); - } - - /// - /// Set timescale. - /// - /// - public void SetTimeScale(float scale) - { - ecs_set_time_scale(Handle, scale); - } - - /// - /// Set target FPS. - /// - /// - public void SetTargetFps(float targetFps) - { - ecs_set_target_fps(Handle, targetFps); - } - - /// - /// Reset simulation clock. - /// - public void ResetClock() - { - ecs_reset_clock(Handle); - } - - /// - /// Set number of threads. - /// - /// - public void SetThreads(int threads) - { - ecs_set_threads(Handle, threads); - } - - /// - /// Set number of threads. - /// - /// - public int GetThreads() - { - return ecs_get_stage_count(Handle); - } - - /// - /// Set number of task threads. - /// - /// - public void SetTaskThreads(int taskThreads) - { - ecs_set_task_threads(Handle, taskThreads); - } - - /// - /// Returns true if task thread use has been requested. - /// - /// - public bool UsingTaskThreads() - { - return ecs_using_task_threads(Handle); - } - - /// - /// Creates a timer. - /// - /// - public TimerEntity Timer() - { - return new TimerEntity(Handle); - } - - /// - /// Creates a timer. - /// - /// - /// - public TimerEntity Timer(ulong id) - { - return new TimerEntity(Handle, id); - } - - /// - /// Creates a timer. - /// - /// - /// - public TimerEntity Timer(string name) - { - return new TimerEntity(Handle, name); - } - - /// - /// Creates a timer. - /// - /// - /// - public TimerEntity Timer() - { - return Timer(Type.Id(Handle)); - } - - /// - /// Creates a timer. - /// - /// - /// - public void Timer(T value) where T : Enum - { - Timer(Type.Id(Handle, value)); - } - - /// - /// Enable randomization of initial time values for timers. - /// - public void RandomizeTimers() - { - ecs_randomize_timers(Handle); - } - - /// - /// Run script. - /// - /// The script name (typically the file). - /// The script. - /// Zero if success, non-zero otherwise. - public int ScriptRun(string name, string str) - { - using NativeString nativeName = (NativeString)name; - using NativeString nativeStr = (NativeString)str; - - return ecs_script_run(Handle, nativeName, nativeStr); - } - - /// - /// Run script from file. - /// - /// The script file name. - /// Zero if success, non-zero if failed. - public int ScriptRunFile(string fileName) - { - using NativeString nativeFileName = (NativeString)fileName; - return ecs_script_run_file(Handle, nativeFileName); - } - - /// - /// Creates a script builder. - /// - /// The created script builder. - public ScriptBuilder Script() - { - return new ScriptBuilder(Handle); - } - - /// - /// Creates a script builder with the provided entity name. - /// - /// The entity name. - /// The created script builder. - public ScriptBuilder Script(string name) - { - return new ScriptBuilder(Handle, name); - } - - /// - /// Convert value to string. - /// - /// - /// - /// - public string ToExpr(ulong id, void* value) - { - return NativeString.GetStringAndFree(ecs_ptr_to_expr(Handle, id, value)); - } - - /// - /// Convert value to string. - /// - /// The value to serialize. - /// The type of the value to serialize. - /// String with expression, or empty string if failed. - public string ToExpr(T* value) where T : unmanaged - { - return ToExpr(Type.Id(Handle), value); - } - - /// - /// Covert value to string. - /// - /// The value to serialize. - /// The type of the value to serialize. - /// String with expression, or empty string if failed. - public string ToExpr(ref T value) where T : unmanaged - { - fixed (T* ptr = &value) - { - return ToExpr(ptr); - } - } - - /// - /// Return meta cursor to value. - /// - /// - /// - /// - public Cursor Cursor(ulong id, void* data) - { - return new Cursor(Handle, id, data); - } - - /// - /// Return meta cursor to value. - /// - /// - /// - /// - public Cursor Cursor(T* data) - { - return Cursor(Type.Id(Handle), data); - } - - /// - /// Return meta cursor to value. - /// - /// - /// - /// - // TODO: Figure out better api that doesn't cause GC hole - public Cursor Cursor(ref T data) where T : unmanaged - { - fixed (T* ptr = &data) - { - return Cursor(ptr); - } - } - - /// - /// Create primitive type. - /// - /// - /// - public Entity Primitive(ecs_primitive_kind_t kind) - { - ecs_primitive_desc_t desc = default; - desc.kind = kind; - - ulong id = ecs_primitive_init(Handle, &desc); - Ecs.Assert(id != 0, nameof(ECS_INVALID_OPERATION)); - - return Entity(id); - } - - /// - /// Creates array type. - /// - /// - /// - /// - public Entity Array(ulong elemId, int arrayCount) - { - ecs_array_desc_t desc = default; - desc.type = elemId; - desc.count = arrayCount; - - ulong id = ecs_array_init(Handle, &desc); - Ecs.Assert(id != 0, nameof(ECS_INVALID_OPERATION)); - - return Entity(id); - } - - /// - /// Creates array type. - /// - /// - /// - /// - public Entity Array(int arrayCount) - { - return Array(Type.Id(Handle), arrayCount); - } - - /// - /// Create vector type. - /// - /// - /// - public Entity Vector(ulong elemId) - { - ecs_vector_desc_t desc = default; - desc.type = elemId; - ulong id = ecs_vector_init(Handle, &desc); - Ecs.Assert(id != 0, nameof(ECS_INVALID_OPERATION)); - return Entity(id); - } - - /// - /// Create vector type. - /// - /// - /// - public Entity Vector() - { - return Vector(Type.Id(Handle)); - } - - /// - /// Serialize untyped value to JSON. - /// - /// - /// - /// - public string ToJson(ulong id, void* value) - { - return NativeString.GetStringAndFree(ecs_ptr_to_json(Handle, id, value)); - } - - /// - /// Serialize value to JSON. - /// - /// - /// - /// - // TODO: Support managed types with ToJson and FromJson. - public string ToJson(T* value) where T : unmanaged - { - return ToJson(Type.Id(Handle), value); - } - - /// - /// Serialize value to JSON. - /// - /// - /// - /// - public string ToJson(ref T value) where T : unmanaged - { - fixed (T* ptr = &value) - { - return ToJson(ptr); - } - } - - /// - /// Serializes the world to a JSON string using the provided description. - /// - /// The description settings for JSON serialization. - /// A JSON string with the serialized world data, or an empty string if failed. - public string ToJson(in WorldToJsonDesc desc) - { - fixed (ecs_world_to_json_desc_t* ptr = &desc.Desc) - return NativeString.GetStringAndFree(ecs_world_to_json(Handle, ptr)); - } - - /// - /// Serializes the world to a JSON string. - /// - /// A JSON string with the serialized world data, or an empty string if failed. - public string ToJson() - { - return NativeString.GetStringAndFree(ecs_world_to_json(Handle, null)); - } - - /// - /// Deserialize value from JSON. - /// - /// - /// - /// - /// - /// - public bool FromJson(ulong id, void* value, string json, ecs_from_json_desc_t* desc = null) - { - using NativeString nativeJson = (NativeString)json; - return ecs_ptr_from_json(Handle, id, value, nativeJson, desc) != null; - } - - /// - /// Deserialize value from JSON. - /// - /// - /// - /// - /// - /// - public bool FromJson(T* value, string json, ecs_from_json_desc_t* desc = null) where T : unmanaged - { - return FromJson(Type.Id(Handle), value, json, desc); - } - - /// - /// Deserialize value from JSON. - /// - /// - /// - /// - public bool FromJson(string json, ecs_from_json_desc_t* desc) - { - using NativeString nativeJson = (NativeString)json; - return ecs_world_from_json(Handle, nativeJson, desc) != null; - } - - /// - /// Deserialize value from JSON. - /// - /// - /// - public bool FromJson(string json) - { - using NativeString nativeJson = (NativeString)json; - return FromJson(json, null); - } - - /// - /// Deserialize JSON file into world. - /// - /// - /// - /// - public bool FromJsonFile(string file, ecs_from_json_desc_t *desc) - { - using NativeString nativeFile = (NativeString)file; - return ecs_world_from_json_file(Handle, nativeFile, desc) != null; - } - - /// - /// Deserialize JSON file into world. - /// - /// - /// - public bool FromJsonFile(string file) - { - return FromJsonFile(file, null); - } - - /// - /// Creates an app builder. - /// - /// - public AppBuilder App() - { - return new AppBuilder(Handle); - } - - /// - /// Create metric builder. - /// - /// - /// - public MetricBuilder Metric(ulong entity) - { - return new MetricBuilder(Handle, entity); - } - - /// - /// Creates an alert builder. - /// - /// An alert builder. - public AlertBuilder AlertBuilder() - { - return new AlertBuilder(Handle); - } - - /// - /// Creates an alert builder. - /// - /// The alert name. - /// An alert builder. - public AlertBuilder AlertBuilder(string name) - { - return new AlertBuilder(Handle, name); - } - - /// - /// Creates an alert builder. - /// - /// The alert entity. - /// An alert builder. - public AlertBuilder AlertBuilder(ulong entity) - { - return new AlertBuilder(Handle, entity); - } - - /// - /// Creates an alert. - /// - /// An alert. - public Alert Alert() - { - return AlertBuilder().Build(); - } - - /// - /// Creates an alert. - /// - /// The alert name. - /// An alert. - public Alert Alert(string name) - { - return AlertBuilder(name).Build(); - } - - /// - /// Creates an alert. - /// - /// The alert entity. - /// An alert. - public Alert Alert(ulong entity) - { - return AlertBuilder(entity).Build(); - } - - /// - /// Creates a query builder. - /// - /// A query builder. - public QueryBuilder QueryBuilder() - { - return new QueryBuilder(Handle); - } - - /// - /// Creates a query builder. - /// - /// The query name. - /// A query builder. - public QueryBuilder QueryBuilder(string name) - { - return new QueryBuilder(Handle, name); - } - - /// - /// Creates a query builder. - /// - /// The query entity. - /// A query builder. - public QueryBuilder QueryBuilder(ulong entity) - { - return new QueryBuilder(Handle, entity); - } - - /// - /// Creates a query. - /// - /// A query. - public Query Query() - { - return QueryBuilder().Build(); - } - - /// - /// Creates a query. - /// - /// The query name. - /// A query. - public Query Query(string name) - { - return new Query(Handle, Lookup(name)); - } - - /// - /// Creates a query. - /// - /// The query entity. - /// A query. - public Query Query(ulong entity) - { - return new Query(Handle, entity); - } - - /// - /// Creates a pipeline builder. - /// - /// A pipeline builder. - public PipelineBuilder Pipeline() - { - return new PipelineBuilder(Handle); - } - - /// - /// Creates a pipeline builder. - /// - /// The pipeline name. - /// A pipeline builder. - public PipelineBuilder Pipeline(string name) - { - return new PipelineBuilder(Handle, name); - } - - /// - /// Creates a pipeline builder. - /// - /// The pipeline entity. - /// A pipeline builder. - public PipelineBuilder Pipeline(ulong entity) - { - return new PipelineBuilder(Handle, entity); - } - - /// - /// Creates a pipeline builder associated with the provided type. - /// - /// A pipeline builder. - public PipelineBuilder Pipeline() - { - return Pipeline(Type.Id(Handle)); - } - - /// - /// Creates an observer builder. - /// - /// An observer builder. - public ObserverBuilder Observer() - { - return new ObserverBuilder(Handle); - } - - /// - /// Creates an observer builder. - /// - /// The observer name. - /// An observer builder. - public ObserverBuilder Observer(string name) - { - return new ObserverBuilder(Handle, name); - } - - /// - /// Creates an observer. - /// - /// The observer entity. - /// An observer. - public Observer Observer(ulong entity) - { - return new Observer(Handle, entity); - } - - /// - /// Creates a system builder. - /// - /// A system builder. - public SystemBuilder System() - { - return new SystemBuilder(Handle); - } - - /// - /// Creates a system builder. - /// - /// The system name. - /// A system builder. - public SystemBuilder System(string name) - { - return new SystemBuilder(Handle, name); - } - - /// - /// Create a system. - /// - /// The system entity. - /// A system. - public System_ System(ulong entity) - { - return new System_(Handle, entity); - } - - /// - /// Initializes built-in components. - /// - public void InitBuiltinComponents() - { - Import(); - } - - internal WorldContext* GetBindingContext() - { - return (WorldContext*)ecs_get_binding_ctx_fast(Handle); - } - - private WorldContext* EnsureBindingContext() - { - WorldContext* ptr = (WorldContext*)ecs_get_binding_ctx_fast(Handle); - - if (ptr != null) - return ptr; - - ptr = Memory.AllocZeroed(1); - ecs_set_binding_ctx(Handle, ptr, &Functions.WorldContextFree); - return ptr; - } - - private PostFrameContext* AllocatePostFrameContext() - { - PostFrameContext* context = Memory.Alloc(1); - WorldContext.RunPostFrameContexts.Add((nint)context); - return context; - } - - private WorldFinishContext* AllocateWorldFinishContext() - { - WorldFinishContext* context = Memory.Alloc(1); - WorldContext.WorldFinishContexts.Add((nint)context); - return context; - } - - /// - /// Returns native pointer to world. - /// - /// - /// - public static ecs_world_t* To(World world) - { - return world.Handle; - } - - /// - /// Returns world wrapper for native world pointer. - /// - /// - /// - public static World From(ecs_world_t* world) - { - return new World(world); - } - - /// - /// Returns native pointer to world. - /// - /// - /// - public static implicit operator ecs_world_t*(World world) - { - return To(world); - } - - /// - /// Returns world wrapper for native world pointer. - /// - /// - /// - public static implicit operator World(ecs_world_t* world) - { - return From(world); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public bool Equals(World other) - { - return Handle == other.Handle; - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is World world && Equals(world); - } - - /// - /// Returns the hash code of the . - /// - /// - public override int GetHashCode() - { - return Handle->GetHashCode(); - } - - /// - /// Checks if two instances are equal. - /// - /// - /// - /// - public static bool operator ==(World left, World right) - { - return left.Equals(right); - } - - /// - /// Checks if two instances are not equal. - /// - /// - /// - /// - public static bool operator !=(World left, World right) - { - return !(left == right); - } -} - -// Flecs.NET Extensions -public unsafe partial struct World -{ - /// - /// Gets an empty table. - /// - /// - public Table Table() - { - return new Table(Handle); - } - - /// - /// Create new entity in table. - /// - /// The table to which to add the new entity. - /// The new entity. - public Entity Entity(Table table) - { - return Entity(ecs_new_w_table(Handle, table)); - } - - /// - /// Set current with id. - /// - /// The id. - /// The previous id. - public Entity SetWith(ulong with) - { - return new Entity(Handle, ecs_set_with(Handle, with)); - } - - /// - /// Get current with id. - /// - /// The last id provided to ecs_set_with(). - public Entity GetWith() - { - return new Entity(Handle, ecs_get_with(Handle)); - } - - /// - /// All entities created in function are created in scope. All operations - /// called in function (such as lookup) are relative to scope. - /// - /// The entity to use as scope. - /// The callback. - public void Scope(ulong parent, Ecs.WorldCallback callback) - { - ulong prev = ecs_set_scope(Handle, parent); - callback(Handle); - ecs_set_scope(Handle, prev); - } - - /// - /// Same as Scope(parent, func), but with T as parent. - /// - /// The callback. - /// The entity to use as scope. - public void Scope(Ecs.WorldCallback callback) - { - Scope(Type.Id(Handle), callback); - } - - /// - /// Same as Scope(parent, func), but with enum as parent. - /// - /// The entity to use as scope. - /// The callback. - /// The enum. - public void Scope(T value, Ecs.WorldCallback callback) where T : Enum - { - Scope(Type.Id(Handle, value), callback); - } - - /// - /// Defer all operations called in function. If the world is already in - /// deferred mode, do nothing. - /// - /// The callback. - public void Defer(Ecs.WorldCallback callback) - { - ecs_defer_begin(Handle); - callback(Handle); - ecs_defer_end(Handle); - } - - /// - /// All entities created in function are created with id. - /// - /// Id to be added to the created entities. - /// The callback. - public void With(ulong id, Ecs.WorldCallback callback) - { - ulong prev = ecs_set_with(Handle, id); - callback(Handle); - ecs_set_with(Handle, prev); - } - - /// - /// All entities created in function are created with pair. - /// - /// The first id. - /// The second id. - /// The callback. - public void With(ulong first, ulong second, Ecs.WorldCallback callback) - { - With(Ecs.Pair(first, second), callback); - } - - /// - /// All entities created in function are created with type. - /// - /// The callback. - /// The component. - public void With(Ecs.WorldCallback callback) - { - With(Type.Id(Handle), callback); - } - - /// - /// All entities created in function are created with enum. - /// - /// The enum constant. - /// The callback. - /// The enum. - public void With(T value, Ecs.WorldCallback callback) where T : Enum - { - With(Type.Id(Handle, value), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The second id. - /// The callback. - /// The first component. - public void With(ulong second, Ecs.WorldCallback callback) - { - With(Ecs.Pair(second, Handle), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The callback. - /// The first component. - /// The second component. - public void With(Ecs.WorldCallback callback) - { - With(Ecs.Pair(Handle), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The second enum constant id. - /// The callback. - /// The first component. - /// The second enum. - public void With(TSecond second, Ecs.WorldCallback callback) where TSecond : Enum - { - With(Type.Id(Handle, second), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The first enum constant. - /// The callback. - /// The first enum. - /// The second component. - public void With(TFirst first, Ecs.WorldCallback callback) where TFirst : Enum - { - WithSecond(Type.Id(Handle, first), callback); - } - - /// - /// All entities created in function are created with pair. - /// - /// The first id. - /// The callback. - /// The second component. - public void WithSecond(ulong first, Ecs.WorldCallback callback) - { - With(first, Type.Id(Handle), callback); - } - - /// - /// Lookup entity by name. - /// - /// The path to resolve. - /// The entity if found, else 0. - public Entity Lookup(string path) - { - return Lookup(path, true); - } - - /// - /// Lookup entity by name. - /// - /// The path to resolve. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - public Entity Lookup(string path, bool recursive) - { - if (string.IsNullOrEmpty(path)) - return new Entity(Handle, 0); - - using NativeString nativePath = (NativeString)path; - - return new Entity( - Handle, - ecs_lookup_path_w_sep(Handle, 0, nativePath, - Pointers.DefaultSeparator, Pointers.DefaultSeparator, recursive) - ); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, out Entity entity) - { - return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, true, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, bool recursive, out Entity entity) - { - return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, recursive, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The separator. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, string separator, out Entity entity) - { - return TryLookup(path, separator, Ecs.DefaultSeparator, true, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The separator. - /// The root separator. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, string separator, string rootSeparator, out Entity entity) - { - return TryLookup(path, separator, rootSeparator, true, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The separator. - /// The root separator. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, string separator, string rootSeparator, bool recursive, out Entity entity) - { - return (entity = Lookup(path, separator, rootSeparator, recursive)) != 0; - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, out ulong entity) - { - return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, true, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, bool recursive, out ulong entity) - { - return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, recursive, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The separator. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, string separator, out ulong entity) - { - return TryLookup(path, separator, Ecs.DefaultSeparator, true, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The separator. - /// The root separator. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, string separator, string rootSeparator, out ulong entity) - { - return TryLookup(path, separator, rootSeparator, true, out entity); - } - - /// - /// Lookup an entity from a path. - /// - /// The path to resolve. - /// The separator. - /// The root separator. - /// Recursively traverse up the tree until entity is found. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookup(string path, string separator, string rootSeparator, bool recursive, out ulong entity) - { - return (entity = Lookup(path, separator, rootSeparator, recursive)) != 0; - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// If not found as a symbol, lookup as path. - /// If looking up as path, recursively traverse up the tree. - /// The entity if found, else 0. - public Entity LookupSymbol(string symbol, bool lookupAsPath = false, bool recursive = false) - { - if (string.IsNullOrEmpty(symbol)) - return new Entity(Handle, 0); - - using NativeString nativeSymbol = (NativeString)symbol; - - return new Entity( - Handle, - ecs_lookup_symbol(Handle, nativeSymbol, lookupAsPath, recursive) - ); - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookupSymbol(string symbol, out Entity entity) - { - return TryLookupSymbol(symbol, false, false, out entity); - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// If not found as a symbol, lookup as path. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookupSymbol(string symbol, bool lookupAsPath, out Entity entity) - { - return TryLookupSymbol(symbol, lookupAsPath, false, out entity); - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// If not found as a symbol, lookup as path. - /// If looking up as path, recursively traverse up the tree. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookupSymbol(string symbol, bool lookupAsPath, bool recursive, out Entity entity) - { - return (entity = LookupSymbol(symbol, lookupAsPath, recursive)) != 0; - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookupSymbol(string symbol, out ulong entity) - { - return TryLookupSymbol(symbol, false, false, out entity); - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// If not found as a symbol, lookup as path. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookupSymbol(string symbol, bool lookupAsPath, out ulong entity) - { - return TryLookupSymbol(symbol, lookupAsPath, false, out entity); - } - - /// - /// Lookup an entity by its symbol name. - /// - /// The symbol. - /// If not found as a symbol, lookup as path. - /// If looking up as path, recursively traverse up the tree. - /// The entity if found, else 0. - /// True if the entity was found, else false. - public bool TryLookupSymbol(string symbol, bool lookupAsPath, bool recursive, out ulong entity) - { - return (entity = LookupSymbol(symbol, lookupAsPath, recursive)) != 0; - } - - /// - /// Cleanup empty tables. - /// - /// The description object. - /// The number of deleted tables. - public int DeleteEmptyTables(in DeleteEmptyTablesDesc desc) - { - fixed (ecs_delete_empty_tables_desc_t* ptr = &desc.Desc) - return ecs_delete_empty_tables(Handle, ptr); - } -} +using Flecs.NET.Core.BindingContext; +using Flecs.NET.Utilities; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +/// +/// The world is the container of all ECS data and systems. If the world is deleted, all data in the world will be +/// deleted as well. +/// +public readonly unsafe partial struct World : IDisposable, IEquatable +{ + private readonly ecs_world_t* _handle; + + internal ref WorldContext WorldContext => ref *EnsureBindingContext(); + + /// + /// The handle to the C world. + /// + public ref readonly ecs_world_t* Handle => ref _handle; + + /// + /// Constructs a world from an pointer. + /// + /// The world handle. + public World(ecs_world_t* handle) + { + _handle = handle; + } + + /// + /// Creates a flecs world that is owned. + /// + /// + public static World Create() + { + Ecs.Os.OverrideOsApi(); + + World w = new World(ecs_init()); + w.EnsureBindingContext(); + w.InitBuiltinComponents(); + + return w; + } + + /// + /// Creates a flecs world from an pointer that is not owned. + /// + /// A C world. + /// A newly created world. + public static World Create(ecs_world_t* world) + { + Ecs.Os.OverrideOsApi(); + + World w = new World(world); + w.EnsureBindingContext(); + w.InitBuiltinComponents(); + + return w; + } + + /// + /// Creates world from command line arguments. + /// + /// Command line arguments. + /// + public static World Create(params Span args) + { + NativeString* nativeStrings = Memory.AllocZeroed(args.Length); + + for (int i = 0; i < args.Length; i++) + nativeStrings[i] = (NativeString)args[i]; + + Ecs.Os.OverrideOsApi(); + + World w = new World(ecs_init_w_args(args.Length, (byte**)nativeStrings)); + w.EnsureBindingContext(); + w.InitBuiltinComponents(); + + for (int i = 0; i < args.Length; i++) + nativeStrings[i].Dispose(); + + Memory.Free(nativeStrings); + + return w; + } + + /// + /// Calls and cleans up resources. + /// + public void Dispose() + { + if (Handle == null || !Ecs.IsStageOrWorld(Handle)) + return; + + _ = ecs_fini(Handle); + } + + public void Shrink() + { + ecs_shrink(Handle); + } + public void ExclusiveAccessBegin(string threadName) + { + using NativeString nativeThreadName = (NativeString) threadName; + ecs_exclusive_access_begin(Handle, nativeThreadName); + } + public void ExclusiveAccessEnd(bool lockWorld) + { + ecs_exclusive_access_end(Handle, lockWorld); + } + + /// + /// Signals that the application should quit. The next call to returns false. + /// + public void Quit() + { + ecs_quit(Handle); + } + + /// + /// Register action to be executed when world is destroyed. + /// + /// The callback. + public void AtFini(Ecs.WorldFinishCallback callback) + { + WorldFinishContext* context = AllocateWorldFinishContext(); + context->Callback.Set(callback, (delegate*)&Functions.WorldFinishCallbackDelegate); + ecs_atfini(Handle, &Functions.WorldFinishCallback, context); + } + + /// + /// Register action to be executed when world is destroyed. + /// + /// The callback. + public void AtFini(delegate* callback) + { + WorldFinishContext* context = AllocateWorldFinishContext(); + context->Callback.Set(callback, (delegate*)&Functions.WorldFinishCallbackPointer); + ecs_atfini(Handle, &Functions.WorldFinishCallback, context); + } + + /// + /// Test if Quit() has been called. + /// + /// + public bool ShouldQuit() + { + return ecs_should_quit(Handle); + } + + /// + /// Begin frame. + /// + /// + /// + public float FrameBegin(float deltaTime = 0) + { + return ecs_frame_begin(Handle, deltaTime); + } + + /// + /// End frame. + /// + public void FrameEnd() + { + ecs_frame_end(Handle); + } + + /// + /// Begin staging. + /// + /// + public bool ReadonlyBegin(bool multiThreaded = false) + { + return ecs_readonly_begin(Handle, multiThreaded); + } + + /// + /// End staging. + /// + public void ReadonlyEnd() + { + ecs_readonly_end(Handle); + } + + /// + /// Defer operations until end end of frame, or until DeferEnd() is called. + /// + /// + public bool DeferBegin() + { + return ecs_defer_begin(Handle); + } + + /// + /// End block of operations to defer. + /// + /// + public bool DeferEnd() + { + return ecs_defer_end(Handle); + } + + /// + /// Test whether deferring is enabled. + /// + /// + public bool IsDeferred() + { + return ecs_is_deferred(Handle); + } + + /// + /// Configure world to have N stages. + /// + /// + public void SetStageCount(int stages) + { + ecs_set_stage_count(Handle, stages); + } + + /// + /// Get number of configured stages. + /// + /// + public int GetStageCount() + { + return ecs_get_stage_count(Handle); + } + + /// + /// Get current stage id. + /// + /// + public int GetStageId() + { + return ecs_stage_get_id(Handle); + } + + /// + /// Test if is a stage. + /// + /// + public bool IsStage() + { + Ecs.Assert( + flecs_poly_is_(Handle, ecs_world_t_magic) || + flecs_poly_is_(Handle, ecs_stage_t_magic), + nameof(ECS_INVALID_PARAMETER) + ); + return flecs_poly_is_(Handle, ecs_stage_t_magic); + } + + /// + /// Merge world or stage. + /// + public void Merge() + { + ecs_merge(Handle); + } + + /// + /// Get stage-specific world pointer. + /// + /// + /// + public World GetStage(int stageId) + { + return new World(ecs_get_stage(Handle, stageId)); + } + + /// + /// Creates asynchronous stage. + /// + /// + public World AsyncStage() + { + return new World(ecs_stage_new(Handle)); + } + + /// + /// Get actual world. + /// + /// + public World GetWorld() + { + return new World(Handle == null ? null : ecs_get_world(Handle)); + } + + /// + /// Test whether the current world object is readonly. + /// + /// + public bool IsReadOnly() + { + return ecs_stage_is_readonly(Handle); + } + + /// + /// Sets the user context object for the world. + /// + /// The user context object. + /// The user context type. + public void SetCtx(T value) + { + WorldContext.UserContext.Set(ref value); + } + + /// + /// Sets the user context object for the world. The provided callback will be run before the + /// user context object is released by flecs. + /// + /// The user context object. + /// The callback. + /// The user context type. + public void SetCtx(T value, Ecs.UserContextFinish callback) + { + WorldContext.UserContext.Set(ref value, callback); + } + + /// + /// Sets the user context object for the world. The provided callback will be run before the + /// user context object is released by flecs. + /// + /// The user context object. + /// The callback. + /// The user context type. + public void SetCtx(T value, delegate* callback) + { + WorldContext.UserContext.Set(ref value, callback); + } + + /// + /// Gets the user context object for the world. + /// + /// The user context type. + /// + public ref T GetCtx() + { + return ref WorldContext.UserContext.Get(); + } + + /// + /// Preallocate memory for number of entities. + /// + /// + public void Dim(int entityCount) + { + ecs_dim(Handle, entityCount); + } + + /// + /// Set entity range. + /// + /// + /// + public void SetEntityRange(ulong min, ulong max) + { + ecs_set_entity_range(Handle, min, max); + } + + /// + /// Enforce that operations cannot modify entities outside of range. + /// + /// + public void EnableRangeCheck(bool enabled = true) + { + ecs_enable_range_check(Handle, enabled); + } + + /// + /// Set the current scope. + /// + /// The entity to use as scope. + /// The previous scope. + public Entity SetScope(ulong scope) + { + return new Entity(Handle, ecs_set_scope(Handle, scope)); + } + + /// + /// Set the current scope. + /// + /// The entity to use as scope. + /// The previous scope. + public Entity SetScope() + { + return SetScope(Type.Id(Handle)); + } + + /// + /// Set the current scope. + /// + /// The entity to use as scope. + /// The enum. + /// The previous scope. + public Entity SetScope(T value) where T : Enum + { + return SetScope(Type.Id(Handle, value)); + } + + /// + /// Get the current scope. + /// + /// The current scope. + public Entity GetScope() + { + return new Entity(Handle, ecs_get_scope(Handle)); + } + + /// + /// Set search path. + /// + /// + /// + public ulong* SetLookupPath(ulong* searchPath) + { + return ecs_set_lookup_path(Handle, searchPath); + } + + /// + /// Lookup entity by name. + /// + /// The path to resolve. + /// The separator. + /// The root separator. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + public Entity Lookup( + string path, + string separator = Ecs.DefaultSeparator, + string rootSeparator = Ecs.DefaultSeparator, + bool recursive = true) + { + if (string.IsNullOrEmpty(path)) + return new Entity(Handle, 0); + + using NativeString nativePath = (NativeString)path; + using NativeString nativeSeparator = (NativeString)separator; + using NativeString nativeRootSeparator = (NativeString)rootSeparator; + + return new Entity( + Handle, + ecs_lookup_path_w_sep(Handle, 0, nativePath, nativeSeparator, nativeRootSeparator, recursive) + ); + } + + /// + /// Sets the data of a component. + /// + /// The id of the component to set. + /// The size of the pointed-to data. + /// The pointer to the data. + /// Reference to self. + public World SetUntyped(ulong id, int size, void* data) + { + Entity(id).SetUntyped(id, size, data); + return this; + } + + /// + /// Sets the data of a component. + /// + /// The id of the component to set. + /// The pointer to the data. + /// Reference to self. + public World SetUntyped(ulong id, void* data) + { + Entity(id).SetUntyped(id, data); + return this; + } + + /// + /// Sets the data of a pair component. + /// + /// The first id of the pair. + /// The second id of the pair. + /// The size of the pointed-to data. + /// The pointer to the data. + /// Reference to self. + public World SetUntyped(ulong first, ulong second, int size, void* data) + { + Entity(first).SetUntyped(first, second, size, data); + return this; + } + + /// + /// Sets the data of a singleton component. + /// + /// The pointer to the data. + /// The component type. + /// Reference to self. + public World SetPtr(T* data) + { + Entity().SetPtr(data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The second id of the pair. + /// The pointer to the data. + /// The first type of the pair. + /// Reference to self. + public World SetPtr(ulong second, TFirst* data) + { + Entity().SetPtr(second, data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World SetPtr(TFirst* data) + { + Entity().SetPtr(data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World SetPtr(TSecond* data) + { + Entity().SetPtr(data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The second id (enum member) of the pair. + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World SetPtr(TSecond second, TFirst* data) where TSecond : Enum + { + return SetPtr(Type.Id(Handle, second), data); + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The first id (enum member) of the pair. + /// The pointer to the data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World SetPtr(TFirst first, TSecond* data) where TFirst : Enum + { + return SetPtrSecond(Type.Id(Handle, first), data); + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The first id of the pair. + /// The pointer to the data. + /// The second type of the pair. + /// Reference to self. + public World SetPtrSecond(ulong first, TSecond* data) + { + Entity(first).SetPtrSecond(first, data); + return this; + } + + /// + /// Sets the data of a singleton component. + /// + /// The component data. + /// The component type. + /// Reference to self. + public World Set(in T data) + { + Entity().Set(in data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The second id of the pair. + /// The component data. + /// The first type of the pair. + /// Reference to self. + public World Set(ulong second, in TFirst data) + { + Entity().Set(second, in data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World Set(in TFirst data) + { + Entity().Set(in data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World Set(in TSecond data) + { + Entity().Set(in data); + return this; + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The second id (enum member) of the pair. + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World Set(TSecond second, in TFirst data) where TSecond : Enum + { + return Set(Type.Id(Handle, second), in data); + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The first id (enum member) of the pair. + /// The component data. + /// The first type of the pair. + /// The second type of the pair. + /// Reference to self. + public World Set(TFirst first, in TSecond data) where TFirst : Enum + { + return SetSecond(Type.Id(Handle, first), in data); + } + + /// + /// Sets the data of a singleton pair component. + /// + /// The first id of the pair. + /// The component data. + /// The second type of the pair. + /// Reference to self. + public World SetSecond(ulong first, in TSecond data) + { + Entity(first).SetSecond(first, in data); + return this; + } + + /// + /// Ensure singleton component inside a callback. + /// + /// + /// + /// + public void Insert(Ecs.InsertRefCallback callback) + { + Invoker.Insert(Handle, Type.Id(Handle), callback); + } + + /// + /// Get mutable pointer to singleton component. + /// + /// + /// + public T* EnsurePtr() where T : unmanaged + { + return Entity().EnsurePtr(); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TFirst* EnsurePtr(ulong second) where TFirst : unmanaged + { + return Entity().EnsurePtr(second); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + /// + public TFirst* EnsurePtr(TSecond second) + where TFirst : unmanaged + where TSecond : Enum + { + return EnsurePtr(Type.Id(Handle, second)); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + /// + public TSecond* EnsurePtr(TFirst first) + where TFirst : Enum + where TSecond : unmanaged + { + return EnsureSecondPtr(Type.Id(Handle, first)); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TFirst* EnsureFirstPtr() where TFirst : unmanaged + { + return Entity().EnsureFirstPtr(); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TSecond* EnsureSecondPtr() where TSecond : unmanaged + { + return Entity().EnsureSecondPtr(); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TSecond* EnsureSecondPtr(ulong first) where TSecond : unmanaged + { + return Entity(first).EnsureSecondPtr(first); + } + + /// + /// Get managed mutable reference to singleton component. + /// + /// + /// + public ref T Ensure() + { + return ref Entity().Ensure(); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TFirst Ensure(ulong second) + { + return ref Entity().Ensure(second); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + /// + public ref TFirst Ensure(TSecond second) where TSecond : Enum + { + return ref Ensure(Type.Id(Handle, second)); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + /// + public ref TSecond Ensure(TFirst first) where TFirst : Enum + { + return ref EnsureSecond(Type.Id(Handle, first)); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TFirst EnsureFirst() + { + return ref Entity().EnsureFirst(); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TSecond EnsureSecond() + { + return ref Entity().EnsureSecond(); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TSecond EnsureSecond(ulong first) + { + return ref Entity(first).EnsureSecond(first); + } + + /// + /// Mark singleton component as modified. + /// + /// + public void Modified() + { + Entity().Modified(); + } + + /// + /// Mark singleton pair as modified. + /// + /// + /// + public void Modified(ulong second) + { + Entity().Modified(second); + } + + /// + /// Mark singleton pair as modified. + /// + /// + /// + public void Modified() + { + Entity().Modified(); + } + + /// + /// Mark singleton pair as modified. + /// + /// + /// + /// + public void Modified(TSecond second) where TSecond : Enum + { + Modified(Type.Id(Handle, second)); + } + + /// + /// Mark singleton pair as modified. + /// + /// + /// + /// + public void Modified(TFirst first) where TFirst : Enum + { + ModifiedSecond(Type.Id(Handle, first)); + } + + /// + /// Mark singleton pair as modified. + /// + /// + /// + public void ModifiedSecond(ulong first) + { + Entity(first).ModifiedSecond(first); + } + + /// + /// Gets ref to singleton component. + /// + /// + /// + public Ref GetRef() + { + return Entity().GetRef(); + } + + /// + /// Gets ref to singleton pair. + /// + /// + /// + /// + public Ref GetRef(ulong second) + { + return Entity().GetRef(second); + } + + /// + /// Gets ref to singleton pair. + /// + /// + /// + /// + /// + public Ref GetRef(TSecond second) where TSecond : Enum + { + return GetRef(Type.Id(Handle, second)); + } + + /// + /// Gets ref to singleton pair. + /// + /// + /// + /// + /// + public Ref GetRef(TFirst first) where TFirst : Enum + { + return GetRefSecond(Type.Id(Handle, first)); + } + + /// + /// Gets ref to singleton pair. + /// + /// + /// + /// + public Ref GetRefFirst() + { + return Entity().GetRefFirst(); + } + + /// + /// Gets ref to singleton pair. + /// + /// + /// + /// + public Ref GetRefSecond() + { + return Entity().GetRefSecond(); + } + + /// + /// Gets ref to singleton pair. + /// + /// + /// + /// + public Ref GetRefSecond(ulong first) + { + return Entity(first).GetRefSecond(first); + } + + /// + /// Gets pointer to singleton component. + /// + /// + /// + public T* GetPtr() where T : unmanaged + { + return Entity().GetPtr(); + } + + /// + /// Gets pointer to singleton pair. + /// + /// + /// + /// + public TFirst* GetPtr(ulong second) where TFirst : unmanaged + { + return Entity().GetPtr(second); + } + + /// + /// Gets pointer to singleton pair. + /// + /// + /// + /// + /// + public TFirst* GetPtr(TSecond second) + where TFirst : unmanaged + where TSecond : Enum + { + return GetPtr(Type.Id(Handle, second)); + } + + /// + /// Gets pointer to singleton pair. + /// + /// + /// + /// + /// + public TSecond* GetPtr(TFirst first) + where TFirst : Enum + where TSecond : unmanaged + { + return GetSecondPtr(Type.Id(Handle, first)); + } + + /// + /// Gets pointer to singleton pair. + /// + /// + /// + /// + public TFirst* GetFirstPtr() where TFirst : unmanaged + { + return Entity().GetFirstPtr(); + } + + + /// + /// Gets pointer to singleton pair. + /// + /// + /// + /// + public TSecond* GetSecondPtr() where TSecond : unmanaged + { + return Entity().GetSecondPtr(); + } + + /// + /// Gets pointer to singleton pair. + /// + /// + /// + /// + public TSecond* GetSecondPtr(ulong first) where TSecond : unmanaged + { + return Entity(first).GetSecondPtr(first); + } + + /// + /// Gets managed reference to singleton component. + /// + /// + /// + public ref readonly T Get() + { + return ref Entity().Get(); + } + + /// + /// Gets managed reference to singleton pair. + /// + /// + /// + /// + public ref readonly TFirst Get(ulong second) + { + return ref Entity().Get(second); + } + + /// + /// Gets managed reference to singleton pair. + /// + /// + /// + /// + /// + public ref readonly TFirst Get(TSecond second) where TSecond : Enum + { + return ref Get(Type.Id(Handle, second)); + } + + /// + /// Gets managed reference to singleton pair. + /// + /// + /// + /// + /// + public ref readonly TSecond Get(TFirst first) where TFirst : Enum + { + return ref GetSecond(Type.Id(Handle, first)); + } + + /// + /// Gets managed reference to singleton pair. + /// + /// + /// + /// + public ref readonly TFirst GetFirst() + { + return ref Entity().GetFirst(); + } + + /// + /// Gets managed reference to singleton pair. + /// + /// + /// + /// + public ref readonly TSecond GetSecond() + { + return ref Entity().GetSecond(); + } + + /// + /// Gets managed reference to singleton pair. + /// + /// + /// + /// + public ref readonly TSecond GetSecond(ulong first) + { + return ref Entity(first).GetSecond(first); + } + + /// + /// Get mutable pointer to singleton component. + /// + /// + /// + public T* GetMutPtr() where T : unmanaged + { + return Entity().GetMutPtr(); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TFirst* GetMutPtr(ulong second) where TFirst : unmanaged + { + return Entity().GetMutPtr(second); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + /// + public TFirst* GetMutPtr(TSecond second) + where TFirst : unmanaged + where TSecond : Enum + { + return GetMutPtr(Type.Id(Handle, second)); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + /// + public TSecond* GetMutPtr(TFirst first) + where TFirst : Enum + where TSecond : unmanaged + { + return GetMutSecondPtr(Type.Id(Handle, first)); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TFirst* GetMutFirstPtr() where TFirst : unmanaged + { + return Entity().GetMutFirstPtr(); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TSecond* GetMutSecondPtr() where TSecond : unmanaged + { + return Entity().GetMutSecondPtr(); + } + + /// + /// Get mutable pointer to singleton pair. + /// + /// + /// + /// + public TSecond* GetMutSecondPtr(ulong first) where TSecond : unmanaged + { + return Entity(first).GetMutSecondPtr(first); + } + + /// + /// Get managed mutable reference to singleton component. + /// + /// + /// + public ref T GetMut() + { + return ref Entity().GetMut(); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TFirst GetMut(ulong second) + { + return ref Entity().GetMut(second); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + /// + public ref TFirst GetMut(TSecond second) where TSecond : Enum + { + return ref GetMut(Type.Id(Handle, second)); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + /// + public ref TSecond GetMut(TFirst first) where TFirst : Enum + { + return ref GetMutSecond(Type.Id(Handle, first)); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TFirst GetMutFirst() + { + return ref Entity().GetMutFirst(); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TSecond GetMutSecond() + { + return ref Entity().GetMutSecond(); + } + + /// + /// Get managed mutable reference to singleton pair. + /// + /// + /// + /// + public ref TSecond GetMutSecond(ulong first) + { + return ref Entity(first).GetMutSecond(first); + } + + /// + /// Get a readonly singleton component inside a callback. + /// + /// + /// + public void Read(Ecs.ReadRefCallback callback) + { + Invoker.Read(Handle, Type.Id(Handle), callback); + } + + /// + /// Get a mutable singleton component inside a callback. + /// + /// + /// + public void Write(Ecs.WriteRefCallback callback) + { + Invoker.Write(Handle, Type.Id(Handle), callback); + } + + /// + /// Test if world has singleton component. + /// + /// + /// + public bool Has(ulong id) + { + return Entity(id).Has(id); + } + + /// + /// Test if world has singleton pair. + /// + /// + /// + /// + public bool Has(ulong first, ulong second) + { + return Entity(first).Has(first, second); + } + + /// + /// Test if world has singleton component. + /// + /// + /// + public bool Has() + { + return Entity().Has(); + } + + /// + /// Test if world has singleton component. + /// + /// + /// + /// + public bool Has(T value) where T : Enum + { + return Entity().Has(value); + } + + /// + /// Test if world has singleton pair. + /// + /// + /// + /// + public bool Has(ulong second) + { + return Entity().Has(second); + } + + /// + /// Test if world has singleton pair. + /// + /// + /// + /// + public bool Has() + { + return Entity().Has(); + } + + /// + /// Test if world has singleton pair. + /// + /// + /// + /// + /// + public bool Has(TSecond second) where TSecond : Enum + { + return Has(Type.Id(Handle, second)); + } + + /// + /// Test if world has singleton pair. + /// + /// + /// + /// + /// + public bool Has(TFirst first) where TFirst : Enum + { + return HasSecond(Type.Id(Handle, first)); + } + + /// + /// Test if world has singleton pair. + /// + /// + /// + /// + public bool HasSecond(ulong first) + { + return Entity(first).Has(first, Type.Id(Handle)); + } + + /// + /// Add singleton component. + /// + /// + public void Add(ulong id) + { + Entity(id).Add(id); + } + + /// + /// Add singleton pair. + /// + /// + /// + public void Add(ulong first, ulong second) + { + Entity(first).Add(first, second); + } + + /// + /// Add singleton component. + /// + /// + public void Add() + { + Entity().Add(); + } + + /// + /// Add singleton component. + /// + /// + /// + public void Add(T value) where T : Enum + { + Entity().Add(value); + } + + /// + /// Add singleton pair. + /// + /// + /// + public void Add(ulong second) + { + Entity().Add(second); + } + + /// + /// Add singleton pair. + /// + /// + /// + public void Add() + { + Entity().Add(); + } + + /// + /// Add singleton pair. + /// + /// + /// + /// + public void Add(TSecond second) where TSecond : Enum + { + Add(Type.Id(Handle, second)); + } + + /// + /// Add singleton pair. + /// + /// + /// + /// + public void Add(TFirst first) where TFirst : Enum + { + AddSecond(Type.Id(Handle, first)); + } + + /// + /// Add singleton pair. + /// + /// + /// + public void AddSecond(ulong first) + { + Entity(first).AddSecond(first); + } + + /// + /// Remove singleton id. + /// + /// + public void Remove(ulong id) + { + Entity(id).Remove(id); + } + + /// + /// Remove singleton pair. + /// + /// + /// + public void Remove(ulong first, ulong second) + { + Entity(first).Remove(first, second); + } + + /// + /// Remove singleton component. + /// + /// + public void Remove() + { + Entity().Remove(); + } + + /// + /// Remove singleton id. + /// + /// + /// + public void Remove(T value) where T : Enum + { + Entity().Remove(value); + } + + /// + /// Remove singleton pair. + /// + /// + /// + public void Remove(ulong second) + { + Entity().Remove(second); + } + + /// + /// Remove singleton pair. + /// + /// + /// + public void Remove() + { + Entity().Remove(); + } + + /// + /// Remove singleton pair. + /// + /// + /// + /// + public void Remove(TSecond second) where TSecond : Enum + { + Remove(Type.Id(Handle, second)); + } + + /// + /// Remove singleton pair. + /// + /// + /// + /// + public void Remove(TFirst first) where TFirst : Enum + { + RemoveSecond(Type.Id(Handle, first)); + } + + /// + /// Remove singleton pair. + /// + /// + /// + public void RemoveSecond(ulong first) + { + Entity(first).Remove(first); + } + + /// + /// Iterate entities in root of world + /// + /// + public void Children(Ecs.EachEntityCallback func) + { + Entity(0).Children(func); + } + + /// + /// Get singleton entity for type. + /// + /// + /// + public Entity Singleton() + { + return Entity(); + } + + /// + /// Get target for a given pair from a singleton entity. + /// + /// + /// + /// + public Entity Target(ulong id, int index = 0) + { + return Entity(ecs_get_target(Handle, id, id, index)); + } + + /// + /// Get target for a given pair from a singleton entity. + /// + /// + /// + /// + /// + public Entity Target(ulong id, ulong rel, int index = 0) + { + return Entity(ecs_get_target(Handle, id, rel, index)); + } + + /// + /// Get target for a given pair from a singleton entity. + /// + /// + /// + /// + public Entity Target(int index = 0) + { + return Entity(ecs_get_target(Handle, Type.Id(Handle), Type.Id(Handle), index)); + } + + /// + /// Get target for a given pair from a singleton entity. + /// + /// + /// + /// + /// + public Entity Target(ulong rel, int index = 0) + { + return Entity(ecs_get_target(Handle, Type.Id(Handle), rel, index)); + } + + /// + /// Get target for a given pair from a singleton entity. + /// + /// + /// + /// + /// + public Entity Target(T value, int index = 0) where T : Enum + { + return Entity(ecs_get_target(Handle, Entity(value), Entity(value), index)); + } + + /// + /// Get target for a given pair from a singleton entity. + /// + /// + /// + /// + /// + /// + public Entity Target(T value, ulong rel, int index = 0) where T : Enum + { + return Entity(ecs_get_target(Handle, Entity(value), rel, index)); + } + + /// + /// Creates alias for component. + /// + /// + /// + public Entity Use(ulong entity, string alias = "") + { + if (string.IsNullOrEmpty(alias)) + alias = NativeString.GetString(ecs_get_name(Handle, entity)); + + using NativeString nativeAlias = (NativeString)alias; + ecs_set_alias(Handle, entity, nativeAlias); + return Entity(entity); + } + + /// + /// Creates alias for component. + /// + /// + /// + /// + public Entity Use(string alias = "") + { + ulong entity = Type.Id(Handle); + + if (string.IsNullOrEmpty(alias)) + alias = NativeString.GetString(ecs_get_name(Handle, entity)); + + using NativeString nativeAlias = (NativeString)alias; + + ecs_set_alias(Handle, entity, nativeAlias); + return Entity(entity); + } + + /// + /// Creates alias for component. + /// + /// + /// + /// + /// + public Entity Use(T value, string alias = "") where T : Enum + { + return Use(Type.Id(Handle, value), alias); + } + + /// + /// Creates alias for component. + /// + /// + /// + /// + public Entity Use(string name, string alias = "") + { + using NativeString nativeName = (NativeString)name; + + ulong entity = ecs_lookup_path_w_sep(Handle, 0, nativeName, + Pointers.DefaultSeparator, Pointers.DefaultSeparator, true); + + Ecs.Assert(entity != 0, nameof(ECS_INVALID_PARAMETER)); + + using NativeString nativeAlias = (NativeString)alias; + + ecs_set_alias(Handle, entity, nativeAlias); + return Entity(entity); + } + + /// + /// Count entities matching a component. + /// + /// + /// + public int Count(ulong id) + { + return ecs_count_id(Handle, id); + } + + /// + /// Count entities matching a pair. + /// + /// + /// + /// + public int Count(ulong first, ulong second) + { + return Count(Ecs.Pair(first, second)); + } + + /// + /// Count entities matching a component. + /// + /// + /// + public int Count() + { + return Count(Type.Id(Handle)); + } + + /// + /// Count entities matching a component. + /// + /// + /// + /// + public int Count(T value) where T : Enum + { + return Count(Type.Id(Handle, value)); + } + + /// + /// Count entities matching a pair. + /// + /// + /// + /// + public int Count(ulong second) + { + return Count(Ecs.Pair(second, Handle)); + } + + /// + /// Count entities matching a pair. + /// + /// + /// + /// + public int Count() + { + return Count(Ecs.Pair(Handle)); + } + + /// + /// Count entities matching a pair. + /// + /// + /// + /// + /// + public int Count(TSecond second) where TSecond : Enum + { + return Count(Type.Id(Handle, second)); + } + + /// + /// Count entities matching a pair. + /// + /// + /// + /// + /// + public int Count(TFirst first) where TFirst : Enum + { + return CountSecond(Type.Id(Handle, first)); + } + + /// + /// Count entities matching a pair. + /// + /// + /// + /// + public int CountSecond(ulong first) + { + return Count(first, Type.Id(Handle)); + } + + /// + /// All entities created in function are created with id. + /// + /// Id to be added to the created entities. + /// The callback. + public void With(ulong id, Action callback) + { + ulong prev = ecs_set_with(Handle, id); + callback(); + ecs_set_with(Handle, prev); + } + + /// + /// All entities created in function are created with pair. + /// + /// The first id. + /// The second id. + /// The callback. + public void With(ulong first, ulong second, Action callback) + { + With(Ecs.Pair(first, second), callback); + } + + /// + /// All entities created in function are created with type. + /// + /// The callback. + /// The component. + public void With(Action callback) + { + With(Type.Id(Handle), callback); + } + + /// + /// All entities created in function are created with enum. + /// + /// The enum constant. + /// The callback. + /// The enum. + public void With(T value, Action callback) where T : Enum + { + With(Type.Id(Handle, value), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The second id. + /// The callback. + /// The first component. + public void With(ulong second, Action callback) + { + With(Ecs.Pair(second, Handle), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The callback. + /// The first component. + /// The second component. + public void With(Action callback) + { + With(Ecs.Pair(Handle), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The second enum constant id. + /// The callback. + /// The first component. + /// The second enum. + public void With(TSecond second, Action callback) where TSecond : Enum + { + With(Type.Id(Handle, second), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The first enum constant. + /// The callback. + /// The first enum. + /// The second component. + public void With(TFirst first, Action callback) where TFirst : Enum + { + WithSecond(Type.Id(Handle, first), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The first id. + /// The callback. + /// The second component. + public void WithSecond(ulong first, Action callback) + { + With(first, Type.Id(Handle), callback); + } + + /// + /// All entities created in function are created in scope. All operations + /// called in function (such as lookup) are relative to scope. + /// + /// The entity to use as scope. + /// The callback. + public void Scope(ulong parent, Action callback) + { + ulong prev = ecs_set_scope(Handle, parent); + callback(); + ecs_set_scope(Handle, prev); + } + + /// + /// Same as Scope(parent, callback), but with T as parent. + /// + /// The callback. + /// The entity to use as scope. + public void Scope(Action callback) + { + Scope(Type.Id(Handle), callback); + } + + /// + /// Same as Scope(parent, callback), but with enum as parent. + /// + /// The entity to use as scope. + /// The callback. + /// The enum. + public void Scope(T value, Action callback) where T : Enum + { + Scope(Type.Id(Handle, value), callback); + } + + /// + /// Use provided scope for operations ran on returned world. + /// + /// + /// + public ScopedWorld Scope(ulong parent) + { + return new ScopedWorld(Handle, parent); + } + + /// + /// Use provided scope for operations ran on returned world. + /// + /// + /// + public ScopedWorld Scope() + { + return Scope(Type.Id(Handle)); + } + + /// + /// Use provided scope for operations ran on returned world. + /// + /// + /// + /// + public ScopedWorld Scope(T value) where T : Enum + { + return Scope(Type.Id(Handle, value)); + } + + /// + /// Use provided scope for operations ran on returned world. + /// + /// + /// + public ScopedWorld Scope(string name) + { + return Scope(Entity(name)); + } + + /// + /// Delete all entities with specified id. + /// + /// + public void DeleteWith(ulong id) + { + ecs_delete_with(Handle, id); + } + + /// + /// Delete all entities with specified pair. + /// + /// + /// + public void DeleteWith(ulong first, ulong second) + { + DeleteWith(Ecs.Pair(first, second)); + } + + /// + /// Delete all entities with specified component. + /// + /// + public void DeleteWith() + { + DeleteWith(Type.Id(Handle)); + } + + /// + /// Delete all entities with specified enum. + /// + /// + /// + public void DeleteWith(T value) where T : Enum + { + DeleteWith(Type.Id(Handle, value)); + } + + /// + /// Delete all entities with specified pair. + /// + /// + /// + public void DeleteWith(ulong second) + { + DeleteWith(Ecs.Pair(second, Handle)); + } + + /// + /// Delete all entities with specified pair. + /// + /// + /// + public void DeleteWith() + { + DeleteWith(Ecs.Pair(Handle)); + } + + /// + /// Delete all entities with specified pair. + /// + /// + /// + /// + public void DeleteWith(TSecond second) where TSecond : Enum + { + DeleteWith(Type.Id(Handle, second)); + } + + /// + /// Delete all entities with specified pair. + /// + /// + /// + /// + public void DeleteWith(TFirst first) where TFirst : Enum + { + DeleteWithSecond(Type.Id(Handle, first)); + } + + /// + /// Delete all entities with specified pair. + /// + /// + /// + public void DeleteWithSecond(ulong first) + { + DeleteWith(Ecs.PairSecond(first, Handle)); + } + + /// + /// Remove all instances of specified id. + /// + /// + public void RemoveAll(ulong id) + { + ecs_remove_all(Handle, id); + } + + /// + /// Remove all instances of specified pair. + /// + /// + /// + public void RemoveAll(ulong first, ulong second) + { + RemoveAll(Ecs.Pair(first, second)); + } + + /// + /// Remove all instances of specified component. + /// + /// + public void RemoveAll() + { + RemoveAll(Type.Id(Handle)); + } + + /// + /// Remove all instances of specified enum. + /// + /// + /// + public void RemoveAll(T value) where T : Enum + { + RemoveAll(Type.Id(Handle, value)); + } + + /// + /// Remove all instances of specified pair. + /// + /// + /// + public void RemoveAll(ulong second) + { + RemoveAll(Ecs.Pair(second, Handle)); + } + + /// + /// Remove all instances of specified pair. + /// + /// + /// + public void RemoveAll() + { + RemoveAll(Ecs.Pair(Handle)); + } + + /// + /// Remove all instances of specified pair. + /// + /// + /// + /// + public void RemoveAll(TSecond second) where TSecond : Enum + { + RemoveAll(Type.Id(Handle, second)); + } + + /// + /// Remove all instances of specified pair. + /// + /// + /// + /// + public void RemoveAll(TFirst first) where TFirst : Enum + { + RemoveAllSecond(Type.Id(Handle, first)); + } + + /// + /// Remove all instances of specified pair. + /// + /// + /// + public void RemoveAllSecond(ulong first) + { + RemoveAll(Ecs.PairSecond(first, Handle)); + } + + /// + /// Defer all operations called in function. If the world is already in + /// deferred mode, do nothing. + /// + /// The callback. + public void Defer(Action callback) + { + ecs_defer_begin(Handle); + callback(); + ecs_defer_end(Handle); + } + + /// + /// Suspend deferring operations. + /// + public void DeferSuspend() + { + ecs_defer_suspend(Handle); + } + + /// + /// Resume deferring operations. + /// + public void DeferResume() + { + ecs_defer_resume(Handle); + } + + /// + /// Check if entity id exists in the world. + /// + /// + /// + public bool Exists(ulong entity) + { + return ecs_exists(Handle, entity); + } + + /// + /// Check if entity id exists in the world. + /// + /// + /// + public bool IsAlive(ulong entity) + { + return ecs_is_alive(Handle, entity); + } + + /// + /// Check if entity id is valid. + /// + /// + /// + public bool IsValid(ulong entity) + { + return ecs_is_valid(Handle, entity); + } + + /// + /// Get alive entity for id. + /// + /// + /// + public Entity GetAlive(ulong entity) + { + return Entity(ecs_get_alive(Handle, entity)); + } + + /// + /// Ensures that entity with provided generation is alive. + /// + /// + /// + public Entity MakeAlive(ulong entity) + { + ecs_make_alive(Handle, entity); + return Entity(entity); + } + + /// + /// Override the generation of an entity. + /// + /// The entity for which to set the generation with the new generation. + public void SetVersion(ulong entity) + { + ecs_set_version(Handle, entity); + } + + /// + /// Run callback after completing frame. + /// + /// The callback. + public void RunPostFrame(Ecs.PostFrameCallback callback) + { + PostFrameContext* postFrameContext = AllocatePostFrameContext(); + postFrameContext->Callback.Set(callback, (delegate*)&Functions.PostFrameCallbackDelegate); + ecs_run_post_frame(Handle, &Functions.PostFrameCallback, postFrameContext); + } + + /// + /// Run callback after completing frame. + /// + /// The callback. + public void RunPostFrame(delegate* callback) + { + PostFrameContext* postFrameContext = AllocatePostFrameContext(); + postFrameContext->Callback.Set(callback, (delegate*)&Functions.PostFrameCallbackPointer); + ecs_run_post_frame(Handle, &Functions.PostFrameCallback, postFrameContext); + } + + /// + /// Get the world info. + /// + /// + public WorldInfo GetInfo() + { + return new WorldInfo(ecs_get_world_info(Handle)); + } + + /// + /// Get delta time. + /// + /// + public float DeltaTime() + { + return ecs_get_world_info(Handle)->delta_time; + } + + /// + /// Get default id. + /// + /// + [SuppressMessage("Usage", "CA1822")] + public Id Id() + { + return default; + } + + /// + /// Get id from string expression. + /// + /// The string expression. + /// + public Id Id(string expr) + { + return new Id(Handle, expr); + } + + /// + /// Get id from id value. + /// + /// + /// + public Id Id(ulong id) + { + return new Id(Handle, id); + } + + /// + /// Get pair from id values. + /// + /// + /// + /// + public Id Id(ulong first, ulong second) + { + return new Id(Handle, first, second); + } + + /// + /// Get id from a type. + /// + /// + /// + public Id Id() + { + return new Id(Handle, Type.Id(Handle)); + } + + /// + /// Get id from an enum. + /// + /// + /// + /// + public Id Id(T value) where T : Enum + { + return new Id(Handle, Type.Id(Handle, value)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id Id(ulong second) + { + return Id(Type.Id(Handle), second); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id Id() + { + return Id(Type.Id(Handle), Type.Id(Handle)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + /// + public Id Id(TSecond second) where TSecond : Enum + { + return Id(Type.Id(Handle, second)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + /// + public Id Id(TFirst first) where TFirst : Enum + { + return IdSecond(Type.Id(Handle, first)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id IdSecond(ulong first) + { + return Id(first, Type.Id(Handle)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id Pair(ulong first, ulong second) + { + return Id(first, second); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id Pair(T value) where T : Enum + { + return Id(Type.Id(Handle, value)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id Pair(ulong second) + { + return Id(second); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id Pair() + { + return Id(); + } + + /// + /// Get pair id. + /// + /// + /// + /// + /// + public Id Pair(TSecond second) where TSecond : Enum + { + return Pair(Type.Id(Handle, second)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + /// + public Id Pair(TFirst first) where TFirst : Enum + { + return PairSecond(Type.Id(Handle, first)); + } + + /// + /// Get pair id. + /// + /// + /// + /// + public Id PairSecond(ulong first) + { + return IdSecond(first); + } + + /// + /// Creates an . + /// + /// + public UntypedComponent Component() + { + return new UntypedComponent(Handle); + } + + /// + /// Creates an from id. + /// + /// + /// + public UntypedComponent Component(ulong id) + { + return new UntypedComponent(Handle, id); + } + + /// + /// Creates an from name. + /// + /// + /// + public UntypedComponent Component(string name) + { + return new UntypedComponent(Handle, name); + } + + /// + /// Find or register component. + /// + /// + /// + public Component Component() + { + return new Component(Handle); + } + + /// + /// Get component associated with name. + /// + /// + /// + /// + public Component Component(string name) + { + return new Component(Handle, name); + } + + /// + /// Get component with associated with id. + /// + /// + /// + /// + public Component Component(ulong id) + { + return new Component(Handle, id); + } + + /// + /// Creates an entity. + /// + /// + public Entity Entity() + { + return new Entity(Handle); + } + + /// + /// Creates an entity from id. + /// + /// + /// + public Entity Entity(ulong id) + { + return new Entity(Handle, id); + } + + /// + /// Creates an entity from name. + /// + /// + /// + public Entity Entity(string name) + { + return new Entity(Handle, name); + } + + /// + /// Creates an entity from type. + /// + /// + /// + public Entity Entity() + { + return new Entity(Handle, Type.Id(Handle)); + } + + /// + /// Creates an entity that's associated with a type. + /// + /// + /// + /// + public Entity Entity(string name) + { + return new Entity(Handle, Type.Id(Handle, false, false, 0, name)); + } + + /// + /// Convert enum constant to entity. + /// + /// + /// + /// + public Entity Entity(T value) where T : Enum + { + return new Entity(Handle, Type.Id(Handle, value)); + } + + /// + /// Creates a prefab. + /// + /// + public Entity Prefab() + { + return new Entity(Handle).Add(EcsPrefab); + } + + /// + /// Creates a prefab with the provided name. + /// + /// + public Entity Prefab(string name) + { + return new Entity(Handle, name).Add(EcsPrefab); + } + + /// + /// Creates a prefab that's associated with a type. + /// + /// + /// + public Entity Prefab() + { + Ecs.Assert( typeof(T).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance ).Length == 0, "Prefab types cannot have fields, while the following type does: " + Type.FullName); + return new Entity(Handle, Type.Id(Handle, false, false, 0)).Add(EcsPrefab); + } + + /// + /// Creates a prefab that's associated with a type. + /// + /// + /// + /// + public Entity Prefab(string name) + { + Ecs.Assert( typeof(T).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance ).Length == 0, "Prefab types cannot have fields, while the following type does: " + Type.FullName); + return new Entity(Handle, Type.Id(Handle, false, false, 0, name)).Add(EcsPrefab); + } + + /// + /// Creates a new event. + /// + /// + /// + public EventBuilder Event(ulong eventId) + { + return new EventBuilder(Handle, eventId); + } + + /// + /// Creates a new event. + /// + /// + /// + public EventBuilder Event() + { + return new EventBuilder(Handle, Type.Id(Handle)); + } + + /// + /// Creates a new event. + /// + /// + /// + /// + public EventBuilder Event(T value) where T : Enum + { + return new EventBuilder(Handle, Type.Id(Handle, value)); + } + + /// + /// Creates a new term. + /// + /// + public Term Term() + { + return new Term(Handle); + } + + /// + /// Creates a new term. + /// + /// + /// + public Term Term(ecs_term_t value) + { + return new Term(Handle, value); + } + + /// + /// Creates a new term. + /// + /// + /// + public Term Term(ulong id) + { + return new Term(Handle, id); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + public Term Term(ulong first, ulong second) + { + return new Term(Handle, first, second); + } + + /// + /// Creates a new term. + /// + /// + /// + public Term Term() + { + return new Term(Handle, Type.Id(Handle)); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + public Term Term(T value) where T : Enum + { + return Term(Type.Id(Handle, value)); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + public Term Term(ulong second) + { + return new Term(Handle, Ecs.Pair(second, Handle)); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + public Term Term() + { + return new Term(Handle, Ecs.Pair(Handle)); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + /// + public Term Term(TSecond second) where TSecond : Enum + { + return Term(Type.Id(Handle, second)); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + /// + public Term Term(TFirst first) where TFirst : Enum + { + return TermSecond(Type.Id(Handle, first)); + } + + /// + /// Creates a new term. + /// + /// + /// + /// + public Term TermSecond(ulong first) + { + return new Term(Handle, Ecs.PairSecond(first, Handle)); + } + + /// + /// Iterate over all entities with the provided (component) id. + /// + /// + /// + public void Each(ulong id, Ecs.EachEntityCallback callback) + { + ecs_iter_t it = ecs_each_id(Handle, id); + while (ecs_each_next(&it)) + Invoker.Each(&it, callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void Each(ulong first, ulong second, Ecs.EachEntityCallback callback) + { + Each(Ecs.Pair(first, second), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void Each(T value, Ecs.EachEntityRefCallback callback) where T : Enum + { + Each(Type.Id(Handle, value), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void Each(ulong second, Ecs.EachEntityRefCallback callback) + { + ecs_iter_t it = ecs_each_id(Handle, Ecs.Pair(second, Handle)); + while (ecs_each_next(&it)) + Invoker.Each(&it, callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void Each(Ecs.EachEntityCallback callback) + { + Each(Pair(), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void Each(Ecs.EachEntityRefCallback callback) + { + Each(Type.Id(Handle), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void Each(Ecs.EachEntityRefCallback callback) + { + EachSecond(Type.Id(Handle), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + /// + public void Each(TSecond second, Ecs.EachEntityRefCallback callback) where TSecond : Enum + { + Each(Type.Id(Handle, second), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + /// + public void Each(TFirst first, Ecs.EachEntityRefCallback callback) where TFirst : Enum + { + EachSecond(Type.Id(Handle, first), callback); + } + + /// + /// Iterate over all entities with the provided pair. + /// + /// + /// + /// + public void EachSecond(ulong first, Ecs.EachEntityRefCallback callback) + { + ecs_iter_t it = ecs_each_id(Handle, Ecs.PairSecond(first, Handle)); + while (ecs_each_next(&it)) + Invoker.Each(&it, callback); + } + + /// + /// Convert enum constant to entity. + /// + /// + /// + /// + public Entity ToEntity(T value) where T : Enum + { + return Entity(value); + } + + /// + /// Define a module. + /// + /// + /// + /// + public Entity Module(string name = "") where TModule : IFlecsModule, new() + { + Entity result = Entity(Type.Id(Handle)); + + if (string.IsNullOrEmpty(name)) + return Entity(result); + + using NativeString nativeName = (NativeString)name; + + Entity prevParent = result.Parent(); + ecs_add_path_w_sep(Handle, result, 0, nativeName, Pointers.DefaultSeparator, Pointers.DefaultSeparator); + Entity parent = result.Parent(); + + if (prevParent == parent) + return Entity(result); + + if (parent != 0) + parent.Add(Ecs.Module); + + // Module was reparented, cleanup old parent(s) + Entity current = prevParent; + + while (current != 0) + { + Entity next = current.Parent(); + + ecs_iter_t it = ecs_each_id(Handle, Pair(Ecs.ChildOf, current)); + + if (!ecs_iter_is_true(&it)) + { + current.Destruct(); + SetVersion(current); + } + + current = next; + } + + return Entity(result); + } + + /// + /// Imports a module. + /// + /// The module type. + /// The module entity. + public Entity Import() where T : IFlecsModule, new() + { + return Ecs.Import(this); + } + + /// + /// Set pipeline. + /// + /// + public void SetPipeline(ulong pipeline) + { + ecs_set_pipeline(Handle, pipeline); + } + + /// + /// Set pipeline. + /// + /// + public void SetPipeline() + { + SetPipeline(Type.Id(Handle)); + } + + /// + /// Set pipeline. + /// + /// + /// + public void SetPipeline(T value) where T : Enum + { + SetPipeline(Type.Id(Handle, value)); + } + + /// + /// Get pipeline. + /// + /// + public Entity GetPipeline() + { + return Entity(ecs_get_pipeline(Handle)); + } + + /// + /// Progress world one tick. + /// + /// + public bool Progress(float deltaTime = 0) + { + return ecs_progress(Handle, deltaTime); + } + + /// + /// Run pipeline. + /// + /// + /// + public void RunPipeline(ulong pipeline, float deltaTime = 0) + { + ecs_run_pipeline(Handle, pipeline, deltaTime); + } + + /// + /// Run pipeline. + /// + /// + /// + public void RunPipeline(float deltaTime = 0) + { + ecs_run_pipeline(Handle, Type.Id(Handle), deltaTime); + } + + /// + /// Set timescale. + /// + /// + public void SetTimeScale(float scale) + { + ecs_set_time_scale(Handle, scale); + } + + /// + /// Set target FPS. + /// + /// + public void SetTargetFps(float targetFps) + { + ecs_set_target_fps(Handle, targetFps); + } + + /// + /// Reset simulation clock. + /// + public void ResetClock() + { + ecs_reset_clock(Handle); + } + + /// + /// Set number of threads. + /// + /// + public void SetThreads(int threads) + { + ecs_set_threads(Handle, threads); + } + + /// + /// Set number of threads. + /// + /// + public int GetThreads() + { + return ecs_get_stage_count(Handle); + } + + /// + /// Set number of task threads. + /// + /// + public void SetTaskThreads(int taskThreads) + { + ecs_set_task_threads(Handle, taskThreads); + } + + /// + /// Returns true if task thread use has been requested. + /// + /// + public bool UsingTaskThreads() + { + return ecs_using_task_threads(Handle); + } + + /// + /// Creates a timer. + /// + /// + public TimerEntity Timer() + { + return new TimerEntity(Handle); + } + + /// + /// Creates a timer. + /// + /// + /// + public TimerEntity Timer(ulong id) + { + return new TimerEntity(Handle, id); + } + + /// + /// Creates a timer. + /// + /// + /// + public TimerEntity Timer(string name) + { + return new TimerEntity(Handle, name); + } + + /// + /// Creates a timer. + /// + /// + /// + public TimerEntity Timer() + { + return Timer(Type.Id(Handle)); + } + + /// + /// Creates a timer. + /// + /// + /// + public void Timer(T value) where T : Enum + { + Timer(Type.Id(Handle, value)); + } + + /// + /// Enable randomization of initial time values for timers. + /// + public void RandomizeTimers() + { + ecs_randomize_timers(Handle); + } + + /// + /// Run script. + /// + /// The script name (typically the file). + /// The script. + /// Zero if success, non-zero otherwise. + public int ScriptRun(string name, string str) + { + using NativeString nativeName = (NativeString)name; + using NativeString nativeStr = (NativeString)str; + + return ecs_script_run(Handle, nativeName, nativeStr); + } + + /// + /// Run script from file. + /// + /// The script file name. + /// Zero if success, non-zero if failed. + public int ScriptRunFile(string fileName) + { + using NativeString nativeFileName = (NativeString)fileName; + return ecs_script_run_file(Handle, nativeFileName); + } + + /// + /// Creates a script builder. + /// + /// The created script builder. + public ScriptBuilder Script() + { + return new ScriptBuilder(Handle); + } + + /// + /// Creates a script builder with the provided entity name. + /// + /// The entity name. + /// The created script builder. + public ScriptBuilder Script(string name) + { + return new ScriptBuilder(Handle, name); + } + + private readonly List ScriptCallbacks = new(); + private readonly Type TypesType = typeof(Type<>); + private readonly Dictionary ScriptTypeIds = new(); + public void AddFunction(Delegate function, string? nameOverride = null, string[]? argumentOverrides = null) + { + AddFunctionImpl(function, nameOverride, argumentOverrides); + } + + public void AddMethod(ulong parent, Delegate function, string? nameOverride = null, string[]? argumentOverrides = null) + { + AddFunctionImpl(function, nameOverride, argumentOverrides, parent: parent); + } + + public void AddMethod(Delegate function, string? nameOverride = null, string[]? argumentOverrides = null) + { + AddFunctionImpl(function, nameOverride, argumentOverrides, parent: Type.Id(Handle)); + } + + internal void AddFunctionImpl(Delegate function, string? nameOverride, string[]? argumentOverrides, ulong parent = default) + { + using NativeString nativeName = (NativeString)(nameOverride ?? function.Method.Name); + InlineArrays.ecs_script_parameter_t_16 scriptParamsRaw = default; + ecs_script_parameter_t* scriptParams = (ecs_script_parameter_t * ) &scriptParamsRaw; + + List cleanup = new(); + try + { + var args = function.Method.GetParameters(); + for (int i = 0; i < args.Length; ++i) + { + cleanup.Add((NativeString)args[i].Name); + NativeString argName = (NativeString)cleanup[^-1]; + + if (!ScriptTypeIds.TryGetValue(args[i].ParameterType, out ulong argTypeId)) + { + ScriptTypeIds.Add(args[i].ParameterType, argTypeId = (ulong) TypesType.MakeGenericType(args[i].ParameterType).GetMethod(nameof(Type.Id), [typeof(ecs_world_t*)])!.Invoke(null, [new IntPtr(Handle)])!); + } + + scriptParams[i] = new() + { + name = argName, + type = argTypeId, + }; + } + + + if (!ScriptTypeIds.TryGetValue(function.Method.ReturnType, out ulong retTypeId)) + { + ScriptTypeIds.Add(function.Method.ReturnType, retTypeId = (ulong)TypesType.MakeGenericType(function.Method.ReturnType).GetMethod(nameof(Type.Id), [typeof(ecs_world_t*)])!.Invoke(null, [new IntPtr(Handle)])!); + } + + ecs_function_desc_t desc = new() + { + name = nativeName, + parent = parent, + @params = scriptParamsRaw, + return_type = retTypeId, + callback = &ScriptCallableCallback, + ctx = (void*)ScriptCallbacks.Count + }; + + ScriptCallbacks.Add(function); + ecs_function_init(Handle, &desc); + } + finally + { + foreach (var entry in cleanup) + { + entry.Dispose(); + } + } + } + + [UnmanagedCallersOnly] + public static void ScriptCallableCallback(ecs_function_ctx_t* ctx, int argc, ecs_value_t* argv, ecs_value_t* result) + { + World world = (World) ecs_get_binding_ctx_fast(ctx->world); + int ind = (int)ctx->ctx; + var del = world.ScriptCallbacks[ind]; + + object[] args = new object[argc]; + var paramInfo = del.Method.GetParameters(); + for (int i = 0; i < argc; i++) + { + Type argType = paramInfo[i].ParameterType; + args[i] = Managed.Get(argType, argv[i].ptr); + } + + var ret = del.DynamicInvoke(args); + ecs_type_info_t* retType = ecs_get_type_info(ctx->world, result->type); + retType->hooks.copy(result->ptr, &ret, 1, retType); + } + + public void AddConstant(ulong parent, string name, T value) + { + using NativeString nativeName = (NativeString)name; + + ecs_const_var_desc_t desc = default; + desc.name = nativeName; + desc.parent = parent; + desc.type = Type.Id(Handle); + + T* ptrValue = &value; + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + Managed.AllocGcHandle(ptrValue, out GCHandle handle); + desc.value = &handle; + ecs_const_var_init(Handle, &desc); + Managed.FreeGcHandle(handle); + } + else + { + desc.value = ptrValue; + ecs_const_var_init(Handle, &desc); + } + } + + public void AddConstant(string name, T value) + { + AddConstant(default, name, value); + } + + /// + /// Convert value to string. + /// + /// + /// + /// + public string ToExpr(ulong id, void* value) + { + return NativeString.GetStringAndFree(ecs_ptr_to_expr(Handle, id, value)); + } + + /// + /// Convert value to string. + /// + /// The value to serialize. + /// The type of the value to serialize. + /// String with expression, or empty string if failed. + public string ToExpr(T* value) where T : unmanaged + { + return ToExpr(Type.Id(Handle), value); + } + + /// + /// Covert value to string. + /// + /// The value to serialize. + /// The type of the value to serialize. + /// String with expression, or empty string if failed. + public string ToExpr(ref T value) where T : unmanaged + { + fixed (T* ptr = &value) + { + return ToExpr(ptr); + } + } + + /// + /// Return meta cursor to value. + /// + /// + /// + /// + public Cursor Cursor(ulong id, void* data) + { + return new Cursor(Handle, id, data); + } + + /// + /// Return meta cursor to value. + /// + /// + /// + /// + public Cursor Cursor(T* data) + { + return Cursor(Type.Id(Handle), data); + } + + /// + /// Return meta cursor to value. + /// + /// + /// + /// + // TODO: Figure out better api that doesn't cause GC hole + public Cursor Cursor(ref T data) where T : unmanaged + { + fixed (T* ptr = &data) + { + return Cursor(ptr); + } + } + + /// + /// Create primitive type. + /// + /// + /// + public Entity Primitive(ecs_primitive_kind_t kind) + { + ecs_primitive_desc_t desc = default; + desc.kind = kind; + + ulong id = ecs_primitive_init(Handle, &desc); + Ecs.Assert(id != 0, nameof(ECS_INVALID_OPERATION)); + + return Entity(id); + } + + /// + /// Creates array type. + /// + /// + /// + /// + public Entity Array(ulong elemId, int arrayCount) + { + ecs_array_desc_t desc = default; + desc.type = elemId; + desc.count = arrayCount; + + ulong id = ecs_array_init(Handle, &desc); + Ecs.Assert(id != 0, nameof(ECS_INVALID_OPERATION)); + + return Entity(id); + } + + /// + /// Creates array type. + /// + /// + /// + /// + public Entity Array(int arrayCount) + { + return Array(Type.Id(Handle), arrayCount); + } + + /// + /// Create vector type. + /// + /// + /// + public Entity Vector(ulong elemId) + { + ecs_vector_desc_t desc = default; + desc.type = elemId; + ulong id = ecs_vector_init(Handle, &desc); + Ecs.Assert(id != 0, nameof(ECS_INVALID_OPERATION)); + return Entity(id); + } + + /// + /// Create vector type. + /// + /// + /// + public Entity Vector() + { + return Vector(Type.Id(Handle)); + } + + /// + /// Serialize untyped value to JSON. + /// + /// + /// + /// + public string ToJson(ulong id, void* value) + { + return NativeString.GetStringAndFree(ecs_ptr_to_json(Handle, id, value)); + } + + /// + /// Serialize value to JSON. + /// + /// + /// + /// + // TODO: Support managed types with ToJson and FromJson. + public string ToJson(T* value) where T : unmanaged + { + return ToJson(Type.Id(Handle), value); + } + + /// + /// Serialize value to JSON. + /// + /// + /// + /// + public string ToJson(ref T value) where T : unmanaged + { + fixed (T* ptr = &value) + { + return ToJson(ptr); + } + } + + /// + /// Serializes the world to a JSON string using the provided description. + /// + /// The description settings for JSON serialization. + /// A JSON string with the serialized world data, or an empty string if failed. + public string ToJson(in WorldToJsonDesc desc) + { + fixed (ecs_world_to_json_desc_t* ptr = &desc.Desc) + return NativeString.GetStringAndFree(ecs_world_to_json(Handle, ptr)); + } + + /// + /// Serializes the world to a JSON string. + /// + /// A JSON string with the serialized world data, or an empty string if failed. + public string ToJson() + { + return NativeString.GetStringAndFree(ecs_world_to_json(Handle, null)); + } + + /// + /// Deserialize value from JSON. + /// + /// + /// + /// + /// + /// + public bool FromJson(ulong id, void* value, string json, ecs_from_json_desc_t* desc = null) + { + using NativeString nativeJson = (NativeString)json; + return ecs_ptr_from_json(Handle, id, value, nativeJson, desc) != null; + } + + /// + /// Deserialize value from JSON. + /// + /// + /// + /// + /// + /// + public bool FromJson(T* value, string json, ecs_from_json_desc_t* desc = null) where T : unmanaged + { + return FromJson(Type.Id(Handle), value, json, desc); + } + + /// + /// Deserialize value from JSON. + /// + /// + /// + /// + public bool FromJson(string json, ecs_from_json_desc_t* desc) + { + using NativeString nativeJson = (NativeString)json; + return ecs_world_from_json(Handle, nativeJson, desc) != null; + } + + /// + /// Deserialize value from JSON. + /// + /// + /// + public bool FromJson(string json) + { + using NativeString nativeJson = (NativeString)json; + return FromJson(json, null); + } + + /// + /// Deserialize JSON file into world. + /// + /// + /// + /// + public bool FromJsonFile(string file, ecs_from_json_desc_t *desc) + { + using NativeString nativeFile = (NativeString)file; + return ecs_world_from_json_file(Handle, nativeFile, desc) != null; + } + + /// + /// Deserialize JSON file into world. + /// + /// + /// + public bool FromJsonFile(string file) + { + return FromJsonFile(file, null); + } + + /// + /// Creates an app builder. + /// + /// + public AppBuilder App() + { + return new AppBuilder(Handle); + } + + /// + /// Create metric builder. + /// + /// + /// + public MetricBuilder Metric(ulong entity) + { + return new MetricBuilder(Handle, entity); + } + + /// + /// Creates an alert builder. + /// + /// An alert builder. + public AlertBuilder AlertBuilder() + { + return new AlertBuilder(Handle); + } + + /// + /// Creates an alert builder. + /// + /// The alert name. + /// An alert builder. + public AlertBuilder AlertBuilder(string name) + { + return new AlertBuilder(Handle, name); + } + + /// + /// Creates an alert builder. + /// + /// The alert entity. + /// An alert builder. + public AlertBuilder AlertBuilder(ulong entity) + { + return new AlertBuilder(Handle, entity); + } + + /// + /// Creates an alert. + /// + /// An alert. + public Alert Alert() + { + return AlertBuilder().Build(); + } + + /// + /// Creates an alert. + /// + /// The alert name. + /// An alert. + public Alert Alert(string name) + { + return AlertBuilder(name).Build(); + } + + /// + /// Creates an alert. + /// + /// The alert entity. + /// An alert. + public Alert Alert(ulong entity) + { + return AlertBuilder(entity).Build(); + } + + /// + /// Creates a query builder. + /// + /// A query builder. + public QueryBuilder QueryBuilder() + { + return new QueryBuilder(Handle); + } + + /// + /// Creates a query builder. + /// + /// The query name. + /// A query builder. + public QueryBuilder QueryBuilder(string name) + { + return new QueryBuilder(Handle, name); + } + + /// + /// Creates a query builder. + /// + /// The query entity. + /// A query builder. + public QueryBuilder QueryBuilder(ulong entity) + { + return new QueryBuilder(Handle, entity); + } + + /// + /// Creates a query. + /// + /// A query. + public Query Query() + { + return QueryBuilder().Build(); + } + + /// + /// Creates a query. + /// + /// The query name. + /// A query. + public Query Query(string name) + { + return new Query(Handle, Lookup(name)); + } + + /// + /// Creates a query. + /// + /// The query entity. + /// A query. + public Query Query(ulong entity) + { + return new Query(Handle, entity); + } + + /// + /// Creates a pipeline builder. + /// + /// A pipeline builder. + public PipelineBuilder Pipeline() + { + return new PipelineBuilder(Handle); + } + + /// + /// Creates a pipeline builder. + /// + /// The pipeline name. + /// A pipeline builder. + public PipelineBuilder Pipeline(string name) + { + return new PipelineBuilder(Handle, name); + } + + /// + /// Creates a pipeline builder. + /// + /// The pipeline entity. + /// A pipeline builder. + public PipelineBuilder Pipeline(ulong entity) + { + return new PipelineBuilder(Handle, entity); + } + + /// + /// Creates a pipeline builder associated with the provided type. + /// + /// A pipeline builder. + public PipelineBuilder Pipeline() + { + return Pipeline(Type.Id(Handle)); + } + + /// + /// Creates an observer builder. + /// + /// An observer builder. + public ObserverBuilder Observer() + { + return new ObserverBuilder(Handle); + } + + /// + /// Creates an observer builder. + /// + /// The observer name. + /// An observer builder. + public ObserverBuilder Observer(string name) + { + return new ObserverBuilder(Handle, name); + } + + /// + /// Creates an observer. + /// + /// The observer entity. + /// An observer. + public Observer Observer(ulong entity) + { + return new Observer(Handle, entity); + } + + /// + /// Creates a system builder. + /// + /// A system builder. + public SystemBuilder System() + { + return new SystemBuilder(Handle); + } + + /// + /// Creates a system builder. + /// + /// The system name. + /// A system builder. + public SystemBuilder System(string name) + { + return new SystemBuilder(Handle, name); + } + + /// + /// Create a system. + /// + /// The system entity. + /// A system. + public System_ System(ulong entity) + { + return new System_(Handle, entity); + } + + /// + /// Initializes built-in components. + /// + public void InitBuiltinComponents() + { + Import(); + } + + internal WorldContext* GetBindingContext() + { + return (WorldContext*)ecs_get_binding_ctx_fast(Handle); + } + + private WorldContext* EnsureBindingContext() + { + WorldContext* ptr = (WorldContext*)ecs_get_binding_ctx_fast(Handle); + + if (ptr != null) + return ptr; + + ptr = Memory.AllocZeroed(1); + ecs_set_binding_ctx(Handle, ptr, &Functions.WorldContextFree); + return ptr; + } + + private PostFrameContext* AllocatePostFrameContext() + { + PostFrameContext* context = Memory.Alloc(1); + WorldContext.RunPostFrameContexts.Add((nint)context); + return context; + } + + private WorldFinishContext* AllocateWorldFinishContext() + { + WorldFinishContext* context = Memory.Alloc(1); + WorldContext.WorldFinishContexts.Add((nint)context); + return context; + } + + /// + /// Returns native pointer to world. + /// + /// + /// + public static ecs_world_t* To(World world) + { + return world.Handle; + } + + /// + /// Returns world wrapper for native world pointer. + /// + /// + /// + public static World From(ecs_world_t* world) + { + return new World(world); + } + + /// + /// Returns native pointer to world. + /// + /// + /// + public static implicit operator ecs_world_t*(World world) + { + return To(world); + } + + /// + /// Returns world wrapper for native world pointer. + /// + /// + /// + public static implicit operator World(ecs_world_t* world) + { + return From(world); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public bool Equals(World other) + { + return Handle == other.Handle; + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is World world && Equals(world); + } + + /// + /// Returns the hash code of the . + /// + /// + public override int GetHashCode() + { + return Handle->GetHashCode(); + } + + /// + /// Checks if two instances are equal. + /// + /// + /// + /// + public static bool operator ==(World left, World right) + { + return left.Equals(right); + } + + /// + /// Checks if two instances are not equal. + /// + /// + /// + /// + public static bool operator !=(World left, World right) + { + return !(left == right); + } +} + +// Flecs.NET Extensions +public unsafe partial struct World +{ + /// + /// Gets an empty table. + /// + /// + public Table Table() + { + return new Table(Handle); + } + + /// + /// Create new entity in table. + /// + /// The table to which to add the new entity. + /// The new entity. + public Entity Entity(Table table) + { + return Entity(ecs_new_w_table(Handle, table)); + } + + /// + /// Set current with id. + /// + /// The id. + /// The previous id. + public Entity SetWith(ulong with) + { + return new Entity(Handle, ecs_set_with(Handle, with)); + } + + /// + /// Get current with id. + /// + /// The last id provided to ecs_set_with(). + public Entity GetWith() + { + return new Entity(Handle, ecs_get_with(Handle)); + } + + /// + /// All entities created in function are created in scope. All operations + /// called in function (such as lookup) are relative to scope. + /// + /// The entity to use as scope. + /// The callback. + public void Scope(ulong parent, Ecs.WorldCallback callback) + { + ulong prev = ecs_set_scope(Handle, parent); + callback(Handle); + ecs_set_scope(Handle, prev); + } + + /// + /// Same as Scope(parent, func), but with T as parent. + /// + /// The callback. + /// The entity to use as scope. + public void Scope(Ecs.WorldCallback callback) + { + Scope(Type.Id(Handle), callback); + } + + /// + /// Same as Scope(parent, func), but with enum as parent. + /// + /// The entity to use as scope. + /// The callback. + /// The enum. + public void Scope(T value, Ecs.WorldCallback callback) where T : Enum + { + Scope(Type.Id(Handle, value), callback); + } + + /// + /// Defer all operations called in function. If the world is already in + /// deferred mode, do nothing. + /// + /// The callback. + public void Defer(Ecs.WorldCallback callback) + { + ecs_defer_begin(Handle); + callback(Handle); + ecs_defer_end(Handle); + } + + /// + /// All entities created in function are created with id. + /// + /// Id to be added to the created entities. + /// The callback. + public void With(ulong id, Ecs.WorldCallback callback) + { + ulong prev = ecs_set_with(Handle, id); + callback(Handle); + ecs_set_with(Handle, prev); + } + + /// + /// All entities created in function are created with pair. + /// + /// The first id. + /// The second id. + /// The callback. + public void With(ulong first, ulong second, Ecs.WorldCallback callback) + { + With(Ecs.Pair(first, second), callback); + } + + /// + /// All entities created in function are created with type. + /// + /// The callback. + /// The component. + public void With(Ecs.WorldCallback callback) + { + With(Type.Id(Handle), callback); + } + + /// + /// All entities created in function are created with enum. + /// + /// The enum constant. + /// The callback. + /// The enum. + public void With(T value, Ecs.WorldCallback callback) where T : Enum + { + With(Type.Id(Handle, value), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The second id. + /// The callback. + /// The first component. + public void With(ulong second, Ecs.WorldCallback callback) + { + With(Ecs.Pair(second, Handle), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The callback. + /// The first component. + /// The second component. + public void With(Ecs.WorldCallback callback) + { + With(Ecs.Pair(Handle), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The second enum constant id. + /// The callback. + /// The first component. + /// The second enum. + public void With(TSecond second, Ecs.WorldCallback callback) where TSecond : Enum + { + With(Type.Id(Handle, second), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The first enum constant. + /// The callback. + /// The first enum. + /// The second component. + public void With(TFirst first, Ecs.WorldCallback callback) where TFirst : Enum + { + WithSecond(Type.Id(Handle, first), callback); + } + + /// + /// All entities created in function are created with pair. + /// + /// The first id. + /// The callback. + /// The second component. + public void WithSecond(ulong first, Ecs.WorldCallback callback) + { + With(first, Type.Id(Handle), callback); + } + + /// + /// Lookup entity by name. + /// + /// The path to resolve. + /// The entity if found, else 0. + public Entity Lookup(string path) + { + return Lookup(path, true); + } + + /// + /// Lookup entity by name. + /// + /// The path to resolve. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + public Entity Lookup(string path, bool recursive) + { + if (string.IsNullOrEmpty(path)) + return new Entity(Handle, 0); + + using NativeString nativePath = (NativeString)path; + + return new Entity( + Handle, + ecs_lookup_path_w_sep(Handle, 0, nativePath, + Pointers.DefaultSeparator, Pointers.DefaultSeparator, recursive) + ); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, out Entity entity) + { + return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, true, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, bool recursive, out Entity entity) + { + return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, recursive, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The separator. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, string separator, out Entity entity) + { + return TryLookup(path, separator, Ecs.DefaultSeparator, true, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The separator. + /// The root separator. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, string separator, string rootSeparator, out Entity entity) + { + return TryLookup(path, separator, rootSeparator, true, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The separator. + /// The root separator. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, string separator, string rootSeparator, bool recursive, out Entity entity) + { + return (entity = Lookup(path, separator, rootSeparator, recursive)) != 0; + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, out ulong entity) + { + return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, true, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, bool recursive, out ulong entity) + { + return TryLookup(path, Ecs.DefaultSeparator, Ecs.DefaultSeparator, recursive, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The separator. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, string separator, out ulong entity) + { + return TryLookup(path, separator, Ecs.DefaultSeparator, true, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The separator. + /// The root separator. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, string separator, string rootSeparator, out ulong entity) + { + return TryLookup(path, separator, rootSeparator, true, out entity); + } + + /// + /// Lookup an entity from a path. + /// + /// The path to resolve. + /// The separator. + /// The root separator. + /// Recursively traverse up the tree until entity is found. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookup(string path, string separator, string rootSeparator, bool recursive, out ulong entity) + { + return (entity = Lookup(path, separator, rootSeparator, recursive)) != 0; + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// If not found as a symbol, lookup as path. + /// If looking up as path, recursively traverse up the tree. + /// The entity if found, else 0. + public Entity LookupSymbol(string symbol, bool lookupAsPath = false, bool recursive = false) + { + if (string.IsNullOrEmpty(symbol)) + return new Entity(Handle, 0); + + using NativeString nativeSymbol = (NativeString)symbol; + + return new Entity( + Handle, + ecs_lookup_symbol(Handle, nativeSymbol, lookupAsPath, recursive) + ); + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookupSymbol(string symbol, out Entity entity) + { + return TryLookupSymbol(symbol, false, false, out entity); + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// If not found as a symbol, lookup as path. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookupSymbol(string symbol, bool lookupAsPath, out Entity entity) + { + return TryLookupSymbol(symbol, lookupAsPath, false, out entity); + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// If not found as a symbol, lookup as path. + /// If looking up as path, recursively traverse up the tree. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookupSymbol(string symbol, bool lookupAsPath, bool recursive, out Entity entity) + { + return (entity = LookupSymbol(symbol, lookupAsPath, recursive)) != 0; + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookupSymbol(string symbol, out ulong entity) + { + return TryLookupSymbol(symbol, false, false, out entity); + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// If not found as a symbol, lookup as path. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookupSymbol(string symbol, bool lookupAsPath, out ulong entity) + { + return TryLookupSymbol(symbol, lookupAsPath, false, out entity); + } + + /// + /// Lookup an entity by its symbol name. + /// + /// The symbol. + /// If not found as a symbol, lookup as path. + /// If looking up as path, recursively traverse up the tree. + /// The entity if found, else 0. + /// True if the entity was found, else false. + public bool TryLookupSymbol(string symbol, bool lookupAsPath, bool recursive, out ulong entity) + { + return (entity = LookupSymbol(symbol, lookupAsPath, recursive)) != 0; + } + + /// + /// Cleanup empty tables. + /// + /// The description object. + /// The number of deleted tables. + public int DeleteEmptyTables(in DeleteEmptyTablesDesc desc) + { + fixed (ecs_delete_empty_tables_desc_t* ptr = &desc.Desc) + return ecs_delete_empty_tables(Handle, ptr); + } +} diff --git a/src/Flecs.NET/Generated/AlertBuilder/AlertBuilder.QueryBuilder.g.cs b/src/Flecs.NET/Generated/AlertBuilder/AlertBuilder.QueryBuilder.g.cs index 68d93820..2e1ddb07 100644 --- a/src/Flecs.NET/Generated/AlertBuilder/AlertBuilder.QueryBuilder.g.cs +++ b/src/Flecs.NET/Generated/AlertBuilder/AlertBuilder.QueryBuilder.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/AlertBuilder/AlertBuilder.QueryBuilder.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/AlertBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct AlertBuilder -{ - /// - public ref AlertBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref AlertBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref AlertBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref AlertBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref AlertBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref AlertBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref AlertBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref AlertBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref AlertBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref AlertBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref AlertBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref AlertBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref AlertBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref AlertBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref AlertBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref AlertBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref AlertBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref AlertBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref AlertBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref AlertBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref AlertBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref AlertBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref AlertBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref AlertBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref AlertBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref AlertBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref AlertBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref AlertBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref AlertBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref AlertBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref AlertBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref AlertBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref AlertBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref AlertBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref AlertBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref AlertBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref AlertBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref AlertBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref AlertBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref AlertBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref AlertBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref AlertBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref AlertBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref AlertBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref AlertBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref AlertBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref AlertBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref AlertBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref AlertBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref AlertBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref AlertBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref AlertBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref AlertBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref AlertBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref AlertBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref AlertBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref AlertBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref AlertBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref AlertBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref AlertBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref AlertBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref AlertBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref AlertBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref AlertBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref AlertBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref AlertBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref AlertBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref AlertBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref AlertBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref AlertBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref AlertBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref AlertBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref AlertBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref AlertBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref AlertBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref AlertBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref AlertBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref AlertBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref AlertBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref AlertBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref AlertBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref AlertBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref AlertBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref AlertBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref AlertBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref AlertBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref AlertBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref AlertBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref AlertBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref AlertBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref AlertBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref AlertBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref AlertBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref AlertBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref AlertBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref AlertBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref AlertBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref AlertBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref AlertBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref AlertBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref AlertBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref AlertBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref AlertBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref AlertBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref AlertBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref AlertBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref AlertBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref AlertBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref AlertBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref AlertBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref AlertBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref AlertBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref AlertBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref AlertBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref AlertBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref AlertBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref AlertBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref AlertBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref AlertBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref AlertBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref AlertBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref AlertBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref AlertBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref AlertBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref AlertBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref AlertBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref AlertBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref AlertBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref AlertBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref AlertBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref AlertBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref AlertBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref AlertBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref AlertBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref AlertBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref AlertBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref AlertBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref AlertBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref AlertBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref AlertBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref AlertBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref AlertBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref AlertBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref AlertBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref AlertBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref AlertBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref AlertBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref AlertBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref AlertBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/AlertBuilder/AlertBuilder.QueryBuilder.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/AlertBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct AlertBuilder +{ + /// + public ref AlertBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref AlertBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref AlertBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref AlertBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref AlertBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref AlertBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref AlertBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref AlertBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref AlertBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref AlertBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref AlertBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref AlertBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref AlertBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref AlertBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref AlertBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref AlertBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref AlertBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref AlertBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref AlertBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref AlertBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref AlertBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref AlertBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref AlertBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref AlertBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref AlertBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref AlertBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref AlertBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref AlertBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref AlertBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref AlertBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref AlertBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref AlertBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref AlertBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref AlertBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref AlertBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref AlertBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref AlertBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref AlertBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref AlertBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref AlertBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref AlertBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref AlertBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref AlertBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref AlertBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref AlertBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref AlertBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref AlertBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref AlertBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref AlertBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref AlertBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref AlertBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref AlertBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref AlertBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref AlertBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref AlertBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref AlertBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref AlertBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref AlertBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref AlertBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref AlertBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref AlertBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref AlertBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref AlertBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref AlertBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref AlertBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref AlertBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref AlertBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref AlertBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref AlertBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref AlertBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref AlertBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref AlertBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref AlertBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref AlertBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref AlertBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref AlertBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref AlertBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref AlertBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref AlertBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref AlertBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref AlertBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref AlertBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref AlertBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref AlertBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref AlertBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref AlertBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref AlertBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref AlertBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref AlertBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref AlertBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref AlertBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref AlertBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref AlertBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref AlertBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref AlertBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref AlertBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref AlertBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref AlertBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref AlertBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref AlertBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref AlertBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref AlertBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref AlertBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref AlertBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref AlertBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref AlertBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref AlertBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref AlertBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref AlertBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref AlertBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref AlertBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref AlertBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref AlertBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref AlertBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref AlertBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref AlertBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref AlertBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref AlertBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref AlertBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref AlertBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref AlertBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref AlertBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref AlertBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref AlertBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref AlertBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref AlertBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref AlertBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref AlertBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref AlertBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref AlertBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref AlertBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref AlertBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref AlertBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref AlertBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref AlertBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref AlertBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref AlertBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref AlertBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref AlertBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref AlertBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref AlertBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref AlertBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref AlertBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref AlertBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref AlertBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref AlertBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref AlertBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref AlertBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref AlertBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref AlertBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder.g.cs index 9218d10f..9c96cd67 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T1.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T1.g.cs index 2671abfd..c552fd2e 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T1.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T1.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T1.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T1.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T10.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T10.g.cs index a634c33d..3c9b2c23 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T10.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T10.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T10.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T10.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T11.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T11.g.cs index 8a02a553..11c01db3 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T11.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T11.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T11.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T11.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T12.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T12.g.cs index 9f6bb046..9f6e045e 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T12.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T12.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T12.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T12.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T13.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T13.g.cs index 7e5124a4..3b32f3be 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T13.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T13.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T13.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T13.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T14.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T14.g.cs index 2b6cb231..9938f107 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T14.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T14.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T14.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T14.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T15.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T15.g.cs index 9e20362b..e7cf706c 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T15.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T15.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T15.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T15.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T16.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T16.g.cs index e354d9d5..e210a071 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T16.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T16.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T16.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T16.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T2.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T2.g.cs index 9082adc2..5089a2d0 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T2.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T2.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T2.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T2.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T3.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T3.g.cs index c33f4d03..7c342199 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T3.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T3.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T3.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T3.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T4.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T4.g.cs index 94e7eb4a..bc80d215 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T4.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T4.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T4.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T4.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T5.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T5.g.cs index 1b342a45..6b40ca3f 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T5.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T5.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T5.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T5.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T6.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T6.g.cs index bf08eb9b..95bf6cc3 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T6.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T6.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T6.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T6.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T7.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T7.g.cs index d29b6f21..77b8e370 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T7.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T7.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T7.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T7.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T8.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T8.g.cs index 28d1c17c..ce7a5540 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T8.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T8.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T8.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T8.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T9.g.cs b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T9.g.cs index c5dc405a..c33d263f 100644 --- a/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T9.g.cs +++ b/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T9.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T9.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct ObserverBuilder -{ - /// - public ref ObserverBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref ObserverBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref ObserverBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref ObserverBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref ObserverBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref ObserverBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref ObserverBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref ObserverBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref ObserverBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref ObserverBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref ObserverBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref ObserverBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref ObserverBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref ObserverBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref ObserverBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref ObserverBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref ObserverBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref ObserverBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref ObserverBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref ObserverBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref ObserverBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref ObserverBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref ObserverBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref ObserverBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref ObserverBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref ObserverBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref ObserverBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref ObserverBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref ObserverBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref ObserverBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref ObserverBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref ObserverBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref ObserverBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref ObserverBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref ObserverBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref ObserverBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref ObserverBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref ObserverBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref ObserverBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref ObserverBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref ObserverBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref ObserverBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref ObserverBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref ObserverBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref ObserverBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref ObserverBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref ObserverBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref ObserverBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref ObserverBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref ObserverBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref ObserverBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref ObserverBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref ObserverBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref ObserverBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref ObserverBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref ObserverBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref ObserverBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/ObserverBuilder/ObserverBuilder.QueryBuilder/T9.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/ObserverBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct ObserverBuilder +{ + /// + public ref ObserverBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref ObserverBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref ObserverBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref ObserverBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref ObserverBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref ObserverBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref ObserverBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref ObserverBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref ObserverBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref ObserverBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref ObserverBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref ObserverBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref ObserverBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref ObserverBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref ObserverBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref ObserverBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref ObserverBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref ObserverBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref ObserverBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref ObserverBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref ObserverBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref ObserverBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref ObserverBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref ObserverBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref ObserverBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref ObserverBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref ObserverBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref ObserverBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref ObserverBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref ObserverBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref ObserverBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref ObserverBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref ObserverBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref ObserverBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref ObserverBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref ObserverBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref ObserverBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref ObserverBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref ObserverBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref ObserverBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref ObserverBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref ObserverBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref ObserverBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref ObserverBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref ObserverBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref ObserverBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref ObserverBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref ObserverBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref ObserverBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref ObserverBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref ObserverBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref ObserverBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref ObserverBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref ObserverBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref ObserverBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref ObserverBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref ObserverBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref ObserverBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref ObserverBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref ObserverBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref ObserverBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref ObserverBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref ObserverBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref ObserverBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref ObserverBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref ObserverBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref ObserverBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref ObserverBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder.g.cs index 06e307c8..9b428042 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T1.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T1.g.cs index 0f4ae61b..05020c3c 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T1.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T1.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T1.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T1.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T10.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T10.g.cs index c1350675..619a050e 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T10.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T10.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T10.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T10.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T11.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T11.g.cs index 209309bb..eea6f24c 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T11.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T11.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T11.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T11.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T12.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T12.g.cs index 56c6c3e1..b49b2083 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T12.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T12.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T12.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T12.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T13.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T13.g.cs index b61a22ec..e617c581 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T13.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T13.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T13.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T13.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T14.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T14.g.cs index ac79d6d7..f34e6e2a 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T14.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T14.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T14.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T14.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T15.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T15.g.cs index 55fda64a..688fdd48 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T15.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T15.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T15.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T15.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T16.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T16.g.cs index cda9a6bc..7ef7ea6f 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T16.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T16.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T16.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T16.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T2.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T2.g.cs index bbc12b08..15fc429b 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T2.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T2.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T2.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T2.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T3.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T3.g.cs index 8b02a8c6..c4d4afd2 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T3.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T3.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T3.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T3.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T4.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T4.g.cs index 4e8f2df2..2b3a0862 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T4.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T4.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T4.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T4.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T5.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T5.g.cs index c05c6195..39ac42b8 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T5.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T5.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T5.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T5.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T6.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T6.g.cs index 66271953..f11a9762 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T6.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T6.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T6.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T6.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T7.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T7.g.cs index 2bbb7fb3..fae7eab8 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T7.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T7.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T7.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T7.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T8.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T8.g.cs index 305ab2f2..ecd17526 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T8.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T8.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T8.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T8.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T9.g.cs b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T9.g.cs index e4817e36..649f0a25 100644 --- a/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T9.g.cs +++ b/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T9.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T9.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct PipelineBuilder -{ - /// - public ref PipelineBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref PipelineBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref PipelineBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref PipelineBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref PipelineBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref PipelineBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref PipelineBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref PipelineBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref PipelineBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref PipelineBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref PipelineBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref PipelineBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref PipelineBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref PipelineBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref PipelineBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref PipelineBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref PipelineBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref PipelineBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref PipelineBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref PipelineBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref PipelineBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref PipelineBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref PipelineBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref PipelineBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref PipelineBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref PipelineBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref PipelineBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref PipelineBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref PipelineBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref PipelineBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref PipelineBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref PipelineBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref PipelineBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref PipelineBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref PipelineBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref PipelineBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref PipelineBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref PipelineBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref PipelineBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref PipelineBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref PipelineBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref PipelineBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref PipelineBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref PipelineBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref PipelineBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref PipelineBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref PipelineBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref PipelineBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref PipelineBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref PipelineBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref PipelineBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref PipelineBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref PipelineBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref PipelineBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref PipelineBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref PipelineBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref PipelineBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/PipelineBuilder/PipelineBuilder.QueryBuilder/T9.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/PipelineBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct PipelineBuilder +{ + /// + public ref PipelineBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref PipelineBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref PipelineBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref PipelineBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref PipelineBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref PipelineBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref PipelineBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref PipelineBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref PipelineBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref PipelineBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref PipelineBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref PipelineBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref PipelineBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref PipelineBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref PipelineBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref PipelineBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref PipelineBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref PipelineBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref PipelineBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref PipelineBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref PipelineBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref PipelineBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref PipelineBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref PipelineBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref PipelineBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref PipelineBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref PipelineBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref PipelineBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref PipelineBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref PipelineBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref PipelineBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref PipelineBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref PipelineBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref PipelineBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref PipelineBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref PipelineBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref PipelineBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref PipelineBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref PipelineBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref PipelineBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref PipelineBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref PipelineBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref PipelineBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref PipelineBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref PipelineBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref PipelineBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref PipelineBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref PipelineBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref PipelineBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref PipelineBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref PipelineBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref PipelineBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref PipelineBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref PipelineBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref PipelineBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref PipelineBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref PipelineBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref PipelineBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref PipelineBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref PipelineBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref PipelineBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref PipelineBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref PipelineBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref PipelineBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref PipelineBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref PipelineBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref PipelineBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref PipelineBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T1.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T1.g.cs index a8f705cd..3d9df129 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T1.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T1.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T1.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T1.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T10.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T10.g.cs index 84acc582..25ba016b 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T10.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T10.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T10.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T10.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T11.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T11.g.cs index e14eb3e1..aa76331a 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T11.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T11.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T11.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T11.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T12.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T12.g.cs index bf8446c1..8d3a24ae 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T12.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T12.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T12.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T12.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T13.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T13.g.cs index daa2fc5d..9cf25131 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T13.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T13.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T13.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T13.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T14.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T14.g.cs index 67fb32ae..ee041309 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T14.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T14.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T14.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T14.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T15.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T15.g.cs index 5b33fa8d..f059ed36 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T15.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T15.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T15.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T15.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T16.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T16.g.cs index 49f4beb4..007d06ed 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T16.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T16.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T16.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T16.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T2.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T2.g.cs index ef7a2913..b330975f 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T2.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T2.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T2.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T2.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T3.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T3.g.cs index 0cb89e74..177cef36 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T3.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T3.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T3.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T3.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T4.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T4.g.cs index 6a4461ac..2df89ddb 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T4.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T4.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T4.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T4.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T5.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T5.g.cs index 0256cab3..1ec95bf8 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T5.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T5.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T5.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T5.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T6.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T6.g.cs index f31ccac9..28b72130 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T6.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T6.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T6.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T6.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T7.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T7.g.cs index c248e80d..825e32df 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T7.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T7.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T7.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T7.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T8.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T8.g.cs index af4e3e3f..7d3ae4aa 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T8.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T8.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T8.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T8.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T9.g.cs b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T9.g.cs index df88910a..9f95d6b1 100644 --- a/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T9.g.cs +++ b/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T9.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T9.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct QueryBuilder -{ - /// - public ref QueryBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref QueryBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref QueryBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref QueryBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref QueryBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref QueryBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref QueryBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref QueryBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref QueryBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref QueryBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref QueryBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref QueryBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref QueryBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref QueryBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref QueryBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref QueryBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref QueryBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref QueryBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref QueryBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref QueryBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref QueryBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref QueryBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref QueryBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref QueryBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref QueryBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref QueryBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref QueryBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref QueryBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref QueryBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref QueryBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref QueryBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref QueryBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref QueryBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref QueryBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref QueryBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref QueryBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref QueryBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref QueryBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref QueryBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref QueryBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref QueryBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref QueryBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref QueryBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref QueryBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref QueryBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref QueryBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref QueryBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref QueryBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref QueryBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref QueryBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref QueryBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref QueryBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref QueryBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref QueryBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref QueryBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref QueryBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref QueryBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref QueryBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref QueryBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref QueryBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref QueryBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref QueryBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref QueryBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref QueryBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/QueryBuilder/QueryBuilder.QueryBuilder/T9.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/QueryBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct QueryBuilder +{ + /// + public ref QueryBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref QueryBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref QueryBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref QueryBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref QueryBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref QueryBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref QueryBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref QueryBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref QueryBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref QueryBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref QueryBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref QueryBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref QueryBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref QueryBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref QueryBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref QueryBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref QueryBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref QueryBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref QueryBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref QueryBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref QueryBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref QueryBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref QueryBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref QueryBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref QueryBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref QueryBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref QueryBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref QueryBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref QueryBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref QueryBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref QueryBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref QueryBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref QueryBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref QueryBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref QueryBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref QueryBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref QueryBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref QueryBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref QueryBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref QueryBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref QueryBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref QueryBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref QueryBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref QueryBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref QueryBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref QueryBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref QueryBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref QueryBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref QueryBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref QueryBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref QueryBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref QueryBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref QueryBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref QueryBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref QueryBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref QueryBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref QueryBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref QueryBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref QueryBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref QueryBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref QueryBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref QueryBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref QueryBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref QueryBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref QueryBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref QueryBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref QueryBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref QueryBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref QueryBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref QueryBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref QueryBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref QueryBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref QueryBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder.g.cs index 152e6c14..b8c391d4 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T1.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T1.g.cs index 1bfc5d41..bb1ab914 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T1.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T1.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T1.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T1.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T10.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T10.g.cs index 2cce32eb..f5fc1503 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T10.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T10.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T10.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T10.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T11.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T11.g.cs index 52689eb1..81e066f7 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T11.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T11.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T11.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T11.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T12.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T12.g.cs index 16b3a2a2..b83b283e 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T12.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T12.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T12.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T12.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T13.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T13.g.cs index 7fc48d5f..fad7038d 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T13.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T13.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T13.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T13.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T14.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T14.g.cs index 85bf676b..70a7e5df 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T14.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T14.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T14.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T14.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T15.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T15.g.cs index dd3a3a8e..199c8c44 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T15.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T15.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T15.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T15.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T16.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T16.g.cs index b9afa86c..a06dd9c5 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T16.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T16.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T16.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T16.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T2.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T2.g.cs index b63203a4..49016f22 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T2.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T2.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T2.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T2.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T3.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T3.g.cs index ee42115e..455df56a 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T3.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T3.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T3.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T3.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T4.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T4.g.cs index bf296278..3480ebcd 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T4.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T4.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T4.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T4.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T5.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T5.g.cs index cfbade5a..2d5f15c3 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T5.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T5.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T5.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T5.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T6.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T6.g.cs index 67d90b96..a1f2376a 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T6.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T6.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T6.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T6.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T7.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T7.g.cs index f26e51b5..ea75ccd4 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T7.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T7.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T7.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T7.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T8.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T8.g.cs index accf9101..99da14cf 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T8.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T8.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T8.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T8.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T9.g.cs b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T9.g.cs index ebcbb56a..5c38bd41 100644 --- a/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T9.g.cs +++ b/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T9.g.cs @@ -1,1052 +1,1058 @@ -// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T9.g.cs -// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs -using System; -using static Flecs.NET.Bindings.flecs; - -namespace Flecs.NET.Core; - -public unsafe partial struct SystemBuilder -{ - /// - public ref SystemBuilder Self() - { - Ecs.GetQueryBuilder(ref this).Self(); - return ref this; - } - - /// - public ref SystemBuilder Id(ulong id) - { - Ecs.GetQueryBuilder(ref this).Id(id); - return ref this; - } - - /// - public ref SystemBuilder Entity(ulong entity) - { - Ecs.GetQueryBuilder(ref this).Entity(entity); - return ref this; - } - - /// - public ref SystemBuilder Name(string name) - { - Ecs.GetQueryBuilder(ref this).Name(name); - return ref this; - } - - /// - public ref SystemBuilder Var(string name) - { - Ecs.GetQueryBuilder(ref this).Var(name); - return ref this; - } - - /// - public ref SystemBuilder Term(ulong id) - { - Ecs.GetQueryBuilder(ref this).Term(id); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Src(ulong srcId) - { - Ecs.GetQueryBuilder(ref this).Src(srcId); - return ref this; - } - - /// - public ref SystemBuilder Src() - { - Ecs.GetQueryBuilder(ref this).Src(); - return ref this; - } - - /// - public ref SystemBuilder Src(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Src(value); - return ref this; - } - - /// - public ref SystemBuilder Src(string name) - { - Ecs.GetQueryBuilder(ref this).Src(name); - return ref this; - } - - /// - public ref SystemBuilder First(ulong firstId) - { - Ecs.GetQueryBuilder(ref this).First(firstId); - return ref this; - } - - /// - public ref SystemBuilder First() - { - Ecs.GetQueryBuilder(ref this).First(); - return ref this; - } - - /// - public ref SystemBuilder First(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).First(value); - return ref this; - } - - /// - public ref SystemBuilder First(string name) - { - Ecs.GetQueryBuilder(ref this).First(name); - return ref this; - } - - /// - public ref SystemBuilder Second(ulong secondId) - { - Ecs.GetQueryBuilder(ref this).Second(secondId); - return ref this; - } - - /// - public ref SystemBuilder Second() - { - Ecs.GetQueryBuilder(ref this).Second(); - return ref this; - } - - /// - public ref SystemBuilder Second(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Second(value); - return ref this; - } - - /// - public ref SystemBuilder Second(string secondName) - { - Ecs.GetQueryBuilder(ref this).Second(secondName); - return ref this; - } - - /// - public ref SystemBuilder Up(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Up(traverse); - return ref this; - } - - /// - public ref SystemBuilder Up() - { - Ecs.GetQueryBuilder(ref this).Up(); - return ref this; - } - - /// - public ref SystemBuilder Up(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Up(value); - return ref this; - } - - /// - public ref SystemBuilder Cascade(ulong traverse = 0) - { - Ecs.GetQueryBuilder(ref this).Cascade(traverse); - return ref this; - } - - /// - public ref SystemBuilder Cascade() - { - Ecs.GetQueryBuilder(ref this).Cascade(); - return ref this; - } - - /// - public ref SystemBuilder Cascade(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Cascade(value); - return ref this; - } - - /// - public ref SystemBuilder Descend() - { - Ecs.GetQueryBuilder(ref this).Descend(); - return ref this; - } - - /// - public ref SystemBuilder Parent() - { - Ecs.GetQueryBuilder(ref this).Parent(); - return ref this; - } - - /// - public ref SystemBuilder Trav(ulong traverse, uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(uint flags = 0) - { - Ecs.GetQueryBuilder(ref this).Trav(flags); - return ref this; - } - - /// - public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Trav(value, flags); - return ref this; - } - - /// - public ref SystemBuilder Flags(ulong flags) - { - Ecs.GetQueryBuilder(ref this).Flags(flags); - return ref this; - } - - /// - public ref SystemBuilder InOut(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOut(inOut); - return ref this; - } - - /// - public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) - { - Ecs.GetQueryBuilder(ref this).InOutStage(inOut); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder ReadWrite() - { - Ecs.GetQueryBuilder(ref this).ReadWrite(); - return ref this; - } - - /// - public ref SystemBuilder In() - { - Ecs.GetQueryBuilder(ref this).In(); - return ref this; - } - - /// - public ref SystemBuilder Out() - { - Ecs.GetQueryBuilder(ref this).Out(); - return ref this; - } - - /// - public ref SystemBuilder InOut() - { - Ecs.GetQueryBuilder(ref this).InOut(); - return ref this; - } - - /// - public ref SystemBuilder InOutNone() - { - Ecs.GetQueryBuilder(ref this).InOutNone(); - return ref this; - } - - /// - public ref SystemBuilder Oper(ecs_oper_kind_t oper) - { - Ecs.GetQueryBuilder(ref this).Oper(oper); - return ref this; - } - - /// - public ref SystemBuilder And() - { - Ecs.GetQueryBuilder(ref this).And(); - return ref this; - } - - /// - public ref SystemBuilder Or() - { - Ecs.GetQueryBuilder(ref this).Or(); - return ref this; - } - - /// - public ref SystemBuilder Not() - { - Ecs.GetQueryBuilder(ref this).Not(); - return ref this; - } - - /// - public ref SystemBuilder Optional() - { - Ecs.GetQueryBuilder(ref this).Optional(); - return ref this; - } - - /// - public ref SystemBuilder AndFrom() - { - Ecs.GetQueryBuilder(ref this).AndFrom(); - return ref this; - } - - /// - public ref SystemBuilder OrFrom() - { - Ecs.GetQueryBuilder(ref this).OrFrom(); - return ref this; - } - - /// - public ref SystemBuilder NotFrom() - { - Ecs.GetQueryBuilder(ref this).NotFrom(); - return ref this; - } - - /// - public ref SystemBuilder Singleton() - { - Ecs.GetQueryBuilder(ref this).Singleton(); - return ref this; - } - - /// - public ref SystemBuilder Filter() - { - Ecs.GetQueryBuilder(ref this).Filter(); - return ref this; - } - - /// - public ref SystemBuilder QueryFlags(uint flags) - { - Ecs.GetQueryBuilder(ref this).QueryFlags(flags); - return ref this; - } - - /// - public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) - { - Ecs.GetQueryBuilder(ref this).CacheKind(kind); - return ref this; - } - - /// - public ref SystemBuilder Cached() - { - Ecs.GetQueryBuilder(ref this).Cached(); - return ref this; - } - - /// - public ref SystemBuilder Expr(string expr) - { - Ecs.GetQueryBuilder(ref this).Expr(expr); - return ref this; - } - - /// - public ref SystemBuilder With(Term term) - { - Ecs.GetQueryBuilder(ref this).With(term); - return ref this; - } - - /// - public ref SystemBuilder With(ulong id) - { - Ecs.GetQueryBuilder(ref this).With(id); - return ref this; - } - - /// - public ref SystemBuilder With(string name) - { - Ecs.GetQueryBuilder(ref this).With(name); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, string second) - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).With(value); - return ref this; - } - - /// - public ref SystemBuilder With(ulong second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(string second) - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With() - { - Ecs.GetQueryBuilder(ref this).With(); - return ref this; - } - - /// - public ref SystemBuilder With(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(second); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first); - return ref this; - } - - /// - public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).With(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Without(Term term) - { - Ecs.GetQueryBuilder(ref this).Without(term); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong id) - { - Ecs.GetQueryBuilder(ref this).Without(id); - return ref this; - } - - /// - public ref SystemBuilder Without(string name) - { - Ecs.GetQueryBuilder(ref this).Without(name); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Without(value); - return ref this; - } - - /// - public ref SystemBuilder Without(ulong second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(string second) - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without() - { - Ecs.GetQueryBuilder(ref this).Without(); - return ref this; - } - - /// - public ref SystemBuilder Without(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(second); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first); - return ref this; - } - - /// - public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Without(first, second); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WithoutSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WithoutSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Write(Term term) - { - Ecs.GetQueryBuilder(ref this).Write(term); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong id) - { - Ecs.GetQueryBuilder(ref this).Write(id); - return ref this; - } - - /// - public ref SystemBuilder Write(string name) - { - Ecs.GetQueryBuilder(ref this).Write(name); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Write(value); - return ref this; - } - - /// - public ref SystemBuilder Write(ulong second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(string second) - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write() - { - Ecs.GetQueryBuilder(ref this).Write(); - return ref this; - } - - /// - public ref SystemBuilder Write(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(second); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first); - return ref this; - } - - /// - public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Write(first, second); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder WriteSecond(string first) - { - Ecs.GetQueryBuilder(ref this).WriteSecond(first); - return ref this; - } - - /// - public ref SystemBuilder Read(Term term) - { - Ecs.GetQueryBuilder(ref this).Read(term); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong id) - { - Ecs.GetQueryBuilder(ref this).Read(id); - return ref this; - } - - /// - public ref SystemBuilder Read(string name) - { - Ecs.GetQueryBuilder(ref this).Read(name); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, string second) - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(T value) where T : Enum - { - Ecs.GetQueryBuilder(ref this).Read(value); - return ref this; - } - - /// - public ref SystemBuilder Read(ulong second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(string second) - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read() - { - Ecs.GetQueryBuilder(ref this).Read(); - return ref this; - } - - /// - public ref SystemBuilder Read(TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(second); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first); - return ref this; - } - - /// - public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum - { - Ecs.GetQueryBuilder(ref this).Read(first, second); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(ulong first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ReadSecond(string first) - { - Ecs.GetQueryBuilder(ref this).ReadSecond(first); - return ref this; - } - - /// - public ref SystemBuilder ScopeOpen() - { - Ecs.GetQueryBuilder(ref this).ScopeOpen(); - return ref this; - } - - /// - public ref SystemBuilder ScopeClose() - { - Ecs.GetQueryBuilder(ref this).ScopeClose(); - return ref this; - } - - /// - public ref SystemBuilder Term() - { - Ecs.GetQueryBuilder(ref this).Term(); - return ref this; - } - - /// - public ref SystemBuilder TermAt() - { - Ecs.GetQueryBuilder(ref this).TermAt(); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder TermAt(int termIndex) - { - Ecs.GetQueryBuilder(ref this).TermAt(termIndex); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) - { - Ecs.GetQueryBuilder(ref this).OrderBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy() - { - Ecs.GetQueryBuilder(ref this).GroupBy(); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) - { - Ecs.GetQueryBuilder(ref this).GroupBy(callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder GroupByCtx(T value, delegate* callback) - { - Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } - - /// - public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) - { - Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); - return ref this; - } +// /_/src/Flecs.NET/Generated/SystemBuilder/SystemBuilder.QueryBuilder/T9.g.cs +// File was auto-generated by /_/src/Flecs.NET.Codegen/Generators/SystemBuilder.cs +using System; +using static Flecs.NET.Bindings.flecs; + +namespace Flecs.NET.Core; + +public unsafe partial struct SystemBuilder +{ + /// + public ref SystemBuilder Self() + { + Ecs.GetQueryBuilder(ref this).Self(); + return ref this; + } + + /// + public ref SystemBuilder Id(ulong id) + { + Ecs.GetQueryBuilder(ref this).Id(id); + return ref this; + } + + /// + public ref SystemBuilder Entity(ulong entity) + { + Ecs.GetQueryBuilder(ref this).Entity(entity); + return ref this; + } + + /// + public ref SystemBuilder Name(string name) + { + Ecs.GetQueryBuilder(ref this).Name(name); + return ref this; + } + + /// + public ref SystemBuilder Var(string name) + { + Ecs.GetQueryBuilder(ref this).Var(name); + return ref this; + } + + /// + public ref SystemBuilder Term(ulong id) + { + Ecs.GetQueryBuilder(ref this).Term(id); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Src(ulong srcId) + { + Ecs.GetQueryBuilder(ref this).Src(srcId); + return ref this; + } + + /// + public ref SystemBuilder Src() + { + Ecs.GetQueryBuilder(ref this).Src(); + return ref this; + } + + /// + public ref SystemBuilder Src(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Src(value); + return ref this; + } + + /// + public ref SystemBuilder Src(string name) + { + Ecs.GetQueryBuilder(ref this).Src(name); + return ref this; + } + + /// + public ref SystemBuilder First(ulong firstId) + { + Ecs.GetQueryBuilder(ref this).First(firstId); + return ref this; + } + + /// + public ref SystemBuilder First() + { + Ecs.GetQueryBuilder(ref this).First(); + return ref this; + } + + /// + public ref SystemBuilder First(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).First(value); + return ref this; + } + + /// + public ref SystemBuilder First(string name) + { + Ecs.GetQueryBuilder(ref this).First(name); + return ref this; + } + + /// + public ref SystemBuilder Second(ulong secondId) + { + Ecs.GetQueryBuilder(ref this).Second(secondId); + return ref this; + } + + /// + public ref SystemBuilder Second() + { + Ecs.GetQueryBuilder(ref this).Second(); + return ref this; + } + + /// + public ref SystemBuilder Second(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Second(value); + return ref this; + } + + /// + public ref SystemBuilder Second(string secondName) + { + Ecs.GetQueryBuilder(ref this).Second(secondName); + return ref this; + } + + /// + public ref SystemBuilder Up(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Up(traverse); + return ref this; + } + + /// + public ref SystemBuilder Up() + { + Ecs.GetQueryBuilder(ref this).Up(); + return ref this; + } + + /// + public ref SystemBuilder Up(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Up(value); + return ref this; + } + + /// + public ref SystemBuilder Cascade(ulong traverse = 0) + { + Ecs.GetQueryBuilder(ref this).Cascade(traverse); + return ref this; + } + + /// + public ref SystemBuilder Cascade() + { + Ecs.GetQueryBuilder(ref this).Cascade(); + return ref this; + } + + /// + public ref SystemBuilder Cascade(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Cascade(value); + return ref this; + } + + /// + public ref SystemBuilder Descend() + { + Ecs.GetQueryBuilder(ref this).Descend(); + return ref this; + } + + /// + public ref SystemBuilder Parent() + { + Ecs.GetQueryBuilder(ref this).Parent(); + return ref this; + } + + /// + public ref SystemBuilder Trav(ulong traverse, uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(traverse, flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(uint flags = 0) + { + Ecs.GetQueryBuilder(ref this).Trav(flags); + return ref this; + } + + /// + public ref SystemBuilder Trav(T value, uint flags = 0) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Trav(value, flags); + return ref this; + } + + /// + public ref SystemBuilder Flags(ulong flags) + { + Ecs.GetQueryBuilder(ref this).Flags(flags); + return ref this; + } + + /// + public ref SystemBuilder InOut(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOut(inOut); + return ref this; + } + + /// + public ref SystemBuilder InOutStage(ecs_inout_kind_t inOut) + { + Ecs.GetQueryBuilder(ref this).InOutStage(inOut); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder ReadWrite() + { + Ecs.GetQueryBuilder(ref this).ReadWrite(); + return ref this; + } + + /// + public ref SystemBuilder In() + { + Ecs.GetQueryBuilder(ref this).In(); + return ref this; + } + + /// + public ref SystemBuilder Out() + { + Ecs.GetQueryBuilder(ref this).Out(); + return ref this; + } + + /// + public ref SystemBuilder InOut() + { + Ecs.GetQueryBuilder(ref this).InOut(); + return ref this; + } + + /// + public ref SystemBuilder InOutNone() + { + Ecs.GetQueryBuilder(ref this).InOutNone(); + return ref this; + } + + /// + public ref SystemBuilder Oper(ecs_oper_kind_t oper) + { + Ecs.GetQueryBuilder(ref this).Oper(oper); + return ref this; + } + + /// + public ref SystemBuilder And() + { + Ecs.GetQueryBuilder(ref this).And(); + return ref this; + } + + /// + public ref SystemBuilder Or() + { + Ecs.GetQueryBuilder(ref this).Or(); + return ref this; + } + + /// + public ref SystemBuilder Not() + { + Ecs.GetQueryBuilder(ref this).Not(); + return ref this; + } + + /// + public ref SystemBuilder Optional() + { + Ecs.GetQueryBuilder(ref this).Optional(); + return ref this; + } + + /// + public ref SystemBuilder AndFrom() + { + Ecs.GetQueryBuilder(ref this).AndFrom(); + return ref this; + } + + /// + public ref SystemBuilder OrFrom() + { + Ecs.GetQueryBuilder(ref this).OrFrom(); + return ref this; + } + + /// + public ref SystemBuilder NotFrom() + { + Ecs.GetQueryBuilder(ref this).NotFrom(); + return ref this; + } + + /// + public ref SystemBuilder Singleton() + { + Ecs.GetQueryBuilder(ref this).Singleton(); + return ref this; + } + + /// + public ref SystemBuilder Filter() + { + Ecs.GetQueryBuilder(ref this).Filter(); + return ref this; + } + + /// + public ref SystemBuilder QueryFlags(uint flags) + { + Ecs.GetQueryBuilder(ref this).QueryFlags(flags); + return ref this; + } + + /// + public ref SystemBuilder CacheKind(ecs_query_cache_kind_t kind) + { + Ecs.GetQueryBuilder(ref this).CacheKind(kind); + return ref this; + } + + /// + public ref SystemBuilder Cached() + { + Ecs.GetQueryBuilder(ref this).Cached(); + return ref this; + } + + /// + public ref SystemBuilder Expr(string expr) + { + Ecs.GetQueryBuilder(ref this).Expr(expr); + return ref this; + } + + /// + public ref SystemBuilder With(Term term) + { + Ecs.GetQueryBuilder(ref this).With(term); + return ref this; + } + + /// + public ref SystemBuilder With(ulong id) + { + Ecs.GetQueryBuilder(ref this).With(id); + return ref this; + } + + /// + public ref SystemBuilder With(string name) + { + Ecs.GetQueryBuilder(ref this).With(name); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, string second) + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).With(value); + return ref this; + } + + /// + public ref SystemBuilder With(ulong second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(string second) + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With() + { + Ecs.GetQueryBuilder(ref this).With(); + return ref this; + } + + /// + public ref SystemBuilder With(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(second); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first); + return ref this; + } + + /// + public ref SystemBuilder With(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder With(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).With(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Without(Term term) + { + Ecs.GetQueryBuilder(ref this).Without(term); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong id) + { + Ecs.GetQueryBuilder(ref this).Without(id); + return ref this; + } + + /// + public ref SystemBuilder Without(string name) + { + Ecs.GetQueryBuilder(ref this).Without(name); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Without(value); + return ref this; + } + + /// + public ref SystemBuilder Without(ulong second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(string second) + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without() + { + Ecs.GetQueryBuilder(ref this).Without(); + return ref this; + } + + /// + public ref SystemBuilder Without(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(second); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first); + return ref this; + } + + /// + public ref SystemBuilder Without(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder Without(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Without(first, second); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WithoutSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WithoutSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Write(Term term) + { + Ecs.GetQueryBuilder(ref this).Write(term); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong id) + { + Ecs.GetQueryBuilder(ref this).Write(id); + return ref this; + } + + /// + public ref SystemBuilder Write(string name) + { + Ecs.GetQueryBuilder(ref this).Write(name); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Write(value); + return ref this; + } + + /// + public ref SystemBuilder Write(ulong second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(string second) + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write() + { + Ecs.GetQueryBuilder(ref this).Write(); + return ref this; + } + + /// + public ref SystemBuilder Write(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(second); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first); + return ref this; + } + + /// + public ref SystemBuilder Write(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder Write(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Write(first, second); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder WriteSecond(string first) + { + Ecs.GetQueryBuilder(ref this).WriteSecond(first); + return ref this; + } + + /// + public ref SystemBuilder Read(Term term) + { + Ecs.GetQueryBuilder(ref this).Read(term); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong id) + { + Ecs.GetQueryBuilder(ref this).Read(id); + return ref this; + } + + /// + public ref SystemBuilder Read(string name) + { + Ecs.GetQueryBuilder(ref this).Read(name); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, string second) + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(T value) where T : Enum + { + Ecs.GetQueryBuilder(ref this).Read(value); + return ref this; + } + + /// + public ref SystemBuilder Read(ulong second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(string second) + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read() + { + Ecs.GetQueryBuilder(ref this).Read(); + return ref this; + } + + /// + public ref SystemBuilder Read(TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(second); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first); + return ref this; + } + + /// + public ref SystemBuilder Read(TFirst first, string second) where TFirst : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder Read(string first, TSecond second) where TSecond : Enum + { + Ecs.GetQueryBuilder(ref this).Read(first, second); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(ulong first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ReadSecond(string first) + { + Ecs.GetQueryBuilder(ref this).ReadSecond(first); + return ref this; + } + + /// + public ref SystemBuilder ScopeOpen() + { + Ecs.GetQueryBuilder(ref this).ScopeOpen(); + return ref this; + } + + /// + public ref SystemBuilder ScopeClose() + { + Ecs.GetQueryBuilder(ref this).ScopeClose(); + return ref this; + } + + /// + public ref SystemBuilder Term() + { + Ecs.GetQueryBuilder(ref this).Term(); + return ref this; + } + + /// + public ref SystemBuilder TermAt() + { + Ecs.GetQueryBuilder(ref this).TermAt(); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder TermAt(int termIndex) + { + Ecs.GetQueryBuilder(ref this).TermAt(termIndex); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(ulong component, Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder OrderBy(Ecs.OrderByCallback callback) + { + Ecs.GetQueryBuilder(ref this).OrderBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(ulong component, Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(component, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy() + { + Ecs.GetQueryBuilder(ref this).GroupBy(); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupBy(Ecs.GroupByCallback callback) + { + Ecs.GetQueryBuilder(ref this).GroupBy(callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, Ecs.UserContextFinish callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder GroupByCtx(T value, delegate* callback) + { + Ecs.GetQueryBuilder(ref this).GroupByCtx(value, callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupCreate(Ecs.GroupCreateCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupCreate(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + /// + public ref SystemBuilder OnGroupDelete(Ecs.GroupDeleteCallback callback) + { + Ecs.GetQueryBuilder(ref this).OnGroupDelete(callback); + return ref this; + } + + public ref SystemBuilder DetectChanges() + { + Ecs.GetQueryBuilder(ref this).DetectChanges(); + return ref this; + } } \ No newline at end of file diff --git a/src/Flecs.NET/Utilities/Managed.cs b/src/Flecs.NET/Utilities/Managed.cs index d2492a18..87179073 100644 --- a/src/Flecs.NET/Utilities/Managed.cs +++ b/src/Flecs.NET/Utilities/Managed.cs @@ -1,83 +1,101 @@ -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Flecs.NET.Core.BindingContext; - -namespace Flecs.NET.Utilities; - -/// -/// Static class for working with managed memory in flecs. -/// -public static unsafe class Managed -{ - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void AllocGcHandle(T* comp, out GCHandle handle) - { - handle = GCHandle.Alloc(new StrongBox(*comp)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void FreeGcHandle(IntPtr handle) - { - if (handle != IntPtr.Zero) - GCHandle.FromIntPtr(handle).Free(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void FreeGcHandle(GCHandle handle) - { - if ((IntPtr)handle != IntPtr.Zero) - handle.Free(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void FreeGcHandle(void* data, int index = 0) - { - IntPtr handle = ((IntPtr*)data)[index]; - FreeGcHandle(handle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static ref T GetTypeRef(void* data) - { - if (!RuntimeHelpers.IsReferenceOrContainsReferences()) - return ref Unsafe.AsRef(data); - - GCHandle handle = GCHandle.FromIntPtr(*(IntPtr*)data); - StrongBox box = (StrongBox)handle.Target!; - return ref box.Value!; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static ref T GetTypeRef(void* data, int index) - { - if (data == null) - return ref Unsafe.NullRef(); - - if (!RuntimeHelpers.IsReferenceOrContainsReferences()) - return ref ((T*)data)[index]; - - GCHandle handle = GCHandle.FromIntPtr(((IntPtr*)data)[index]); - StrongBox box = (StrongBox)handle.Target!; - return ref box.Value!; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static ref T GetTypeRef(IntPtr data) - { - return ref GetTypeRef((void*)data); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static ref T GetTypeRef(IntPtr data, int index) - { - return ref GetTypeRef((void*)data, index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static ref T GetTypeRef(GCHandle handle) - { - StrongBox box = (StrongBox)handle.Target!; - return ref box.Value!; - } -} +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Flecs.NET.Core.BindingContext; + +namespace Flecs.NET.Utilities; + +/// +/// Static class for working with managed memory in flecs. +/// +public static unsafe class Managed +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void AllocGcHandle(T* comp, out GCHandle handle) + { + handle = GCHandle.Alloc(new StrongBox(*comp)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FreeGcHandle(IntPtr handle) + { + if (handle != IntPtr.Zero) + GCHandle.FromIntPtr(handle).Free(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FreeGcHandle(GCHandle handle) + { + if ((IntPtr)handle != IntPtr.Zero) + handle.Free(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void FreeGcHandle(void* data, int index = 0) + { + IntPtr handle = ((IntPtr*)data)[index]; + FreeGcHandle(handle); + } + + private static readonly Dictionary TypeIsRefy = new(); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static object Get(Type type, void* data) + { + if (!TypeIsRefy.TryGetValue(type, out bool refy)) + { + TypeIsRefy.Add(type, refy = (bool) typeof(RuntimeHelpers).GetMethod(nameof(RuntimeHelpers.IsReferenceOrContainsReferences))!.MakeGenericMethod(type).Invoke(null, [])!); + } + + if (refy) + return Unsafe.AsRef(data); + + GCHandle handle = GCHandle.FromIntPtr(*(IntPtr*)data); + IStrongBox box = (IStrongBox)handle.Target!; + return box.Value!; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ref T GetTypeRef(void* data) + { + if (!RuntimeHelpers.IsReferenceOrContainsReferences()) + return ref Unsafe.AsRef(data); + + GCHandle handle = GCHandle.FromIntPtr(*(IntPtr*)data); + StrongBox box = (StrongBox)handle.Target!; + return ref box.Value!; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ref T GetTypeRef(void* data, int index) + { + if (data == null) + return ref Unsafe.NullRef(); + + if (!RuntimeHelpers.IsReferenceOrContainsReferences()) + return ref ((T*)data)[index]; + + GCHandle handle = GCHandle.FromIntPtr(((IntPtr*)data)[index]); + StrongBox box = (StrongBox)handle.Target!; + return ref box.Value!; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ref T GetTypeRef(IntPtr data) + { + return ref GetTypeRef((void*)data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ref T GetTypeRef(IntPtr data, int index) + { + return ref GetTypeRef((void*)data, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ref T GetTypeRef(GCHandle handle) + { + StrongBox box = (StrongBox)handle.Target!; + return ref box.Value!; + } +}