Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::project_manager Class Reference

#include <project_manager.h>

Classes

struct  project_compat_report
 

Public Types

enum class  project_compat : std::uint8_t { no_info_file , ok , engine_older }
 

Public Member Functions

 project_manager (rtti::context &ctx, cmd_line::parser &parser)
 
 ~project_manager ()
 
auto init (rtti::context &ctx, const cmd_line::parser &parser) -> bool
 
auto deinit (rtti::context &ctx) -> bool
 
auto inspect_project (const fs::path &project_path) const -> project_compat_report
 
auto open_project (rtti::context &ctx, const fs::path &project_path) -> bool
 
void close_project (rtti::context &ctx)
 
void create_project (rtti::context &ctx, const fs::path &project_path)
 
auto regenerate_agent_files () -> bool
 
void save_editor_settings ()
 
void load_editor_settings ()
 
auto get_name () const -> const std::string &
 
void set_name (const std::string &name)
 
auto get_settings () -> settings &
 
auto get_deploy_settings () -> deploy_settings &
 
auto get_editor_settings () -> editor_settings &
 
auto get_project_editor_settings () -> project_editor_settings &
 
auto get_project_info () -> project_info &
 
auto get_project_info () const -> const project_info &
 
auto has_open_project () const -> bool
 
void load_project_settings ()
 
void save_project_settings (rtti::context &ctx)
 
void load_deploy_settings ()
 
void save_deploy_settings ()
 
void load_project_editor_settings ()
 
void save_project_editor_settings ()
 
auto load_project_info () -> bool
 
void save_project_info ()
 

Detailed Description

Definition at line 16 of file project_manager.h.

Member Enumeration Documentation

◆ project_compat

enum class unravel::project_manager::project_compat : std::uint8_t
strong

Result of inspect_project describing a project's on-disk metadata. Used so UI callers can show a confirmation prompt before committing to open_project, without having to implement any of the file I/O themselves.

Enumerator
no_info_file 

No project.cfg found - this is a legacy project. open_project will create one on-the-fly, preserving all existing content.

ok 

Project was last opened by the same or a newer engine build than the running one. Safe to open (or at worst: the rare case of a downgrade, which we don't guard against).

engine_older 

Project was last opened by a strictly older engine build than the running one, compared across all version components. On-disk formats may have evolved since, so the UI layer should prompt the user before committing to an open that re-saves everything.

Definition at line 30 of file project_manager.h.

Constructor & Destructor Documentation

◆ project_manager()

unravel::project_manager::project_manager ( rtti::context & ctx,
cmd_line::parser & parser )

Definition at line 512 of file project_manager.cpp.

◆ ~project_manager()

unravel::project_manager::~project_manager ( )

Definition at line 571 of file project_manager.cpp.

Member Function Documentation

◆ close_project()

void unravel::project_manager::close_project ( rtti::context & ctx)

Definition at line 91 of file project_manager.cpp.

◆ create_project()

void unravel::project_manager::create_project ( rtti::context & ctx,
const fs::path & project_path )

Definition at line 365 of file project_manager.cpp.

◆ deinit()

auto unravel::project_manager::deinit ( rtti::context & ctx) -> bool

Definition at line 562 of file project_manager.cpp.

◆ get_deploy_settings()

auto unravel::project_manager::get_deploy_settings ( ) -> deploy_settings&

Definition at line 497 of file project_manager.cpp.

◆ get_editor_settings()

auto unravel::project_manager::get_editor_settings ( ) -> editor_settings&

Definition at line 502 of file project_manager.cpp.

◆ get_name()

auto unravel::project_manager::get_name ( ) const -> const std::string&

Definition at line 482 of file project_manager.cpp.

◆ get_project_editor_settings()

auto unravel::project_manager::get_project_editor_settings ( ) -> project_editor_settings&

Definition at line 312 of file project_manager.cpp.

◆ get_project_info() [1/2]

auto unravel::project_manager::get_project_info ( ) -> project_info&

Definition at line 317 of file project_manager.cpp.

◆ get_project_info() [2/2]

auto unravel::project_manager::get_project_info ( ) const -> const project_info&

Definition at line 322 of file project_manager.cpp.

◆ get_settings()

auto unravel::project_manager::get_settings ( ) -> settings&

Definition at line 492 of file project_manager.cpp.

◆ has_open_project()

auto unravel::project_manager::has_open_project ( ) const -> bool

Definition at line 507 of file project_manager.cpp.

◆ init()

auto unravel::project_manager::init ( rtti::context & ctx,
const cmd_line::parser & parser ) -> bool

Definition at line 536 of file project_manager.cpp.

◆ inspect_project()

auto unravel::project_manager::inspect_project ( const fs::path & project_path) const -> project_compat_report

Inspects a project directory without opening it. Cheap enough to be called from the hub list / recent-projects view for every entry.

Definition at line 327 of file project_manager.cpp.

◆ load_deploy_settings()

void unravel::project_manager::load_deploy_settings ( )

Definition at line 275 of file project_manager.cpp.

◆ load_editor_settings()

void unravel::project_manager::load_editor_settings ( )

Definition at line 453 of file project_manager.cpp.

◆ load_project_editor_settings()

void unravel::project_manager::load_project_editor_settings ( )

Definition at line 291 of file project_manager.cpp.

◆ load_project_info()

auto unravel::project_manager::load_project_info ( ) -> bool

Loads app:/project.cfg into project_info_. If the file is missing, returns false and leaves project_info_ default-constructed.

Definition at line 301 of file project_manager.cpp.

◆ load_project_settings()

void unravel::project_manager::load_project_settings ( )

Definition at line 263 of file project_manager.cpp.

◆ open_project()

auto unravel::project_manager::open_project ( rtti::context & ctx,
const fs::path & project_path ) -> bool

Definition at line 132 of file project_manager.cpp.

◆ regenerate_agent_files()

auto unravel::project_manager::regenerate_agent_files ( ) -> bool

Copies editor agent instruction templates into the project root as AGENTS.md and CLAUDE.md (overwrites existing). Returns true when AGENTS.md was written successfully.

Definition at line 389 of file project_manager.cpp.

◆ save_deploy_settings()

void unravel::project_manager::save_deploy_settings ( )

Definition at line 286 of file project_manager.cpp.

◆ save_editor_settings()

void unravel::project_manager::save_editor_settings ( )

Definition at line 471 of file project_manager.cpp.

◆ save_project_editor_settings()

void unravel::project_manager::save_project_editor_settings ( )

Definition at line 296 of file project_manager.cpp.

◆ save_project_info()

void unravel::project_manager::save_project_info ( )

Definition at line 307 of file project_manager.cpp.

◆ save_project_settings()

void unravel::project_manager::save_project_settings ( rtti::context & ctx)

Definition at line 268 of file project_manager.cpp.

◆ set_name()

void unravel::project_manager::set_name ( const std::string & name)

Definition at line 487 of file project_manager.cpp.


The documentation for this class was generated from the following files: