Lumiera  0.pre.03
»edit your freedom«
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 92 of file element-tracker.hpp.

Public Member Functions

void append (P< ELM > const &asset)
 
void clear ()
 
bool isRegistered (ELM const &asset) const
 
void remove (ELM const &asset)
 
- Public Member Functions inherited from RefArrayVector< P< ELM > >
 RefArrayVector (Size_t n, Val_t const &v=Val_t())
 
 RefArrayVector (Vect const &ref)
 
- Public Member Functions inherited from RefArrayVectorWrapper< P< ELM >, P< ELM > >
 RefArrayVectorWrapper (Tab toWrap)
 
virtual P< ELM > const & operator[] (size_t i) const
 
virtual size_t size () const
 
- Public Member Functions inherited from RefArray< P< ELM > >
virtual ~RefArray ()
 this is an interface
 

Private Types

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

Static Private Member Functions

static void unlink_it (P< ELM > &elm)
 
+ Inheritance diagram for ElementTracker< ELM >:
+ Collaboration diagram for ElementTracker< ELM >:

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