Lumiera  0.pre.03
»edit your freedom«
DelStash Class Reference

#include "lib/del-stash.hpp"

Description

Manage a collection of deleter functions.

This component can memorise addresses and deleter functions and trigger deletion of single objects, or delete all objects on demand or automatically on shutdown.

Warning
clients must not add a given object more than once

Definition at line 65 of file del-stash.hpp.

Public Member Functions

 DelStash (size_t elms_to_reserve=0)
 
template<typename TY >
void kill (TY *obj)
 
template<typename TY >
void kill (TY &obj)
 
void killAll ()
 
template<typename TY >
void manage (TY *obj)
 
template<typename TY >
void manage (TY &obj)
 
void manage (void *obj, KillFun *customDeleter)
 
size_t size () const
 

Classes

class  Killer
 

Private Types

typedef std::vector< KillerKillers
 
typedef void KillFun(void *)
 

Private Member Functions

Killers::iterator findEntry (const void *obj)
 
bool isRegistered (const void *objAddress)
 
void triggerKill (void *objAddress)
 
- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Static Private Member Functions

template<typename X >
static void how_to_kill (void *subject)
 trampoline function to invoke destructor of the specific target type
 

Private Attributes

Killers killers_
 
+ Inheritance diagram for DelStash:
+ Collaboration diagram for DelStash:

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