1#ifndef YAZE_APP_CORE_PROJECT_H
2#define YAZE_APP_CORE_PROJECT_H
10#include "absl/status/status.h"
11#include "absl/strings/match.h"
39 absl::Status
Create(
const std::string &project_name) {
42 return absl::OkStatus();
45 absl::Status
Open(
const std::string &project_path) {
47 name = project_path.substr(project_path.find_last_of(
"/") + 1);
49 std::ifstream in(project_path);
52 return absl::InternalError(
"Could not open project file.");
56 std::getline(in,
name);
62 while (std::getline(in, line)) {
70 return absl::OkStatus();
78 return absl::InternalError(
"Could not open project file.");
81 out <<
name << std::endl;
91 return absl::OkStatus();
97 return absl::InvalidArgumentError(
98 "Project fields cannot be empty. Please load a rom file, set your "
99 "code folder, and set your labels file. See HELP for more details.");
102 return absl::OkStatus();
A class to manage experimental feature flags.
#define RETURN_IF_ERROR(expression)
constexpr char kEndOfProjectFile[]
Represents a project in the application.
std::vector< std::string > previous_rom_filenames_
absl::Status Open(const std::string &project_path)
std::string labels_filename_
absl::Status CheckForEmptyFields()
absl::Status Create(const std::string &project_name)
Creates a new project.
std::string rom_filename_