yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::Project Struct Reference

Represents a project in the application. More...

#include <project.h>

Inheritance diagram for yaze::app::Project:
Collaboration diagram for yaze::app::Project:

Public Member Functions

absl::Status Create (const std::string &project_name)
 Creates a new project.
 
absl::Status Open (const std::string &project_path)
 
absl::Status Save ()
 
absl::Status CheckForEmptyFields ()
 
- Public Member Functions inherited from yaze::app::core::ExperimentFlags
 ExperimentFlags ()=default
 
virtual ~ExperimentFlags ()=default
 
auto flags () const
 
Flagsmutable_flags ()
 
std::string Serialize () const
 

Public Attributes

bool project_opened_ = false
 
std::string name
 
std::string flags = ""
 
std::string filepath
 
std::string rom_filename_ = ""
 
std::string code_folder_ = ""
 
std::string labels_filename_ = ""
 
std::vector< std::string > previous_rom_filenames_
 

Detailed Description

Represents a project in the application.

A project is a collection of files and resources that are used in the creation of a Zelda3 hack that can be saved and loaded. This makes it so the user can have different rom file names for a single project and keep track of backups.

Definition at line 30 of file project.h.

Member Function Documentation

◆ Create()

absl::Status yaze::app::Project::Create ( const std::string & project_name)
inline

Creates a new project.

Parameters
project_nameThe name of the project.
project_pathThe path to the project.
Returns
An absl::Status indicating the success or failure of the project creation.

Definition at line 39 of file project.h.

References name, and project_opened_.

Referenced by yaze::app::editor::EditorManager::DrawYazeMenuBar().

◆ Open()

absl::Status yaze::app::Project::Open ( const std::string & project_path)
inline

◆ Save()

absl::Status yaze::app::Project::Save ( )
inline

Definition at line 73 of file project.h.

References CheckForEmptyFields(), code_folder_, filepath, yaze::app::kEndOfProjectFile, labels_filename_, name, RETURN_IF_ERROR, and rom_filename_.

Referenced by yaze::app::editor::EditorManager::DrawYazeMenuBar().

Here is the call graph for this function:

◆ CheckForEmptyFields()

absl::Status yaze::app::Project::CheckForEmptyFields ( )
inline

Definition at line 94 of file project.h.

References code_folder_, filepath, labels_filename_, name, and rom_filename_.

Referenced by Save().

Member Data Documentation

◆ project_opened_

bool yaze::app::Project::project_opened_ = false

◆ name

◆ flags

std::string yaze::app::Project::flags = ""

Definition at line 107 of file project.h.

◆ filepath

std::string yaze::app::Project::filepath

◆ rom_filename_

std::string yaze::app::Project::rom_filename_ = ""

◆ code_folder_

std::string yaze::app::Project::code_folder_ = ""

◆ labels_filename_

std::string yaze::app::Project::labels_filename_ = ""

◆ previous_rom_filenames_

std::vector<std::string> yaze::app::Project::previous_rom_filenames_

Definition at line 112 of file project.h.


The documentation for this struct was generated from the following file: