Project

group project

Project management components of the CoffeeEngine.

class Project
#include <Project.h>

The Project class is responsible for managing project data such as name, directory, and start scene path.

Public Functions

template<class Archive>
inline void serialize(Archive &archive)

Serializes the project data.

Template Parameters:

Archive – The type of the archive.

Parameters:

archive – The archive to serialize to.

Public Static Functions

static Ref<Project> New(const std::filesystem::path &path)

Creates a new project.

Returns:

A reference to the newly created project.

static Ref<Project> Load(const std::filesystem::path &path)

Loads a project from the specified path.

Parameters:

path – The path to the project file.

Returns:

A reference to the loaded project.

static void SaveActive()

Saves the active project to the specified path.

Parameters:

path – The path to save the project file.

static inline Ref<Project> GetActive()

Gets the active project.

Returns:

A reference to the active project.

static inline const std::filesystem::path &GetProjectDirectory()

Gets the directory of the active project.

Returns:

The path to the project directory.

static inline const std::string &GetProjectName()

Gets the name of the active project.

Returns:

The name of the project.

static inline std::filesystem::path GetCacheDirectory()

Retrieves the cache directory path of the active project.

This static method returns a constant reference to the cache directory path associated with the currently active project.

Returns:

const std::filesystem::path& Reference to the cache directory path.