Commit Graph

23 Commits

Author SHA1 Message Date
luz paz
bfdffb50be App: Fix header uniformity, trailing whitespace, and doxygen headers 2020-11-19 13:38:37 +01:00
wmayer
6008aa3ae3 App: add documentation to PropertyCleaner
move global variables static variables of PropertyCleaner
add unit test for removal of property in onBeforeChange
2020-03-21 18:33:08 +01:00
Zheng, Lei
d441a9ded5 App: make deleting dynamic property safer
Dynamic property can be removed at any time, even during triggering of
onChanged() signal of the removing property. This patch introduced
static function Property::destroy() to make it safer by queueing any
removed property, and only deleting them when no onChanged() call is
active.
2020-03-21 15:43:03 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
luz.paz
f22ae848ea Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Zheng, Lei
d3500ecfab App: fix Python object leak in PropertyListT
* Fix Python object leak in _setPyObject()
* Add support for Python iterables
* Minor performance improvement on setPyValues()
2019-08-17 15:32:49 +02:00
luz.paz
8825c95727 Fix typos in src/App 2019-08-17 15:32:48 +02:00
Zheng, Lei
f4205130ae App: Property related API changes
Property:

* Extended property status bitset. Mirror most of PropertyType and
  allow dynamic change property type.

* Cache property name and type to improve performance

* Centralize property status change signalling

* Change aboutToSetValue()/hasSetValue() to virtual

* Add new API getFullName() to obtain full quanlified name of the property

AtomicPropertyChangeInterface:

* Allow calling aboutToSetValue()/hasSetValue() when actually changed

PropertyLists:

* Refactor implementation by an abstract class PropertyListBase and a
  template class PropertyListsT, to allow better code reuse.
  PropertyListT is derived from AtomicPropertyChangeInterface to allow
  more efficient change on individual elements.

* All list type property now accept setting python value as a dictionary
  with index as key to set individual element of a list.

* Add touch list for more efficient handling of value changes. The list
  contains the index of changed value. And empty touch list should be
  treated as the entire list is changed. PropertyContainerPy expose this
  functionality with getPropertyTouchList().

PropertyPersistentObject:

* New property to allow dynamic creation of any FreeCAD object derived
  from Base::Persistence, and use it as a property.

DynamicProperty:

* Use boost multi_index_container for efficient property lookup while
  keeping order.

* Modify to be allowed to use in PropertyContainer directly

PropertyContainer:

* Use boost multi_index_container for efficient property lookup while
  keeping order.

* Allow adding/removing dynamic property on all property container

* Modify Save/Restore() to persist property status, and better handle
  transient property which can now be dynamically enabled/disabled per
  object.

* Add new API getFullName() to obtain full quanlified name of the property.
  Implemented by Document, DocumentObject, and also
  ViewProviderDocumentObject if future patch

DocumentObject and FeaturePython are modified to accommondate the
dynamic property changes.

Removed get/setCustomAttribute() implementation from DocumentObjectPy,
and rely on PropertyContainerPy for the implementation, because of the
additional dynamic property support in property container.

Gui::ViewProviderDocumentObject, which is derived from
PropertyContainer, is also modified accordingly
2019-08-17 14:52:09 +02:00
luz.paz
6031223ebe Weekly misc. typo fixes 2018-03-05 09:25:48 -05:00
wmayer
2059d47e2c move encodeAttribute from Property to Persitence to avoid code duplication 2017-11-26 18:38:45 +01:00
wmayer
3b957a12b5 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
8032a7a492 replace hard-coded values with enum values 2017-05-30 15:21:23 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
DeepSOIC
369a7032b4 App::Property: add methods to get/set read-onlyness 2016-08-08 21:47:45 +03:00
wmayer
e4768c1c75 + fix clang warning: -Woverloaded-virtual 2015-10-02 20:42:16 +02:00
Eivind Kvedalen
722a40dd41 Added Expression classes to App directory. Added Expression interface to Property base class. 2015-09-21 14:51:02 +02:00
wmayer
d71d8943cb + handle single quote when writing XML 2015-07-30 11:52:50 +02:00
Eivind Kvedalen
e70b859395 Made Property::encodeAttribute static. 2015-02-13 21:53:56 +01:00
wmayer
cc775f9254 + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
07c64e206d + encode CR and LF for XML 2014-06-14 18:04:19 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00