Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
AutoRegistered< TAR > Class Template Reference

#include "lib/element-tracker.hpp"

Description

template<typename TAR>
class lib::AutoRegistered< TAR >

Helper mixin template for implementing a type intended to participate in automatic element tracking.

  • the element-tracking registry is accessed through the static functor getRegistry
  • a factory and a detach operation is provided, automatically handling registration. It is not mandatory to use this template, but types participating in automatic element tracking should provide equivalent functionality.

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

Public Types

typedef lib::ElementTracker< TAR > Registry
 
typedef lib::OptionalRef< RegistryRegistryLink
 
typedef P< TAR > PTarget
 

Static Public Member Functions

static PTarget create ()
 factory for creating smart-ptr managed TAR instances, automatically registered with the element-tracking registry.
 
static void setRegistryInstance (Registry &registry_to_use)
 
static void deactivateRegistryLink ()
 
static bool is_attached_to (Registry const &someRegistry)
 

Public Member Functions

void detach ()
 detach this element from the element-tracking registry.
 

Static Protected Attributes

static RegistryLink getRegistry
 storage for the functor to link an AutoRegistered entity to the corresponding registration service
 

Member Typedef Documentation

◆ Registry

template<typename TAR >
typedef lib::ElementTracker<TAR> Registry

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

◆ RegistryLink

template<typename TAR >
typedef lib::OptionalRef<Registry> RegistryLink

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

◆ PTarget

template<typename TAR >
typedef P<TAR> PTarget

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

Member Function Documentation

◆ detach()

template<typename TAR >
void detach ( )
inline

detach this element from the element-tracking registry.

Note
called when destroying an non-empty registry.

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

References AutoRegistered< TAR >::getRegistry.

Referenced by Sequence::unlink(), and Timeline::unlink().

+ Here is the caller graph for this function:

◆ create()

template<typename TAR >
static PTarget create ( )
inlinestatic

factory for creating smart-ptr managed TAR instances, automatically registered with the element-tracking registry.

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

References AutoRegistered< TAR >::getRegistry.

◆ setRegistryInstance()

template<typename TAR >
static void setRegistryInstance ( Registry registry_to_use)
inlinestatic

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

References AutoRegistered< TAR >::getRegistry, and OptionalRef< T >::link_to().

+ Here is the call graph for this function:

◆ deactivateRegistryLink()

template<typename TAR >
static void deactivateRegistryLink ( )
inlinestatic

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

References OptionalRef< T >::clear(), and AutoRegistered< TAR >::getRegistry.

+ Here is the call graph for this function:

◆ is_attached_to()

template<typename TAR >
static bool is_attached_to ( Registry const &  someRegistry)
inlinestatic

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

References AutoRegistered< TAR >::getRegistry, and OptionalRef< T >::points_to().

+ Here is the call graph for this function:

Member Data Documentation

◆ getRegistry

template<typename TAR >
AutoRegistered< TAR >::RegistryLink getRegistry
staticprotected
+ Inheritance diagram for AutoRegistered< TAR >:
+ Collaboration diagram for AutoRegistered< TAR >:

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