mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Add new verifiers for files and directories. Update codegen to be able to create these
This commit is contained in:
@@ -158,6 +158,28 @@ struct StringVerifier : public TemplateVerifier<std::string> {
|
||||
std::string type() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
* A Verifier that checks whether a given key inside a ghoul::Dictionary is a string and
|
||||
* refers to an existing file on disk.
|
||||
*/
|
||||
struct FileVerifier : public StringVerifier {
|
||||
TestResult operator()(const ghoul::Dictionary& dict,
|
||||
const std::string& key) const override;
|
||||
|
||||
std::string type() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
* A Verifier that checks whether a given key inside a ghoul::Dictionary is a string and
|
||||
* refers to an existing directory on disk.
|
||||
*/
|
||||
struct DirectoryVerifier : public StringVerifier {
|
||||
TestResult operator()(const ghoul::Dictionary& dict,
|
||||
const std::string& key) const override;
|
||||
|
||||
std::string type() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
* A Verifier that checks whether a given key inside a ghoul::Dictionary is another
|
||||
* ghoul::Dictionary. The constructor takes a list of DocumentationEntry%s, which are used
|
||||
|
||||
Reference in New Issue
Block a user