Skip to content

[Engine] ComponentRegistry, EcsCore, signature 갱신 및 cleanup flow 구현#66

Merged
learncold merged 3 commits into
mainfrom
feat/issue-8
Apr 3, 2026
Merged

[Engine] ComponentRegistry, EcsCore, signature 갱신 및 cleanup flow 구현#66
learncold merged 3 commits into
mainfrom
feat/issue-8

Conversation

@SilverSupplier
Copy link
Copy Markdown
Collaborator

Summary

  • ComponentRegistry: 컴포넌트 타입별 고유 ID 부여 및 PackedComponentStorage 중앙 관리
  • EcsCore: EntityRegistry + ComponentRegistry 통합 코어
    • addComponent/removeComponent 시 entity Signature 자동 갱신
    • destroyEntity 시 notifyEntityDestroyed로 등록된 모든 storage cleanup
  • EcsCoreTests: 생명주기, 컴포넌트 추가/제거, cleanup flow, 인덱스 재사용 검증

Related Issue

Area

  • Engine

Architecture Check

  • I kept the dependency direction application -> domain -> engine.
  • I did not add Qt UI code to src/domain.
  • I did not add domain or application dependencies to src/engine.
  • I used src/ as the include root.

Verification

  • cmake --preset windows-debug-no-app
  • cmake --build --preset build-no-app-debug
  • ctest --preset test-no-app-debug

Risks / Follow-up

… 구현 (#8)

## Summary

- ComponentRegistry: 컴포넌트 타입별 고유 ID 부여 및 PackedComponentStorage 중앙 관리
- EcsCore: EntityRegistry + ComponentRegistry 통합 코어
  - addComponent/removeComponent 시 entity Signature 자동 갱신
  - destroyEntity 시 notifyEntityDestroyed로 등록된 모든 storage cleanup
- EcsCoreTests: 생명주기, 컴포넌트 추가/제거, cleanup flow, 인덱스 재사용 검증

## Related Issue

- Closes #8

## Area

- [x] Engine

## Architecture Check

- [x] I kept the dependency direction `application -> domain -> engine`.
- [x] I did not add Qt UI code to `src/domain`.
- [x] I did not add `domain` or `application` dependencies to `src/engine`.
- [x] I used `src/` as the include root.

## Verification

- [ ] `cmake --preset windows-debug`
- [ ] `cmake --build --preset build-debug`
- [ ] `ctest --preset test-debug`
- [x] Not run (reason below)

로컬 환경의 PATH에 cmake가 없어 직접 실행 불가. CI pipeline에서 검증됨.

## Risks / Follow-up

- WorldQuery(#9) 구현 시 EntityRegistry::eachAlive() 추가 예정
- EcsCore_EntityIndex_Reuse: EcsCore(1)로 capacity 명시
  FIFO free list에서 default capacity(4096)는 즉시 index 재사용을
  보장하지 않아 테스트가 실패했다. EngineRegistryTests와 동일하게
  capacity=1로 시나리오를 명시적으로 구성한다.
- ComponentRegistry.h, EcsCore.h: 설명 주석 제거
Copy link
Copy Markdown
Owner

리뷰 반영은 제가 진행하겠습니다. 두 finding 모두 수정해서 PR 브랜치를 업데이트한 뒤 다시 확인 후 merge하겠습니다.

@learncold learncold merged commit 75b2330 into main Apr 3, 2026
2 checks passed
@learncold learncold deleted the feat/issue-8 branch April 3, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task-Implement ComponentRegistry, Signature updates, and EcsCore cleanup flow

2 participants