Loading...
Searching...
No Matches
slotLoader.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "core/ast/slot.hpp"
5
6namespace by {
7
8 class errReport;
9 class packLoading;
10 typedef std::vector<packLoading*> packLoadings;
11
17 class _nout slotLoader: public typeProvidable, public clonable {
18 BY(CLASS(slotLoader))
19
20 public:
21 slotLoader();
22
23 public:
24 me& addPath(const std::string& filePath);
25 me& addPath(const std::vector<std::string> paths);
26 me& addPath(std::initializer_list<const nchar*> paths);
27 me& addRelativePath(const std::string& path);
34 me& setBaseSlots(nmap* it) BY_SIDE_FUNC(it, setBaseSlots(*it), *this);
35
41 void load();
42
43 private:
44 void _makeSlots(nmap& tray);
45 void _addNewSlot(nmap& tray, const std::string& dirPath, const std::string& manifestName);
46
47 void _logSlot(const slot& pak) const;
48
49 manifest _interpManifest(const std::string& dir, const std::string& manPath) const;
50
51 packLoading* _makeLoading(const std::string& name) const;
52 const packLoadings& _getLoadings() const;
53
54 private:
55 tstr<nmap> _slots;
56 std::vector<std::string> _paths;
57 static constexpr nchar DELIMITER = '/';
58 };
59} // namespace by
Interface for objects that can be cloned.
Definition clonable.hpp:13
Base class for pack loading strategies.
Definition packLoading.hpp:20
Pack slot.
Definition slot.hpp:21
Slot loading and management system.
Definition slotLoader.hpp:17
me & setBaseSlots(nmap &s)
Sets the map where loaded slots will be stored.
void load()
Initiates the pack loading process.
Interface for objects that can provide their type information.
Definition typeProvidable.hpp:13
#define BY_SIDE_FUNC(...)
Side function macros for safe pointer operations.
Definition sideFunc.hpp:24
Pack manifest information.
Definition manifest.hpp:32
Rich logging support with polymorphic type conversion.
Definition richLog.hpp:34