blob: cf41cb62092dce9ea42135afd91aaff65c365aec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef EXPRESSION_H
#define EXPRESSION_H
#include "libsamplemacros.h"
#include <string>
class LIBSAMPLE_API Expression
{
public:
enum Operation {
None, Add, Sub, LessThan, GreaterThan
};
Expression(int number);
Expression(const Expression& other);
Expression& operator=(const Expression& other);
~Expression();
Expression operator>(const Expression& other);
Expression operator<(const Expression& other);
Expression operator+(const Expression& other);
Expression operator-(const Expression& other);
std::string toString() const;
private:
int m_value;
Operation m_operation;
Expression* m_operand1;
Expression* m_operand2;
Expression();
};
#endif // EXPRESSION_H
|