Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::PropertyOwner Class Referenceabstract
+ Inheritance diagram for inviwo::PropertyOwner:

Public Types

using iterator = std::vector<Property*>::iterator
 
using const_iterator = std::vector<Property*>::const_iterator
 

Public Member Functions

virtual ~PropertyOwner ()
 Removes all properties and notifies its observers of the removal.
 
virtual void addProperty (Property *property, bool owner=true)
 
virtual void addProperty (Property &property)
 
virtual PropertyaddProperty (std::unique_ptr< Property > property)
 
template<typename... Ts>
void addProperties (Ts &... properties)
 
virtual void insertProperty (size_t index, Property *property, bool owner=true)
 insert property property at position index If index is not valid, the property is appended.
 
virtual void insertProperty (size_t index, Property &property)
 insert property property at position index If index is not valid, the property is appended.
 
virtual PropertyinsertProperty (size_t index, std::unique_ptr< Property > property)
 insert property property at position index If index is not valid, the property is appended.
 
virtual PropertyremoveProperty (std::string_view identifier)
 
virtual PropertyremoveProperty (Property *property)
 
virtual PropertyremoveProperty (Property &property)
 
virtual PropertyremoveProperty (size_t index)
 remove property referred to by index
 
virtual bool move (Property *property, size_t newIndex)
 
virtual void clear ()
 Remove all properties; Owned properties will be deleted.
 
virtual const std::string & getIdentifier () const
 
const std::vector< Property * > & getProperties () const
 
const std::vector< CompositeProperty * > & getCompositeProperties () const
 
std::vector< Property * > getPropertiesRecursive () const
 
std::vector< Property * > & getPropertiesRecursive (std::vector< Property * > &destination) const
 
PropertygetPropertyByIdentifier (std::string_view identifier, bool recursiveSearch=false) const
 
PropertygetPropertyByPath (std::string_view path) const
 
template<class T >
std::vector< T * > getPropertiesByType (bool recursiveSearch=false) const
 
bool empty () const
 
size_t size () const
 
Propertyoperator[] (size_t)
 
const Propertyoperator[] (size_t) const
 
const_iterator find (Property *property) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
virtual bool isValid () const
 
virtual void setValid ()
 
InvalidationLevel getInvalidationLevel () const
 
virtual void invalidate (InvalidationLevel invalidationLevel, Property *modifiedProperty)
 
virtual ProcessorgetProcessor ()
 
virtual const ProcessorgetProcessor () const
 
virtual const PropertyOwnergetOwner () const
 
virtual PropertyOwnergetOwner ()
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
virtual void setAllPropertiesCurrentStateAsDefault ()
 
virtual void resetAllProperties ()
 
virtual void invokeEvent (Event *event) override
 
virtual InviwoApplicationgetInviwoApplication ()=0
 
- Public Member Functions inherited from inviwo::PropertyOwnerObservable
void notifyObserversWillAddProperty (PropertyOwner *owner, Property *property, size_t index)
 
void notifyObserversDidAddProperty (Property *property, size_t index)
 
void notifyObserversWillRemoveProperty (Property *property, size_t index)
 
void notifyObserversDidRemoveProperty (PropertyOwner *owner, Property *property, size_t index)
 
- Public Member Functions inherited from inviwo::Observable< PropertyOwnerObserver >
 Observable (const Observable< PropertyOwnerObserver > &other)
 
 Observable (Observable< PropertyOwnerObserver > &&other) noexcept
 
Observable< PropertyOwnerObserver > & operator= (const Observable< PropertyOwnerObserver > &other)
 
Observable< PropertyOwnerObserver > & operator= (Observable< PropertyOwnerObserver > &&other) noexcept
 
void addObserver (PropertyOwnerObserver *observer)
 
void removeObserver (PropertyOwnerObserver *observer)
 
virtual void startBlockingNotifications () override final
 
virtual void stopBlockingNotifications () override final
 
- Public Member Functions inherited from inviwo::ObservableInterface
- Public Member Functions inherited from inviwo::Serializable
- Public Member Functions inherited from inviwo::EventListener

Protected Member Functions

 PropertyOwner (const PropertyOwner &rhs)
 
PropertyOwneroperator= (const PropertyOwner &that)=delete
 
void forEachProperty (std::function< void(Property &)> callback, bool recursiveSearch=false) const
 
- Protected Member Functions inherited from inviwo::Observable< PropertyOwnerObserver >
void forEachObserver (C callback)
 
- Protected Member Functions inherited from inviwo::ObservableInterface
void addObservationHelper (Observer *observer)
 
void removeObservationHelper (Observer *observer)
 

Protected Attributes

std::vector< Property * > properties_
 
std::vector< EventProperty * > eventProperties_
 
std::vector< CompositeProperty * > compositeProperties_
 
std::vector< std::unique_ptr< Property > > ownedProperties_
 

Member Function Documentation

◆ addProperty() [1/2]

virtual void inviwo::PropertyOwner::addProperty ( Property & property)
virtual

Reimplemented in inviwo::ListProperty.

◆ addProperty() [2/2]

virtual void inviwo::PropertyOwner::addProperty ( Property * property,
bool owner = true )
virtual

Reimplemented in inviwo::ListProperty.

◆ clear()

virtual void inviwo::PropertyOwner::clear ( )
virtual

Remove all properties; Owned properties will be deleted.

Reimplemented in inviwo::ListProperty.

◆ deserialize()

virtual void inviwo::PropertyOwner::deserialize ( Deserializer & d)
overridevirtual

Implements inviwo::Serializable.

◆ insertProperty() [1/3]

virtual void inviwo::PropertyOwner::insertProperty ( size_t index,
Property & property )
virtual

insert property property at position index If index is not valid, the property is appended.

Parameters
indexinsertion point for property
propertyproperty to be inserted

Reimplemented in inviwo::ListProperty.

◆ insertProperty() [2/3]

virtual void inviwo::PropertyOwner::insertProperty ( size_t index,
Property * property,
bool owner = true )
virtual

insert property property at position index If index is not valid, the property is appended.

Parameters
indexinsertion point for property
propertyproperty to be inserted
ownerPropertyOwner will take ownership of the property if true

Reimplemented in inviwo::ListProperty.

◆ insertProperty() [3/3]

virtual Property * inviwo::PropertyOwner::insertProperty ( size_t index,
std::unique_ptr< Property > property )
virtual

insert property property at position index If index is not valid, the property is appended.

Parameters
indexinsertion point for property
propertyproperty to be inserted

◆ invalidate()

virtual void inviwo::PropertyOwner::invalidate ( InvalidationLevel invalidationLevel,
Property * modifiedProperty )
virtual

◆ invokeEvent()

virtual void inviwo::PropertyOwner::invokeEvent ( Event * event)
overridevirtual

Reimplemented from inviwo::EventListener.

◆ removeProperty()

virtual Property * inviwo::PropertyOwner::removeProperty ( size_t index)
virtual

remove property referred to by index

Parameters
indexindex of property to be removed
Exceptions
RangeExceptionif index is not valid

Reimplemented in inviwo::ListProperty.

◆ serialize()

virtual void inviwo::PropertyOwner::serialize ( Serializer & s) const
overridevirtual

Implements inviwo::Serializable.

◆ setValid()

virtual void inviwo::PropertyOwner::setValid ( )
virtual

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