git-svn-id: svn://db.shs.com.ru/pip@597 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2018-02-12 12:20:15 +00:00
parent da48575caa
commit 6c51e8edf3
43 changed files with 204 additions and 164 deletions

View File

@@ -25,7 +25,7 @@
#include "pistring.h"
class PICrypt {
class PIP_EXPORT PICrypt {
public:
//! Construct and generate random key
PICrypt();

View File

@@ -31,12 +31,12 @@ typedef complexd (*FuncFunc)(void * , int, complexd * );
namespace PIEvaluatorTypes {
static const int operationCount = 14;
enum eType {etNumber, etOperator, etVariable, etFunction};
enum Operation {oNone, oAdd, oSubtract, oMultiply, oDivide, oResidue, oPower,
enum PIP_EXPORT eType {etNumber, etOperator, etVariable, etFunction};
enum PIP_EXPORT Operation {oNone, oAdd, oSubtract, oMultiply, oDivide, oResidue, oPower,
oEqual, oNotEqual, oGreater, oSmaller, oGreaterEqual, oSmallerEqual,
oAnd, oOr, oFunction
};
enum BaseFunctions {bfUnknown, bfSin, bfCos, bfTg, bfCtg,
enum PIP_EXPORT BaseFunctions {bfUnknown, bfSin, bfCos, bfTg, bfCtg,
bfArcsin, bfArccos, bfArctg, bfArcctg,
bfExp, bfRandom, bfRandomn,
bfSh, bfCh, bfTh, bfCth,
@@ -50,7 +50,7 @@ namespace PIEvaluatorTypes {
bfCustom = 0xFFFF
};
struct Instruction {
struct PIP_EXPORT Instruction {
Instruction() {out = -1; function = -1; operation = oNone;}
Instruction(Operation oper, PIVector<int> opers, int out_ind, int func = -1) {
operation = oper; operators = opers; out = out_ind; function = func;}
@@ -59,7 +59,7 @@ namespace PIEvaluatorTypes {
int out;
int function;
};
struct Element {
struct PIP_EXPORT Element {
Element() {num = 0; var_num = -1; type = etNumber;}
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;}
@@ -67,7 +67,7 @@ namespace PIEvaluatorTypes {
int num;
int var_num;
};
struct Function {
struct PIP_EXPORT Function {
Function() {arguments = 0; type = bfUnknown; handler = 0;}
Function(const PIString & name, int args, BaseFunctions ftype) {identifier = name; arguments = args; type = ftype; handler = 0;}
Function(const PIString & name, int args, FuncFunc h) {identifier = name; arguments = args; type = bfCustom; handler = h;}
@@ -76,7 +76,7 @@ namespace PIEvaluatorTypes {
FuncFunc handler;
int arguments;
};
struct Variable {
struct PIP_EXPORT Variable {
Variable() {value = 0.;}
Variable(const PIString & var_name, complexd val) {name = var_name; value = val;}
PIString name;

View File

@@ -121,6 +121,7 @@ typedef PIFFT_double PIFFT;
typedef PIFFT_double PIFFTd;
typedef PIFFT_float PIFFTf;
#ifndef CC_VC
#define _PIFFTW_H(type) class _PIFFTW_P_##type##_ { \
public: \
@@ -190,4 +191,6 @@ template<> inline void PIFFTW<ldouble>::deleteP(void *& _p) {if (_p) delete (_PI
typedef PIFFTW<ldouble> PIFFTWld;
#endif
#endif // PIFFT_H

View File

@@ -24,8 +24,9 @@
#ifndef PIFIXEDPOINT_H
#define PIFIXEDPOINT_H
template<int Precision = 0, typename Type = int>
class PIFixedPoint {
class PIP_EXPORT PIFixedPoint {
// friend PICout operator <<(PICout s, const FixedPoint<> & v);
public:
typedef PIFixedPoint<Precision, Type> fp;