Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ExpressionFormatter Class Reference

Expression formatter. More...

#include <ExpressionFormatter.h>

Public Member Functions

 ExpressionFormatter (QSharedPointer< ParameterFinder > parameterFinder)
 
 ~ExpressionFormatter ()
 
QString formatReferringExpression (QString const &expression) const
 

Static Public Member Functions

static QString format (QString const &expression, QSharedPointer< ExpressionParser > parser, bool *expressionIsValid=nullptr)
 

Detailed Description

Expression formatter.

Definition at line 26 of file ExpressionFormatter.h.

Constructor & Destructor Documentation

◆ ExpressionFormatter()

ExpressionFormatter::ExpressionFormatter ( QSharedPointer< ParameterFinder > parameterFinder)

Constructor.

Parameters
[in]parameterFinderParameter finder used to search the components parameters.

◆ ~ExpressionFormatter()

ExpressionFormatter::~ExpressionFormatter ( )

Destructor.

Member Function Documentation

◆ format()

static QString ExpressionFormatter::format ( QString const & expression,
QSharedPointer< ExpressionParser > parser,
bool * expressionIsValid = nullptr )
static

Format an expression to its largest base number.

Parameters
[in]expressionThe selected expression.
[in]parserThe used expression parser.
[in]expressionIsValidFlag for informing of a valid expression.
Returns
Formatted expression.

◆ formatReferringExpression()

QString ExpressionFormatter::formatReferringExpression ( QString const & expression) const

Format an expression containing a reference to another parameter.

Parameters
[in]expressionThe expression being worked on.
Returns
Formatted expression.

The documentation for this class was generated from the following file: