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

#include "vault/gear/special-job-fun.hpp"

Description

Front-end to configure a special job functor for one-time use.

Definition at line 90 of file special-job-fun.hpp.

Public Member Functions

template<class FUN , typename = disable_if_self<SpecialJobFun, FUN>>
 SpecialJobFun (FUN &&someFun)
 Establish a new SpecialJobFun variation directly by wrapping a given functor. More...
 
 operator bool () const
 
 operator JobClosure & () const
 
uint remainingInvocations () const
 
long use_count () const
 

Classes

class  SpecialExecutor
 

Private Types

using _Handle = lib::Handle< SpecialFunPrototype >
 

Additional Inherited Members

- Protected Types inherited from Handle< SpecialFunPrototype >
typedef std::shared_ptr< SpecialFunPrototype > SmPtr
 
- Protected Member Functions inherited from Handle< SpecialFunPrototype >
SpecialFunPrototype & impl () const
 
 Handle ()=default
 by default create an Null handle. More...
 
 Handle (SpecialFunPrototype *imp)
 directly establish handle from an implementation, which typically way just heap allocated beforehand.
 
 Handle (Handle const &r)=default
 
 Handle (Handle &&rr)=default
 
 Handle (shared_ptr< Y > const &r)
 
 Handle (shared_ptr< Y > &&srr)
 
 Handle (weak_ptr< Y > const &wr)
 
 Handle (unique_ptr< Y > &&urr)
 
Handleactivate (SpecialFunPrototype *impl, DEL whenDead)
 Activation of the handle by the managing service. More...
 
Handleactivate (shared_ptr< SpecialFunPrototype > const &impl)
 another way of activating a handle by sharing ownership with an existing smart-ptr
 
Handleactivate (shared_ptr< SpecialFunPrototype > &&impl)
 
void close ()
 deactivate this handle, so it isn't tied any longer to the associated implementation or service object. More...
 
bool isValid () const
 
 operator bool () const
 
Handleoperator= (Handle const &r)=default
 
Handleoperator= (Handle &&rr)=default
 
Handleoperator= (shared_ptr< Y > const &sr)
 
Handleoperator= (shared_ptr< Y > &&srr)
 
Handleoperator= (unique_ptr< Y > &&urr)
 
- Protected Attributes inherited from Handle< SpecialFunPrototype >
SmPtr smPtr_
 

Constructor & Destructor Documentation

◆ SpecialJobFun()

SpecialJobFun ( FUN &&  someFun)
inlineexplicit

Establish a new SpecialJobFun variation directly by wrapping a given functor.

The JobFunctor instance itself will be heap allocated.

Warning
while a direct reference to this JobFunctor can be obtained through conversion, this reference must not be used after invoking the job one single time; after that, this reference is dangling and using it further will lead to SEGFAULT or memory corruption.

Definition at line 169 of file special-job-fun.hpp.

+ Inheritance diagram for SpecialJobFun:
+ Collaboration diagram for SpecialJobFun:

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