Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ExpressionFormatter.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// File: ExpressionFormatter.h
3//-----------------------------------------------------------------------------
4// Project: Kactus2
5// Author: Mikko Teuho
6// Date: 26.01.2015
7//
8// Description:
9// Formatter for parameter expressions consisting of references.
10//-----------------------------------------------------------------------------
11
12#ifndef EXPRESSIONFORMATTER_H
13#define EXPRESSIONFORMATTER_H
14
15#include "ParameterFinder.h"
16
17#include "KactusAPI/KactusAPIGlobal.h"
18
19#include <QSharedPointer>
20
22
23//-----------------------------------------------------------------------------
25//-----------------------------------------------------------------------------
26class KACTUS2_API ExpressionFormatter
27{
28
29public:
30
36 ExpressionFormatter(QSharedPointer<ParameterFinder> parameterFinder);
37
42
50 QString formatReferringExpression(QString const& expression) const;
51
52 static QString format(QString const& expression, QSharedPointer<ExpressionParser> parser);
53
54private:
55
59 ExpressionFormatter& operator=(const ExpressionFormatter& other);
60
62 QSharedPointer<ParameterFinder> parameterFinder_;
63};
64
65#endif // EXPRESSIONFORMATTER_H
ExpressionFormatter(QSharedPointer< ParameterFinder > parameterFinder)
static QString format(QString const &expression, QSharedPointer< ExpressionParser > parser)
QString formatReferringExpression(QString const &expression) const
Interface for expression parsers.