Handles loading of Zrythm projects from disk.
More...
#include <src/structure/project/project_loader.h>
Handles loading of Zrythm projects from disk.
This class manages the complete project loading pipeline:
- Reading compressed project file
- Zstd decompression
- JSON parsing
- Schema validation
- Metadata extraction
Definition at line 26 of file project_loader.h.
◆ extract_title()
| utils::Utf8String zrythm::structure::project::ProjectLoader::extract_title |
( |
const nlohmann::json & | j | ) |
|
|
static |
Extracts the project title from JSON metadata.
- Parameters
-
| j | The validated JSON object. |
- Returns
- The project title, or "Untitled" if not found.
◆ get_uncompressed_project_text()
| std::string zrythm::structure::project::ProjectLoader::get_uncompressed_project_text |
( |
const fs::path & | project_dir | ) |
|
|
static |
Reads and decompresses the project file.
- Parameters
-
| project_dir | The project directory. |
- Returns
- The decompressed JSON string.
- Exceptions
-
◆ load_from_directory()
| LoadResult zrythm::structure::project::ProjectLoader::load_from_directory |
( |
const fs::path & | project_dir | ) |
|
|
static |
Loads and validates a project from the specified directory.
- Parameters
-
| project_dir | The project directory containing project.zpj |
- Returns
- LoadResult containing the parsed JSON and metadata.
- Exceptions
-
◆ parse_and_validate()
| nlohmann::json zrythm::structure::project::ProjectLoader::parse_and_validate |
( |
const std::string & | json_str | ) |
|
|
static |
Parses JSON string and validates against schema.
- Parameters
-
| json_str | The raw JSON string. |
- Returns
- Parsed and validated JSON object.
- Exceptions
-
The documentation for this class was generated from the following file: