mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Add new verifier to handle identifiers and update codegen to be able to use them (closes #2522)
This commit is contained in:
@@ -168,6 +168,21 @@ private:
|
||||
bool _mustBeNotEmpty = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* A Verifier that checks whether a given string is a valid identifier, meaning that is
|
||||
* does not contain any whitespaces or dots
|
||||
*/
|
||||
struct IdentifierVerifier : public StringVerifier {
|
||||
IdentifierVerifier();
|
||||
|
||||
TestResult operator()(const ghoul::Dictionary& dict,
|
||||
const std::string& key) const override;
|
||||
|
||||
std::string documentation() 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 file on disk.
|
||||
|
||||
Reference in New Issue
Block a user