Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
ElementTracker< ELM > Class Template Reference

#include "lib/element-tracker.hpp"

Description

template<typename ELM>
class lib::ElementTracker< ELM >

Registry for tracking object instances.

Custom implementation of the RefArray interface, based on a vector. Especially used by the Session to keep track of all timelines and sequences. Typically, ELM will inherit from AutoRegistered<ELM>, which in turn will invoke the registration/deregistration. Because of the smart-ptr-from-this problem, removal takes a direct reference, as opposed to a smart-ptr.

Note
ELM is required to provide an equality test. Depending on the semantics of this equality, registration might behave surprisingly, as previously registered equivalent instances will be deregistered prior to appending the new instance.

Definition at line 81 of file element-tracker.hpp.

Public Member Functions

 ~ElementTracker ()
 
void clear ()
 
void append (P< ELM > const &asset)
 
void remove (ELM const &asset)
 
bool isRegistered (ELM const &asset) const
 

Private Types

using _Vec = std::vector< P< ELM > >
 
using Iter = _Vec::iterator
 
using CIter = _Vec::const_iterator
 

Static Private Member Functions

static void unlink_it (P< ELM > &elm)
 

Constructor & Destructor Documentation

◆ ~ElementTracker()

template<typename ELM >
~ElementTracker ( )
inline

Definition at line 89 of file element-tracker.hpp.

References ElementTracker< ELM >::clear().

+ Here is the call graph for this function:

Member Typedef Documentation

◆ _Vec

template<typename ELM >
using _Vec = std::vector<P<ELM> >
private

Definition at line 84 of file element-tracker.hpp.

◆ Iter

template<typename ELM >
using Iter = _Vec::iterator
private

Definition at line 85 of file element-tracker.hpp.

◆ CIter

template<typename ELM >
using CIter = _Vec::const_iterator
private

Definition at line 86 of file element-tracker.hpp.

Member Function Documentation

◆ clear()

template<typename ELM >
void clear ( )
inline

Definition at line 96 of file element-tracker.hpp.

References util::for_each(), and ElementTracker< ELM >::unlink_it().

Referenced by ElementTracker< ELM >::~ElementTracker().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ append()

template<typename ELM >
void append ( P< ELM > const &  asset)
inline

Definition at line 106 of file element-tracker.hpp.

References ElementTracker< ELM >::remove().

+ Here is the call graph for this function:

◆ remove()

template<typename ELM >
void remove ( ELM const &  asset)
inline

Definition at line 114 of file element-tracker.hpp.

Referenced by ElementTracker< ELM >::append().

+ Here is the caller graph for this function:

◆ isRegistered()

template<typename ELM >
bool isRegistered ( ELM const &  asset) const
inline

Definition at line 126 of file element-tracker.hpp.

◆ unlink_it()

template<typename ELM >
static void unlink_it ( P< ELM > &  elm)
inlinestaticprivate

Definition at line 138 of file element-tracker.hpp.

Referenced by ElementTracker< ELM >::clear().

+ Here is the caller graph for this function:
+ Inheritance diagram for ElementTracker< ELM >:
+ Collaboration diagram for ElementTracker< ELM >:

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