Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 81 of file special-job-fun.hpp.

Classes

class  SpecialExecutor
 

Public Member Functions

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

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.
 
 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)
 
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)
 
 operator bool () const
 
bool isValid () const
 
Handleactivate (SpecialFunPrototype *impl, DEL whenDead)
 Activation of the handle by the managing service.
 
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.
 
- Protected Attributes inherited from Handle< SpecialFunPrototype >
SmPtr smPtr_
 

Constructor & Destructor Documentation

◆ SpecialJobFun() [1/2]

SpecialJobFun ( )
default

◆ SpecialJobFun() [2/2]

template<class FUN , typename = disable_if_self<SpecialJobFun, FUN>>
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 160 of file special-job-fun.hpp.

Member Typedef Documentation

◆ _Handle

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

Member Function Documentation

◆ operator bool()

operator bool ( ) const
inlineexplicit

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

References SpecialJobFun::remainingInvocations().

+ Here is the call graph for this function:

◆ operator JobClosure &()

operator JobClosure & ( ) const
inline

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

References Handle< SpecialFunPrototype >::impl().

+ Here is the call graph for this function:

◆ remainingInvocations()

uint remainingInvocations ( ) const
inline

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

References Handle< SpecialFunPrototype >::impl(), and Handle< SpecialFunPrototype >::isValid().

Referenced by SpecialJobFun::operator bool().

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

◆ use_count()

long use_count ( ) const
inline

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

References Handle< SpecialFunPrototype >::smPtr_.

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

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