46 #ifndef VAULT_GEAR_SPECIAL_JOB_FUN_H 47 #define VAULT_GEAR_SPECIAL_JOB_FUN_H 71 using std::make_shared;
81 virtual uint remainingInvocations()
const =0;
106 : fun_{move (theFun)}
115 REQUIRE (instance->selfHook_);
116 REQUIRE (instance->remainingInvocations());
118 return instance->selfHook_;
123 remainingInvocations()
const 132 invokeJobOperation (JobParameter param)
override 134 if (not remainingInvocations())
135 throw err::Logic{
"invoking deceased SpecialJobFun" 136 ,err::LUMIERA_ERROR_LIFECYCLE};
144 diagnostic()
const override 146 return _Fmt{
"SpecialJob(%d)-%s"}
148 % util::showHash(
size_t(
this), 2);
167 template<
class FUN,
typename =disable_if_self<SpecialJobFun, FUN>>
176 operator bool()
const 178 return 0 < remainingInvocations();
183 REQUIRE (
operator bool());
184 return _Handle::impl();
188 remainingInvocations()
const 190 return _Handle::isValid()? _Handle::impl().remainingInvocations()
197 return _Handle::smPtr_.use_count();
Generic opaque reference counting handle, for accessing a service and managing its lifecycle...
Interface: JobFunctor configured to invoke a function a limited number of times.
Generic implementation of a JobFunctor to perform no calculations.
SpecialJobFun(FUN &&someFun)
Establish a new SpecialJobFun variation directly by wrapping a given functor.
Front-end to configure a special job functor for one-time use.
A front-end for using printf-style formatting.
Derived specific exceptions within Lumiera's exception hierarchy.
void close()
deactivate this handle, so it isn't tied any longer to the associated implementation or service objec...
Interface of the closure for frame rendering jobs.
friend _Handle & selfAttached(SpecialExecutor *instance)
A generic opaque handle to an implementation entity, including lifecycle management.
a family of time value like entities and their relationships.
Vault-Layer implementation namespace root.
Stub/Test implementation of the JobFunctor interface for a render job to do nothing at all ...