FindVariableOperation.h
43 lines
| 1.4 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r735 | #ifndef SCIQLOP_FINDVARIABLEOPERATION_H | ||
#define SCIQLOP_FINDVARIABLEOPERATION_H | ||||
#include "Visualization/IVisualizationWidgetVisitor.h" | ||||
#include <Common/spimpl.h> | ||||
#include <set> | ||||
class IVisualizationWidget; | ||||
r1420 | class Variable2; | |||
Alexandre Leroux
|
r735 | |||
/** | ||||
* @brief The FindVariableOperation class defines an operation that traverses all of visualization | ||||
* widgets to determine which ones contain the variable passed as parameter. The result of the | ||||
* operation is the list of widgets that contain the variable. | ||||
*/ | ||||
r1420 | class FindVariableOperation : public IVisualizationWidgetVisitor | |||
{ | ||||
Alexandre Leroux
|
r735 | public: | ||
/** | ||||
* Ctor | ||||
* @param variable the variable to find | ||||
*/ | ||||
r1420 | explicit FindVariableOperation(std::shared_ptr<Variable2> variable); | |||
Alexandre Leroux
|
r735 | |||
r1420 | void visitEnter(VisualizationWidget* widget) override final; | |||
void visitLeave(VisualizationWidget* widget) override final; | ||||
void visitEnter(VisualizationTabWidget* tabWidget) override final; | ||||
void visitLeave(VisualizationTabWidget* tabWidget) override final; | ||||
void visitEnter(VisualizationZoneWidget* zoneWidget) override final; | ||||
void visitLeave(VisualizationZoneWidget* zoneWidget) override final; | ||||
void visit(VisualizationGraphWidget* graphWidget) override final; | ||||
Alexandre Leroux
|
r735 | |||
/// @return the widgets that contain the variable | ||||
r1420 | std::set<IVisualizationWidget*> result() const noexcept; | |||
Alexandre Leroux
|
r735 | |||
private: | ||||
class FindVariableOperationPrivate; | ||||
spimpl::unique_impl_ptr<FindVariableOperationPrivate> impl; | ||||
}; | ||||
#endif // SCIQLOP_FINDVARIABLEOPERATION_H | ||||