Kanzi  3.9.7
Kanzi Engine API
kanzi::PropertyObject Class Reference

PropertyObject is the base class that supports setting and retrieving of property types. More...

#include <kanzi/core/property/property_object.hpp>

Inheritance diagram for kanzi::PropertyObject:
[legend]

Public Types

typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 

Public Member Functions

template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier without notifying handlers. More...
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 Returns the begin iterator to the internal property storage container. More...
 
PropertyStorageContainer::const_iterator beginPropertyStorage () const
 Returns the begin iterator to the internal property storage container. More...
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object. More...
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object. More...
 
PropertyStorageContainer::iterator endPropertyStorage ()
 Returns the end iterator to the internal property storage container. More...
 
PropertyStorageContainer::const_iterator endPropertyStorage () const
 Returns the end iterator to the internal property storage container. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property type. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers. More...
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const
 Gets number of current notification handlers for given property type. More...
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers. More...
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property. More...
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property. More...
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value. More...
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Virtual function to handle property change notifications. More...
 
 PropertyObject ()
 
void removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties)
 Remove all KZB properties that are not included in a given set. More...
 
void removeKzbProperties ()
 Remove all KZB properties. More...
 
template<typename DataType >
void removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property. More...
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property type. More...
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
KZ_DEPRECATED void validatePropertyModifiers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers. More...
 
void validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers. More...
 
virtual ~PropertyObject ()
 

Protected Member Functions

AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Acquires a local value source entry that is free for the assignment of a value. More...
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
template<typename DataType >
void addPropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Adds a property modifier entry to the property modifier stack and validates them. More...
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 Internally adds a property value source. More...
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 Internally adds a property value source. More...
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &otherPropertyStorage)
 Copy local value from property storage. More...
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the property storage for given property type descriptor. More...
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation. More...
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByNameAndDataType (string_view name, PropertyDataType dataType) const
 Finds a property type descriptor by name and data type. More...
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByQualifiedNameAndDataType (string_view qualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names. More...
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names. More...
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the top-level value source for a given property descriptor. More...
 
virtual void notifyPropertyHandlers (PropertyStoragePtr &storagePtr, PropertyNotificationReason reason)
 Notifies all property handlers on a property storage. More...
 
void onCopy (const PropertyObject &other)
 
void removeLocalValue (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Removes a local value from the given property storage. More...
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 Removes a property value source. More...
 
void validatePropertyModifiers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers without notifying handlers. More...
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers and notifies handlers. More...
 

Detailed Description

PropertyObject is the base class that supports setting and retrieving of property types.

See PropertyType, AbstractPropertyType, DynamicPropertyType.

Member Typedef Documentation

typedef PropertyStorageContainer::iterator kanzi::PropertyObject::PropertyStorageIterator
typedef PropertyStorageContainer::const_iterator kanzi::PropertyObject::PropertyStorageConstIterator
typedef PropertyStorageContainer::reverse_iterator kanzi::PropertyObject::PropertyStorageReverseIterator

Constructor & Destructor Documentation

kanzi::PropertyObject::PropertyObject ( )
explicit
virtual kanzi::PropertyObject::~PropertyObject ( )
virtual

Member Function Documentation

template<typename DataType >
void kanzi::PropertyObject::setProperty ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Traits::ParameterType  value 
)
inline

Sets the local value of a property type.

Parameters
propertyTypeThe property type identifying the property to set.
valueThe value to set.
void kanzi::PropertyObject::removeKzbProperties ( flat_set< AbstractPropertyType > *  keepProperties)

Remove all KZB properties that are not included in a given set.

Property types marked with KZU_PROPERTY_MANAGER_FLAG_KEEP_DURING_PATCHING are not removed.

Parameters
keepPropertiesSet of properties to keep.
void kanzi::PropertyObject::removeKzbProperties ( )
inline

Remove all KZB properties.

Property types marked with KZU_PROPERTY_MANAGER_FLAG_KEEP_DURING_PATCHING are not removed.

template<typename DataType >
PropertyType<DataType>::Traits::ReturnType kanzi::PropertyObject::getProperty ( const PropertyType< DataType > &  propertyType) const
inline

Returns the current value of a property type.

This function returns a value that is the result of the property system evaluating the inputs that can affect the values of properties. It calculates the final value by determining the base value of the property and applying existing modifiers to it.

Base value is affected by the following inputs where the highest entry in the list determines the base value:

  1. Local value set with setProperty or loaded from kzb
  2. Value set by a style affecting the property.
  3. Value defined by class metadata.

When the base value is determined the system applies modifiers to the value that can change the value or replace it completely. The following is the list of possible modifiers, where the order of evaluation is determined by the order the modifiers were added or applied.

  1. Values defined is states of state manager.
  2. Animations.

If no inputs to the property value can be established the system returns the value registered in the property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.
template<typename DataType >
optional<typename PropertyType<DataType>::Traits::ReturnType> kanzi::PropertyObject::getOptionalProperty ( const PropertyType< DataType > &  propertyType) const
inline

Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value.

If there is no value sources or modifiers, nullopt is returned.

See also
getProperty()
Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns an optional value that is left empty if the property was not found.
template<typename DataType >
PropertyType<DataType>::Traits::ReturnType kanzi::PropertyObject::getPropertyBase ( const PropertyType< DataType > &  propertyType) const
inline

Returns the current value of a property disregarding modifiers.

Base value is affected by the following inputs where the highest entry in the list determines the base value:

  1. Local value set with setProperty or loaded from kzb
  2. Value set by a style affecting the property.
  3. Value defined by class metadata.

Modifiers are not applied, the highest-priority base value is returned.

If no inputs to the property value can be established the system returns the value default value from property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.
template<typename DataType >
optional<typename PropertyType<DataType>::Traits::ReturnType> kanzi::PropertyObject::getOptionalPropertyBase ( const PropertyType< DataType > &  propertyType) const
inline

Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.

If there is no value sources, nullopt is returned.

See also
getPropertyBase()

If no inputs to the property value can be established the system returns the value default value from property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.
template<typename DataType >
void kanzi::PropertyObject::setAbstractProperty ( AbstractPropertyType  abstractPropertyType,
typename PropertyType< DataType >::Traits::ParameterType  value 
)
inline
template<typename DataType >
PropertyType<DataType>::Traits::ReturnType kanzi::PropertyObject::getAbstractProperty ( AbstractPropertyType  abstractPropertyType) const
inline
template<typename DataType >
PropertyType<DataType>::Traits::ReturnType kanzi::PropertyObject::getAbstractPropertyBase ( AbstractPropertyType  abstractPropertyType) const
inline
template<typename DataType >
optional<typename PropertyType<DataType>::Traits::ReturnType> kanzi::PropertyObject::getOptionalAbstractProperty ( AbstractPropertyType  abstractPropertyType) const
inline
void kanzi::PropertyObject::setPropertyFlag ( AbstractPropertyType  propertyType,
uint32_t  flag 
)
bool kanzi::PropertyObject::isPropertyFlagSet ( AbstractPropertyType  propertyType,
uint32_t  flag 
) const
void kanzi::PropertyObject::clearPropertyFlag ( AbstractPropertyType  propertyType,
uint32_t  flag 
)
bool kanzi::PropertyObject::hasValue ( AbstractPropertyType  propertyType) const

Evaluates whether there are any inputs into the property value.

Both value sources and modifiers are taken into account.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there are inputs into the property value, false otherwise.
bool kanzi::PropertyObject::hasBaseValue ( AbstractPropertyType  propertyType) const

Evaluates whether there are any inputs into the property value, disregarding modifiers.

Does not take modifiers into account.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there are inputs into the property value, false otherwise.
bool kanzi::PropertyObject::hasLocalValue ( AbstractPropertyType  propertyType) const

Evaluates whether there is a local value set for the property.

Local values are set with setProperty or loaded from kzb.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there is a local value for the property.
bool kanzi::PropertyObject::hasNonClassValue ( AbstractPropertyType  propertyType) const

Evaluates whether there is a value of any precedence higher than class default value set for the property.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there is a non-class value for the property.
void kanzi::PropertyObject::removeLocalValue ( AbstractPropertyType  propertyType)

Removes the local value associated with the property.

Parameters
propertyTypeThe property type identifying the property to evaluate.
void kanzi::PropertyObject::copyLocalValue ( const PropertyObject other,
AbstractPropertyType  propertyType 
)

Copies local value of single property from another object.

Parameters
otherThe object from which to copy the value.
propertyTypeProperty type to copy.
void kanzi::PropertyObject::copyLocalValues ( const PropertyObject other)

Copies all local values from another object.

Parameters
otherThe object from which to copy the values.
template<typename DataType >
void kanzi::PropertyObject::addPropertyValueSource ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource *  valueSource,
PropertyValuePrecedence  precedence,
void *  ownerPointer 
)
inline
template<typename DataType >
void kanzi::PropertyObject::addPropertyValueSource ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource *  valueSource,
PropertyValuePrecedence  precedence,
AbstractPropertyTypeDescriptor::ValueSourceOwner owner 
)
inline
template<typename DataType >
void kanzi::PropertyObject::removePropertyValueSource ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource *  valueSource,
void *  ownerPointer 
)
inline
template<typename DataType >
void kanzi::PropertyObject::removeLocalPropertyValueSource ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource *  valueSource,
void *  ownerPointer 
)
inline
template<typename DataType >
void kanzi::PropertyObject::addPropertyModifier ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback  callback,
void *  owner 
)
inline
template<typename DataType >
void kanzi::PropertyObject::addPropertyModifierWithoutNotifyingHandlers ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback  callback,
void *  owner 
)
inline

