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
16 class _nout slotLoader: public typeProvidable, public clonable {
17 BY(CLASS(slotLoader))
18
19 public:
20 slotLoader();
21
22 public:
23 me& addPath(const std::string& filePath);
24 me& addPath(const std::vector<std::string> paths);
25 me& addPath(std::initializer_list<const nchar*> paths);
26 me& addRelativePath(const std::string& path);
27 me& setBaseSlots(nmap& s);
28 me& setBaseSlots(nmap* it) BY_SIDE_FUNC(it, setBaseSlots(*it), *this);
29 me& setReport(errReport& report);
30
31 void load();
32
33 private:
34 void _makeSlots(nmap& tray);
35 void _addNewSlot(nmap& tray, const std::string& dirPath, const std::string& manifestName);
36
37 void _logSlot(const slot& pak) const;
38
39 manifest _interpManifest(const std::string& dir, const std::string& manPath) const;
40
41 packLoading* _makeLoading(const std::string& name) const;
42 const packLoadings& _getLoadings() const;
43
44 private:
45 tstr<errReport> _report;
46 tstr<nmap> _slots;
47 std::vector<std::string> _paths;
48 static constexpr nchar DELIMITER = '/';
49 };
50} // namespace by
Interface for objects that can be cloned.
Definition: clonable.hpp:12
Error reporting and collection system.
Definition: errReport.hpp:14
Base class for pack loading strategies.
Definition: packLoading.hpp:19
Pack slot for loading and management.
Definition: slot.hpp:16
Slot loading and management system.
Definition: slotLoader.hpp:16
Definition: tnmap.hpp:11
Strong reference smart pointer with strict type checking.
Definition: tstr.hpp:13
Interface for objects that can provide their type information.
Definition: typeProvidable.hpp:12
pack manifest information
Definition: manifest.hpp:29