Skip to main content

Software Design Specification (SDS)

1. Overview

1.1 Purpose

본 문서는 **Ghost 라이브러리의 소프트웨어 설계(SDS, Software Design Specification)**를 정의한다.

Ghost는 Grap 시스템의 Platform Layer (P2) 로 동작하는 라이브러리이며,
운영체제 플랫폼과 직접 통신하여 다음 기능을 구현한다.

  • Window 생성 및 관리
  • OS 메시지 처리
  • NativeEvent 생성
  • CPU Writable Surface 제공
  • 플랫폼 시간 측정

본 문서는 현재 코드 구현을 기반으로 설계를 설명한다.

추측 기반 기능이나 향후 기능은 포함하지 않는다.


1.2 Scope

Ghost 라이브러리는 다음 설계 영역을 포함한다.

ComponentDescription
Window SystemWindow 생성 및 lifecycle 관리
Native Event SystemOS 이벤트 수집
CPU SurfaceWindow backbuffer 접근
Platform IntegrationOS API 호출
Time System플랫폼 시간 측정

Ghost는 플랫폼 추상화 계층으로 동작한다.

다음 기능은 설계 범위에 포함되지 않는다.

Excluded ComponentDescription
Renderer그래픽 렌더링
UI SystemUI 레이아웃
Input MappingNativeEvent → Engine Event 변환
Asset System파일 또는 리소스 로딩

1.3 Design Goals

Ghost 설계의 주요 목표는 다음과 같다.

GoalDescription
Platform AbstractionOS API 추상화
Lightweight API단순한 API 제공
Handle Based System플랫폼 핸들 은닉
Minimal Dependencies최소 의존성 유지
Modular Architecture모듈 기반 구조

1.4 Module Structure

Ghost 라이브러리는 다음 모듈 구조로 구성된다.

ghost/
├── common/
├── id/
├── window/
├── time/
├── native_event/
├── platform/
└── tests/

각 모듈의 역할

ModuleResponsibility
common공통 타입
id객체 식별 시스템
windowWindow API
time시간 측정
native_event입력 이벤트
platform플랫폼 구현
tests테스트 코드

1.5 Design Principles

Ghost 설계는 다음 원칙을 따른다.

Platform Isolation

플랫폼 타입은 외부 API에 노출되지 않는다.

예시

HWND

이 타입은 Ghost API 외부에 노출되지 않는다.


Handle Based Object Model

Ghost 객체는 ID 기반 핸들 시스템을 사용한다.

예시

GhostWindowId

이 ID를 통해 내부 플랫폼 상태를 조회한다.


Module Separation

각 모듈은 명확히 분리되어 있다.

LayerModule
Core Typescommon
Object Identityid
Public APIwindow
Input Systemnative_event
Time Systemtime
Platform Implementationplatform

1.6 External Dependencies

현재 Ghost 구현은 다음 플랫폼 API를 사용한다.

DependencyDescription
Win32 APIWindow 생성 및 메시지 처리
GDIBackbuffer 생성
QueryPerformanceCounter고해상도 타이머

1.7 Document Structure

본 SDS 문서는 다음 구조로 구성된다.

SectionDescription
Architecture전체 시스템 구조
Module Design모듈 설계
Data Structures핵심 구조체
API Design주요 API 설계
Platform Implementation플랫폼 구현

이 문서는 Ghost 라이브러리의 현재 설계를 설명하는 기술 문서이다.