Loading...
Searching...
No Matches
hellfire::Project Class Reference

#include <Project.h>

Collaboration diagram for hellfire::Project:

Public Member Functions

 Project (const std::string &name)
 
 Project (const ProjectMetadata &metadata)
 
 ~Project ()
 
void initialize_managers ()
 
bool save ()
 
void close ()
 
std::filesystem::path get_project_root () const
 
std::filesystem::path get_assets_path () const
 
std::filesystem::path get_scenes_path () const
 
std::filesystem::path get_settings_path () const
 
const ProjectMetadataget_metadata () const
 
ProjectMetadataget_metadata ()
 
const std::string & get_name () const
 
const std::string & get_version () const
 
SceneManagerget_scene_manager () const
 
AssetRegistryget_asset_registry () const
 

Static Public Member Functions

static std::unique_ptr< Projectcreate (const std::string &name, const std::filesystem::path &location)
 
static std::unique_ptr< Projectload_data (const std::filesystem::path &project_file)
 

Private Member Functions

void create_directory_structure () const
 
void initialize_default_assets ()
 
void cleanup_managers ()
 

Static Private Member Functions

static std::string get_current_timestamp ()
 

Private Attributes

ProjectMetadata metadata_
 
std::filesystem::path project_root_path_
 
std::filesystem::path project_file_path_
 
std::unique_ptr< SceneManagerscene_manager_ = nullptr
 
std::unique_ptr< AssetRegistryasset_registry_ = nullptr
 
std::unique_ptr< AssetManagerasset_manager_ = nullptr
 
std::unique_ptr< Rendererscene_renderer_ = nullptr
 
std::vector< std::filesystem::path > recent_scenes_
 

Detailed Description

Definition at line 26 of file Project.h.

Constructor & Destructor Documentation

◆ Project() [1/2]

hellfire::Project::Project ( const std::string &  name)
explicit

Definition at line 21 of file Project.cpp.

◆ Project() [2/2]

hellfire::Project::Project ( const ProjectMetadata metadata)
explicit

Definition at line 31 of file Project.cpp.

◆ ~Project()

hellfire::Project::~Project ( )

Definition at line 33 of file Project.cpp.

Member Function Documentation

◆ cleanup_managers()

void hellfire::Project::cleanup_managers ( )
private

Definition at line 196 of file Project.cpp.

◆ close()

void hellfire::Project::close ( )

Definition at line 118 of file Project.cpp.

◆ create()

std::unique_ptr< Project > hellfire::Project::create ( const std::string &  name,
const std::filesystem::path &  location 
)
static

Definition at line 37 of file Project.cpp.

◆ create_directory_structure()

void hellfire::Project::create_directory_structure ( ) const
private

Definition at line 148 of file Project.cpp.

◆ get_asset_registry()

AssetRegistry * hellfire::Project::get_asset_registry ( ) const
inline

Definition at line 54 of file Project.h.

◆ get_assets_path()

std::filesystem::path hellfire::Project::get_assets_path ( ) const

Definition at line 136 of file Project.cpp.

◆ get_current_timestamp()

std::string hellfire::Project::get_current_timestamp ( )
staticprivate

Definition at line 204 of file Project.cpp.

◆ get_metadata() [1/2]

ProjectMetadata & hellfire::Project::get_metadata ( )
inline

Definition at line 48 of file Project.h.

◆ get_metadata() [2/2]

const ProjectMetadata & hellfire::Project::get_metadata ( ) const
inline

Definition at line 47 of file Project.h.

◆ get_name()

const std::string & hellfire::Project::get_name ( ) const
inline

Definition at line 50 of file Project.h.

◆ get_project_root()

std::filesystem::path hellfire::Project::get_project_root ( ) const

Definition at line 132 of file Project.cpp.

◆ get_scene_manager()

SceneManager * hellfire::Project::get_scene_manager ( ) const
inline

Definition at line 53 of file Project.h.

◆ get_scenes_path()

std::filesystem::path hellfire::Project::get_scenes_path ( ) const

Definition at line 140 of file Project.cpp.

◆ get_settings_path()

std::filesystem::path hellfire::Project::get_settings_path ( ) const

Definition at line 144 of file Project.cpp.

◆ get_version()

const std::string & hellfire::Project::get_version ( ) const
inline

Definition at line 51 of file Project.h.

◆ initialize_default_assets()

void hellfire::Project::initialize_default_assets ( )
private

Definition at line 157 of file Project.cpp.

◆ initialize_managers()

void hellfire::Project::initialize_managers ( )

Definition at line 161 of file Project.cpp.

◆ load_data()

std::unique_ptr< Project > hellfire::Project::load_data ( const std::filesystem::path &  project_file)
static

Definition at line 61 of file Project.cpp.

◆ save()

bool hellfire::Project::save ( )

Definition at line 96 of file Project.cpp.

Member Data Documentation

◆ asset_manager_

std::unique_ptr<AssetManager> hellfire::Project::asset_manager_ = nullptr
private

Definition at line 62 of file Project.h.

◆ asset_registry_

std::unique_ptr<AssetRegistry> hellfire::Project::asset_registry_ = nullptr
private

Definition at line 61 of file Project.h.

◆ metadata_

ProjectMetadata hellfire::Project::metadata_
private

Definition at line 56 of file Project.h.

◆ project_file_path_

std::filesystem::path hellfire::Project::project_file_path_
private

Definition at line 58 of file Project.h.

◆ project_root_path_

std::filesystem::path hellfire::Project::project_root_path_
private

Definition at line 57 of file Project.h.

◆ recent_scenes_

std::vector<std::filesystem::path> hellfire::Project::recent_scenes_
private

Definition at line 65 of file Project.h.

◆ scene_manager_

std::unique_ptr<SceneManager> hellfire::Project::scene_manager_ = nullptr
private

Definition at line 60 of file Project.h.

◆ scene_renderer_

std::unique_ptr<Renderer> hellfire::Project::scene_renderer_ = nullptr
private

Definition at line 63 of file Project.h.


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