more work on asset registry and importing process
This commit is contained in:
@@ -6,14 +6,12 @@
|
||||
#define B_ENGINE_ASSETREGISTRY_H
|
||||
|
||||
#include <unordered_map>
|
||||
#include <uuid/uuid.h>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <string_view>
|
||||
#include <filesystem>
|
||||
|
||||
#include "AssetRecord.h"
|
||||
|
||||
#include "uuid.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
@@ -23,15 +21,17 @@ using Path = fs::path;
|
||||
|
||||
class AssetRegistry {
|
||||
public:
|
||||
static void read_source_folder(std::string_view _folder);
|
||||
static void read_directory(const Path& path);
|
||||
|
||||
static std::vector<AssetRegistry*> get_records();
|
||||
static AssetRegistry* get_record(uuid_t uuid);
|
||||
static std::vector<AssetRecord*> get_records();
|
||||
static AssetRecord* get_record(uuids::uuid uuid);
|
||||
private:
|
||||
static std::unordered_map<uuids::uuid, std::unique_ptr<AssetRegistry>> _registry;
|
||||
static std::unordered_map<uuids::uuid, std::unique_ptr<AssetRecord>> _registry;
|
||||
|
||||
static bool does_meta_exist(const Path& path);
|
||||
static void generate_meta_file(const Path& path);
|
||||
static std::optional<AssetRecord> read_meta_file(const Path& path);
|
||||
static bool generate_meta_file(const Path& path);
|
||||
static void load_asset(AssetRecord* asset);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user