Commit Graph

17 Commits

Author SHA1 Message Date
luz.paz
7af7c10cf1 Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Zheng, Lei
a4028b0bd5 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
3a1a6eb7d8 Fix typos in src/App 2019-08-17 15:32:48 +02:00
Zheng, Lei
be6ec3fdfc 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
bb9d49dd18 Weekly misc. typo fixes 2018-03-05 09:25:48 -05:00
wmayer
1a6e5db7f6 move encodeAttribute from Property to Persitence to avoid code duplication 2017-11-26 18:38:45 +01:00
wmayer
4d63e9a4c4 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
c4cb4518ba replace hard-coded values with enum values 2017-05-30 15:21:23 +02:00
wmayer
fb7094bf31 use specialized exception classes 2017-04-28 18:49:11 +02:00
DeepSOIC
c74a7b5010 App::Property: add methods to get/set read-onlyness 2016-08-08 21:47:45 +03:00
wmayer
2acb38daa7 + fix clang warning: -Woverloaded-virtual 2015-10-02 20:42:16 +02:00
Eivind Kvedalen
ae388d26ea Added Expression classes to App directory. Added Expression interface to Property base class. 2015-09-21 14:51:02 +02:00
wmayer
7d7c8e6991 + handle single quote when writing XML 2015-07-30 11:52:50 +02:00
Eivind Kvedalen
53083e091c Made Property::encodeAttribute static. 2015-02-13 21:53:56 +01:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
bb9db0b129 + 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