manifest.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace by {
7
8 // TODO: entrypoints[== filePath] can be various. but not language.
12 struct _nout entrypoint: public validable {
13 entrypoint(const std::string& newLang, const std::vector<std::string>& newPaths);
14 virtual ~entrypoint();
15
16 public:
17 nbool isValid() const override;
18
19 public:
20 std::string lang;
21 std::vector<std::string> paths;
22 };
23
24 typedef std::vector<entrypoint> entrypoints;
25
29 struct manifest: public validable {
30 static constexpr const nchar* DEFAULT_NAME = "{default}";
31
32 manifest();
33 manifest(const std::string& newName);
34 manifest(const std::string& newName, const std::string& newFilePath, const std::string& newAuthor,
35 const std::string& newVer, const entrypoints& newPoints);
36 virtual ~manifest();
37
38 nbool isValid() const override;
39
40 public:
41 std::string name; // manifest name should not contain '.'(dot) character.
42 std::string filePath;
43 std::string author;
44 std::string version;
45 std::string ver;
46
47 entrypoints points;
48 };
49
50 typedef std::vector<manifest> manifests;
51} // namespace by
Interface for objects with validation state.
Definition: validable.hpp:11
Entry point definition for pack loading.
Definition: manifest.hpp:12
pack manifest information
Definition: manifest.hpp:29