Adds a property modifier without notifying handlers.

Use this function only when you want to omit the notification. For example, omit the notification when you add a modifier that is not connected.

Parameters
propertyTypeProperty type to add.
callbackModifier callback to install.
ownerOwner of the modifier.
Since
Kanzi 3.9.7
template<typename DataType >
void kanzi::PropertyObject::removePropertyModifier ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback  callback,
void *  owner 
)
inline
KZ_DEPRECATED void kanzi::PropertyObject::validatePropertyModifiers ( AbstractPropertyType  propertyType)

Validates property modifiers and notifies handlers.

Parameters
propertyTypeProperty type to validate.
Deprecated:
In Kanzi 3.9.7. Use validatePropertyModifiersAndNotifyHandlers() instead.
template<typename DataType >
void kanzi::PropertyObject::addPropertyNotificationHandler ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::NotificationCallback  callback,
void *  owner 
)
inline
template<typename DataType >
void kanzi::PropertyObject::removePropertyNotificationHandler ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::NotificationCallback  callback,
void *  owner 
)
inline
template<typename DataType >
size_t kanzi::PropertyObject::getPropertyNotificationHandlerCount ( const PropertyType< DataType > &  propertyType) const
inline

Gets number of current notification handlers for given property type.

PropertyStorageContainer::iterator kanzi::PropertyObject::beginPropertyStorage ( )
inline

Returns the begin iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the beginning of property storage.
PropertyStorageContainer::const_iterator kanzi::PropertyObject::beginPropertyStorage ( ) const
inline

Returns the begin iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the beginning of property storage.
PropertyStorageContainer::iterator kanzi::PropertyObject::endPropertyStorage ( )
inline

Returns the end iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the end of property storage.
PropertyStorageContainer::const_iterator kanzi::PropertyObject::endPropertyStorage ( ) const
inline

Returns the end iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the end of property storage.
void kanzi::PropertyObject::validatePropertyModifiersAndNotifyHandlers ( AbstractPropertyType  propertyType)

Validates property modifiers and notifies handlers.

Parameters
propertyTypeProperty type to validate.
Since
Kanzi 3.9.7
template<typename DataType >
void kanzi::PropertyObject::addPropertyModifierBase ( const PropertyType< DataType > &  propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback  callback,
void *  owner,
bool  notify 
)
inlineprotected

