Finality Engine
Loading...
Searching...
No Matches
AssetRegistry.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <Core/Core.h>
14#include <filesystem>
15#include <map>
16#include <string>
17#include <vector>
18#include <cstdint>
19
20namespace FINALITY
21{
24
27 {
28 uint64_t ID = 0;
29 std::string Path;
30 std::string Source;
32 std::string Status = "Ready";
33 std::string Diagnostic;
34 int64_t Modified = 0;
35 std::vector<uint64_t> Dependencies;
36 };
37
48 {
49 public:
50 static void Open(const std::filesystem::path& projectDirectory);
57 static void SetRuntimeCacheDirectory(const std::filesystem::path& directory);
58 static std::filesystem::path GetCacheDirectory();
59 static void Close();
60 static void Scan();
61 static void Reimport(uint64_t id);
62 static bool Import(const std::filesystem::path& source, const std::filesystem::path& destination = "Assets");
63 static bool Move(uint64_t id, const std::filesystem::path& destination);
64 static bool Save();
65 static const std::map<uint64_t, AssetRecord>& GetRecords();
66 static const AssetRecord* Find(uint64_t id);
67 static const AssetRecord* FindPath(const std::filesystem::path& path);
68 static std::string Resolve(const std::string& reference);
69 static std::string Reference(const std::filesystem::path& path);
70 static const std::filesystem::path& GetProjectDirectory();
71 static ProjectAssetType GetType(const std::filesystem::path& path);
72 };
73}
#define FAPI
Definition Core.h:22
Tracks project assets, metadata and reference resolution.
static void Open(const std::filesystem::path &projectDirectory)
static bool Import(const std::filesystem::path &source, const std::filesystem::path &destination="Assets")
static void SetRuntimeCacheDirectory(const std::filesystem::path &directory)
Overrides where runtime import/database caches are written.
static const std::filesystem::path & GetProjectDirectory()
static ProjectAssetType GetType(const std::filesystem::path &path)
static const AssetRecord * Find(uint64_t id)
static void Reimport(uint64_t id)
static std::filesystem::path GetCacheDirectory()
static const std::map< uint64_t, AssetRecord > & GetRecords()
static std::string Reference(const std::filesystem::path &path)
static const AssetRecord * FindPath(const std::filesystem::path &path)
static std::string Resolve(const std::string &reference)
static bool Move(uint64_t id, const std::filesystem::path &destination)
Owns entities and dispatches script simulation.
Definition Scene.h:36
ProjectAssetType
Asset categories used by registry discovery and editor inspection.
Registry entry associating a stable asset ID with a project-relative path, dependencies and import st...
std::vector< uint64_t > Dependencies
ProjectAssetType Type