##// END OF EJS Templates
Some fixes...
Some fixes - Improves log display - Fixes problem of range not set in UTC - Fixes problem for range of VariableState not correctly set at variable creation

File last commit:

r1221:ea075ddc1542
r1223:767abfa514f1
Show More
FuzzingOperations.h
48 lines | 1.7 KiB | text/x-c | CLexer
/ plugins / amda / tests / FuzzingOperations.h
Alexandre Leroux
Defines fuzzing operations...
r1202 #ifndef SCIQLOP_FUZZINGOPERATIONS_H
#define SCIQLOP_FUZZINGOPERATIONS_H
#include "FuzzingDefs.h"
#include <memory>
#include <set>
#include <QLoggingCategory>
#include <QMetaType>
Q_DECLARE_LOGGING_CATEGORY(LOG_FuzzingOperations)
class VariableController;
/**
* Enumeration of types of existing fuzzing operations
*/
Alexandre Leroux
Implements move operations (1)...
r1217 enum class FuzzingOperationType { CREATE, PAN_LEFT, PAN_RIGHT, ZOOM_IN, ZOOM_OUT };
Alexandre Leroux
Defines fuzzing operations...
r1202
/// Interface that represents an operation that can be executed during a fuzzing test
struct IFuzzingOperation {
virtual ~IFuzzingOperation() noexcept = default;
Alexandre Leroux
Defines VariableState struct (2)...
r1221 /// Checks if the operation can be executed according to the current variable state passed in
/// parameter
virtual bool canExecute(const VariableState &variableState) const = 0;
/// Executes the operation on the variable state passed in parameter
/// @param variableState the variable state on which to execute the operation
Alexandre Leroux
Defines fuzzing operations...
r1202 /// @param variableController the controller associated to the operation
/// @param properties properties that can be used to configure the operation
Alexandre Leroux
Defines VariableState struct (2)...
r1221 /// @remarks variableState is passed as a reference because, according to the operation, it can
/// be
Alexandre Leroux
Fixes clang-format for resource files
r1211 /// modified (in/out parameter)
Alexandre Leroux
Defines VariableState struct (2)...
r1221 virtual void execute(VariableState &variableState, VariableController &variableController,
Alexandre Leroux
Fixes clang-format for resource files
r1211 const Properties &properties = {}) const = 0;
Alexandre Leroux
Defines fuzzing operations...
r1202 };
/// Factory of @sa IFuzzingOperation
struct FuzzingOperationFactory {
/// Creates a fuzzing operation from a type
static std::unique_ptr<IFuzzingOperation> create(FuzzingOperationType type);
};
Alexandre Leroux
Adds weights to operations (2)...
r1216 using WeightedOperationsTypes = std::map<FuzzingOperationType, double>;
Q_DECLARE_METATYPE(WeightedOperationsTypes)
Alexandre Leroux
Defines fuzzing operations...
r1202
#endif // SCIQLOP_FUZZINGOPERATIONS_H