swift
Public Member Functions | Protected Member Functions | List of all members
swift::misc::shared_state::CListObserver< T, U > Class Template Referenceabstract

Base class for an object that shares state with a corresponding CListMutator subclass object. More...

Inheritance diagram for swift::misc::shared_state::CListObserver< T, U >:
[legend]

Public Member Functions

virtual void initialize (IDataLink *dataLink)
 Subscribe using the given transport mechanism.
 
void setFilter (const U &filter)
 Set filter to choose list elements.
 
allValues () const
 Get list value containing all elements matching the filter.
 
virtual void onElementAdded (const typename T::value_type &value)=0
 Called when an element matching the filter is added to the list.
 
virtual void onElementsReplaced (const T &values)=0
 Called when the whole list is updated wholesale.
 

Protected Member Functions

 CListObserver (QObject *parent)
 Constructor.
 
- Protected Member Functions inherited from swift::misc::shared_state::CGenericListObserver
 CGenericListObserver (QObject *parent)
 Constructor.
 
void setFilter (const CVariant &filter)
 Set list filter as variant.
 
CVariantList allValues () const
 Get filtered list value as variant list.
 
int cleanValues ()
 Remove any old values that no longer match the filter.
 

Detailed Description

template<typename T, typename U = CAnyMatch>
class swift::misc::shared_state::CListObserver< T, U >

Base class for an object that shares state with a corresponding CListMutator subclass object.

Template Parameters
TDatatype encapsulating the state to be shared.
UDatatype describing a filter to apply to the list.

Definition at line 62 of file listobserver.h.


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