QAD_EXPORT

git-svn-id: svn://db.shs.com.ru/libs@719 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
2020-02-28 10:05:11 +00:00
parent d10fff52c9
commit 350240cdfc
55 changed files with 218 additions and 201 deletions

View File

@@ -7,6 +7,8 @@
#include <QDebug>
#include <cmath>
#include <complex>
#include "qad_export.h"
#ifndef PIP_MATH_COMPLEX
#define QPIEVALUATOR_COMPLEX
@@ -40,7 +42,7 @@ namespace QPIEvaluatorTypes {
bfIm, bfRe, bfArg, bfLen, bfConj,
bfRad, bfDeg};
struct Instruction {
struct QAD_EXPORT Instruction {
Instruction() {;}
Instruction(Operation oper, QVector<int> opers, int out_ind, int func = -1) {
operation = oper; operators = opers; out = out_ind; function = func;}
@@ -48,20 +50,20 @@ namespace QPIEvaluatorTypes {
QVector<int> operators;
int out;
int function;};
struct Element {
struct QAD_EXPORT Element {
Element() {;}
Element(eType new_type, int new_num, int new_var_num = -1) {set(new_type, new_num, new_var_num);}
void set(eType new_type, int new_num, int new_var_num = -1) {type = new_type; num = new_num; var_num = new_var_num;}
eType type;
int num;
int var_num;};
struct Function {
struct QAD_EXPORT Function {
Function() {arguments = 0; type = bfUnknown;}
Function(const QString & name, int args, BaseFunctions ftype) {identifier = name; arguments = args; type = ftype;}
QString identifier;
BaseFunctions type;
int arguments;};
struct Variable {
struct QAD_EXPORT Variable {
Variable() {value = 0.;}
Variable(const QString & var_name, complexd val) {name = var_name; value = val;}
QString name;
@@ -71,7 +73,9 @@ namespace QPIEvaluatorTypes {
return s1.name.size() > s2.name.size();
return s1.name > s2.name;
}
};
}
/*
≠ :
≥ }
@@ -79,7 +83,7 @@ namespace QPIEvaluatorTypes {
⋀ &
|
*/
class QPIEvaluatorContent
class QAD_EXPORT QPIEvaluatorContent
{
friend class QPIEvaluator;
public:
@@ -116,7 +120,8 @@ private:
};
class QPIEvaluator
class QAD_EXPORT QPIEvaluator
{
public:
QPIEvaluator() {correct = false ;}
@@ -172,6 +177,7 @@ private:
};
inline bool operator ==(QPIEvaluatorTypes::Element e1, QPIEvaluatorTypes::Element e2) {return (e1.type == e2.type && e1.num == e2.num);}
inline bool operator !=(QPIEvaluatorTypes::Element e1, QPIEvaluatorTypes::Element e2) {return (e1.type != e2.type || e1.num != e2.num);}