Finality Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Project.h
Go to the documentation of this file.
1
11
#pragma once
12
13
#include <
Core/Core.h
>
14
#include <filesystem>
15
#include <string>
16
#include "
ProjectSettings.h
"
17
18
namespace
FINALITY
19
{
29
class
FAPI
Project
30
{
31
public
:
32
bool
Create
(
const
std::filesystem::path& location,
const
std::string& name,
33
const
std::filesystem::path& templateAssets = {},
bool
starterTemplate =
true
);
34
bool
Open
(
const
std::filesystem::path& path);
35
bool
Save
()
const
;
36
bool
SaveSettings
()
const
;
37
bool
LoadSettings
();
38
void
SetName
(
const
std::string& name) {
if
(!name.empty()) m_Name = name; }
39
bool
IsOpen
()
const
{
return
!m_Path.empty(); }
40
const
std::filesystem::path&
GetPath
()
const
{
return
m_Path; }
41
std::filesystem::path
GetDirectory
()
const
{
return
m_Path.parent_path(); }
42
std::filesystem::path
GetAssetsDirectory
()
const
{
return
GetDirectory
() /
"Assets"
; }
43
const
std::string&
GetName
()
const
{
return
m_Name; }
44
std::string
StartupScene
=
"Assets/Scenes/Main.fscene"
;
45
ProjectSettings
Settings
;
46
47
private
:
48
std::filesystem::path m_Path;
49
std::string m_Name;
50
};
51
}
Core.h
FAPI
#define FAPI
Definition
Core.h:22
ProjectSettings.h
FINALITY::Project
Owns project identity, paths and saved configuration.
Definition
Project.h:30
FINALITY::Project::GetName
const std::string & GetName() const
Definition
Project.h:43
FINALITY::Project::SetName
void SetName(const std::string &name)
Definition
Project.h:38
FINALITY::Project::StartupScene
std::string StartupScene
Definition
Project.h:44
FINALITY::Project::IsOpen
bool IsOpen() const
Definition
Project.h:39
FINALITY::Project::LoadSettings
bool LoadSettings()
FINALITY::Project::GetAssetsDirectory
std::filesystem::path GetAssetsDirectory() const
Definition
Project.h:42
FINALITY::Project::GetPath
const std::filesystem::path & GetPath() const
Definition
Project.h:40
FINALITY::Project::Create
bool Create(const std::filesystem::path &location, const std::string &name, const std::filesystem::path &templateAssets={}, bool starterTemplate=true)
FINALITY::Project::SaveSettings
bool SaveSettings() const
FINALITY::Project::Open
bool Open(const std::filesystem::path &path)
FINALITY::Project::Settings
ProjectSettings Settings
Definition
Project.h:45
FINALITY::Project::Save
bool Save() const
FINALITY::Project::GetDirectory
std::filesystem::path GetDirectory() const
Definition
Project.h:41
FINALITY
Definition
Asset.h:12
FINALITY::ProjectSettings
Definition
ProjectSettings.h:16
FinalityEngine
src
Project
Project.h
Generated by
1.18.0