Skip to content

Task-Implement WorldQuery facade for ECS reads #9

@learncold

Description

@learncold

Summary

EcsCore에 대한 읽기 전용 facade인 WorldQuery를 구현한다. view<T...>()로 특정 컴포넌트를 모두 보유한 entity 목록을 조회하고, contains<T>()get<T>()로 개별 entity의 컴포넌트 존재 여부와 데이터를 읽는다.

Parent Issue

#1

Area

Engine

Target Sprint

Sprint 1

Scope

  • WorldQuery: EcsCore& 참조를 보유하는 read-only facade
    • view<T...>(): 지정 타입의 Signature 비트를 조합해 조건을 만족하는 entity 목록 반환, 미등록 타입 포함 시 빈 벡터 반환
    • contains<T>(): entity의 컴포넌트 보유 여부 반환
    • get<T>(): entity의 컴포넌트 참조 반환 (const/non-const 오버로드)
  • EntityRegistry::eachAlive(): entity와 Signature를 함께 전달하는 템플릿 순회 메서드 추가
  • WorldQueryTests: view 필터링, 미등록 타입, 파괴된 entity 제외, contains, get 검증

Acceptance Criteria

  • view<T...>()가 지정 컴포넌트를 모두 보유한 entity만 반환한다
  • 미등록 타입이 포함된 view<T...>() 호출은 빈 벡터를 반환한다
  • destroyEntity 이후 해당 entity는 view 결과에서 제외된다
  • contains<T>()get<T>()EcsCore의 동작과 일치한다

Architecture / Dependency Check

  • 구현 파일은 src/engine 안에만 둔다
  • engine이 domain 또는 application을 include하지 않는다
  • Qt 코드를 포함하지 않는다
  • include 경로는 engine/... 기준을 유지한다

Verification Plan

  • cmake --preset windows-debug-no-app
  • cmake --build --preset build-no-app-debug
  • ctest --preset test-no-app-debug
  • WorldQueryTests 전체 통과

Dependencies / Blockers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions