Commit Graph

51 Commits

Author SHA1 Message Date
Zheng, Lei
b6834155cf Expression: fix python object evaluation 2019-08-17 15:32:48 +02:00
Zheng, Lei
ced27a69c6 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +02:00
Yorik van Havre
b5a3d28fee Doxygen tweaks 2019-07-17 18:01:56 -03:00
wmayer
cb53719821 Fix a couple of clang compiler warnings:
-Wunused-variable
-Winconsistent-missing-override
-Wdelete-non-virtual-dtor
-Wunused-private-field
-Wformat
2019-06-23 15:19:12 +02:00
luz.paz
06d583b425 Misc typos and whitespace fixes
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*`
2019-03-31 11:42:36 +02:00
wmayer
55781c5ee8 Fix precision of NumberExpression when writing to a string (reverts 4d3329edd8)
See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=34392
2019-02-23 14:34:14 +01:00
luz.paz
69b3b0b7f2 Misc. typos 2018-05-19 12:06:34 -04:00
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Eivind Kvedalen
51b422ead0 Expressions: Fixed issue #3432; aggregate functions sometimes ignore some of their arguments.
Also updated regression tests in Spreadsheet module.
2018-04-21 22:33:54 +02:00
Eivind Kvedalen
53d4757ba7 Spreadsheet/Expressions: Fixed issue #3363. 2018-03-25 11:53:35 +02:00
wmayer
c9f25d75d3 fix typo 2018-03-11 18:34:18 +01:00
luz.paz
327957110a Misc. comment typos 2018-01-14 12:11:35 -02:00
Unknown
e3eca59173 Misc. typo fixes
Various workbenches
2017-12-23 14:30:30 +01:00
wmayer
01a13e9a95 fix coverity issue 2017-11-18 16:30:27 +01:00
Eivind Kvedalen
653da7efb7 Fixed issue #2877: Added hypot() and catet() functions to expression framework. 2017-07-20 18:57:31 +02:00
Eivind Kvedalen
3a33273fce Expressions: Fixed issue #3128; mod(x;y) should support arbitrary units for both arguments. 2017-07-13 12:20:31 +02:00
wmayer
fb7094bf31 use specialized exception classes 2017-04-28 18:49:11 +02:00
Eivind Kvedalen
2714dd82c8 Spreadsheet: Fixed issue #2894: Unit strings could be used as aliases. 2017-03-07 13:45:53 -03:00
Kunda
31b0233393 source typo fixes pt6 2017-03-07 13:43:46 -03:00
wmayer
a7539e2c97 fix various warnings 2017-02-02 20:42:56 +01:00
Eivind Kvedalen
7b314d6cfa Expressions: Generalized FunctionExpression::simplify(...) function. 2017-02-02 10:27:29 +01:00
Eivind Kvedalen
7ebaa54bd5 Expressions: Fixed issue #2879. 2017-02-02 10:27:29 +01:00
wmayer
e0a89c17d2 fix & suppress warnings of generated code 2016-12-30 13:31:31 +01:00
Eivind Kvedalen
d00ff2155d Spreadsheet: Fix for issue #2646: Spreadsheet-Sum-Function does not work with units
This fix also fixes the other aggregates.
2016-12-15 17:27:18 +01:00
Eivind Kvedalen
b398069372 Spreadsheet: Fix for issue #2647, stddev does not work with arrays. 2016-12-15 17:27:18 +01:00
Eivind Kvedalen
30390b70a7 Spreadsheet: Save numbers with one more digit. 2016-12-15 17:27:18 +01:00
Eivind Kvedalen
7279c1bd53 Spreadsheet: Fixed for issue #2767: In some instances, needed parentheses are dropped from the expression. Fixed and updated unit tests. 2016-12-15 17:27:18 +01:00
wmayer
47b41a7883 fixes #0002460: Use keyword 'explicit' for Quantity constructor 2016-11-05 23:21:42 +01:00
wmayer
2af6bb6e49 replace deprecated auto_ptr with unique_ptr 2016-09-22 13:01:20 +02:00
wmayer
c636974ec8 fix -Wextra in FreeCADApp 2016-09-21 16:05:36 +02:00
wmayer
eb0647b144 Coverity issues:
129727: Structurally dead code
151979, 133461: Uninitialized scalar field
129785, 129786, 129787: Use after free
2016-08-16 12:23:12 +02:00
Eivind Kvedalen
4f7470c5e8 Expressions: Simpified parser, fixed precedence (parentheses) 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
97aa0a1c6d Expressions: Fixed parsing of unit expressions similar to 1/unit. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
8f511322bc Expressions: Moved Expression::priority to cpp file. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
aa8b035842 Expressions: Refactored aggregate functions. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
b5e44436f1 Expressions: Added support for aggregate functions and ranges. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
0458ba6561 Expressions: Added code to throw under/overflow exceptions. 2016-03-08 16:09:29 +01:00
Eivind Kvedalen
59e3bad558 Expressions: Use BooleanExpression class for EQ, NE, LT, GT, LTE, and GTE operators. 2016-03-08 16:09:27 +01:00
Eivind Kvedalen
778abe9072 Expressions: Added App::BooleanExpression class. 2016-03-08 16:09:27 +01:00
Eivind Kvedalen
e063c25b69 Expressions: Turned off debug output/tracing for expression parser. 2016-03-08 16:09:26 +01:00
Eivind Kvedalen
dcc3c6b27b Expression class: Improved error message when resolving a variable fails. 2016-02-18 16:54:44 +01:00
Eivind Kvedalen
452650440b PropertyExpressionEngine: Refactored and moved visitor code to separate file. 2016-02-18 16:54:41 +01:00
Eivind Kvedalen
3752181621 VariableExpression: Add converters for long and bool data types. 2016-01-26 11:49:50 +01:00
Eivind Kvedalen
ca0c9de886 Expression/ObjectIdentifier: changed return type of renameDocumentObject and renameDocument,
to be able to signal that a rename actually took place.
2015-12-21 14:11:12 +01:00
Eivind Kvedalen
d012bdba3a NumberExpression: Added std::setprecision to keep precision of number in double to string conversion. 2015-12-18 22:05:32 +01:00
wmayer
f46dc20fca + fix & suppress msvc warnings 2015-10-16 18:26:30 +02:00
wmayer
2acb38daa7 + fix clang warning: -Woverloaded-virtual 2015-10-02 20:42:16 +02:00
wmayer
c114c648fc + use dedicated exception classes for expression and parsing errors 2015-09-27 23:17:33 +02:00
wmayer
c4c34d2998 Fix warnings: -Wuninitialized in expression engine 2015-09-22 10:12:17 +02:00
wmayer
e0bdf24c95 + fix build problems with MSVC and libpack 2015-09-21 14:51:12 +02:00