Adds a property modifier entry to the property modifier stack and validates them.

Parameters
propertyTypeProperty type to add.
callbackModifier callback to install.
ownerOwner of the modifier.
notifyTo notify property handlers, set to true. To omit notification, set to false.
Since
Kanzi 3.9.7
void kanzi::PropertyObject::addPropertyValueSource ( AbstractPropertyTypeDescriptor descriptor,
AbstractPropertyTypeDescriptor::ValueSource valueSource,
PropertyValuePrecedence  precedence,
void *  ownerPointer 
)
protected

Internally adds a property value source.

Parameters
descriptorProperty type descriptor.
valueSourceValue source to add.
precedencePrecedence of the value source.
ownerPointerRaw pointer to owner for the value source. Can be 0.
void kanzi::PropertyObject::addPropertyValueSource ( AbstractPropertyTypeDescriptor descriptor,
AbstractPropertyTypeDescriptor::ValueSource valueSource,
PropertyValuePrecedence  precedence,
AbstractPropertyTypeDescriptor::ValueSourceOwner owner 
)
protected

Internally adds a property value source.

Parameters
descriptorProperty type descriptor.
valueSourceValue source to add.
precedencePrecedence of the value source.
ownerValue source owner.
void kanzi::PropertyObject::removeLocalValue ( AbstractPropertyTypeDescriptor descriptor,
PropertyStoragePtr propertyStorage 
)
protected

Removes a local value from the given property storage.

Called internally by other functions.

Parameters
descriptorDescriptor owning the property storage.
propertyStorageProperty storage to remove value from.
void kanzi::PropertyObject::removePropertyValueSource ( AbstractPropertyTypeDescriptor descriptor,
AbstractPropertyTypeDescriptor::ValueSource valueSource,
void *  owner 
)
protected

Removes a property value source.

Parameters
descriptorDescriptor to remove from.
valueSourceValue source installed.
ownerValue source owner pointer.
AbstractPropertyTypeDescriptor::ValueSource* kanzi::PropertyObject::getTopValueSource ( AbstractPropertyTypeDescriptor descriptor) const
protected

Gets the top-level value source for a given property descriptor.

The top-level value source is the last value source before property modifiers.

Parameters
descriptorProperty descriptor.
Returns
Top-level value source.
AbstractPropertyTypeDescriptor::ValueSource* kanzi::PropertyObject::getFinalValueSource ( AbstractPropertyTypeDescriptor descriptor) const
protected
AbstractPropertyTypeDescriptor::ValueSource* kanzi::PropertyObject::getNonClassValueSource ( AbstractPropertyTypeDescriptor descriptor) const
protected
AbstractPropertyTypeDescriptor::ValueSource* kanzi::PropertyObject::getClassValueSource ( AbstractPropertyTypeDescriptor descriptor) const
protected
AbstractPropertyTypeDescriptor::ValueSourceEntry* kanzi::PropertyObject::constructLocalValueSourceEntry ( AbstractPropertyTypeDescriptor descriptor,
AbstractPropertyTypeDescriptor::PropertyStorage propertyStorage 
)
protected
AbstractPropertyTypeDescriptor::ValueSourceEntry* kanzi::PropertyObject::acquireLocalValueSourceEntry ( AbstractPropertyTypeDescriptor descriptor,
PropertyStoragePtr propertyStorage 
)
protected

Acquires a local value source entry that is free for the assignment of a value.

Value source entries with an owner may not allow the value source to be reused for assignment. In this case, an existing value source is deleted. If no applicable local value source entry is available, a new entry is constructed.

Parameters
descriptorProperty type descriptor.
propertyStorageProperty storage from which to acquire the entry.
Returns
Reusable value source entry or a newly created one if a reusable entry was not available.
AbstractPropertyTypeDescriptor::PropertyStorage* kanzi::PropertyObject::findPropertyStorage ( AbstractPropertyTypeDescriptor descriptor) const
protected

Gets the property storage for given property type descriptor.

