##// END OF EJS Templates
Separate the initialization of the properties of the graph of the update of the units of the graph....
Separate the initialization of the properties of the graph of the update of the units of the graph. The initialization of the properties is carried out when adding a variable in the graph, the update of the units is carried out when loading the data of this variable

File last commit:

r1228:6bf9a231f6d8
r1308:41b7c6aab8be
Show More
FuzzingValidators.h
40 lines | 1.1 KiB | text/x-c | CLexer
/ plugins / amda / tests / FuzzingValidators.h
Alexandre Leroux
Creates validator interface
r1226 #ifndef SCIQLOP_FUZZINGVALIDATORS_H
#define SCIQLOP_FUZZINGVALIDATORS_H
Alexandre Leroux
Adds validators to the fuzzing test...
r1228 #include <memory>
#include <set>
Alexandre Leroux
Creates validator interface
r1226 #include <QLoggingCategory>
Alexandre Leroux
Adds validators to the fuzzing test...
r1228 #include <QMetaType>
Alexandre Leroux
Creates validator interface
r1226
Q_DECLARE_LOGGING_CATEGORY(LOG_FuzzingValidators)
class VariableState;
Alexandre Leroux
Creates validators for range and data
r1227 /// Types of validators that can be defined
enum class FuzzingValidatorType {
DATA, ///< Validates variable's data
RANGE ///< Validates variable's range
};
Alexandre Leroux
Creates validator interface
r1226 /**
* Struct that represents a validator. A validator checks if the state of a variable is valid at the
* moment it is called during a fuzzing test
*/
struct IFuzzingValidator {
virtual ~IFuzzingValidator() noexcept = default;
/// Validates the variable's state passed in parameter
virtual void validate(const VariableState &variableState) const = 0;
};
Alexandre Leroux
Creates validators for range and data
r1227 /// Factory of @sa IFuzzingValidator
struct FuzzingValidatorFactory {
/// Creates a validator according to the type passed in parameter
static std::unique_ptr<IFuzzingValidator> create(FuzzingValidatorType type);
};
Alexandre Leroux
Adds validators to the fuzzing test...
r1228 using ValidatorsTypes = std::vector<FuzzingValidatorType>;
Q_DECLARE_METATYPE(ValidatorsTypes)
Alexandre Leroux
Creates validator interface
r1226 #endif // SCIQLOP_FUZZINGVALIDATORS_H