mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Allow Documentations to be exhaustive to not allow extra dictionaries
This commit is contained in:
@@ -39,6 +39,7 @@ namespace documentation {
|
||||
struct Verifier;
|
||||
|
||||
using Optional = ghoul::Boolean;
|
||||
using Exhaustive = ghoul::Boolean;
|
||||
|
||||
struct TestResult {
|
||||
bool success;
|
||||
@@ -64,11 +65,13 @@ struct DocumentationEntry {
|
||||
using DocumentationEntries = std::vector<documentation::DocumentationEntry>;
|
||||
|
||||
struct Documentation {
|
||||
Documentation(std::string name = "", DocumentationEntries entries = {});
|
||||
Documentation(std::string name = "", DocumentationEntries entries = {},
|
||||
Exhaustive exhaustive = Exhaustive::No);
|
||||
Documentation(DocumentationEntries entries);
|
||||
|
||||
std::string name;
|
||||
DocumentationEntries entries;
|
||||
Exhaustive exhaustive;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -71,13 +71,14 @@ struct StringVerifier : public TemplateVerifier<std::string> {
|
||||
};
|
||||
|
||||
struct TableVerifier : public TemplateVerifier<ghoul::Dictionary> {
|
||||
TableVerifier(std::vector<DocumentationEntry> d = {});
|
||||
TableVerifier(std::vector<DocumentationEntry> d = {}, Exhaustive exhaustive = Exhaustive::No);
|
||||
|
||||
TestResult operator()(const ghoul::Dictionary& dict, const std::string& key) const override;
|
||||
|
||||
std::string type() const override;
|
||||
|
||||
std::vector<DocumentationEntry> doc;
|
||||
Exhaustive exhaustive;
|
||||
};
|
||||
|
||||
struct VectorVerifier {};
|
||||
|
||||
Reference in New Issue
Block a user