This function is for internal use.

Parameters
descriptorProperty type descriptor.
Returns
Pointer to property storage or nullptr.
PropertyStoragePtr kanzi::PropertyObject::findPropertyStoragePtr ( AbstractPropertyTypeDescriptor descriptor) const
protected

Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation.

Parameters
descriptorDescriptor to look with.
Returns
Intrusive pointer to property storage.
PropertyStoragePtr kanzi::PropertyObject::constructPropertyStorage ( AbstractPropertyTypeDescriptor descriptor)
protected
PropertyStoragePtr kanzi::PropertyObject::acquirePropertyStorage ( AbstractPropertyTypeDescriptor descriptor)
protected
AbstractPropertyTypeDescriptor::ModifierStorage* kanzi::PropertyObject::acquireModifierStorage ( AbstractPropertyTypeDescriptor descriptor,
AbstractPropertyTypeDescriptor::PropertyStorage propertyStorage 
)
protected
AbstractPropertyTypeDescriptor::ModifierStorage* kanzi::PropertyObject::findModifierStorage ( AbstractPropertyTypeDescriptor descriptor)
protected
AbstractPropertyTypeDescriptor::NotificationStorage* kanzi::PropertyObject::acquireNotificationStorage ( AbstractPropertyTypeDescriptor descriptor)
protected
AbstractPropertyTypeDescriptor::NotificationStorage* kanzi::PropertyObject::findNotificationStorage ( AbstractPropertyTypeDescriptor descriptor) const
protected
AbstractPropertyTypeDescriptor* kanzi::PropertyObject::findPropertyTypeDescriptorByNameAndDataType ( string_view  name,
PropertyDataType  dataType 
) const
protected

Finds a property type descriptor by name and data type.

The property type descriptor must exist in the property object. The name may be either an unqualified name or a full name.

Parameters
nameName to match.
dataTypeData type to match.
Returns
Descriptor if found.
AbstractPropertyTypeDescriptor* kanzi::PropertyObject::findPropertyTypeDescriptorByQualifiedNameAndDataType ( string_view  qualifiedName,
PropertyDataType  dataType 
) const
protected

Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names.

Parameters
qualifiedNameQualified name to match.
dataTypeData type to match.
Returns
Descriptor if found.
AbstractPropertyTypeDescriptor* kanzi::PropertyObject::findPropertyTypeDescriptorByUnqualifiedNameAndDataType ( string_view  unqualifiedName,
PropertyDataType  dataType 
) const
protected

Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names.

Parameters
unqualifiedNameUnqualified name to match.
dataTypeData type to match.
Returns
Descriptor if found.
void kanzi::PropertyObject::validatePropertyModifiersAndNotifyHandlers ( PropertyStoragePtr propertyStorage)
protected

Validates property modifiers and notifies handlers.

Internally calls validatePropertyModifiers().

Parameters
propertyStoragePointer to the property storage that contains the modifiers.
void kanzi::PropertyObject::validatePropertyModifiers ( PropertyStoragePtr propertyStorage)
protected

Validates property modifiers without notifying handlers.

Used internally by Kanzi to validate the property modifier stack.

Parameters
propertyStoragePointer to the property storage that contains the modifiers.
Since
Kanzi 3.9.7
void kanzi::PropertyObject::copyLocalValue ( const AbstractPropertyTypeDescriptor::PropertyStorage otherPropertyStorage)
protected

Copy local value from property storage.

Parameters
otherPropertyStorageProperty storage from which to copy.
virtual void kanzi::PropertyObject::notifyPropertyHandlers ( PropertyStoragePtr storagePtr,
PropertyNotificationReason  reason 
)
protectedvirtual

Notifies all property handlers on a property storage.

Hold a reference to the property storage before you call this function. The notification handlers can otherwise cause the storage to become invalid.

Parameters
storagePtrPointer to the property storage.
reasonReason for the notification.

Reimplemented in kanzi::Node.

void kanzi::PropertyObject::onCopy ( const PropertyObject other)
protected

The documentation for this class was generated from the following file: